[antlr-interest] Newlines (yet again)
Terence Parr
parrt at cs.usfca.edu
Tue Jan 18 10:58:27 PST 2005
On Jan 18, 2005, at 10:45 AM, Paul J. Lucas wrote:
> You definitely do not need "\r\n" for Windows. Since the '\n'
> is always present and required for a newline, why do you care
> whether a '\r' came before it? Answer: you don't care what
> came before it.
You still have to consume it. The implicit assumption here is that
some other construct matches it. For example, the (..)* loop in a
single-line // comment. So, on the end you can just look for '\n'. :)
Ter
More information about the antlr-interest
mailing list