Question: Compilers: 1. Write the CFG grammar for numbers (signed or unsigned) in Pascal programming language. Numbers in Pascal are integers or real (numbers with decimal
Compilers:
1. Write the CFG grammar for numbers (signed or unsigned) in Pascal programming language. Numbers in Pascal are integers or real (numbers with decimal point). Real numbers must have at least one digit before and decimal point.
2. Find a CFG for each of the following non-regular languages and write the trace diagram for each of the given strings:
a. L={anbpcm | p=2m+2n, m=0,1,2, and n=1,2,3,..}
Trace w1=a2b6c and w2=ab8c3
b. L={apbncm | p=2n+3m; n=0,1,2,3,.. and m=1,2,3,}
Trace w1=a5b1 c1 and w2=a3c
c. L={anbm | m>=n; n=1,2,3 }
Trace w=a3 b5
THANK YOU!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
