Arithmetic evaluation: Difference between revisions

Content added Content deleted
No edit summary
m (→‎{{header|Python}}: Another case problem)
Line 1,332: Line 1,332:
There are python modules, such as Ply, which facilitate the implementation of parsers. This example, however, uses only standard Python with the parser having
There are python modules, such as Ply, which facilitate the implementation of parsers. This example, however, uses only standard Python with the parser having
two stacks, one for operators, one for operands.
two stacks, one for operators, one for operands.
<lang Python>import operator
<lang python>import operator


class AstNode(object):
class AstNode(object):