parsimonious parser - error trying to parse assignment grammar
问题 I'm using the Python Parsimonious Parser to try to build an interpreter for a simple language I'm designing. I watched this tutorial video which was very helpful, and now I'm slowly modifying the code to match my own rules. I'm stuck on an assignment rule originally defined as: def assignment(self, node, children): 'assignment = lvalue "=" expr' lvalue, _, expr = children self.env[lvalue] = expr return expr I modified the rule slightly with the following grammar: def assignment(self, node,