Path: csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Kaz Kylheku <480-992-1380@kylheku.com> Newsgroups: comp.compilers Subject: Re: Are compiler developers light-years ahead of other software development? Date: Sun, 23 Jan 2022 06:17:36 -0000 (UTC) Organization: A noiseless patient Spider Lines: 22 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <22-01-103@comp.compilers> References: <22-01-059@comp.compilers> <22-01-083@comp.compilers> <22-01-090@comp.compilers> <22-01-096@comp.compilers> Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="43826"; mail-complaints-to="abuse@iecc.com" Keywords: yacc, practice Posted-Date: 23 Jan 2022 15:07:32 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:2864 On 2022-01-22, Ian Lance Taylor wrote: > In my experience bison/yacc parsers are really good for knowing the exact > language that you are parsing. In my experience, you can easily know what language you're processing with Yacc is if you avoid its /ad hoc/ features for suppressing conflict messages. Namely: - %left, %right and %nonassoc declarations for tokens. - %prec in rules. Otherwise, you're likely going to be relying on your regression test cases to inform you what language you're parsing. The exception is that %left, %right are readily understood if they are only used for the operator tokens in the productions for a binary operator expression grammar (that likely being their motivating use case). -- TXR Programming Language: http://nongnu.org/txr Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal