onsider the following grammar along its semantic rules and its Parsing Table. 1.E→ E+T { add value of E and T and save to a new variable} 2.E→T 3.T→id { convert id to integer} 4.T→(id) {convert id to integer} Parsing table: State + id ( ) $ E T 0 S1 S2 4 3 1 R3 R3 R3 2 S1 S2 6 3 3 R2 R2 R2 4 S5 A 5 S1 S2 7 6 S5 S8 7 R1 R1 R1 8 R4 R4 R4 Write a program that will input from input.txt, and will find potential tokens. Any token that is not part of grammar will be discarded, tokens which are part of grammar will be parsed using LR-1 parser. Program MUST print status of stack and operation performed (shift or reduce) along Token and states, on each stack operation. You are also required to perform semantic operations, in case of reduction of a production. Proper message will be displayed after parsing either it is successful of failed.
Quote:Write a program that will input from input.txt
Quote:find potential tokens
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)