> On 1 Dec 2024, at 16:07, Maury Markowitz <[email protected]> wrote: > > But many dialects allow strings to be unquoted as long as they do not contain > a line end, colon or comma: > > DATA 10,20,HELLO,WORLD!
One way is to use context switches; see the Flex and Bison manuals.
In the .l file one has say:
%x DATA_decl
%%
DATA { BEGIN(DATA_decl); }
<DATA_decl>{
…
\n { BEGIN(INITIAL); }
}
with … being special syntax for this context, and exiting the context on \n.
