473,769 Members | 2,382 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

parse C source flow to extract program tree

Hello colleagues,

Could anybody tell me if there are existing open-source solutions to
extract the program tree using a program source code? I'm aware that
GCC has program flow information and tree respectively for
optimization, but I'm looking for something less complicated.
An ideal case would be a small program based on a parser with YACC
compatible grammar which extracts the program flow tree.

Best regards,
C
Jan 15 '08 #1
6 2440
Crooter wrote:
Hello colleagues,

Could anybody tell me if there are existing open-source solutions to
extract the program tree using a program source code? I'm aware that
GCC has program flow information and tree respectively for
optimization, but I'm looking for something less complicated.
An ideal case would be a small program based on a parser with YACC
compatible grammar which extracts the program flow tree.
Not really OT here (guess it'd be topical in comp.unix.progr ammer), but try
looking for cflow.

Bye, Jojo
Jan 15 '08 #2
On Jan 15, 6:26*am, Crooter <crooo...@gmail .comwrote:
Hello colleagues,

Could anybody tell me if there are existing open-source solutions to
extract the program tree using a program source code? I'm aware that
GCC has program flow information and tree respectively for
optimization, but I'm looking for something less complicated.
An ideal case would be a small program based on a parser with YACC
compatible grammar which extracts the program flow tree.
http://sourceforge.net/search/?type_...ords=flowchart
FCOL
Jan 16 '08 #3
Thanks a lot, Jojo, it looks like the most suitable solution.
Joachim Schmitz:
Crooter wrote:
....skipped...
Not really OT here (guess it'd be topical in comp.unix.progr ammer), but try
looking for cflow.

Bye, Jojo
Jan 16 '08 #4
Thank you, the tools you mentioned are quite good for human analysis
of source code (graphical representation especially), but I was
looking for something more 'internal' or intermediate. Still the ideas
in the tools can be interesting.

To be honest, I'm surprised with the speed you answered. I wish I
could help anybody so fast. :)

On 16 ÑÎ×, 07:00, user923005 <dcor...@connx. comwrote:
On Jan 15, 6:26šam, Crooter <crooo...@gmail .comwrote:
http://sourceforge.net/search/?type_..._of_search=sof....
FCOL
Jan 16 '08 #5
Crooter wrote:
Thanks a lot, Jojo, it looks like the most suitable solution.
Please don't top-post. Your replies belong following or interspersed
with properly trimmed quotes. See the majority of other posts in the
newsgroup, or:
<http://www.caliburn.nl/topposting.html >
Jan 16 '08 #6
Crooter wrote: *** and top-posted. Fixed. ***
>
.... snip ...
>
Thank you, the tools you mentioned are quite good for human
analysis of source code (graphical representation especially),
but I was looking for something more 'internal' or intermediate.
Still the ideas in the tools can be interesting.

To be honest, I'm surprised with the speed you answered. I wish
I could help anybody so fast. :)
Please do not top-post. Your answer belongs after (or intermixed
with) the quoted material to which you reply, after snipping all
irrelevant material. I fixed this one. See the following links:

--
<http://www.catb.org/~esr/faqs/smart-questions.html>
<http://www.caliburn.nl/topposting.html >
<http://www.netmeister. org/news/learn2quote.htm l>
<http://cfaj.freeshell. org/google/ (taming google)
<http://members.fortune city.com/nnqweb/ (newusers)

--
Posted via a free Usenet account from http://www.teranews.com

Jan 17 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1337
by: Manlio Perillo | last post by:
Hi. With module parser it is possible to access Python parse trees. But this only works for 'external' source. I would like to known if, at least in theory, it can be possible to access Python parse trees from 'inside' a script. As a simple example:
0
1694
by: Chad Whitacre | last post by:
Hey all, I've been playing around with the parser module, and based on the documentation I would expect all symbols in a parse tree to be part of the grammar. For example, I find this line in the symbol module docs: Refer to the file Grammar/Grammar in the Python distribution for the definitions of the names in the context of the language grammar. However, the program below gives me a human-readable parse tree (also
0
1774
by: M.B. | last post by:
Hi I'm currently converting an application from Java to C#, and in this application I need to read a C# source file, extract some information and then write a modified version of the original source file. I need information such as method names, parameters and return statements. For example, given the method declaration: public ArrayList MyFunction(int param1, bool param2)
22
872
by: Ram Laxman | last post by:
Hi all, I have a text file which have data in CSV format. "empno","phonenumber","wardnumber" 12345,2234353,1000202 12326,2243653,1000098 Iam a beginner of C/C++ programming. I don't know how to tokenize the comma separated values.I used strtok function reading line by line using fgets.but it gives some weird behavior.It doesnot stripout the "" fully.Could any body have sample code for the same so that it will be helfful for my...
3
2188
by: Aaron | last post by:
I'm a newbie so please bear with me... I'm looking to parse XML into a Collection so that I can pass that collection around to functions to extract data from it easily. I'm hoping there is code already to parse std XML files into a Collection? All I've found is code where the XML structure is already known... I need to code to work no matter what the structure... it would "figure out" what nodes are parents/children and such then place...
4
2504
by: kj | last post by:
I consider myself quite proficient in C and a few other programming languages, but I have never succeeded in understanding a largish program (such as zsh or ncurses) at the source level. Basically, I quickly become disoriented, losing sight of the forest for the trees. What's your approach for understanding a large program at the source level? By "understanding a program" I mean more than just figuring out where to zero in to make a...
34
2986
by: priyanka | last post by:
Hi, I was wondering if we could parse or do something in the executable( whose source language was C). How can I use some scripting language like perl/python to find out the information about the executable ? Is it possible ? Also, how does the compiler add inling to the program ? I know that whenever it sees"inline" in front of the procedure name, it inlines it. But if we give the -finline options, it inline all the procedures ? How
29
2909
by: gs | last post by:
let say I have to deal with various date format and I am give format string from one of the following dd/mm/yyyy mm/dd/yyyy dd/mmm/yyyy mmm/dd/yyyy dd/mm/yy mm/dd/yy dd/mmm/yy mmm/dd/yy
5
64651
AdrianH
by: AdrianH | last post by:
Assumptions I am assuming that you know or are capable of looking up the functions I am to describe here and have some remedial understanding of C++ programming. FYI Although I have called this article “How to Parse a File in C++”, we are actually mostly lexing a file which is the breaking down of a stream in to its component parts, disregarding the syntax that stream contains. Parsing is actually including the syntax in order to make...
0
9586
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10043
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9990
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8869
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7406
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5298
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3956
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2814
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.