From m.liedl at gmx.de Sun Oct 7 11:24:17 2007 From: m.liedl at gmx.de (Markus Liedl) Date: Sun, 07 Oct 2007 17:24:17 +0200 Subject: [grammarians] the project 'Ruby top down grammar' Message-ID: <20071007152417.219840@gmx.net> hello list, My name is Markus Liedl. I'm working on an alternative Ruby grammar. It is currently only working within Emacs, but I intend to write a grammar interpreter in Ruby, so one can use Ruby as a host language instead of Emacs Lisp. Have a look and tell me what you think about it. It's hosted on rubyforge, project name ruby-tp-dw-gram; you can check it out via svn checkout svn://rubyforge.org/var/svn/ruby-tp-dw-gram See below for the top of the README file. thanks, Markus Liedl Ruby Top Down Grammar This project tries to implement a reusable top-down grammar of the Ruby language. It may be used to * bootstrap a pure ruby vm * advanced syntax highlighting in emacs This Ruby grammar can be classified as a non-exhaustively backtracking, non-deterministic top-down parser. It is close to a "Parsing expression grammar", although it uses two features, modes and marks, which make me unsure whether this categorization fits. The ruby grammar is written in a parsing specific language in Lisp syntax. This decision was made because it is simple to parse. An implementation of this definition language takes a few hundred lines (well, in elisp). This facilitates bootstraping. Another goal was to avoid 'semantic actions' written in an arbitrary language. This is necessary for seriously targetting multiple host languages. ... From mental at rydia.net Sun Oct 14 11:19:00 2007 From: mental at rydia.net (MenTaLguY) Date: Sun, 14 Oct 2007 11:19:00 -0400 Subject: [grammarians] the project 'Ruby top down grammar' In-Reply-To: <20071007152417.219840@gmx.net> References: <20071007152417.219840@gmx.net> Message-ID: <1192375140.6179.2.camel@localhost.localdomain> On Sun, 2007-10-07 at 17:24 +0200, Markus Liedl wrote: > My name is Markus Liedl. I'm working on an alternative Ruby grammar. > It is currently only working within Emacs, but I intend to write a > grammar interpreter in Ruby, so one can use Ruby as a host language > instead of Emacs Lisp. Cool! Both the grammar and the grammar interpreter sound like useful projects. How complete is its coverage of the Ruby grammar currently? -mental -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/rubygrammar-grammarians/attachments/20071014/733d5056/attachment.bin From m.liedl at gmx.de Mon Oct 15 01:56:35 2007 From: m.liedl at gmx.de (Markus Liedl) Date: Mon, 15 Oct 2007 07:56:35 +0200 Subject: [grammarians] the project 'Ruby top down grammar' In-Reply-To: <1192375140.6179.2.camel@localhost.localdomain> References: <20071007152417.219840@gmx.net> <1192375140.6179.2.camel@localhost.localdomain> Message-ID: <20071015055635.321810@gmx.net> > On Sun, 2007-10-07 at 17:24 +0200, Markus Liedl wrote: > > My name is Markus Liedl. I'm working on an alternative Ruby grammar. > > > It is currently only working within Emacs, but I intend to write a > > grammar interpreter in Ruby, so one can use Ruby as a host language > > instead of Emacs Lisp. > > Cool! Both the grammar and the grammar interpreter sound like useful > projects. How complete is its coverage of the Ruby grammar currently? > > -mental Well, I'm still debugging the grammar and still find minor bugs. The major missing parts are currently * here-doc * %Q %W regexp So, I've not yet parsed huge amounts of Ruby code with it. markus