[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Somewhat newbie question: multiple lines in one token?
From: |
Robert Collins |
Subject: |
RE: Somewhat newbie question: multiple lines in one token? |
Date: |
Tue, 18 Jun 2002 09:02:18 +1000 |
> -----Original Message-----
> From: Hans Aberg [mailto:address@hidden
> Sent: Tuesday, 18 June 2002 3:50 AM
> To: Robert Collins
Thank you Hans & CrampyMan for your input. Your assistance allowed me to
isolate the problem.
I'm now happily using a single lex state to manage the multiple line
entries:
%x mlinestate
%%
"multipleline:" BEGIN(mlinestate);return MLINETAG;
<mlinestate>[^\n]* return STRING;
<mlinestate>\n return NL;
<mlinestate>\n+ BEGIN(INITIAL);return PARAGRAPH;
And it works great. The single \n rule is what I was missing before
(oops!).
Cheers,
Rob