(flex.info.gz) How can I make REJECT cascade across start condition boundaries?
Info Catalog
(flex.info.gz) How can I match text only at the end of a file?
(flex.info.gz) FAQ
(flex.info.gz) Why cant I use fast or full tables with interactive mode?
How can I make REJECT cascade across start condition boundaries?
================================================================
You can do this as follows. Suppose you have a start condition `A', and
after exhausting all of the possible matches in `<A>', you want to try
matches in `<INITIAL>'. Then you could use the following:
%x A
%%
<A>rule_that_is_long ...; REJECT;
<A>rule ...; REJECT; /* shorter rule */
<A>etc.
...
<A>.|\n {
/* Shortest and last rule in <A>, so
* cascaded REJECTs will eventually
* wind up matching this rule. We want
* to now switch to the initial state
* and try matching from there instead.
*/
yyless(0); /* put back matched text */
BEGIN(INITIAL);
}
Info Catalog
(flex.info.gz) How can I match text only at the end of a file?
(flex.info.gz) FAQ
(flex.info.gz) Why cant I use fast or full tables with interactive mode?
automatically generated byinfo2html