[antlr-interest] New Guy Question...
George Spears
george at woh.rr.com
Sun Jun 5 06:00:21 PDT 2011
Hi everyone,
Just dipping my toes in the ANTLR waters do to speak.. In other words, I am
definitely new at this, so a couple quick questions.
1) Is this list/email address the best way to ask questions?
2) Any idea when "The Definitive ANTLR book" will be updated? It
appears to be based on 3.0, whereas the ANTLR product is 3.3. I still
purchased the book, and it is helping tremendously.
3) My language of choice is Delphi. Does anyone have a sample grammar
and the Delphi equiv of Test.java that they could send me.? (George at woh
dot rr dot com)
4) How do I handle case insensitivity? For example, assume in the
following grammar that the token 'CALL' can be all caps, all lower letters,
or a mix. How do I recognize it?
grammar T;
/** Match things like "call foo;" */
CALL : 'CALL';
ID : ('a'..'z'|'A'..'Z')+ ;
INT : '0'..'9'+ ;
NEWLINE:'\r'? '\n' ;
WS : (' '|'\t')+ { $channel=HIDDEN; } ;
MULT: '*';
ASSIGN: '=';
PLUS: '+';
MINUS: '-';
r : CALL ID ';' {System.out.println("invoke "+$ID.text);} ;
Thanks,
George Spears
More information about the antlr-interest
mailing list