(f)lex string with double quotes

Joop <gkokmdam@zonnet.nl>
23 Sep 2003 12:59:56 -0400

          From comp.compilers

Related articles
(f)lex string with double quotes gkokmdam@zonnet.nl (Joop) (2003-09-23)
Re: (f)lex string with double quotes jjan@cs.rug.nl (J.H.Jongejan) (2003-09-27)
| List of all articles for this month |
From: Joop <gkokmdam@zonnet.nl>
Newsgroups: comp.compilers
Date: 23 Sep 2003 12:59:56 -0400
Organization: Planet Internet
Keywords: lex, question
Posted-Date: 23 Sep 2003 12:59:56 EDT

Hi all,
could anyone help me to a lex regular expression that will pick-up a
string of the format:
"Any text and a double quote like this "" and this too"
This is what some silly language uses and I need to read it with my
(f)lex program. I just don't know how to go about it.
wkr,
Gerke
[There's a bunch of ways to do it. The simplest is something like this:


\"([^")|\"\")*\"


but since strings can be long, I'd rather use start states to go into
a string scanning state and then back out. -John]



Post a followup to this message

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