394041424344454647
tokenizer.ordinaryChar('/'); } public IExpression parse() throws IOException { tokenizer.nextToken(); final IExpression e = term(); expect(TT_EOF); return e; }
4546474849505152535455
expect(TT_EOF); return e; } private IExpression term() throws IOException { IExpression e = product(); while (true) { if (accept('+')) { e = new Add(e, product()); } else if (accept('-')) { e = new Sub(e, product());
5859606162636465666768
} } } private IExpression product() throws IOException { IExpression e = factor(); while (true) { if (accept('*')) { e = new Mul(e, factor()); } else if (accept('/')) { e = new Div(e, factor());
7172737475767778798081
} } } private IExpression factor() throws IOException { final IExpression e; if (accept('(')) { e = term(); expect(')'); } else { expect(TT_NUMBER);