DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

(flex.info.gz) How can I match text only at the end of a file?

Info Catalog (flex.info.gz) Can I build nested parsers that work with the same input file? (flex.info.gz) FAQ (flex.info.gz) How can I make REJECT cascade across start condition boundaries?
 
 How can I match text only at the end of a file?
 ===============================================
 
 There is no way to write a rule which is "match this text, but only if
 it comes at the end of the file".  You can fake it, though, if you
 happen to have a character lying around that you don't allow in your
 input.  Then you redefine `YY_INPUT' to call your own routine which, if
 it sees an `EOF', returns the magic character first (and remembers to
 return a real `EOF' next time it's called).  Then you could write:
 
 
      <COMMENT>(.|\n)*{EOF_CHAR}    /* saw comment at EOF */
 
Info Catalog (flex.info.gz) Can I build nested parsers that work with the same input file? (flex.info.gz) FAQ (flex.info.gz) How can I make REJECT cascade across start condition boundaries?
automatically generated byinfo2html