17.01.2015 Views

S - Intranet - Department of Computer Science: Login

S - Intranet - Department of Computer Science: Login

S - Intranet - Department of Computer Science: Login

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Parser Conflict Resolution<br />

Most programming language grammars are LR(1). But, in practice, you<br />

still encounter grammars which have parsing conflicts.<br />

=> a common cause is an ambiguous grammar<br />

Ambiguous grammars always have parsing conflicts (because they are<br />

ambiguous this is just unavoidable).<br />

In practice, parser generators still generate a parser for such grammars,<br />

using a “resolution rule” to resolve parsing conflicts deterministically.<br />

=> The resolution rule may or may not do what you want/expect<br />

=> You will get a warning message. If you know what you are doing<br />

this can be ignored. Otherwise => try to solve the conflict by<br />

disambiguating the grammar.<br />

41

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

Saved successfully!

Ooh no, something went wrong!