Re: [Pyparsing] Can I write a ANSI C parse use pyparsing?
Brought to you by:
ptmcg
From: chunlin z. <zha...@gm...> - 2007-10-10 09:05:04
|
Paul - My intent is to parse c file and get the C data type detail,and in some situation I can use the data type detail(for example to analysis some data generate by C program) Yes...I agree with you,Writing a full ANSI C parser is really an ambitious project. ---- btw:I post this mail in gnane.comp.python.pyparsing.user,but I can not see your reply in newsgroup On 10/10/07, Paul McGuire <pa...@al...> wrote: > chunlin - > > Writing a full ANSI C parser is really an ambitious project. C has a lot of > surprising syntax options, in variable declarations (arrays, bitfields, > pointers, structs, unions), dereferencing of pointers, pointers to pointers, > pointers to functions, pre-and post-increment and decrement operators. In > addition, the C preprocessor can be extremely complicated to implement. > > Are you trying to write a full compiler, or trying to extract data from a > body of C source code, or transform code to adapt to a changing API, or what > exactly? > > -- Paul > > > -----Original Message----- > From: pyp...@li... > [mailto:pyp...@li...] On Behalf Of chunlin > Sent: Wednesday, October 10, 2007 1:33 AM > To: pyp...@li... > Subject: [Pyparsing] Can I write a ANSI C parse use pyparsing? > > I have not dive into pyparsing. > Before that I want to ask if it can make this job well... > > Thanks! > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Pyparsing-users mailing list > Pyp...@li... > https://lists.sourceforge.net/lists/listinfo/pyparsing-users > > |