[antlr-interest] options and tokens

Shaun Bogan smbogan at gmail.com
Tue Jan 15 00:10:29 PST 2008


My grammar starts out something like this:

grammar fqs;

tokens {
   IMAGINARY;
}

options {
  output=AST;
}

However, I get a an error that options is unexpected.  How do I create
imaginary tokens for my rewrites if I can't use both options and
tokens?  If I flip the order, it always complains about the second
one.  Am I missing something here?  This is my first time trying to
use AST rewrite rules.

Thanks for any help,
S M Bogan


More information about the antlr-interest mailing list