Recursive Descent Parsing in Java
Recursive Descent Parsing
Consider the following BNF grammar:
A -> I = E
E -> T + E | T - E | T
T -> P * T | P / T | P
P -> I | L | (E)
I -> a | b | ... | y | z
L -> 0 | 1 | ... | 8 | 9
Using the technique described in class implement a recursive descent parser that recognizes strings in this language. Input should be from a file called input.dat and output should be to the console. An example session might look like this:
String read from file: a=a+b-c*d
The string "a=a+b-c*d" is in the language.
String read from file: a=a**b++c
The string "a=a**b++c" is not in the language.
im really confused on what exactly i am suppose to do.
I don't know where to start and I am unsure of what this program is suppose to do. PLEASE HELP!!