Fun with RACC examples

B

barjunk

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.
 
B

barjunk

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 onracc.

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 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.
 
D

Dave Baldwin

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.
 
B

barjunk

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








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.


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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top