The old parser seems c-like, but the new is not always complatible with the old, mostly with the bitwise operators. Here is an example |----------------------------+---+------------+------------| | op | C | old parser | new parser | |----------------------------+---+------------+------------| | 1 + 1 & 1 | 0 | 0 | 2 | | 1 + 1 | 1 | 3 | 3 | 2 | | 1 + 1 << 1 | 4 | 4 | 3 | | 2 + 2 >> 1 | 2 | 2 | 3 | |----------------------------+---+------------+------------| It isn't enough to modify only the precedence in yacc, it is also probably necessary to see the rule for `expr' again. The simplest solution is to recommend the use of the parentheses. (tito) On Tue, Dec 27, 2011 at 11:51:56PM -0500, Steven Yi wrote: > I'm curious, what are the exact differences between what is in the old > parser and what is in C? Also, it seems to me that the general precedence > rules for this area are pretty much standardized amongst various languages. > Could someone provide an example of something that would work in the old > parser but not in C? Also, might we consider moving over to the C-style > for precedence and consider the old parser implementation a bug? > > Thanks! > steven > > On Tue, Dec 27, 2011 at 7:02 AM, john ffitch wrote: > > > The precedence cannot (necessarily) be changed like this. It must be > > the same as the old parser which is not (necessarily) the same as C. > > I am very happy for you to work on it -- never been that good at > > precedence > > > > ==John ffitch ------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net