[antlr-interest] token nondeterminism problem

Michael Brade brade at informatik.uni-muenchen.de
Sun Mar 5 08:09:20 PST 2006

On Sunday 05 March 2006 14:47, manuel aldana wrote:
> But how is it possible to put lexing-rules to the tokens definition? e.g.:
> -------------------------------
> class MyLexer extends Lexer;
> tokens{
>    BLA;
use this instead:
or choose different token names.
> }
> BLA='x'|'y';
and then delete this rule.

> ID options{testLiterals:true}: ('a'..'z')+;
> ------------------------------------------

> I know compiler is raising error this way. Setting BLA 'protected' would
> compile and avoid nondeterminism warnings but I would like to have rules
> in the tokens definition. is that possible?

Hope this helps,
Michael Brade;                 KDE Developer, Student of Computer Science
  |-mail: echo brade !#|tr -d "c oh"|s\e\d 's/e/\@/2;s/$/.org/;s/bra/k/2'
  °--web: http://www.kde.org/people/michaelb.html

KDE 4: Beyond Your Expectations
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20060305/cff2ab62/attachment.bin

More information about the antlr-interest mailing list