Recursive expressions with pyparsing

后端 未结 2 1078
深忆病人
深忆病人 2021-01-05 22:04

I\'m trying to figure out how to do a left-associative expression where recursive (not-enclosed in anything) expressions are possible. For example, I\'d like to do:

2条回答
  •  攒了一身酷
    2021-01-05 22:12

    Pyparsing produces left parse trees. Add a semantic action to edit the parse tree right after expr has been parsed.

提交回复
热议问题