wpp: Fix expansion of macro bodies following the parsing of a numerical digit.
authorRob Shearman <robertshearman@gmail.com>
Mon, 18 Jan 2010 22:15:09 +0000 (22:15 +0000)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 19 Jan 2010 11:43:30 +0000 (12:43 +0100)
commit3fecf9ddcd5dd8ac8d3b48106e8eab7e3e303371
treed05d8bdc70682d14b1bdab5ff9ab87ff084ba7b0
parent226998185f0dda70efb0a726139bb1a41abfb60d
wpp: Fix expansion of macro bodies following the parsing of a numerical digit.

The current regular expression causes all letters and spaces (among
other characters) following the appearance of a digit to be classed as
a literal, including C identifiers which may need to be expanded.

The expression was intended to catch the remaining characters that
were not covered by the first two rules ([^a-zA-Z0-9'"#/\\\n]+ and
{cident}), but the [^'"#/\\\n] expression caught {cident} as well.
While one solution would have been just to catch the expression that
match [a-zA-Z0-9]* that don't match {cident}, i.e. [0-9][a-zA-Z0-9]*,
in the interests of avoiding unnecessary multiple LITERALs being
generated and then combined during parsing the expression also
includes the first expression, making it
[0-9][a-zA-Z0-9]*[^a-zA-Z0-9'"#/\\\n]*.
libs/wpp/ppl.l