Parsing nested function calls using pyparsing

前端 未结 3 1212
时光取名叫无心
时光取名叫无心 2020-12-30 08:33

I\'m trying to use pyparsing to parse function calls in the form:

f(x, y)

That\'s easy. But since it\'s a recursive-descent p

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-30 09:08

    The definition of arg should be arranged with the item that starts with another at the left, so it is matched preferentially:

    arg = expression | identifier | integer
    

提交回复
热议问题