[antlr-interest] help with literals

VLADIMIR KONSTANTINOV Vladimir.Konstantinov at rogers.com
Thu Nov 13 11:03:03 PST 2003


I want to specify literals ("min", "max", "sum" etc) in my grammar.
 
I am getting :
 line 1:1: unexpected char: 'm'
 line 1:2: unexpected char: 'i'
 line 1:3: unexpected char: 'n'
when testing with the following expression: "min;" 
 
This a stripped down version of my grammar:
 
///
class ExpressionParser extends Parser;
options { importVocab=Expression; }
calc: fun END;
fun: "min";
 
class ExpressionLexer extends Lexer ;
options{ exportVocab=Expression;}
END: ';'
///
 
I am missing something very basic, but can't figure it out myself.
 
Thanks in advance.


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list