Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to construct parsing table for LL(k>1)?

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.

like image 773
Petr Kozelka Avatar asked Jan 25 '12 10:01

Petr Kozelka


People also ask

What is LL K parser?

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.

What is LL 1 parser how it works?

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.


1 Answers

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 :-)

like image 162
greenoldman Avatar answered Oct 04 '22 07:10

greenoldman