Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Parsers for C

Reply
Thread Tools

Parsers for C

 
 
Nikhil
Guest
Posts: n/a
 
      05-03-2006
Hi,

I was interested in knowing of there are parsers in C than can parse C
code in some form of Data Structures and then after some user
manuplation, write back the code in a file.

A commercial tool which can do that would be the best ...

Thanks,

Nikhil

 
Reply With Quote
 
 
 
 
Jack Klein
Guest
Posts: n/a
 
      05-04-2006
On 3 May 2006 13:53:21 -0700, "Nikhil" <> wrote in
comp.lang.c:

> Hi,
>
> I was interested in knowing of there are parsers in C than can parse C
> code in some form of Data Structures and then after some user
> manuplation, write back the code in a file.
>
> A commercial tool which can do that would be the best ...
>
> Thanks,
>
> Nikhil


Look at http://www.google.com

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
 
Reply With Quote
 
 
 
 
ciju
Guest
Posts: n/a
 
      05-04-2006
Try Lex & Yacc

 
Reply With Quote
 
Roberto Waltman
Guest
Posts: n/a
 
      05-04-2006
"Nikhil" wrote:
>I was interested in knowing of there are parsers in C than can parse C
>code in some form of Data Structures and then after some user
>manuplation, write back the code in a file.
>A commercial tool which can do that would be the best ...


The following is Rod Pemberton's reply to a similar question:


>"Rod Pemberton" wrote:


>> > For a research project, we're looking for a reliable parser for C
>> > that will take an ANSI C program and yield a tree representation of
>> > the program (as a Java or C++ object). ...

>
>> I don't know which if any of these may fulfill your needs, but they may be
>> worth a look. I also noticed some of the links are bad as I posted, but
>> they may still help you to track them down.
>>
>> CIL - C Intermediate Language - C to C transformation
>> http://manju.cs.berkeley.edu/cil/
>>
>> WCC - A C Subset Compiler (DECUS ftp links now appear to be dead...sorry)
>> http://www.decus.org/libcatalog/desc...ml/v00281.html
>> ftp://ftp.encompassus.org/lib/
>>
>> npath - C Source Complexity Measures
>> http://www.geonius.com/software/tools/npath.html
>>
>> Check: A unit test framework for C
>> http://check.sourceforge.net/
>>
>> CTool Library (call-graph generator, source transformations)
>> http://ctool.sourceforge.net/
>>
>> Cproto automatically generates C function prototypes
>> http://cproto.sourceforge.net/
>>
>> JSCPP - a C preprocessor + parser with special modes
>> http://www.die-schoens.de/prg/
>>
>> CXREF C language cross referencing program
>> in volume1 of comp.sources.unix:
>> http://ftp.sunet.se/pub/usenet/ftp.u....sources.unix/
>>
>> CSur Le projet Csur (in French)
>> An analyzer of code C to detect common program execution errors
>> http://www.lsv.ens-cachan.fr/~goubault/Csur/csur.html
>>
>> Chico State Mini-C Compiler (CSMCC) is a student training load-and-go
>> compiler (incomplete, teaching tool)
>> http://www.ecst.csuchico.edu/~sameerg/compproj.html
>> http://www.ecst.csuchico.edu/~hilzer/csci250/proj/
>>
>> Edward Willink's C++ grammars:
>> http://www.computing.surrey.ac.uk/research/dsrg/fog/
>> (some of the links have an extra text '/v' in them, just delete)
>>
>> ISO C/C++ grammars version 1.2 (c-c++-grammars-1.2.tar.gz)
>> http://www.sigala.it/sandro/download.php
>>
>> A C99 Parser, a recursive decent parser
>> http://www.mazumdar.demon.co.uk/c_parser.html
>>
>> Ctags generates an index (or tag) file of language objects
>> http://ctags.sourceforge.net/
>>
>> Cdecl English<->C translator for C declarations
>> cdecl in volume6 of comp.sources.unix:
>> cdecl2 in volume14 of comp.sources.unix:
>> http://ftp.sunet.se/pub/usenet/ftp.u....sources.unix/

