Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED!nerds-end From: Hans-Peter Diettrich Newsgroups: comp.compilers Subject: Re: LR(1) Parsing : Error Handling & Recovery Date: Mon, 28 Jul 2014 14:43:50 +0200 Organization: Compilers Central Lines: 25 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <14-07-063@comp.compilers> References: <14-07-023@comp.compilers> <14-07-024@comp.compilers> <14-07-030@comp.compilers> <14-07-031@comp.compilers> <14-07-041@comp.compilers> <14-07-046@comp.compilers> <14-07-060@comp.compilers> <14-07-062@comp.compilers> NNTP-Posting-Host: news.iecc.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-Trace: miucha.iecc.com 1406557145 14508 2001:470:1f07:1126:0:676f:7373:6970 (28 Jul 2014 14:19:05 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Mon, 28 Jul 2014 14:19:05 +0000 (UTC) Keywords: LL(1), parse Posted-Date: 28 Jul 2014 10:19:05 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:1353 Chris Dodd schrieb: > A counter-example from Kurki-Suonio > > 3835&volume=9&issue=3&spage=225> Unfortunately I couldn't get the article, so here's what I don't understand: > is: > > S ::= aSA | \epsilon > A ::= aabS | c > > This grammar (and the language) is LL(2), but there does not exist an > equivalent LL(1) grammar. IMO this grammar is LL(3), not LL(2). There might be a typo in A, which might originally read as: A ::= abS | c resulting in an LL(2) grammar. Can somebody enlighten me? DoDi