[antlr-interest] ANTLRv3.1b2: Illegal output option on imported lexer grammar??

Francis ANDRE francis.andre.kampbell at orange.fr
Sun Aug 10 23:42:01 PDT 2008


Hi

With the starting composite grammar Cobol.g
grammar Cobol;
import identificationDivision=IdentificationDivision, 
cobolLexer=CobolLexerRules;


I got an illegal option output while the only output option in the 
CobolLexerRules.g is
lexer grammar CobolLexerRules;
options {
    k=2;
}


Here the ANTLR errput:
ANTLR Parser Generator  Version 3.1b2 (July 17, 2008)  1989-2008
warning(149): CobolLexerRules.g:0:0: rewrite syntax or operator with no 
output option; setting output=AST
error(133): CobolLexerRules.g:0:0: illegal option output

What should be the options for the lexer grammar??

cheers

FA




More information about the antlr-interest mailing list