On Mon, Feb 22, 2010 at 6:21 PM, Jim Idle <[email protected]> wrote:

> It's not completely flawed. To do what you asked, you do not need to
> influence the lexer, just look ahead in the off-channel at certain points
> and change the channel of the SEMI back to the default if you wanted it to
> appear; but as I said, that is an awkward way to do it I think.
>
> Jim
>
>

My ideas was more or less that whenever I have ambigous syntax (with no
semicolons whatsoever in the parser)  I resolve problems using syntactic
predicates  taking "optional" parts of syntax (like semicolons) into
consideration. If syntactic predicate hit the optional part then it would
fail - meaning that separator divided potentially ambigous construct and it
is time to try the next alternative. It seemed clean to me, but you've made
me think about it again. I could use your suggestion to make semicolon
tokens reappear but how do I do this? CommonTokenStream does not seem to
provide any public method of inspecting non-default channels



-- 
Greetings
Marcin Rzeźnicki

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