Consider the grammar
T → T -> T
T → T * T
T → int
where -> is considered a single terminal symbol.
a) Add a new start production as shown in Sect. 2.14.
b) Calculate FOLLOW(T). Remember to add an extra start production.
c) Construct an SLR parser-table for the grammar.
d) Eliminate conflicts using the following precedence rules:
• * binds tighter than ->.
• * is left-associative.
• -> is right-associative.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here