On the web, there is a lot of examples showing how to construct parsing tables for a context-free grammar from first/follow sets for LL(1) parser.
But I haven't found anything useful related to k>1 cases. Even wikipedia gives no info about this.
I expect that it must be in some way similar, but pointers to existing research in this area would be very helpful.
An LL(k) parser is regarded as a push-down transducer in which the push-down symbols are certain equivalence classes of “viable suffixes,” a dual concept of the “viable prefixes” used in the LR(k) theory.
LL(1) parsing is a top-down parsing method in the syntax analysis phase of compiler design. Required components for LL(1) parsing are input string, a stack, parsing table for given grammar, and parser.
I struggle pretty much with the same issues, building LR parser, not LL though. I found a little better page than LL(k) mentioned by @cakeplus -- http://www.seanerikoconnor.freeservers.com/ComputerScience/Compiler/ParserGeneratorAndParser/QuickReviewOfLRandLALRParsingTheory.html There is also related paper available for free -- http://ci.nii.ac.jp/naid/110002673618/
However even those didn't help me much. So I started myself from the basics. If anyone is interested: https://aboutskila.wordpress.com/2013/06/14/lalrk-first-sets/ and the battle will continue :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With