[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
small pascal
Hi,
I am new to compiler design. I was wondering if somebody could help me. I
am going through the small pascal compiler example. Here is a small test
program
program test;
var x:integer;
begin
x:=2;
writeln(x);
.
It fails on first semicolon complaing that the semicolon expected, whereas
it is there. Grammar looks fine. I regenerated the lexer.dat file. Still
giving the same problem. I debugged the program and noticed that in method
public Start parse() throws ParserException, LexerException, IOException
(parser.java) when it switch on the action[0] it leads to the exception.
Now, I cannot view the action table. Is there any way to view and modify
this table.
Please advise
Ali