[antlr-interest] "unexpected token" error

togol machillan togolmach2 at lycos.com
Tue Mar 8 09:50:12 PST 2005


Another newbie question. I hope somebody can help me out here.

I have the following lexer rules (omitting some which are clear by name)

VALUE  options {testLiterals = true; }

FIGURE: ('-')? ((DIGIT)+ '.' (DIGIT)* | '.'(DIGIT)+ );


I want the ASSIGNMENT rule to match a token like MOLE-FRAC=1.0 or STOIC=IN, for example. But when I include this rule, the program throws the unexpected token: error at the point where first space character occurs in the input file. Is this due to some problem with the greedy nature of the the VALUE rule? 

Thanks in advance.


Togol Mach  
NEW! Lycos Dating Search. The only place to search multiple dating sites at once.

More information about the antlr-interest mailing list