DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

(flex.info.gz) How can I build a two-pass scanner?

Info Catalog (flex.info.gz) How can I expand macros in the input? (flex.info.gz) FAQ (flex.info.gz) How do I match any string not matched in the preceding rules?
 
 How can I build a two-pass scanner?
 ===================================
 
 One way to do it is to filter the first pass to a temporary file, then
 process the temporary file on the second pass. You will probably see a
 performance hit, due to all the disk I/O.
 
    When you need to look ahead far forward like this, it almost always
 means that the right solution is to build a parse tree of the entire
 input, then walk it after the parse in order to generate the output.
 In a sense, this is a two-pass approach, once through the text and once
 through the parse tree, but the performance hit for the latter is
 usually an order of magnitude smaller, since everything is already
 classified, in binary format, and residing in memory.
 
Info Catalog (flex.info.gz) How can I expand macros in the input? (flex.info.gz) FAQ (flex.info.gz) How do I match any string not matched in the preceding rules?
automatically generated byinfo2html