I'm trying to create a postfix to infix converter, and I'm unable to create the grammar for postfix formulas. I've been also looking for it for a while without success..
What grammar could I use to recognize valid postfix expressions?
The tokens I need are: number
, +
, *
and ^
(pow).
I would suggest
E ::= number | E E + | E E * | E E ^
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With