Path: csiph.com!weretis.net!feeder9.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Richard Rogers Newsgroups: comp.compilers Subject: LALR look-ahead sets from item right context grammar? Date: Sat, 28 Feb 2026 13:43:17 +0000 Organization: Compilers Central Sender: johnl%iecc.com Approved: comp.compilers@iecc.com Message-ID: <26-02-010@comp.compilers> References: <26-02-004@comp.compilers> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="11228"; mail-complaints-to="abuse@iecc.com" Keywords: parse, LALR Posted-Date: 28 Feb 2026 12:30:29 EST 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:3722 Qwen3-coder just pointed out that what I've described is actually "LALR(1) with context-sensitive look-aheads," also known by a couple other names. To get true LALR(1), you'd have to take the union of the FIRST(RCG(i,j)) over states j containing item i. But that seems silly since it's better and less code without doing the union :)