Have you been stuck, trying to make an expression parser but you just can't? Well just put this in your parser gen, and you’ll be good to go!
Have you been stuck, trying to make an expression parser but you just
can’t? Well just put this in your parser gen, and you’ll be good to
go!
E→Eα→Eβ→Eα;Eβ(;E;)γσpre;Eσin;Eσpost;ϵ And to wrap it all up:
NΣS∈{E}∈γ∪σ∈σ and:
⟨N,Σ,R,S⟩
Where:
γσ=Terminal literals=⎩⎪⎨⎪⎧apreainapost=Prefix operators=Infix operators=Postfix operators
TIL greek letters make you look smart.