[grammarians] ambiguity with method call?
mental@rydia.net
mental at rydia.net
Wed Nov 30 14:42:49 EST 2005
Quoting Terence Parr <parrt at cs.usfca.edu>:
> Here's the thing. The impl does not specify the language
> definition;
Well... currently for Ruby, matz's implementation effectively _is_
the language definition which the other implementations try to
track, except where he identifies a particular thing as a bug.
Today, there is no other language definition, except as a platonic
ideal.
> All that said, the point of this exercise is probably to get a
> real spec driven from a real grammatical description.
That and replacing YACC, yes.
matz's implementation will continue to define the leading edge of
Ruby, but at least there will be a stable spec and all of this
stuff will have been dragged screaming into the sunlight.
> Am I the first person to run across this ambiguity before?
At this point my impression is that pretty much anyone who's
seriously worked with the parser is aware of it (c.f. the
ParseTree unit tests I think daz referenced).
I wouldn't say it's widely known, though. People who aren't writing
Ruby parsers tend not to notice the ambiguity because the rule for
resolving it lines up pretty well with what most intend.
-mental
More information about the Rubygrammar-grammarians
mailing list