Re: Simple parser for C/C++
- From: Esa Heikkinen <esa.heikkinen@xxxxxx>
- Date: Fri, 28 Sep 2007 21:59:50 +0300
Helmut Giese kirjoitti:
On Fri, 28 Sep 2007 19:11:35 +0300, Esa Heikkinen
<esa.heikkinen@xxxxxx> wrote:
HiHi Esa,
How easy would be make simple parser for C/C++ by tcl ?
I would want to make tcl-script, which searchs all functions/methods and entry/exit points of functions/methods from C/C++-source file.
I think this should be possible, but i don't know how.
Michael already directed you to the page on the wiki which is probably
the best starting point for parsing C.
As for C++, there is no such thing as a "simple parser". Think of
classes, function and operator overloading, namespaces and - the most
terrible of all (in terms of parsing) - templates.
Just my 0.02
Best regards
Helmut Giese
Ok .. i understand, but i think it would be exist simpler way to detect only things i want. I don't want to parse all code. Maybe i do not need parser at all ?
Maybe i can do that by "regexp" or "string match" by investigating many rows of code at same time ?
I only want to detect row numbers of certain things (what i described before).
---
Esa
.
- Follow-Ups:
- Re: Simple parser for C/C++
- From: Alexandre Ferrieux
- Re: Simple parser for C/C++
- References:
- Simple parser for C/C++
- From: Esa Heikkinen
- Re: Simple parser for C/C++
- From: Helmut Giese
- Simple parser for C/C++
- Prev by Date: Re: Syntax
- Next by Date: How to create an Captcha with TclMagick?
- Previous by thread: Re: Simple parser for C/C++
- Next by thread: Re: Simple parser for C/C++
- Index(es):
Relevant Pages
|