|Flex and EOF firstname.lastname@example.org (Matteo Corti) (2006-04-08)|
|Re: Flex and EOF email@example.com (Chris Dodd) (2006-04-09)|
|Re: Flex and EOF firstname.lastname@example.org (Russ Cox) (2006-04-09)|
|Re: Flex and EOF email@example.com (Michael Tiomkin) (2006-04-09)|
|Re: Flex and EOF DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2006-04-10)|
|Re: Flex and EOF firstname.lastname@example.org (Matteo Corti) (2006-04-12)|
|Re: Flex and EOF email@example.com (Ira Baxter) (2006-04-12)|
|From:||"Russ Cox" <firstname.lastname@example.org>|
|Date:||9 Apr 2006 16:59:57 -0400|
> I have a rule in my lexer to skip shell-like comments:
> #.*$ /* skip comments */
> which works just fine if there is \n at the end of the line.
> If the comment is in the last line wich is terminated by EOF the rule
> obviously fails.
Since . doesn't match \n, wouldn't #.* work just fine in either case?
And then you get the \n as a separate token, which might be beneficial
for line counting purposes anyway.
Return to the
Search the comp.compilers archives again.