Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.linkpendium.com!news.linkpendium.com!news.iecc.com!nerds-end From: Borneq Newsgroups: comp.compilers Subject: Constructing LL(k) tables Date: Sun, 13 Nov 2011 04:57:26 -0800 (PST) Organization: Compilers Central Lines: 12 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <11-11-034@comp.compilers> NNTP-Posting-Host: news.iecc.com X-Trace: leila.iecc.com 1321226657 92837 64.57.183.58 (13 Nov 2011 23:24:17 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Sun, 13 Nov 2011 23:24:17 +0000 (UTC) Keywords: LL(1), question Posted-Date: 13 Nov 2011 18:24:17 EST X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: x330-a1.tempe.blueboxinc.net comp.compilers:336 To construct LL(1) table M: for each production A->alpha do: for each terminal a from FIRST(alpha) (a<>eps) add production A->alpha to M[A,a] if eps is in FIRST(alpha), for each b from FOLLOW(A) add A->alpha to M[A,b] If grammar is not LL(1), in one table position there will be more than one production. Can I construct LL(k) tables simply by splitting cells with more than one production? Which is algorithm to production choosing ?