i have problem with @members rule in ANTLR. I want overwrite default error handling, so i read http://www.antlr.org/wiki/display/ANTLR3/Error+reporting+and+recovery and write this simple code for my grammar:
@members {
def displayRecognitionError(self, tokenNames, e):
print 'Test'
}
I have no @lexer::members or @parser::members in my grammar. Code (python runtime) from this rule is included only in parser file, not in lexer. It is a bug? I think it is, @members should add content to both - lexer and parser according to documentation. I use Python runtime, 3.1.3.
Btw. is stackoverflow inline code work's for Opera?