Path: csiph.com!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!178.20.174.218.MISMATCH!feeder5.feed.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Kaz Kylheku <493-878-3164@kylheku.com> Newsgroups: comp.compilers Subject: Re: Segmentation in programming language grammars .. why? Date: Mon, 30 Dec 2019 18:04:05 +0000 (UTC) Organization: Aioe.org NNTP Server Lines: 14 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <19-12-035@comp.compilers> References: <19-12-034@comp.compilers> Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="53342"; mail-complaints-to="abuse@iecc.com" Keywords: parse, design Posted-Date: 30 Dec 2019 20:11:43 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:2416 On 2019-12-30, rockbrentwood@gmail.com wrote: > and is segmented into subgroups Sx, Sc, Se, Sb, Sl, Sj of S. Why? Why not just > write it as one segment like this? It's not creating new conflicts in so > doing. They want to maintain hierarchical categories like "iteration statement" and "selection statement" as part of the language definition. There is some advantage in this when documenting, because the grammar fragment given in each section is understood to be complete. That is to say, in the document section on selection statements, say, the grammar fragment which defines selection-statement is complete in the sense that nothing else in the document is a selection-statement.