On Feb 8, 2010, at 12:17 PM, balachandarlinks wrote:
>    As a part of my project i need to parse a "c source code" into
> tokens.I need to process the tokens to identify some predefined
> patterns.

"c source code" is a nebulous definition. Which version of C, which compiler, 
which extensions? With support for all the preprocessor commands?

You do NOT want to use PLY from scratch for this project unless you really know 
what you are getting yourself into. For an example of things that can go wrong:

  
http://cacm.acm.org/magazines/2010/2/69354-a-few-billion-lines-of-code-later/fulltext


Your best bet is to use something like gcc-xml at:

  http://www.gccxml.org/HTML/Index.html

or Coccinelle at

  http://coccinelle.lip6.fr/

Odds are your requirements aren't complex enough to require that level of tool 
support, but perhaps a set of regular expressions is good enough.

In any case, it would be hard to answer unless you go into more details.


                                Andrew
                                [email protected]


-- 
You received this message because you are subscribed to the Google Groups 
"ply-hack" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/ply-hack?hl=en.

Reply via email to