banner
Dave Horner's Website - Yet another perspective on things...
Home Tech Talk Programming Parsing code - getting a model view of your source.
If you appreciate the information found on this website, please drop me a line!

Who's Online

We have 34 guests online
Content View Hits : 1157264
moon and stars
How did you find my site?
 
How often do you answer random online questions?
 

Random Quote

"The limits of my language mean the limits of my world."
--Ludwig Wittgenstein
grandma
P1010089
img_1297_r1
Las_Vegas_2002_319

Parsing code - getting a model view of your source.

Friday, 15 May 2009 00:00
Getting a model of your code is very powerful kung foo.


pycparser - Project Hosting on Google Code - C parser and AST generator written in Python

gcc code dom

I think the idea of having the compiler spit out an xml model is awesome.
GCC-XML - open-source C++ parser, the C++ front-end to GCC, which is currently able to deal with the language in its entirety. The purpose of the GCC-XML extension is to generate an XML description of a C++ program from GCC's internal representation. Since XML is easy to parse, other development tools will be able to work with C++ programs without the burden of a complicated C++ parser.

Elsa

Elsa is a C and C++ parser which is based on Elkhound which is like Bison. Elkhound Overview


The classics

The LEX & YACC Page Bison - GNU parser generator
Standalone lexers with lex: synopsis, examples, and pitfalls


Sprint parser

Sprint is included within the excellent Boost C++ Libraries. Boost.Spirit Home
CodeProject: JSON Spirit: A C++ JSON Parser/Generator Implemented with Boost Spirit.
Last Updated on Sunday, 05 February 2012 09:47