f



C++ Abstract Syntax Tree

Is there to your knowledge any existing free C++ open source code that
parses C++ code and generates an abstract syntax tree?

Thanks
0
4/21/2004 4:47:56 AM
comp.compilers 3310 articles. 1 followers. Post Follow

3 Replies
3018 Views

Similar Articles

[PageSpeed] 11

Wouter Lievens wrote:
> Is there to your knowledge any existing free C++ open source code that
> parses C++ code and generates an abstract syntax tree?

I think there's some grammar for PCCTS 1.x (looak at www.antlr.org). PCCTS
generates C++ code so that would be what you need.

rgds

Sebastian Kaliszewski
0
Sebastian
4/28/2004 7:22:29 PM
"Wouter Lievens" <lievenswouter@snotmail.com> wrote
> Is there to your knowledge any existing free C++ open source code that
> parses C++ code and generates an abstract syntax tree?

http://opencxx.sourceforge.net

BR
Grzegorz
0
jakacki
4/28/2004 7:22:43 PM
> Is there to your knowledge any existing free C++ open source code that
> parses C++ code and generates an abstract syntax tree?

GCC generates trees (AST) and uses trees as it's internal representation
before generating the IR.

Vidya Praveen

0
Vidya
4/29/2004 4:03:16 PM
Reply:

Similar Artilces:

program that compiles in C compiler but not in C++ compiler
Hi, I need a small program that compiles in C compiler but not in C++ compiler. Thx in advans, Karthik Balaguru KBG <karthik.balaguru@lntinfotech.com> wrote: > I need a small program that compiles in C compiler but not in C++ > compiler. No problem, just send $10 to paypal@zevv.nl and I'll do your homework for you. -- :wq ^X^Cy^K^X^C^C^C^C KBG said: > Hi, > > I need a small program that compiles in C compiler but not in C++ > compiler. Can you think of any syntactic differences between C and C++? For example, what about keywords? They are very, very sen...

Bison: reentrant C++ abstract-syntax-tree parser
I'm trying to use bison to make an abstract syntax tree. I'm trying to do it in a nice C++ sort of way. But I'm finding it very difficult, and would really find it helpful if someone could point me to an example of "best practice". I'd really like to just return an object in response to a grammar rule, like I did with JavaCC. But bison wants to put all possible return types in a union, and it's not allowed to put a class in a union, so I can't. I found some examples which used pointers instead. So when the grammar matched a rule, it created a new instance of...

Are sun studio C/C++ compilers and Forte C/C++ compilers same ??
Is there any difference between sun studio compilers and forte compilers??? or the names have been changed??? In article <1145338052.955429.256610@v46g2000cwv.googlegroups.com>, "ameya_agnihotri" <ameyaagnihotri22@gmail.com> writes: > Is there any difference between sun studio compilers and forte > compilers??? > or the names have been changed??? One of many name changes in the product's history (including amongst others, Java somethingortheother, Workshop, Proworks/Teamworks, and probably more I've forgotten). Of course, the versions and features cha...

compiling c code but libraries are compiled in c++
hi, We have written cunit code for testing some APIs. defination of those APIs are in c++ and .so library is created of them. when I compile my cunit code it gets compiled successfully but while liking it gives undefined reference to symbol. can anyone help me in this matter. Regards Sumit Shrivastava On 29 May 2007 04:11:14 -0700 sumit <sumit.shrivastava09@gmail.com> wrote: | We have written cunit code for testing some APIs. defination of | those APIs are in c++ and .so library is created of them. when I | compile my cunit code it gets compiled successf...

Will C pgm compile on C++ compiler?
I had C programming in school years ago and would like to play with it again. When I go online I only seem to be able to find C++ compilers. I know that C++ is object oriented, whereas C is not. I can get a good price on Visual C++ 6.0. Is there a way to run native C programs on a C++ compiler? Thanks, Ken [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] "Ken Applequist" <apple07840@yahoo.com> wrote in message news:<Sh%1d.4320$F75.1229@trndny01>... > I had C programming in school ...

Writing a C/C++ compiler in C++
I've been thinking of writing a C++ compiler in C++ over the next several years, and I was wondering what's changed in writing a compiler? I've been pouring over these groups and there seems to be a lot of tools for starting but is the modern process still the same? As far as I understand it you write a lexer that tokenizes all the symbols, then write a parser that parses all of the tokens, then walks the parse tree to generate the asm or IL that gets shoved to the backend. So it seemed straightforward except that C++ isn't a LALR(1) grammer that Bison or Byacc accepts. Does ...

Could I compile "c" source with a C++ compiler (Forte C++ Update 2)?
Does Forte C++ Update 2 compiles C source code in ANSI C as same as Forte C udpate 2 does? Jacob, Park <bluejacob@empal.com> wrote: > Does Forte C++ Update 2 compiles C source code in ANSI C as same as > Forte C udpate 2 does? If you're asking whether "CC" will compile the same code as "cc", then the answer is no. This is true for ANY standard-compliant c++ compiler (compilers with different "language mode" like gcc don't count as a single compiler for this description). However, usually one can make C code "compilable" by C++ co...

Re: Will C pgm compile on C++ compiler?
Ken Applequist wrote: > I had C programming in school years ago and would like to play with it > again. When I go online I only seem to be able to find C++ compilers. I know > that C++ is object oriented, whereas C is not. I can get a good price on > Visual C++ 6.0. Is there a way to run native C programs on a C++ compiler? Several authors implied that a C++ compiler can compile C programs. This is only correct with some restrictions. For example, you can obviously not use C++ keywords as identifiers. For example, the following is a legal C program but will fail using C++: in...

