Re: little lex question

"john43" <>
12 Sep 2002 13:42:18 -0400

          From comp.compilers

Related articles
little lex question (Bart Vandewoestyne) (2002-09-12)
Re: little lex question (john43) (2002-09-12)
| List of all articles for this month |

From: "john43" <>
Newsgroups: comp.compilers
Date: 12 Sep 2002 13:42:18 -0400
Organization: Compilers Central
References: 02-09-074
Keywords: lex
Posted-Date: 12 Sep 2002 13:42:18 EDT

> I think I might be able to solve this problem by using 'start
> conditions', but i have not figured out yet how to do this in the most
> efficient way. (actually, i haven't figured out *any* way yet ;-)

Hi, You have just stumbled upon the implementation problem of
tokenizing input without context. Start conditions are a leg up. You
have the right approach. Seek out flex for more syntactic sugar with
the start conditions. Also, there is no need to insert printf's if you
use the --debug option. If your input is nothing more than a few <DT>,
etc. tags, then flex with start conditions will do fine. Otherwise,
consider a parser generator. -JM

Post a followup to this message

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