Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试创建一个后缀到中缀转换器,但我无法为后缀公式创建语法。我也找了一段时间没有成功。。
我可以使用什么语法来识别有效的后缀表达式?
我需要的标记是:、number和+( *pow )。^
number
+
*
^
我会建议
E ::= number | E E + | E E * | E E ^
在什么意义上有效?产生一个值?
B ::= number | B B O O ::= + | * | ^