commercial c compilers vs free c compilers
what are the benefits in using commercial compilers like intel, greenhill or portland compared to free c compiles like gcc, lcc, tcc, TenDRA, sun and others? geletine wrote: > what are the benefits in using commercial compilers like intel, > greenhill or portland compared to free c compiles like gcc, lcc, tcc, > TenDRA, sun and others? > <mostly non-topical> As we have no idea of your interests, potential benefits may not be meaningful in your projects. More than one of these commercial compilers is more efficient about vectorization, although gcc is closing the gap. <...

link a c compiled application with a c++ compiled library ?
Hi, I've searched nearly one hour for this but found nothing usefull :-/ So my question is simple : Is it possible to link a c compiled application with a C++ compiled library ?? If yes, how would it possible.. (I guess this would be indirectly posible by using some wrapper around the c++ library, but I'm aboslutely not wanting to do that in my case, well at least if I have to write that wrapper manually myself). I looked at gcc,g++ man pages, gcc online documentation, .. but can't even find a beginning of info related to that :-/ Thank you if you can help me. Regards, ...

C/C++ compiler
Exceptionally would need to build a prog. executable to run in a 16bit environment (MS-DOS). What a compiler (for experience), that of setting options can generate executables in a 16bit not protected environment ? That is a compiler that can be run under WinXP and genres just a 16bit executable? I think it is called a cross-compiler! Obviously, free downloadable ... Thanks in advance. ostia schrieb: > Exceptionally would need to build a prog. executable to run > in a 16bit environment (MS-DOS). > What a compiler (for experience), that of setting > options can generate executa...

C to C++ Syntax
Hello all, I have a question regarding syntax, coming from a C background. In C, if I had a function like this: char *ParseDelimitedString(char *String,int DelimitedNumber,char *Retval,int MaxBytes) { .... return(Retval); } This would be the way to return a string, instead of trying to return a local variable. Of course, you can malloc() within the function and return that, but I dont like having the caller know he has to free() it, but I digress.. In C++, if I had this function as a static function, in some StringUtil class: std::string &StringUtil::ParseDelimitedString(strin...

Compiling C into C++
I'm trying to include a C header file from an external library in my C+ + program but when I compile I get the following error: error: expected unqualified-id before 'private' error: abstract declarator 'void*' used as declaration error: expected ';' before 'private' It didn't take me long to figure out that the offending C header file uses a variable with the name "private". I've reproduced the problem as follows: /* -------- a.h - the C header file */ #ifndef TEST_H #define TEST_H struct s { void *private; }; #endif /* -------- end...

C compiles, C++ Does Not
I recently installed DJGPP on my system. There was no problem during the install. However I can compile C programs without any problems but when I try to compile a C++ program I get a long list of error messages and the file will not compile. Can anyone suggest what the problem might be ? On Thu, 15 Apr 2004 03:35:45 GMT in comp.os.msdos.djgpp, charlesreed@eatel.net (Charles Reed) wrote: > I recently installed DJGPP on my system. There was no >problem during the install. However I can compile C programs without >any problems but when I try to compile a C++ program I get a...

Web resources about - C++ Abstract Syntax Tree - comp.compilers

Sealed Abstract
sealed abstract class drew;

List (abstract data type) - Wikipedia, the free encyclopedia
In computer science , a list or sequence is an abstract data type that implements a finite ordered collection of values , where the same value ...

Oakland Zoo auctions off abstract paintings by elephants, lemurs, giraffes
An auction for 32 colorful paintings produced by elephants, giraffes, river otters and even a cockroach at the Oakland Zoo is underway with more ...

Give photos and videos some abstract flair with GeometriCam
GeometriCam - abstract geometric design in real-time Give photos and videos some abstract flair with GeometriCam is a story by AppAdvice.

Ellsworth Kelly, Giant of Abstract Painting, Dies at 92
ARTnews Ellsworth Kelly, Giant of Abstract Painting, Dies at 92 ARTnews Ellsworth Kelly, who began his influential 70-year career with thrilling ...

Abstract Painter Carl Morris
Carl Morris, an abstract painter who studied in Chicago and whose work echoed the forces and forms of nature, has died. He was 82.Mr. Morris ...

Take An Abstract, Virtual Road Trip With This Music-Video-Turned-App
An ode to the last days of summer. Tumbling down the highway at full speed, the landscape out the window becomes a blur and passing objects ...

Review: 'Steve Jobs' Is An Electrifying Interpretive Dance Of Abstract Biographical Cinema
Danny Boyle and Aaron Sorkin's Steve Jobs is a fantastically entertaining cinema. The Box Office: Steve Jobs debuts in limited release in New ...

These Kaleidoscopic, Abstract Images Are Trippy And Gorgeous
Sometimes you see the work of an artist and you just want to stare at it for a long, long time. Such is the art of Joe Eisner, whose digital ...

Influential Abstract Painter And Sculptor Ellsworth Kelly Dies At 92
Dec 27 (Reuters) - Influential American abstract painter and sculptor Ellsworth Kelly died on Sunday, said an art gallery owner in New York. ...

Resources last updated: 1/24/2016 7:10:17 AM