Operator-precedence parser: Difference between revisions

Content deleted Content added
Added a missing period.
Without this modification, rhs := parse_expression_1(rhs, pred + 1) will be a guaranteed no-op due to the first check it makes, and the entire parsing will stuck forever.
Line 47:
than ''op''<nowiki>'</nowiki>s, or a right-associative operator
whose precedence is equal to ''op'''s
''rhs'' := ''parse_expression_1'' (''rhs'', precedence of ''op'' + (1 if ''lookahead'' precedence is greater, else 0))
''lookahead'' := peek next token
''lhs'' := the result of applying ''op'' with operands ''lhs'' and ''rhs''