Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!peer01.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: Hans Aberg Newsgroups: comp.compilers Subject: Re: LR(1) Parsing : Error Handling & Recovery Date: Mon, 21 Jul 2014 18:39:08 +0200 Organization: A noiseless patient Spider Lines: 17 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <14-07-051@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-038@comp.compilers> <14-07-039@comp.compilers> <14-07-040@comp.compilers> <14-07-049@comp.compilers> NNTP-Posting-Host: news.iecc.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: miucha.iecc.com 1405963404 58529 2001:470:1f07:1126:0:676f:7373:6970 (21 Jul 2014 17:23:24 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Mon, 21 Jul 2014 17:23:24 +0000 (UTC) Keywords: parse, practice Posted-Date: 21 Jul 2014 13:23:24 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: 2081 X-Received-Body-CRC: 4289515925 Xref: csiph.com comp.compilers:1341 On 2014/07/21 14:20, Evangelos Drikos wrote: > On 7/20/14, 2:38 AM, Hans Aberg wrote: >>> A GLR parser splits the parses in face of an ambiguity, which might be >>> used instead. Bison supports this, but currently the actions during a >>> parse split are not executed, and so cannot set context variables for >>> the lexer, until the merge. > > In short, your idea can be applied only as a hack; it might work > sometimes, depends on the grammar. If that is what you meant we don't > disagree. > [In my experience, it's a rare parser that is useful and doesn't depend > on some hacks. -John] Indeed, but yet another feature that one might want is being able to split the lexer as well - may be useful for experimenting with the processing of natural languages. Such a feature has been discussed a bit on the Bison mailing lists.