[antlr-interest] BOF or BOL (Beginning of file/line)

Warren Falk warren-antlr.org at warrenfalk.com
Sun May 31 17:39:59 PDT 2009


For a grammar I'm working on, I need the lexer to output a token for
the beginning of (almost) every line.  Adding an emit() to a custom
NEWLINE rule is simple enough, but what is the correct way to emit the
token at the beginning of the file?

Thanks in advance


More information about the antlr-interest mailing list