Question: Write a BNF for integer numbers : | 0 | 1 | .. | 9 + | - | Give a parse tree and left

  1. Write a BNF for integer numbers :

|

0 | 1 | .. | 9

+ | - |

Give a parse tree and left most derivation for any integer number.

  1. Write a BNF for binary numbers and give parse tree and left most derivation for any binary number :

0 | 1 | 0 | 1

  1. Write a BNF for the language that contains all strings of as and bs, give parse tree and left most derivation for abaabb

a | b | a | b

  1. Write a BNF for identifier and give parse tree and left most derivation for any identifier :

| |

A|B| .|Z|a|b|..|z

0 | 1 | .. | 9

  1. Write a BNF for declaration statement of identifiers (suppose that id is terminal) and give parse tree and left most derivation for any statement:

;

id | id ,

int | float | double

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!