[antlr-interest] separat lexer + parser grammars

Oliver Kowalke oliver.kowalke at gmx.de
Fri Feb 15 15:01:39 PST 2008


Hi,
I want to sepparat lexer and parser into different files.
I don't know where I've to put the tokens option.
tokens
{
        WORKFLOW = 'workflow';
}

If I put it into the lexer file I get:
literals are illegal in lexer tokens{} section: 'workflow'

I I put it into the parser grammar I get:
literal has no associated lexer rule: 'workflow'

Could you please give me an hint, please?

best regards,
Oliver


More information about the antlr-interest mailing list