Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > C Grammar for Parse::RecDescent

Reply
Thread Tools

C Grammar for Parse::RecDescent

 
 
necnecnecnec@gmail.com
Guest
Posts: n/a
 
      01-07-2008
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
 
Reply With Quote
 
 
 
 
Florian Kaufmann
Guest
Posts: n/a
 
 
Reply With Quote
 
 
 
 
Ted Zlatanov
Guest
Posts: n/a
 
      01-07-2008
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Boolean grammar (javacc) Robert Watkins Java 0 11-12-2003 04:06 AM
Grammar Tree by Javacc CDS Java 0 11-06-2003 04:34 PM
Java Grammar Iván Roca Java 3 08-08-2003 10:38 PM
make a spell and grammar check possible in text area of a web page. Bhupesh Naik ASP .Net 2 08-07-2003 08:04 AM
Java Grammar Parser? exits funnel Java 3 07-19-2003 01:53 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57