01.09.2014 Views

LR(1) - Classes

LR(1) - Classes

LR(1) - Classes

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Quiz #9<br />

• Convince yourself (and me) that the ambiguous<br />

grammar for expressions is not <strong>LR</strong>(1).<br />

E –> E + E<br />

| E * E<br />

| (E)<br />

| id<br />

• Is the following grammar <strong>LR</strong>(1)? Is it LA<strong>LR</strong>(1)?<br />

S –> Aa | bAc | Bc | bBa<br />

A –> d<br />

B –> d<br />

18

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!