Question: Please help with #6 and 7, I need exactly solution of coding C++ for number #7: Var should check NIDENT or SIDENT, then assign a

Please help with #6 and 7, I need exactly solution of coding C++

for number #7: Var should check NIDENT or SIDENT, then assign a key-value pair in defVar with a value of true or false based on whether the lexeme already exists in defVar.

map defVar;

Please help with #6 and 7, I need exactly
In this programming assignment, you will be building a parser for the Simple Perl-Like (SPL) programming language. The syntax definitions of SPL programming language are given below using EBNF notations. Your implementation of a parser to the language is based on the following grammar rules specified in EBNF notations. 1. Prog ::= StmtList 2. StmtList : := Stmt ; { Stmt; } 3. Stmt : := AssignStme | WriteLnStmt | IfStmt 4. WriteLnStmt ::= writeln (ExprList) 5. IfStmt : := if (Expr) \\{ 'StmtList '}' [ else ' { ' StmtList '}' ] 6. AssignStmt : := Var = Expr 7. Var : := NIDENT | SIDENT 8. Exprlist : : = Expr { , Expr } 9. Expr : := RelExpr [ (-eql==) RelExpr ] 10. RelExpr : : = AddExpr [ ( -it | -gt | ) AddExpr ] 11. AddExpr :: MultExpr { ( + | - ( .) MultExpr } 12. MultExpr : : = ExponExpr { ( * | / | **) ExponExpr } 13. ExponExpr : := UnaryExpr { ^ UnaryExpr } 14. UnaryExpr : := [( - | + )] PrimaryExpr 15. PrimaryExpr : := IDENT | SIDENT | NIDENT | ICONST | RCONST | SCONST (Expr)

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!