On Thu, Oct 21, 2010 at 9:13 AM, Cremerius Ralf (DGS-EC/ECC3) <
[email protected]> wrote:

> ...
>
> SOMETOKEN
>        :       ('a')*;
>
> ...
>
> public static void main(String[] args) throws Exception
> {
>        ANTLRStringStream       input   = new ANTLRStringStream("<");
>        problemLexer            lexer   = new problemLexer(input);
>        CommonTokenStream       tokens  = new CommonTokenStream(lexer);
>        problemParser           parser  = new problemParser(tokens);
>        parser.main_rule();
> }
>
>
> ----------------------------------------------------------------------------------------------------------------------------------------
>
> => Did I make some beginner's error and I'm just not able to see it?
>
>
The rule:

SOMETOKEN
  :  ('a')*
  ;



matches empty strings, and there are an infinite amount of them before your
input "<". This is probably the cause of the behavior you're
witnessing. Change it into 'a'+ and see if things run differently.

Regards,

Bart.

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to