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

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 Databases Questions!