Subject: Re: Makefile.mbr problem - fix?
To: Darrin B. Jewell <email@example.com>
From: David Laight <firstname.lastname@example.org>
Date: 05/06/2003 08:10:50
On Mon, May 05, 2003 at 06:06:55PM -0400, Darrin B. Jewell wrote:
> Cool. I wouldn't bother with the double quotes and just include the
> literal string in the regexp.
Yes - those quotes aren't needed...
> Also, does the use of strtoul introduce any errors trying to parse
> a number that is too large to fit in an int yylval?
yes - I should use strtol()
> I haven't looked at lex input in a while, but I assume it doesn't
> matter that 0 matches both your decimal and octal regexps. (The
> octal regexp could be easily adjusted to be 0[0-7]+ if it mattered)
As you pointed out (and I found in testing) the '*' is needed to parse '0'.
I'm fairly sure that lex does 'first match' - otherwise the other tokens
wouldn't be parsed correctly.
David Laight: email@example.com