From: Clemens Hintze Date: 2000-04-12T08:33:29+02:00 Subject: [ruby-talk:02463] Precedence question Dave Thomas writes: ... > 6 * inc 7 ... > -:6: parse error > > Is it correct to say that it's simply a precedence thing, and that > it's being parsed as > > (6*inc) 7 > > or is there something more subtle going on? Hmm ... from the grammar I believe that Ruby parses inc 7 as a statement not as a expression! Statements, however, are only allowed within expressions if they occur in parentheses. That means 6 * (inc 7) is okay! So it is not a precedence problem, although it looks like one. :-) > Thanks > > Dave -- Clemens Hintze mailto: c.hintze@gmx.net