[antlr-interest] unexpected token: :

David Holroyd dave at badgers-in-foil.co.uk
Sat Aug 12 07:34:53 PDT 2006


I'm trying to convert a v2 grammar to v3.  I'm getting lots of errors
about ':' tokens.  Here's a fairly minimal testcase I've made while
trying to track this down:

  grammar AS3Parser;
  x : y | z ;
  y : "class" ;
  z : "package";

Here's the output I get,

ANTLR Parser Generator   Early Access Version 3.0b3 (July 21, 2006) 1989-2006
3:3: syntax error: antlr: src/antlr/org/asdt/core/internal/antlr/as3.g3.testcase:3:3: unexpected token: :
4:5: syntax error: antlr: src/antlr/org/asdt/core/internal/antlr/as3.g3.testcase:4:5: unexpected token: "package"
src/antlr/org/asdt/core/internal/antlr/as3.g3.testcase:2:9: reference to undefined rule: z
src/antlr/org/asdt/core/internal/antlr/as3.g3.testcase:2:5: reference to undefined rule: y

I'm sure it's something really obvious, but I just don't see it.


help!
dave

-- 
http://david.holroyd.me.uk/


More information about the antlr-interest mailing list