Forum: Ruby racc 1.4.6 release

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Be30361bb0b0c495e3077db43ad84b56?d=identicon&s=25 Aaron Patterson (Guest)
on 2008-12-30 05:51
(Received via mailing list)
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/>
5a837592409354297424994e8d62f722?d=identicon&s=25 Ryan Davis (Guest)
on 2008-12-30 09:45
(Received via mailing list)
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.
Be30361bb0b0c495e3077db43ad84b56?d=identicon&s=25 Aaron Patterson (Guest)
on 2008-12-30 17:12
(Received via mailing list)
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.

I'm not totally sure.  That is from Aoki's list of changes from between
1.4.5 release and now.
Aafa8848c4b764f080b1b31a51eab73d?d=identicon&s=25 Phlip (Guest)
on 2008-12-30 19:26
(Received via mailing list)
>>> racc 1.4.6 has been released!
>> YAY!!

Can it lex JavaScript?

(All I need is some hierarchical report of the structure...)
Be30361bb0b0c495e3077db43ad84b56?d=identicon&s=25 Aaron Patterson (Guest)
on 2008-12-30 19:56
(Received via mailing list)
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!

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
Aafa8848c4b764f080b1b31a51eab73d?d=identicon&s=25 Phlip (Guest)
on 2008-12-30 21:55
(Received via mailing list)
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...
Aee77dba395ece0a04c688b05b07cd63?d=identicon&s=25 Daniel Berger (djberg96)
on 2009-01-02 14:26
(Received via mailing list)
Aaron Patterson wrote:
> ### 1.4.6
> * <http://racc.rubyforge.org/>
Gem install failure:

http://rubyforge.org/tracker/index.php?func=detail...

Regards,

Dan
Be30361bb0b0c495e3077db43ad84b56?d=identicon&s=25 Aaron Patterson (Guest)
on 2009-01-02 18:57
(Received via mailing list)
On Fri, Jan 02, 2009 at 10:24:52PM +0900, Daniel Berger wrote:
>>
>> * <http://i.loveruby.net/en/projects/racc/>
>> * <http://racc.rubyforge.org/>
>
> Gem install failure:
>
> http://rubyforge.org/tracker/index.php?func=detail...

Oops!  Should be fixed now.  Sorry about that.
Bec38d63650c8912b6ba9b557fb953b9?d=identicon&s=25 Roger Pack (rogerdpack)
on 2009-01-02 23:54
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/
Ae16cb4f6d78e485b04ce1e821592ae5?d=identicon&s=25 Martin DeMello (Guest)
on 2009-01-03 00:00
(Received via mailing list)
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!

Ooh, nice! Bookmarked!

martin
5a837592409354297424994e8d62f722?d=identicon&s=25 Ryan Davis (Guest)
on 2009-01-03 07:09
(Received via mailing list)
On Jan 2, 2009, at 14:53 , Roger Pack wrote:

> 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.
Bec38d63650c8912b6ba9b557fb953b9?d=identicon&s=25 Roger Pack (rogerdpack)
on 2009-01-04 04:33
> 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
This topic is locked and can not be replied to.