options{DEBUG_PARSER = true; DEBUG_TOKEN_MANAGER = true;} PARSER_BEGIN(Calculator) public class Calculator { public static void main(String[] args) { try{ Calculator parser = new Calculator(System.in); parser.Start(); }catch (ParseException e){ System.out.println(e.getMessage()); } } } PARSER_END(Calculator) /** * For now only using the Hello World grammar */ SKIP : { " "|"\t"|"\n"|"\r" } TOKEN : { | | | ( ) + > } void Start() : { } { ()* }