Re: AST for several modules

iank@idiom.com (Ian L. Kaplan)
14 Jun 2000 12:59:50 -0400

          From comp.compilers

Related articles
AST for several modules Andreas.Ames@Tenovis.com (Andreas Ames) (2000-06-10)
Re: AST for several modules idbaxter@semdesigns.com (Ira D. Baxter) (2000-06-14)
Re: AST for several modules rod.bates@wichita.boeing.com (Rodney M. Bates) (2000-06-14)
Re: AST for several modules cfc@world.std.com (Chris F Clark) (2000-06-14)
Re: AST for several modules iank@idiom.com (2000-06-14)
Re: AST for several modules danwang+news@cs.princeton.edu (Daniel C. Wang) (2000-06-20)
Re: AST for several modules Andreas.Ames@Tenovis.com (Andreas Ames) (2000-06-20)
Re: AST for several modules joachim.durchholz@halstenbach.com.or.de (Joachim Durchholz) (2000-06-20)
Re: AST for several modules vugluskr@unicorn.math.spbu.ru (2000-07-18)
| List of all articles for this month |
From: iank@idiom.com (Ian L. Kaplan)
Newsgroups: comp.compilers
Date: 14 Jun 2000 12:59:50 -0400
Organization: Unknown
References: 00-06-038
Keywords: parse

Andreas Ames <Andreas.Ames@Tenovis.com> wrote:
>Till now I only know about descriptions how to build ASTs for single
>modules for programming languages like C, assembler etc. I wonder if
>somebody could give me some hints about how to parse and build a
>single ( or several connected ) ASTs for several modules/files,


    I think that the answer here is to simply chain the definitions
together in a list. The AST is built for each module and the module
is added to the module list, which is either kept in the AST or in a
separate data structure (I'd keep it in the AST).


    Control flow/data flow analysis is done on a module basis. Of
course functions can be in-lined, making them part of another module.


    My answer seems rather simplistic, so perhaps I have missed your
point here.


    Ian Kaplan
    abuse@bearcave.com


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.