This is the original grammar that is used in the example parser. It is shown in the Java CUP specification format that is required to use this particular visualization tool. Visual YACC in Java uses Java CUP and JLEX as the parser and lexer, respectively.
terminal PLUS, MINUS, TIMES, DIVIDE;
terminal Integer NUMBER;
non terminal statement, expr_part;
non terminal Integer expr, term, factor;
statement ::= statement expr_part
expr_part ::= expr:e ;
expr ::= expr:e1 PLUS term:e2
term ::= term:e1 TIMES factor:e2
factor ::= NUMBER:n