Using ruby for generic language parsing (or any language-specificparsing libraries out there?)

Discussion in 'Ruby' started by Andrew S. Townley, Apr 13, 2009.

  1. Hi,

    I've been looking at the various parser generator options for Ruby on
    and off for a while now, and I was wondering if anyone had any
    experience/recommendations on existing solutions.

    What I'd ideally like to have is a set of pre-defined parser libraries
    that defined an event-driven interface for handling productions. This
    would theoretically allow you to simply plug in your own business logic
    into a robust, maintained and (hopefully) well-tested parser without
    actually having to go though the tedium and pain of defining a bunch of
    parsers yourself.

    I'd like to be able to have something like this for SQL-92, Java and C,
    with potentially other languages in the future. I'm guessing stuff like
    this has been developed for many of the IDEs out there that support
    these languages, but I've never seen something as complete as what I'm
    talking about via searching through google.

    In the past, I've written parsers with Lex/Yacc, and I did do some work
    a couple of years ago with rex & racc, but for anything as complex as
    the above, I think rex/racc would be a) too time consuming/error prone
    (I found it incredibly difficult to debug and diagnose problems and
    generate reasonable error messages) and b) surely re-inventing the wheel
    for the nth time, where n > 10,000,000,000. :)

    I looked a bit at rparsec and treetop, but before I go down this path, I
    was hoping to tap some of the community's collective wisdom for pointers
    to similar initiatives.

    Any information, suggestions or war stories would be most appreciated.

    Cheers,

    ast
    --
    Andrew S. Townley <>
    http://atownley.org
    Andrew S. Townley, Apr 13, 2009
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jerry Stuckle
    Replies:
    13
    Views:
    387
    Tom St Denis
    Oct 22, 2010
  2. Eric Danstron

    Are there ANY good forums out there anymore???

    Eric Danstron, Sep 21, 2005, in forum: ASP General
    Replies:
    1
    Views:
    145
    Immediacy
    Sep 22, 2005
  3. Darryl Owens
    Replies:
    1
    Views:
    299
    Robert Miles
    Nov 12, 2012
  4. Darryl Owens
    Replies:
    1
    Views:
    305
  5. Darryl Owens
    Replies:
    7
    Views:
    249
    Dwight Hutto
    Oct 7, 2012
Loading...

Share This Page