[antlr-interest] Error: Declared package doesn't match expected package
Sailesh Kandula
skandula at asu.edu
Fri Sep 18 20:58:43 PDT 2009
While building my first ANTLR project SimpleCalc.g i ran into the error:
The declared package "annexextension.SimpleCalc" does not match expected
package "".
SimpleCalc.g :
header {
package annexextension.SimpleCalc;
}
{
import antlr.TokenStreamRecognitionException;
}
class SimpleCalcParser extends Parser ;
expr : term ( ( PLUS | MINUS ) term )* ;
term : factor ( ( MULT | DIV ) factor )* ;
factor : NUMBER ;
class SimpleLexer extends Lexer;
...
If i remove the package declaration it builds(of course). I read past
threads and FAQ but couldn't find any pointers. I'm using Eclipse 3.5.1 with
org.antlr.ui (version 4.1.0) plugin. Any hints?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090918/2443ebba/attachment.html
More information about the antlr-interest
mailing list