Posted by : Andreas Kwan Senin, 13 Oktober 2014

14. Draw parse trees for the sentences aabb and aaaabbbb, as derived from the grammar of Problem 13

14aproblemset14bproblemset

15. Convert the BNF of Example 3.1 to EBNF. 
EBNF:
<program> → begin <stmt_list> end
<stmt_list> → <stmt> { ;  <stmt_list>}
<stmt> → <var> = <expression>
<var> → A | B | C
<expression> → <var> { (+|-) <var>}

16. Convert the BNF of Example 3.3 to EBNF. 
<assign> → <id> = <expr>
<id> → A | B | C
<expr> → <expr> {(+ | *) <expr>}
| <id>


17. Convert the following EBNF to BNF: S → A{bA} A → a[b]A 
S -> A | AX
X -> bA | bAX
A -> aA | abA
18. What is the difference between an intrinsic attribute and a nonintrinsic synthesized attribute?
An intrinsic attribute is an inherent characteristic of a terminal symbol in the grammar. So the value of the attribute is determined solely from the terminal symbol. A nonintrinsic synthesized attribute is an attribute of a non-terminal symbol in the grammar.

{ 1 komentar... read them below or add one }

Welcome to My Blog

Mengenai Saya

Foto saya
Hanyalah salah satu manusia yang hidup di dunia ini

Popular Post

Blogger templates

Diberdayakan oleh Blogger.

Total Tayangan Halaman

- Copyright © BlogOfCommoners -Robotic Notes- Powered by Blogger - Designed by Johanes Djogan -