My name is Moises Pantoja and I am a computer science major at Sac State. I have a heavy interest in finances and pass my time with my family. I am pursuing a career in data mining.
Grammar for Arithmatic Expression
EXP ::= EXP + TERM | EXP - TERM | TERM
TERM ::= TERM * FACTOR | TERM / FACTOR | FACTOR
FACTOR ::= (EXP) | DIGIT
DIGIT ::= 0|1|2|3|4|5|6|7|8|9
Example of some valid strings:
1-2*2$
(1-2)*3$
2/3$
Example of some invalid strings:
22-3$
2/$
(1+)$
Enter string using the numbers 0 to 9, and the
symbols +, -, *, /, (, and ).
Your end of string variable will be dollar sign ($).
When you click on 'submit', it will check whether entered string is valid or not for a given grammar.
output