[ANN] racc 1.4.6 release

racc 1.4.6 has been released!

* <http://i.loveruby.net/en/projects/racc/>
* <http://racc.rubyforge.org/>

Racc is a LALR(1) parser generator.
It is written in Ruby itself, and generates Ruby program.

Changes:

### 1.4.6

* Bugfixes

  * bin/racc -g option renamed to -t
  * racc/compiler.rb is removed
  * '|' is allowed with meta rules
  * Ruby 1.8.7 compatibility fixes
  * Ruby 1.9 compatibility fixes

* <http://i.loveruby.net/en/projects/racc/>
* <http://racc.rubyforge.org/>

racc 1.4.6 has been released!

YAY!!

* racc/compiler.rb is removed

what is this referring to? I don't have compiler.rb in my svn checkout.

···

On Dec 29, 2008, at 20:50 , Aaron Patterson wrote:

Aaron Patterson wrote:

racc 1.4.6 has been released!

* <http://i.loveruby.net/en/projects/racc/>
* <http://racc.rubyforge.org/>

Racc is a LALR(1) parser generator.
It is written in Ruby itself, and generates Ruby program.

Changes:

### 1.4.6

* Bugfixes

  * bin/racc -g option renamed to -t
  * racc/compiler.rb is removed
  * '|' is allowed with meta rules
  * Ruby 1.8.7 compatibility fixes
  * Ruby 1.9 compatibility fixes

* <http://i.loveruby.net/en/projects/racc/>
* <http://racc.rubyforge.org/>

Gem install failure:

http://rubyforge.org/tracker/index.php?func=detail&aid=23401&group_id=7299&atid=28265

Regards,

Dan

Aaron Patterson wrote:

racc 1.4.6 has been released!

* <http://i.loveruby.net/en/projects/racc/>
* <http://racc.rubyforge.org/>

Racc is a LALR(1) parser generator.
It is written in Ruby itself, and generates Ruby program.

I think I may have asked this before but...
is racc the same thing as that used by ruby_parser [1] to parse ruby?
If so then why does [1] say that it is a C extension? I am so confused.
Also isn't racc built into the ruby distro? Is this an updated version
of that? Will it be rolled into trunk?
Thanks!
-=r

[1] http://parsetree.rubyforge.org/

···

--
Posted via http://www.ruby-forum.com/.

I'm not totally sure. That is from Aoki's list of changes from between
1.4.5 release and now.

···

On Tue, Dec 30, 2008 at 05:44:23PM +0900, Ryan Davis wrote:

On Dec 29, 2008, at 20:50 , Aaron Patterson wrote:

racc 1.4.6 has been released!

YAY!!

* racc/compiler.rb is removed

what is this referring to? I don't have compiler.rb in my svn checkout.

--
Aaron Patterson
http://tenderlovemaking.com/

Oops! Should be fixed now. Sorry about that.

···

On Fri, Jan 02, 2009 at 10:24:52PM +0900, Daniel Berger wrote:

Aaron Patterson wrote:

racc 1.4.6 has been released!

* <http://i.loveruby.net/en/projects/racc/>
* <http://racc.rubyforge.org/>

Racc is a LALR(1) parser generator.
It is written in Ruby itself, and generates Ruby program.

Changes:

### 1.4.6

* Bugfixes

  * bin/racc -g option renamed to -t
  * racc/compiler.rb is removed
  * '|' is allowed with meta rules
  * Ruby 1.8.7 compatibility fixes
  * Ruby 1.9 compatibility fixes

* <http://i.loveruby.net/en/projects/racc/>
* <http://racc.rubyforge.org/>

Gem install failure:

http://rubyforge.org/tracker/index.php?func=detail&aid=23401&group_id=7299&atid=28265

--
Aaron Patterson
http://tenderlovemaking.com/

I think I may have asked this before but...
is racc the same thing as that used by ruby_parser [1] to parse ruby?

yes

If so then why does [1] say that it is a C extension? I am so confused.

there might be a few things your confused by. [1] is the link to the parse tree project page. PT is a C extension. RP uses racc which has a C extension to optimize its performance. A majority of racc is implemented in ruby.

Also isn't racc built into the ruby distro? Is this an updated version
of that? Will it be rolled into trunk?

it is, the C extension ships with the ruby distro. This is an updated release, but most if not all of the updates pertain to the racc compiler, which does NOT ship with the ruby distro. It won't be rolled in.

···

On Jan 2, 2009, at 14:53 , Roger Pack wrote:

racc 1.4.6 has been released!

YAY!!

Can it lex JavaScript?

(All I need is some hierarchical report of the structure...)

···

--
   Phlip

there might be a few things your confused by. [1] is the link to the
parse tree project page. PT is a C extension. RP uses racc which has a
C extension to optimize its performance. A majority of racc is
implemented in ruby.

So racc has an optional C extension to optimize its performance, and
that one part is built into the base ruby distro [oddly]. I guess I
could look into it more to know what the difference between the parser
and compiler is. Cool.
Thanks.
-=r

···

--
Posted via http://www.ruby-forum.com/.

I'm glad you asked! Of course it can! For parsing JavaScript, I
present to you two solutions. One is pure ruby and kind of slow, and
the other one is C and super fast!

RKelly is a pure ruby javascript parser that uses racc:

  http://github.com/tenderlove/rkelly/tree/master

I haven't released a gem yet, but I could be persuaded to since I'm not
really doing much with it lately. RKelly will give you an AST of your
javascript.

Your second option is Johnson. It uses Spidermonkey, is really fast,
and can return a JavaScript AST:

  http://github.com/jbarnette/johnson/tree/master

I haven't documented the parser too much, so take a look at
parser_test.rb for examples.

Hope that helps

···

On Wed, Dec 31, 2008 at 03:24:36AM +0900, Phlip wrote:

racc 1.4.6 has been released!

YAY!!

Can it lex JavaScript?

--
Aaron Patterson
http://tenderlovemaking.com/

Aaron Patterson wrote:

Can it lex JavaScript?

I'm glad you asked! Of course it can! For parsing JavaScript, I
present to you two solutions. One is pure ruby and kind of slow, and
the other one is C and super fast!

Yay!

Google assert_javascript. It's a great library - we use it all the time at work, but it's hard to get started with, because of the bugs in its root library. It can't parse 'Ajax.Request', but it can parse 'var ajax = Ajax.Request', so it's incompatible with generated code.

It's a re-imagining of assert_rjs, but without the noise from regular expressions.

I will shortly be rewriting assert_javascript using one of these parsers instead...

···

--
   Phlip

Ooh, nice! Bookmarked!

martin

···

On Tue, Dec 30, 2008 at 10:54 PM, Aaron Patterson <aaron@tenderlovemaking.com> wrote:

On Wed, Dec 31, 2008 at 03:24:36AM +0900, Phlip wrote:

racc 1.4.6 has been released!

YAY!!

Can it lex JavaScript?

I'm glad you asked! Of course it can! For parsing JavaScript, I
present to you two solutions. One is pure ruby and kind of slow, and
the other one is C and super fast!