>
>These additional links may be of some use. ASTRÉE appears to be great
>but I don't see any code release...
>
>CCURED memory safe C transformations (for CIL)
>http://manju.cs.berkeley.edu/ccured/
>
>C Code Checker (for CIL)
>http://www.drugphish.ch/~jonny/cca.html
>
>PScan Scan C files for format string overflows
>http://www.striker.ottawa.on.ca/~aland/pscan/
>
>CQUAL C checking through extended type qualifiers
>http://www.cs.umd.edu/~jfoster/cqual/
>
>Smatch - Source Matcher, C source checker for Linux Kernel
>http://smatch.sourceforge.net/
>
>SPLint Secure Programming Lint error detection
>http://www.splint.org
>
>BOON Buffer Overrun detectiON
>http://www.cs.berkeley.edu/~daw/boon/
>
>CZECH, project pedantic error detection
>http://pedantic.sourceforge.net/
>
>Flawfinder for C (in Python)
>http://www.dwheeler.com/flawfinder/
>
>ASTRÉE determines absence of runtime errors (in OCAML)
>http://www.astree.ens.fr/
>"In Nov. 2003, ASTRÉE was able to prove completely automatically the absence
>of any RTE in the primary flight control software of the Airbus A340
>fly-by-wire system, a program of 132,000 lines of C"

 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      05-04-2006
"ciju" <> writes:
> Try Lex & Yacc


The question, which you failed to quote, was:

"Nikhil" <> writes:
| I was interested in knowing of there are parsers in C than can parse C
| code in some form of Data Structures and then after some user
| manuplation, write back the code in a file.
|
| A commercial tool which can do that would be the best ...

Please read <http://cfaj.freeshell.org/google/>.

As it turns out, typedefs make C very difficult to parse with just the
usual tools. (I speak from painful experience.) The preprocessor
makes it nearly impossible, unless you parse the code *after* it's
been preprocessed (or implement your own preprocessor as part of your
parser).

A Google search for "C parser" is undoubtedly the best first step.
You can reinvent this particular wheel if you like, but making it
round is going to be harder than you think.

--
Keith Thompson (The_Other_Keith) kst- <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
 
Reply With Quote
 
jacob navia
Guest
Posts: n/a
 
      05-04-2006
Nikhil a écrit :
> Hi,
>
> I was interested in knowing of there are parsers in C than can parse C
> code in some form of Data Structures and then after some user
> manuplation, write back the code in a file.
>
> A commercial tool which can do that would be the best ...
>
> Thanks,
>
> Nikhil
>


We distribute the lcc-win32 compiler.

We can do exactly what you want and tailor the compiler to parse C in
the form you want and write back the code as you specify.

Please send your specifications indicating what exactly you want to do
to me or to Q software solutions.

http://www.q-software-solutions.de

jacob
 
Reply With Quote
 
Rod Pemberton
Guest
Posts: n/a
 
      05-05-2006

"Roberto Waltman" <> wrote in message
news...
> "Nikhil" wrote:
> >I was interested in knowing of there are parsers in C than can parse C
> >code in some form of Data Structures and then after some user
> >manuplation, write back the code in a file.
> >A commercial tool which can do that would be the best ...

>
> The following is Rod Pemberton's reply to a similar question:
>


Thanks Walt. I've posted a more complete list to alt.os.development.

The short google link:
http://groups.google.com/group/alt.o...2981cca7?hl=en


Rod Pemberton


 
Reply With Quote
 
Ira Baxter
Guest
Posts: n/a
 
      05-15-2006

"Nikhil" <> wrote in message
news: oups.com...
> Hi,
>
> I was interested in knowing of there are parsers in C than can parse C
> code in some form of Data Structures and then after some user
> manuplation, write back the code in a file.
>
> A commercial tool which can do that would be the best ...


http://www.semanticdesigns.com/Produ...CFrontEnd.html

Meets all of your requirements.

--
Ira Baxter, CTO
www.semanticdesigns.com


 
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
javax.xml.Parsers location Gibakou Java 4 11-23-2004 07:04 PM
XSL-1000: (Fatal Error) Error while parsing XSL file (org.apache.xerces.parsers.AbstractSAXParser$AttributesProxy) Kevin Flood Java 0 09-08-2004 02:11 PM
How can I get a nicer HTML output from POD parsers??? dede Perl 0 08-05-2004 12:33 PM
Cloning Pull Parsers? Particularly XPP3 Nathaniel Hughes Java 0 02-02-2004 11:26 PM
Locator2 and SAX parsers Marcos Java 0 07-15-2003 05:34 PM



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