|Flex and EOF email@example.com (Matteo Corti) (2006-04-08)|
|Re: Flex and EOF firstname.lastname@example.org (Chris Dodd) (2006-04-09)|
|Re: Flex and EOF email@example.com (Russ Cox) (2006-04-09)|
|Re: Flex and EOF firstname.lastname@example.org (Michael Tiomkin) (2006-04-09)|
|Re: Flex and EOF DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2006-04-10)|
|Re: Flex and EOF email@example.com (Matteo Corti) (2006-04-12)|
|Re: Flex and EOF firstname.lastname@example.org (Ira Baxter) (2006-04-12)|
|From:||Hans-Peter Diettrich <DrDiettrich@compuserve.de>|
|Date:||10 Apr 2006 00:16:50 -0400|
|Posted-Date:||10 Apr 2006 00:16:50 EDT|
Matteo Corti wrote:
> 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.
This is one of the reasons why e.g. C syntax (of the preprocessor)
requires that source files must end with a newline character. Do you
have full control of your syntax?
Return to the
Search the comp.compilers archives again.