Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED!nerds-end From: jgk@panix.com (Joe keane) Newsgroups: comp.compilers Subject: precedence have both ways Date: Thu, 30 May 2013 23:21:41 -0400 (EDT) Organization: Public Access Networks Corp. Lines: 36 Sender: johnl@iecc.com Approved: comp.compilers@iecc.com Message-ID: <13-05-020@comp.compilers> References: <13-05-010@comp.compilers> <13-05-018@comp.compilers> NNTP-Posting-Host: news.iecc.com X-Trace: leila.iecc.com 1369970501 3816 64.57.183.58 (31 May 2013 03:21:41 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Fri, 31 May 2013 03:21:41 +0000 (UTC) Keywords: parse, theory Posted-Date: 30 May 2013 23:21:41 EDT 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:906 Anton Ertl wrote: >a<3 AND b<3 This reminds me of a question. One person designs a language 'C1' with precedence: [higher] ... | & <, <=, >, <= ==, != ... [lower] Some other person designs a language 'C2' with precedence: [higher] ... <, <=, >, <= ==, != | & ... [lower] They're the same besides that. To compromise, they make a new language 'C3' such that a program is valid C3 if it is valid C1 and valid C2 -and- both ways mean the same. Is there some good way to do this -in the grammar-? [I see gcc has warnings like this.]