javacc-7.0.1.examples.JavaGrammars.1.5.MyToken Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javacc Show documentation
Show all versions of javacc Show documentation
JavaCC is a parser/scanner generator for Java.
public class MyToken extends Token
{
/**
* Constructs a new token for the specified Image and Kind.
*/
public MyToken(int kind, String image)
{
this.kind = kind;
this.image = image;
}
int realKind = JavaParserConstants.GT;
/**
* Returns a new Token object.
*/
public static final Token newToken(int ofKind, String tokenImage)
{
return new MyToken(ofKind, tokenImage);
}
}