[antlr-interest] No lexer generated

Sam Harwell sam at tunnelvisionlabs.com
Thu Nov 15 17:05:36 PST 2012

It should generate the lexer as long as the composite grammar has at least one lesser rule defined directly in it (not imported). You can create a dummy fragment rule for this to keep out from affecting the behavior of your lexer . This is an ANTLR 3 limitation.


----- Reply message -----
From: "Juancarlo Añez" <apalala at gmail.com>
Date: Thu, Nov 15, 2012 6:59 pm
Subject: [antlr-interest] No lexer generated
To: "antlr-interest at antlr.org" <antlr-interest at antlr.org>

So? Is there any reason why ANTLR won't generate a lexer for a combined

On Thu, Nov 15, 2012 at 12:38 PM, Juancarlo Añez <apalala at gmail.com> wrote:

> I have a grammar that starts like this:
> grammar COBOL;
> options {
>     language  = Python;
>     backtrack = false;
>     output    = AST;
>     ASTLabelType=CommonTree;
> }
> import Tokens, Lexical;
> And no lexer or code for Tokens or Lexical is generated.
> I have the exact same setup for another grammar, and it works.
> What can be happening this time?
> --
> Juancarlo *Añez*

Juancarlo *Añez*

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address

More information about the antlr-interest mailing list