Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!sun-barr!decwrl!megatest!djones From: djones@megatest.UUCP (Dave Jones) Newsgroups: comp.lang.c Subject: Re: precedence of && (was: precedence of ?:) Message-ID: <8068@goofy.megatest.UUCP> Date: 15 Sep 89 01:59:30 GMT References: <1989Sep14.181049.8175@twwells.com) Organization: Megatest Corporation, San Jose, Ca Lines: 20 From article <1989Sep14.181049.8175@twwells.com), by bill@twwells.com (T. William Wells): ) ) : (If I ever write a C compiler, I'm going to use precedence, and if ) : anybody ever complains that they got an "L-value" error message when they ) : distinctly asked for a "syntax" error message, maybe I'll offer to wash ) : their car.) ) ) I wrote a precedence parser for C expressions. It was a mass of ) kludges on top of fudges. I threw it away. C is just not specifiable ) by precedence. ) You misunderstand my intensions. I agree that precedence parsers are obsolete. By "use precedence" I just refer to disambiguation rules such as the yacc %left and %prec directives. They make life easy and LR tables short. Take a peek a the cgram.y file in the source of the so called "portable" C compiler, if you dare. It may not be pretty, but it would be even not prettier if it were not for the precedence rules.