A simple calculator with guisan and LL grammar.
- SDL 2.0+
- SDL2_image
- SDL2_ttf
- SDL2_mixer
- Guisan(built-in)
Raw Grammar:
E-->E+T|E-T|T
T-->N*T|N/T|N
N-->M^N|M
M-->(E)
|sin(E)
|cos(E)
|ln(E)
|lg(E)
|sqrt(E)
|tan(E)
|number
Eliminate the left recursion:
E-->Te
e-->+Te|-Te|void
T-->Nt
t-->*Nt|/Nt|void
N-->Mn
n-->^N|void
M-->(E)
|sin(E)
|cos(E)
|ln(E)
|lg(E)
|sqrt(E)
|tan(E)
|number