[antlr-interest] ANTLRWorks 1.4.2: Simple grammar doesn't work

Udo Weik WeikEngOff at aol.com
Tue Jul 19 08:39:49 PDT 2011


Hello,

what's wrong with the following grammar,
tested with: abcd


grammar Problem1b ;

fragment
Cl :  'a'..'z' ;
fragment
Cu :  'A'..'Z' ;
fragment
INT : '0'..'9' ;

id_Chars :               Cl | Cu ;
id_NumbersChars  : INT | Cl | Cu ;

test : id_Chars ( id_NumbersChars )* ;


My main problem is that every time I'm working with
ANTLRWorks 1.4.2 its behaviour is different. Now
I restartet ANTLRWorks and I got an error
[17:35:45] F:\ProgLang\Parsers\ANTLR3\Projects\Tutorial\Test\IntegerZero\output\__Test__.java:14: cannot find symbol
[17:35:45] symbol  : method Cl()
[17:35:45] location: class Problem1bParser
[17:35:45]             g.Cl();
[17:35:45]              ^
[17:35:45] 1 error

Some minutes ago the debugger blocked, before
only 'a' was recognized.


Many thanks and greetings
Udo


More information about the antlr-interest mailing list