Operator-precedence Parser
运算符优先级解析器(operator-precedence parser) 负责解析运算表达式,将人类可读的 中缀表达式 处理为便于处理计算的格式,比如 逆波兰表达式。
主要有三种算法 [1]:
- Shunting Yard
- top-down operator precedence (TDOP)
- 优先级爬升
补全算法
Wikipedia
In computer science, an operator precedence parser is a bottom-up parser that interprets an operator-precedence grammar. For example, most calculators use operator precedence parsers to convert from the human-readable infix notation relying on order of operations to a format that is optimized for evaluation such as Reverse Polish notation (RPN).[2]