All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javacc-7.0.1.test.cpp.Template.jj Maven / Gradle / Ivy

There is a newer version: 7.0.13
Show newest version
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;  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy