[antlr-interest] @lexer::header{} or @parser::header{} doesn't work in v3

Peizhao Hu peizhao at itee.uq.edu.au
Mon Oct 15 23:50:52 PDT 2007


Hi All,

I tried the following statements in my grammar. when I compiled it, it 
throws out error saying "unexpected token: options {", which is the next 
statement of setting options


@parser::header{
package com.nicta.safe.ACoMS.sensor.teds;
}
@lexer::header{
package com.nicta.safe.ACoMS.sensor.teds;
}

options {
	output=AST; /* output AST */
	k=2;
}

I tried to replace package with import statement, but the same problem.


-- 
regards;

Peizhao


More information about the antlr-interest mailing list