[antlr-interest] Can subrules be set to 'n-to-m'?

Terence Parr parrt at cs.usfca.edu
Sat Mar 26 17:48:35 PST 2005


On Mar 26, 2005, at 1:42 PM, John D. Mitchell wrote:
>> That may be so, but I'd kill for a lexer right now that could handle
>> common left prefixes without requiring syntactic predicates (like I 
>> want
>> a load of exception-based backtracking on every token). There are some
>> clever things you can do with a LL(k) based lexer but there are also 
>> some
>> very basic things that you can do with lex that are an absolute 
>> nightmare
>> with antlr. Hopefully the DFA-based LL(*) algorithm for antlr3 will 
>> sort
>> most of this.
>
> Yeah, the LL* stuff seems to kick ass on that sort of thing.
>
> Do you have some good examples of some easy-using-lex constructs 
> readily at
> hand?  Those would be good for us to keep in mind as we beat on Antlr 
> v3.

FYI, for the new java.g used in version 3.0 antlr, I just took the 
language spec's definition of float etc... and stuck in.  ANTLR said 
"ok" :)  Hooray!

Ter





More information about the antlr-interest mailing list