javacc-7.0.1.test.cpp.Template.jj 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.
options
{
STATIC = true;
OUTPUT_LANGUAGE = "c++";
OUTPUT_DIRECTORY = "gen";
PARSER_INCLUDES = "ASTdcl.h";
NAMESPACE = "SPL";
}
PARSER_BEGIN(Parser)
//template AST::CompilationUnit* Parser::CompilationUnit();
PARSER_END(Parser)
SKIP : { " " | "\t" | "\n" | "\r" | "\f" }
TOKEN : { < INT : "int" > | < BOOL : "boolean" > }
TOKEN : { < INTEGER_LITERAL : ( )+ > }
TOKEN :
{
< IDENTIFIER : ( | )* >
| < #LETTER : ["a"-"z", "A"-"Z"] >
| < #DIGIT : ["0"-"9"] >
}
template
AST::CompilationUnit* CompilationUnit() :
{}
{
< INT > { return nullptr; }
}