Fun with RACC examples

I’ve been browsing the Pragmatic Programmer book and was taken by the
“learn something new” statement.

Since parsers have always been interesting to me, I decided on racc.

I put together a sample that I found on cmills.freesheel.org
presentation and have put a copy of it here:

http://pastie.caboo.se/88816

Can any tell me why this doesn’t work?

I’m using ruby 1.8.4 and racc version 1.4.5. Thanks for any guidance
you might provide.

Mike B.

On Aug 17, 4:00 pm, barjunk [email protected] wrote:

Can any tell me why this doesn’t work?

I’m using ruby 1.8.4 andraccversion 1.4.5. Thanks for any guidance
you might provide.

Mike B.

Looks like I made a type on line 32 of the pastie. It reads:

when /\A\S+/o

and should be:

when /\A\s+/o

Yikes! :slight_smile:

Its surprising that there wasn’t more conversation about this…is
there an elephant in the room that I can’t see? :slight_smile:

It seemed like everywhere I went to look for information about this, I
read “yacc/racc is hard”.

If folks aren’t using stuff like this, what do they use instead?

Mike B.

On 22 Aug 2007, at 06:20, barjunk wrote:

> > It seemed like everywhere I went to look for information about this, I > read "yacc/racc is hard". > > If folks aren't using stuff like this, what do they use instead? >

I looked at raac but the lack of docs put me off. Dhaka too much
better in that respect and I am just about to start using it.

http://dhaka.rubyforge.org/

Dave.

On Aug 21, 11:57 pm, Dave B. [email protected] wrote:

If folks aren’t using stuff like this, what do they use instead?

I looked at raac but the lack of docs put me off. Dhaka too much
better in that respect and I am just about to start using it.

http://dhaka.rubyforge.org/

Dave.

Mike B.

Dave,

Thanks for pointing me to that. The good thing about dhaka seems that
there are recent posts, implying active development.

I looked at racc because it seemed to be “the standard” with regard to
what folks would most likely be able to help with if I ran into
trouble.

I’ll give dhaka a try too and see what I can make of it.

Hopefully you’ll post some of your experiences here as well.

Mike B.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs