Expression parser for polyhedron dice simulator