Repeat Example 2.36 using the grammar of Figure 2.15.
Consider the following grammar for a declaration list:
decl list −→ decl list decl ; | decl ;
decl −→ id : type
type −→ int | real | char
−→ array const .. const of type
−→ record decl list end
Construct the CFSM for this grammar. Use it to trace out a parse (as in
Figure 2.30) for the following input program:
foo : record
a : char;
b : array 1 .. 2 of real;
end;
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here