Question
Write BNF(Backus-Naur Form) (or EBNF) rules and draw the parse tree for this programming language: Description: You may use non-terminal symbols like: < program >,
Write BNF(Backus-Naur Form) (or EBNF) rules and draw the parse tree for this programming language:
Description:
You may use non-terminal symbols like: < program >, < procedure >, < var-list >, < call-stmt >, < assign-stmt > You may include any other non-terminal / terminal symbols when necessary.
----------------------------------------------------
Language is:
Procedure SubA [Var a,b,c] Var d; Start d = a + b + c - 1; ExitIfZero d; Call SubB; End
Procedure SubB Var a,b; Start a = 4; Print a; End
Procedure Main Var d,e,f; Start d = 1; e = 2; f = 3; Call SubA [d,e,f]; End
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started