[grammarians] starting over from scratch
Mauricio Fernández
mfp at acm.org
Sun Nov 27 18:32:54 EST 2005
On Sun, Nov 27, 2005 at 02:15:45PM -0800, Terence Parr wrote:
> Ok, so the parse.y grammar has lots of duplicated grammar fragments
> so yacc can figure out how to do different actions depending on
> context. Further there is lots of weird stuff going on to resolve
> ambiguities and be as tight as possible. Some of it is beyond my ken
> giving my ruby nuby-ness. The lexer seems mostly or all handwritten;
> haven't looked at it much.
>
> I'm building a grammar from scratch starting with assignments. :)
>
> Damn thing even seems to be working...
Have you seen the following?
EBNF corresponding to Ruby 1.4
http://www.outerbody.com/ruby/ruby-man-1.4/yacc.html
The same with some changes towards Ruby 1.6
http://www.ruby-lang.org/ja/man/?cmd=view;name=%B5%BF%BB%F7BNF%A4%CB%A4%E8%A4%EBRuby%A4%CE%CA%B8%CB%A1
"Ruby's grammar"
http://www.ruby-lang.org/ja/man/?cmd=view;name=Ruby%A4%CE%CA%B8%CB%A1
--
Mauricio Fernandez
More information about the Rubygrammar-grammarians
mailing list