Parse a list of expressions using pyparsing
问题 I'm trying to use pyparsing to parse simple basic program: import pyparsing as pp pp.ParserElement.setDefaultWhitespaceChars(" \t") EOL = pp.LineEnd().suppress() # Identifiers is a string + optional $ identifier = pp.Combine(pp.Word(pp.alphas) + pp.Optional("$")) # Literals (number or double quoted string) literal = pp.pyparsing_common.number | pp.dblQuotedString line_number = pp.pyparsing_common.integer function = pp.Forward() operand = function | identifier | literal expression = pp