Re: [Ilugc] Need to Learn ply or pycparser

2010-02-10 Thread Joe Steeve

Balachandar balachandarli...@gmail.com writes:
 into tokens.I need to process the tokens to identify some
 predefined patterns.

If these patterns are logical, llvm could be useful.

-- 
.o. I'm a Free man. I use Free Software.
..o
ooo http://www.joesteeve.org/


pgpMOXct59CYQ.pgp
Description: PGP signature
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] Need to Learn ply or pycparser

2010-02-10 Thread M K Saravanan
I used pyparsing for one of my parsing project.  It is easy to learn and use.

-- mks --

On Thu, Feb 11, 2010 at 3:15 AM, Joe Steeve joe_ste...@gmx.net wrote:

 Balachandar balachandarli...@gmail.com writes:
 into tokens.I need to process the tokens to identify some
 predefined patterns.
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] Need to Learn ply or pycparser

2010-02-09 Thread Ashok Gautham
On Mon, Feb 8, 2010 at 10:51 PM, Balachandar balachandarli...@gmail.com
wrote:
 Hi guys,
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.I searched in
 google
 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
http://www.lysator.liu.se/c/ANSI-C-grammar-l.html

Do the values 'returned' contain enough info for you? If so,
lex is the tool.

---
Ashok `ScriptDevil` Gautham
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


[Ilugc] Need to Learn ply or pycparser

2010-02-08 Thread Balachandar
Hi guys,
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.I searched in google 
and got some suggestions about pycparser and ply.But I am puzzled how to work 
with ply or pycparser.Please help me guys ..How can i get a kickstart in this..

___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] Need to Learn ply or pycparser

2010-02-08 Thread Rajagopal Swaminathan
Greetings,

On Mon, Feb 8, 2010 at 10:51 PM, Balachandar balachandarli...@gmail.com wrote:
 Hi guys,
    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.I searched in 
 google
 and got some suggestions about pycparser and ply.But I am puzzled how to work
 with ply or pycparser.Please help me guys ..How can i get a kickstart in 
 this..



Bison, Lex?

Regards,

Rajagopal
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc