[Ilugc] Need to Learn ply or pycparser
thescriptdevil at gmail.com
Tue Feb 9 16:39:02 IST 2010
On Mon, Feb 8, 2010 at 10:51 PM, Balachandar <balachandarlinks at gmail.com>
> Hi guys,
> As a part of my project i need to parse a "c source code" into tokens.I
> to process the tokens to identify some predefined patterns.I searched in
> and got some suggestions about pycparser and ply.
ply looks like a general purpose lex/yacc replacement...
pycparser uses ply internally and generates the AST.
I am doubtful if you need pycparser. Take the source and
use only the lexer... You do not need a parser to tokenize.
This is a lex version of the C language
Do the values 'returned' contain enough info for you? If so,
lex is the tool.
Ashok `ScriptDevil` Gautham
More information about the ilugc