Re: Flex regular expression problem

Laurence Finston <lfinsto1@gwdg.de>
24 Aug 2005 18:26:30 -0400

          From comp.compilers

Related articles
Flex regular expression problem pocm@sat.inesc-id.pt (pmatos) (2005-08-21)
Re: Flex regular expression problem Meyer-Eltz@t-online.de (Detlef Meyer-Eltz) (2005-08-24)
Re: Flex regular expression problem lfinsto1@gwdg.de (Laurence Finston) (2005-08-24)
Re: Flex regular expression problem bonzini@gnu.org (Paolo Bonzini) (2005-08-31)
| List of all articles for this month |

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

> 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.