. For each of the following languages, i) give a context free grammar that generates the language, ii) use two examples
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
. For each of the following languages, i) give a context free grammar that generates the language, ii) use two examples
http://en.wikipedia.org/wiki/Roman numerals and http://literacy.kent.edu/Minigrants/Cin ... nchart.htm terminals {c.l.x.v.i}. c = 100,1= 50,x= 10,v = 5,i = 1 S→XTUIXX T→ cl X→XXU U → ¡Y VII Y→XV I → II €
. For each of the following languages, i) give a context free grammar that generates the language, ii) use two examples to show that your CFG can be used to derive to your example, iii) generate parse trees for both of your examples, and iv) generate ASTs for one of your examples. (36 points) d.) Write a rudimentary CFG to parse the roman numerals 1-99 (i.ii.iii.iv.v.... ‚ix.x.. . . ,xl,. . . ‚lxxx,. . . ‚xc,. . . ‚xcix). If you are unfamiliar with roman numerals, please have a look at