Thanks Gavin,

Unfortunately my grammar is about 6500 lines long and already takes 
about 1 minute to generate the lexer and parser with backtracking turned 
on.  So as soon as I add the wildcard to the main loop, I get all kinds 
of  "createLookaheadDFA(Unknown Source): could not even do K=1 for 
decision..." errors during generation.

Yuri

Gavin Lambert wrote:
> At 06:49 13/11/2008, Yuri Tijerino wrote:
> >> What I really want is change the default behavior and throw
> >> away the tokens that cause the exception and continue
> >> parsing the input after those tokens as if it was a new
> >> input.  Is this even possible?
> [...]
> >Isn't this in a way what the Lexer does when trying to find
> >tokens based on EBNF rules?  How do I duplicate that behavior
> >in the parser rules so that it won't stop trying to match the
> >rest of the input when a rule partially matches something and
> >it can't recover automagically?
>
> You could try turning backtracking on, and have as your final alt 
> something that consumes a single token and then tries the standard 
> recognition again.  Something like this:
>
> start
>   :  ( somethingvalid |  somethingelse | . )* EOF
>   ;
>
>

List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org:8080/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