Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED!nerds-end From: George Neuner Newsgroups: comp.compilers Subject: Re: LR(1) Parsing : Error Handling & Recovery Date: Thu, 17 Jul 2014 18:49:55 -0400 Organization: A noiseless patient Spider Lines: 34 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <14-07-030@comp.compilers> References: <14-07-023@comp.compilers> <14-07-024@comp.compilers> NNTP-Posting-Host: news.iecc.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: miucha.iecc.com 1405704966 69374 2001:470:1f07:1126:0:676f:7373:6970 (18 Jul 2014 17:36:06 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Fri, 18 Jul 2014 17:36:06 +0000 (UTC) Keywords: parse, errors Posted-Date: 18 Jul 2014 13:36:06 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com X-Received-Bytes: 2262 X-Received-Body-CRC: 3404598009 Xref: csiph.com comp.compilers:1320 On Wed, 16 Jul 2014 16:39:09 -0400 (EDT), Ivan Godard wrote: >As a practical matter, natural languages are pretty much LL1 (German >verbs excepted) Obviously you haven't read any legal briefs lately 8-) Natural languages are contextual. Neither LL(1) nor (LA|S)LR(1) can parse a contextual language - both are limited to context-free languages. GLR and PEG theoretically can parse contextual languages. It is thought that LL(*) - LL with unlimited lookahead - may be able to as well, but AFAIK, there has been no formal proof offered for this. >so people are reasonably familiar to quasi-linear parsing. Studies have shown that human parsing of language is both top-town and bottom-up simultaneously. >Nearly all languages yield to LL1 techniques (the formal proofs >that a language is not LL1 are irrelevant) ... Yes ... most useful context free languages can be contorted into LL(1). But it's a lot easier just to use an LL(k) tool. In theory, any LL(k) language can be refactored to be LL(1), but refactoring a "greater than small k" language is usually impractical due to explosive growth of the resulting LL(1) grammar. George