From suk at pobox.com Wed Feb 1 09:49:13 2006 From: suk at pobox.com (Peter Suk) Date: Wed, 1 Feb 2006 08:49:13 -0600 Subject: [grammarians] I have a LALR definition that compiles with 0 conflicts In-Reply-To: <1138758546.16551.106.camel@localhost.localdomain> References: <1138758546.16551.106.camel@localhost.localdomain> Message-ID: <27a356c2e10a0e21b24b9d02ef687c59@pobox.com> On Jan 31, 2006, at 7:49 PM, MenTaLguY wrote: > On Mon, 2006-01-30 at 22:50 -0600, Peter Suk wrote: >> What progress have the grammarians made? > > We've got a number of different folks working on grammars; I haven't > really been keeping close track. > > I think the person furthest along right now is Martin Traverso, who's > got most of the language down except for (as of his last post), > multiple > assignment, regexps, and some of the more esoteric quoting constructs > (e.g. heredocs). > > His grammar is available here: > > http://www.rubyforge.org/var/svn/rubygrammar/grammars/antlr-v3/trunk > > though I don't know how up-to-date the copy there is. This just gave me a 404 Page Not Found. --Peter -- There's neither heaven nor hell, save what we grant ourselves. There's neither fairness nor justice, save what we grant each other. From mental at rydia.net Wed Feb 1 11:19:01 2006 From: mental at rydia.net (mental@rydia.net) Date: Wed, 01 Feb 2006 11:19:01 -0500 Subject: [grammarians] I have a LALR definition that compiles with 0 conflicts In-Reply-To: <27a356c2e10a0e21b24b9d02ef687c59@pobox.com> References: <1138758546.16551.106.camel@localhost.localdomain> <27a356c2e10a0e21b24b9d02ef687c59@pobox.com> Message-ID: <1138810741.43e0df7550eca@www.rydia.net> Quoting Peter Suk : > > His grammar is available here: > > > > > http://www.rubyforge.org/var/svn/rubygrammar/grammars/antlr-v3/trunk > > > > though I don't know how up-to-date the copy there is. > > This just gave me a 404 Page Not Found. Ah, sorry, that's supposed to be an SVN URL. svn://rubyforge.org/var/svn/rubygrammar/grammars/antlr-v3/trunk -mental From yawl.20481481 at bloglines.com Fri Feb 17 00:22:01 2006 From: yawl.20481481 at bloglines.com (yawl.20481481@bloglines.com) Date: 17 Feb 2006 05:22:01 -0000 Subject: [grammarians] First release of Rubyfront Message-ID: <1140153721.395804466.23044.sendItem@bloglines.com> I am glad to announce the first release of rubyfront (a ruby parser powered by antlr). Even though this is the first release, rubyfront can parse entire ruby standard library (over 1500 .rb files). To download or check out more details about rubyfront, please go to http://seclib.blogspot.com/2006/02/first-release-of-rubyfront.html Rubyfront uses BSD license. I am going to write more about it on my blog later. Xue Yong Zhi http://seclib.blogspot.com From mfp at acm.org Fri Feb 17 05:18:54 2006 From: mfp at acm.org (Mauricio Fernandez) Date: Fri, 17 Feb 2006 11:18:54 +0100 Subject: [grammarians] First release of Rubyfront In-Reply-To: <1140153721.395804466.23044.sendItem@bloglines.com> References: <1140153721.395804466.23044.sendItem@bloglines.com> Message-ID: <20060217101854.GA16012@tux-chan> On Fri, Feb 17, 2006 at 05:22:01AM -0000, yawl.20481481 at bloglines.com wrote: > I am glad to announce the first release of rubyfront (a ruby parser powered > by antlr). > > Even though this is the first release, rubyfront can parse entire > ruby standard library (over 1500 .rb files). > > To download or check out more details about rubyfront, please go to > http://seclib.blogspot.com/2006/02/first-release-of-rubyfront.html This is GREAT news (and I don't say that often). I installed J2SE 5.0 right after reading this. Here are the results of the smoke tests with a 1.8 tree from 2006-01-14: parsersmoketest: [java] parser exception for ruby1.8/ext/dl/test/test.rb: line 69:14: unexpected token: ? r,rs = c2i[?a] ========= (?char literals not supported yet?) [java] parser exception for ruby1.8/ext/tk/lib/tk.rb: line 1110:23: unexpected token: []= def @tk_cmd_tbl.[]=(idx,val) ======== [java] parser exception for ruby1.8/lib/yaml/types.rb: line 22:5: expecting "end", found 'ensure' class PrivateType def self.tag_subclasses?; false; end attr_accessor :type_id, :value verbose, $VERBOSE = $VERBOSE, nil def initialize( type, val ) @type_id = type; @value = val @value.taguri = "x-private:#{ @type_id }" end def to_yaml( opts = {} ) @value.to_yaml( opts ) end ensure ============= $VERBOSE = verbose end [java] lexer exception for ruby1.8/test/ruby/marshaltestlib.rb: line 359:21: unexpected char: '@' marshal_equal(:+@) ======== unary + marshal_equal(:-@) marshal_equal(:[]) [java] parser exception for ruby1.8/test/ruby/test_file.rb: line 98:19: unexpected token: ? assert_equal([?a], result) ======== [java] parser exception for ruby1.8/test/ruby/test_stringchar.rb: line 167:1: unexpected token: null this looks like a bug in the lexer, it's returning null as a token (?) [java] parser exception for ruby1.8/test/rinda/test_rinda.rb: line 196:27: unexpected token: => entry = @ts.write(['1'=>1, '2'=>2, '3'=>3]) ========================= literal hash inside an array, {} omitted [java] parser exception for ruby1.8/test/xmlrpc/test_webrick_server.rb: line 91:38: expecting ASSIGN, found '' assert_equal false, ok assert_equal -99, param.faultCode # <= here, no idea why [java] lexer exception for ruby1.8/mkconfig.rb: line 19:5: unexpected char: '(' def (config = "").write(arg) ============== arbitrary exp allowed as the target of the singleton method def [java] 1869 ruby programs have been parsed, 9 failed. Thanks! -- Mauricio Fernandez From yawl.20481481 at bloglines.com Fri Feb 17 11:06:39 2006 From: yawl.20481481 at bloglines.com (yawl.20481481@bloglines.com) Date: 17 Feb 2006 16:06:39 -0000 Subject: [grammarians] First release of Rubyfront Message-ID: <1140192399.27866845.29103.sendItem@bloglines.com> > > [java] 1869 ruby programs have been parsed, 9 failed. > Thank for the feedbacks! They look like easy problems and I will fix them soon. Xue Yong Zhi From parrt at cs.usfca.edu Fri Feb 17 11:51:28 2006 From: parrt at cs.usfca.edu (Terence Parr) Date: Fri, 17 Feb 2006 08:51:28 -0800 Subject: [grammarians] First release of Rubyfront In-Reply-To: <1140192399.27866845.29103.sendItem@bloglines.com> References: <1140192399.27866845.29103.sendItem@bloglines.com> Message-ID: <65ED3611-7C89-4AB5-B5DC-7CA23D40CC7B@cs.usfca.edu> On Feb 17, 2006, at 8:06 AM, yawl.20481481 at bloglines.com wrote: > >> >> [java] 1869 ruby programs have been parsed, 9 failed. >> > > Thank for the feedbacks! They look like easy problems and I will > fix them > soon. In a few months when ANTLR v3 is a little further along, I'll do the conversion and see how it looks :) Ter From mental at rydia.net Fri Feb 17 12:12:33 2006 From: mental at rydia.net (mental@rydia.net) Date: Fri, 17 Feb 2006 12:12:33 -0500 Subject: [grammarians] First release of Rubyfront In-Reply-To: <1140153721.395804466.23044.sendItem@bloglines.com> References: <1140153721.395804466.23044.sendItem@bloglines.com> Message-ID: <1140196353.43f60401ba78f@www.rydia.net> Quoting yawl.20481481 at bloglines.com: > I am glad to announce the first release of rubyfront (a ruby > parser powered by antlr). Congratulations! Excellent work! -mental From mental at rydia.net Fri Feb 17 12:21:40 2006 From: mental at rydia.net (mental@rydia.net) Date: Fri, 17 Feb 2006 12:21:40 -0500 Subject: [grammarians] First release of Rubyfront In-Reply-To: <1140192399.27866845.29103.sendItem@bloglines.com> References: <1140192399.27866845.29103.sendItem@bloglines.com> Message-ID: <1140196900.43f606242d9e8@www.rydia.net> Quoting yawl.20481481 at bloglines.com: > Thank for the feedbacks! They look like easy problems and I will > fix them soon. Out of curiousity, are you working with Martin Traverso at all, or independently? I think it'd be great if we could get you two together to avoid duplicated work. -mental From mental at rydia.net Fri Feb 17 12:23:31 2006 From: mental at rydia.net (mental@rydia.net) Date: Fri, 17 Feb 2006 12:23:31 -0500 Subject: [grammarians] First release of Rubyfront In-Reply-To: <1140196900.43f606242d9e8@www.rydia.net> References: <1140192399.27866845.29103.sendItem@bloglines.com> <1140196900.43f606242d9e8@www.rydia.net> Message-ID: <1140197011.43f60693eff75@www.rydia.net> Quoting mental at rydia.net: > Out of curiousity, are you working with Martin Traverso at all, > or independently? Ah, never mind. I see this is a v2 grammar; he's doing a native v3 grammar. Still, it might be cool to have you guys compare notes. -mental From yawl.20481481 at bloglines.com Mon Feb 27 01:52:27 2006 From: yawl.20481481 at bloglines.com (yawl.20481481@bloglines.com) Date: 27 Feb 2006 06:52:27 -0000 Subject: [grammarians] First release of Rubyfront Message-ID: <1141023147.2923743443.18208.sendItem@bloglines.com> Hi Mauricio, I fixed all the bugs you reported, here is smoke test result I ran against current ruby stable snapshot: parsersmoketest: [java] 1575 ruby programs have been parsed, 0 failed. And now rubyfront can accept Ruby on Rails's source code as well. You are going to see a few failures, but they are expected (.rhtml files are not valid ruby script). Please download from: http://www.seclib.com/rubyfront/download/rubyfront.zip Thank you! --- Mauricio Fernandez [java] 1869 ruby programs have been parsed, 9 failed. > From puellula at gmail.com Mon Feb 27 03:40:00 2006 From: puellula at gmail.com (Sara) Date: Mon, 27 Feb 2006 09:40:00 +0100 Subject: [grammarians] pretty printer Message-ID: <006a01c63b79$721b9650$6401a8c0@trudy> Hi at all, now I'm continuing my work realizing a pretty printer for my little ruby Grammar my hands made. Good Work! bye bye, puellula -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygrammar-grammarians/attachments/20060227/846f6478/attachment.htm From mental at rydia.net Mon Feb 27 11:47:47 2006 From: mental at rydia.net (mental@rydia.net) Date: Mon, 27 Feb 2006 11:47:47 -0500 Subject: [grammarians] pretty printer In-Reply-To: <006a01c63b79$721b9650$6401a8c0@trudy> References: <006a01c63b79$721b9650$6401a8c0@trudy> Message-ID: <1141058867.44032d3316c4c@www.rydia.net> Quoting Sara : > Hi at all, > now I'm continuing my work realizing a pretty printer for my > little ruby Grammar my hands made. Awesome! -mental