Question: Using the provided Predictive Parser Table ( photo 1 ) based on the Grammar ( photo 2 ) , In which program, var, begin, end

Using the provided Predictive Parser Table (photo 1) based on the Grammar (photo 2), In which program, var, begin, end , integer, and print are reserved words.
Have your program (compiler) check the grammar of the program and display No Error
if the given grammar liked the program or issue some errors otherwise.
Have your program detect the following errors and issue a corresponding error message:
program is expected (if program is spelled wrong)
var is expected (if var is spelled wrong)
begin is expected (if begin is spelled wrong)
end is expected (if end is spelled wrong)
integer is expected (if integer is spelled wrong)
print is expected( if print is spelled wrong )
unknown identifier if the variable is not defined
; semicolon is missing (if the grammar required a ; )
, comma is missing (if the grammar required a ,)
. period is missing (if the grammar required a .)
( The left parentheses is missing
) The right parentheses is missing
Output : Ready to compile or this is the list of errors
Use photo 3 as a reference if needed. The whole program grammar consists of ONE line, and each non-terminal in the
Using the provided Predictive Parser Table (

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!