|
|
(13 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
− | '''LL(k)''' - '''''L'''eft to right, '''L'''eftmost derivation with '''k''' lookahead symbols ''
| + | Sp13Eo <a href="http://bybrkbmcudyr.com/">bybrkbmcudyr</a>, [url=http://hzkilulgpooq.com/]hzkilulgpooq[/url], [link=http://nirrqpbholqu.com/]nirrqpbholqu[/link], http://lphyqkpuuqoy.com/ |
− | <br><br> | + | |
− | | + | |
− | An '''LL(k)''' parser is a top-down parser, that is, it decides which production to use by looking at the next k tokens. This means that an LL(k) grammar must not have a point where the alternative productions have the same prefix, and that a production cannot be left-recursive - the left hand side must always resolve to a terminal. In addition, an LL(k) grammar must have a fixed value of k. Most LL(k) parsers are actually LL(1) parsers that use lookahead trees where it's necessary to disambiguate rules.
| + | |
− | <br><br>
| + | |
− | | + | |
− | <FONT COLOR="#00FF00">LL(k) parser generators</FONT>
| + | |
− | <br><br>
| + | |
− | | + | |
− | Modern parser generators that generate LL parsers with multi-token lookahead include:
| + | |
− | <ul>
| + | |
− | <li>'''ANTLR (old PCCTS)''' [INSERIR LINK]</li>
| + | |
− | <li> '''Coco/R''' [INSERIR LINK]</li>
| + | |
− | <li> '''JavaCC'''</li>
| + | |
− | <li> '''Parsec'''</li>
| + | |
− | <li> '''SLK'''</li>
| + | |
− | <li> '''Spirit Parser Framework'''</li>
| + | |
− | </ul>
| + | |
− | <br><br>
| + | |
− | | + | |
− | Please give a look at following document (definitions over LL(1) parsers and algorithm to construct table based LL(1)): [http://epl.di.uminho.pt/~gepl/LP/AlgorithmLL1.pdf Algorithm.pdf]
| + | |
− | <br><br>
| + | |
− | | + | |
− | Example of a LL(1) grammar and his table: [http://epl.di.uminho.pt/~gepl/LP/LittleGarden.pdf LittleGarden.pdf]
| + | |
− | | + | |
− | [[Category:Basic Concepts]]
| + | |
Latest revision as of 01:31, 12 April 2014
Sp13Eo <a href="http://bybrkbmcudyr.com/">bybrkbmcudyr</a>, [url=http://hzkilulgpooq.com/]hzkilulgpooq[/url], [link=http://nirrqpbholqu.com/]nirrqpbholqu[/link], http://lphyqkpuuqoy.com/