C Grammar for Parse::RecDescent

Discussion in 'Perl Misc' started by necnecnecnec@gmail.com, Jan 7, 2008.

  1. Guest

    Hello,

    I'm looking for a grammar to help with parsing C programs. Is there
    something ready?
    (I've seen in perlmonks some regular expression method, but it's a bit
    weak to my needs).

    Thanks,
    Nec
    , Jan 7, 2008
    #1
    1. Advertising

    1. Advertising

  2. Ted Zlatanov Guest

    On Sun, 6 Jan 2008 21:19:00 -0800 (PST) wrote:

    n> I'm looking for a grammar to help with parsing C programs. Is there
    n> something ready? (I've seen in perlmonks some regular expression
    n> method, but it's a bit weak to my needs).

    AFAIK this is a hard problem that hasn't been solved yet. P::RD could
    do it, in theory, but what I've seen are only partial implementations.
    If you or anyone else have an actual functioning lexer and parser or the
    equivalent P::RD grammar, I'd be very interested in taking a look. I've
    wished for something like that myself but never had the time to work on
    it.

    Florian's answer is a good starting point, but actually implementing the
    BNF is the hard part.

    Ted
    Ted Zlatanov, Jan 7, 2008
    #3
    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. jean-gert nesselbosch

    XPath1.0-grammar compatible to Parse::RecDescent

    jean-gert nesselbosch, May 12, 2006, in forum: XML
    Replies:
    0
    Views:
    402
    jean-gert nesselbosch
    May 12, 2006
  2. ccm news
    Replies:
    0
    Views:
    3,055
    ccm news
    Jan 15, 2009
  3. Lex Williams

    Alternative to Parse::RecDescent

    Lex Williams, Aug 26, 2008, in forum: Ruby
    Replies:
    4
    Views:
    189
    James Gray
    Aug 27, 2008
  4. Jon Ericson

    Huffman coding and Parse::RecDescent

    Jon Ericson, Apr 22, 2004, in forum: Perl Misc
    Replies:
    4
    Views:
    159
    Jon Ericson
    Apr 23, 2004
  5. jean-gert nesselbosch

    XPath1.0-grammar compatible to Parse::RecDescent

    jean-gert nesselbosch, May 17, 2006, in forum: Perl Misc
    Replies:
    0
    Views:
    113
    jean-gert nesselbosch
    May 17, 2006
Loading...

Share This Page