|MetaCharacters as Literals in Lex email@example.com (1990-02-15)|
|Date:||Thu, 15 Feb 90 04:01:24 CST|
|From:||firstname.lastname@example.org (Tony Jones)|
In Lex, how do I include the metacharacter '*' as a literal character in
the left hand side of a rule ?
I am trying to do the following ...
Adding the '*' increases %a's and %o's 10 times, and takes 1/2 an hour to
compile the generated 'C'.
Also, correct input such as '/usr/bin/*' fails to match the above rule,
examples such as '/usr/bin/bc' still match correctly
Can anybody tell me what I'm doing wrong (if anything), and point me in the
direction of a good fix.
Cray Research (UK), Ltd. +44 344 485971 x2177/2207
UUCP : (UK) ...!ukc!crayuk!ant (US) ...!cray!hall!ant
ARPA : (UK) email@example.com (US) firstname.lastname@example.org
[Looks to me like you've found yet another lex bug; there is an example
in the SysV.3.2 programmer's guide that specifically says that stars in
character classes are supposed to work. You might try the faster and less
buggy flex instead. -John]
Return to the
Search the comp.compilers archives again.