On Mon, Jan 31, 2011 at 6:34 PM, Jim Idle <[email protected]> wrote:
> It is much better to add a NL to the end of the input if it is not present
> as the ambiguities are complicated and pointless without that, but with
> this simple example you can do:
<snip..>

Jim,

   I've seen you make this suggestion several times.  Is there a
canonical or simple way to do that inside the Lexer?  Or is the
easiest way to do that to monkey with the stream to ensure it kicks
out a potentially missing character if it isn't the last character
before the EOF?

I've had this problem, and I just had my NL be ('\n'|EOF) and moved
along, for the grammars I had it was 'good enough'.  It would seem
much easier, and cleaner to fix up it up as you suggest, just not sure
the cleanest way to go about it.

Kirby

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