Editing LL(k) ---- LL(1) Parsers

Jump to: navigation, search

Please note that you are now editing the latest revision of this page, which is not the approved one shown by default.

Warning: You are not logged in.

Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
Sp13Eo  <a href="http://bybrkbmcudyr.com/">bybrkbmcudyr</a>, [url=http://hzkilulgpooq.com/]hzkilulgpooq[/url], [link=http://nirrqpbholqu.com/]nirrqpbholqu[/link], http://lphyqkpuuqoy.com/
+
'''''LL(k''') - '''L'''eft to right, '''L'''eftmost derivation with '''k''' lookahead symbols''
 +
<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>
 +
 
 +
== LL(k) parser generators ==
 +
 
 +
Modern parser generators that generate LL parsers with multi-token lookahead include:
 +
# '''[http://eplmediawiki.di.uminho.pt/index.php/ANTLR ANTLR] (old PCCTS)'''
 +
# '''[http://eplmediawiki.di.uminho.pt/index.php/CoCo/R Coco/R]'''
 +
# '''JavaCC'''
 +
# '''Parsec'''
 +
# '''SLK'''
 +
# '''Spirit Parser Framework'''
 +
<br>
 +
 
 +
Please give a look at following document (definitions over LL(1) parsers and algorithm to construct table based LL(1)): [http://eplmediawiki.di.uminho.pt/uploads/AlgorithmLL1.pdf Algorithm.pdf]
 +
 
 +
== Example of a LL(1) grammar and his table ==
 +
[http://eplmediawiki.di.uminho.pt/uploads/LittleGarden.pdf LittleGarden.pdf]
 +
 
 +
[[Category:Basic Concepts]]

Please note that all contributions to eplmediawiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Eplmediawiki:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)
Personal tools
Namespaces

Variants
Actions
Navigation
extras
Toolbox