Re: Flex regular expression problem

Laurence Finston <>
24 Aug 2005 18:26:30 -0400

          From comp.compilers

Related articles
Flex regular expression problem (pmatos) (2005-08-21)
Re: Flex regular expression problem (Detlef Meyer-Eltz) (2005-08-24)
Re: Flex regular expression problem (Laurence Finston) (2005-08-24)
Re: Flex regular expression problem (Paolo Bonzini) (2005-08-31)
| List of all articles for this month |

From: Laurence Finston <>
Newsgroups: comp.compilers
Date: 24 Aug 2005 18:26:30 -0400
Organization: GWDG, Goettingen
References: 05-08-079
Keywords: lex
Posted-Date: 24 Aug 2005 18:26:30 EDT

> but it never works as I expect. Any ideas?

You could use a start condition for strings. The scanner should enter it
when it scans the first double quote character and collect all characters
up to the closing double quote, at which point it should leave the start
condition. I would also implement a way of quoting
double quote characters, so that "\"" would be interpreted as a string
containing a double quote character, and not a string containing a
backslash followed by an opening double quote. You could also implement
special handling for other characters or sequences of characters.

Laurence Finston

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.