Where to start in parsing?

I haven’t programmed in a while, but I want to get back with doing
some parsing for a text adventure I want to make. I know it’s not
Ruby’s specialty, but it’s nice to try and learn how to do something
like this in a language that has good string support.

So I want to start learning to parse, so naturally I go to Goolge. But
of course, I got a lot of XML and stuff like that and that’s really
not what I’m looking for (I think). So where do I start? I think I’ve
heard that regex is the modern parsing algorithm. Or would a different
library be more helpful for me right now?

On Fri, Jun 29, 2007 at 02:55:02PM +0900, [email protected] wrote:

I haven’t programmed in a while, but I want to get back with doing
some parsing for a text adventure I want to make. I know it’s not
Ruby’s specialty, but it’s nice to try and learn how to do something
like this in a language that has good string support.

So I want to start learning to parse, so naturally I go to Goolge. But
of course, I got a lot of XML and stuff like that and that’s really
not what I’m looking for (I think). So where do I start? I think I’ve
heard that regex is the modern parsing algorithm. Or would a different
library be more helpful for me right now?

Check out Dhaka:
http://dhaka.rubyforge.org/

It starts with simple examples and goes all the way up to a non trivial
language.

marcel

On Jun 29, 2:01 am, “Marcel Molina Jr.” [email protected] wrote:

library be more helpful for me right now?

Check out Dhaka:http://dhaka.rubyforge.org/

It starts with simple examples and goes all the way up to a non trivial language.

marcel

Marcel Molina Jr. [email protected]

Thank you.

On Jun 29, 3:08 am, “[email protected][email protected] wrote:

So I want to start learning to parse, so naturally I go to Goolge. But

Marcel Molina Jr. [email protected]

Thank you.

Err…to clarify, WTF is “sudo gem install dhaka” supposed to mean?
(Sorry for the double post…or would this be a triple?)

Err…how exactly do you install a gem?

As I think someone said:

“sudo gem instal ”

on a unix or OS X terminal.

[It means, running as root, execute the “gem” program with the command
“instal” for the gem named . This is how to do it on unix of
OS X.]

If you’re on Windows, you’ll need to use the gem installer that I’m sure
comes with the one click package.

You might want to look here:

http://rubygems.org/

Cheers,
Benj

On Jun 29, 3:08 am, “[email protected][email protected] wrote:

So I want to start learning to parse, so naturally I go to Goolge. But

Marcel Molina Jr. [email protected]

Thank you.

Err…how exactly do you install a gem?

Hi …these links will definitely prove useful…
Installing on Windows
http://wiki.rubyonrails.org/rails/pages/GemRails

http://wiki.rubyonrails.org/rails/pages/RailsOnWindows

Regards,
Ujjwal

You need to have RubyGems installed. IIRC, the Windows One-click
Installer
includes RubyGems so you should just be able to "gem install "
on
Windows.

If you’re using OS X, the DarwinPorts “rb-rubygems” package is what you
need; on Debian or Ubuntu you need the “rubygems” package.

Mushfeq.

If you’re on Windows, you’ll need to use the gem installer that I’m sure
comes with the one click package.

You might want to look here:

http://rubygems.org/

Cheers,
Benj

Well, I do have Windows and I’m kind of trying to figure this all out,
but it seems almost all of the instructions for using this stuff is
for Lunix and stuff. How do I install a gem on Windows and have Ruby
take care of it all…or just where do I put the installed gem?

Sorry for the trouble. Hoping this is the last off-topic problem.

There are quite a few gems that install on Windows just like Linux /
Mac:

gem install whatever

(replace whatever with the gem to install)

You don’t need the sudo on Windows, but if you’re on Vista you might
want to
start the “cmd” shell by typing that into the search box (where Run used
to
be) and hitting CTRL+SHIFT+ENTER instead of just enter to gain Admin
rights.

Many gems that have binaries will prompt you about which version to
install,
and if there’s an mswin32 version, select it.

If a gem fails to install, it is likely because it doesn’t come bundled
with
a binary and it’s trying to compile it and can’t. In that case, check
the
gem’s website out to see if there’s a Windows version. There often is.

Robert