# Fun with RACC examples

**URL:** <https://www.ruby-forum.com/t/fun-with-racc-examples/112378>\
**Category:** Ruby\
**Created:** [August 18, 2007, 2:08am UTC](https://www.ruby-forum.com/t/fun-with-racc-examples/112378 "2007-08-18T02:08:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![barjunk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3ec8ea/32.png) [@barjunk](https://www.ruby-forum.com/u/barjunk)\
**Post date:** [August 18, 2007, 2:08am UTC](https://www.ruby-forum.com/t/fun-with-racc-examples/112378/1 "2007-08-18T02:08:01Z")

</div>

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](http://cmills.freesheel.org)  
presentation and have put a copy of it here:

[http://pastie.caboo.se/88816](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.

---

<div class="post-metadata">

**Author:** ![barjunk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3ec8ea/32.png) [@barjunk](https://www.ruby-forum.com/u/barjunk)\
**Post date:** [August 22, 2007, 7:20am UTC](https://www.ruby-forum.com/t/fun-with-racc-examples/112378/2 "2007-08-22T07:20:34Z")

</div>

On Aug 17, 4:00 pm, barjunk [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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! 🙂

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

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.

---

<div class="post-metadata">

**Author:** ![barjunk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3ec8ea/32.png) [@barjunk](https://www.ruby-forum.com/u/barjunk)\
**Post date:** [August 22, 2007, 9:58am UTC](https://www.ruby-forum.com/t/fun-with-racc-examples/112378/3 "2007-08-22T09:58:17Z")

</div>

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/](http://dhaka.rubyforge.org/)

Dave.

---

<div class="post-metadata">

**Author:** ![barjunk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3ec8ea/32.png) [@barjunk](https://www.ruby-forum.com/u/barjunk)\
**Post date:** [August 22, 2007, 4:55pm UTC](https://www.ruby-forum.com/t/fun-with-racc-examples/112378/4 "2007-08-22T16:55:35Z")

</div>

On Aug 21, 11:57 pm, Dave B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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/](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.
