[antlr-interest] "prog : .+ ; " ==> "no viable alternative at character" (antlr-3.1.2)

Valery Khamenya khamenya at gmail.com
Sun Jan 31 14:46:15 PST 2010


Hi,

what's wrong with the following trivial lexer grammar?

  grammar Grammar;
  options {
language=Python;
 output=AST;
ASTLabelType=CommonTree;
  }
  prog : .+  ;

I am getting "no viable alternative at character ..." at every character of
input stream.

antlr-3.1.2

Of course I don't really need a 1-char chopping lexer. It is just a relevant
extraction from a real case grammar.

Comments and hints are welcome!

Best regards
--
Valery


More information about the antlr-interest mailing list