(New page: {{TOCright}} == Exercise 1 == Consider the following grammar, where S is the initial symbol and { a, b } is the set of terminal symbols: <text> S -> G b b | a a b | b G a G -> a </text> ...) |
|||
Line 36: | Line 36: | ||
* [http://www.l2f.inesc-id.pt/~david/ist/docencia/compiladores/2007-2008/lalr1-ex123.pdf Answers to exercises 1, 2, and 3] | * [http://www.l2f.inesc-id.pt/~david/ist/docencia/compiladores/2007-2008/lalr1-ex123.pdf Answers to exercises 1, 2, and 3] | ||
+ | |||
+ | [[category:Compilers]] | ||
+ | [[category:IST]] |
Contents |
Consider the following grammar, where S is the initial symbol and { a, b } is the set of terminal symbols: <text> S -> G b b | a a b | b G a G -> a </text>
Consider the following grammar, where E is the initial symbol and { [, ], ;, id } is the set of terminal symbols: <text> E -> [ E ; L ] | id L -> E | E ; L </text>
Consider the following grammar, where S is the initial symbol and { e, i, x } is the set of terminal symbols: <text> S -> i S | i S e S | x </text>