Welcome to ABC, the ANTLR-Based C front-end. ABC is a Java program for parsing and manipulating programs written in C and possibly some languages extending C, such as CIVL-C. It can be used to perform a number of tasks, including the following:
- preprocess the source file(s)
- parse the preprocessed source to form an Abstract Syntax Tree representation of a translation unit
- analyze an AST to determine the type of every expression, the entity associated to every identifier, the scope of every node, and so on
- merge multiple ASTs into one large AST
- transform ASTs, by, for example, removing expressions with side-effects, renaming entities, pruning unreachable code, etc.
invalid reference
ABC
- util
- responsibilities: simple general-purpose utility classes that do not use other parts of ABC
- uses: nothing
- interface:
dev.civl.abc.util.IF - entry point: none
- config
- responsibilities: representation of configuration parameters for ABC
- uses: nothing
- interface:
dev.civl.abc.config.IF - entry point:
Configurations
- token
- responsibilities: representing tokens; keeping track of the origin and history of each token through macro expansion and inclusion; representing characters and strings
- uses: util
- interface:
dev.civl.abc.token.IF - entry point:
Tokens
- front
- responsibilities: preprocessing and parsing a file to produce an ANTLR tree representation of a translation unit
- uses: util, config, token
- interface:
dev.civl.abc.front.IF, - entry point:
- submodules
- preproc
- responsibilities: preprocessing a file to generate a post-preprocessor token stream
- uses: util, config, token
- interface:
,
invalid reference
dev.civl.abc.front.c.preproc.IFinvalid reference
dev.civl.abc.front.fortran.preproc.IF - entry point:
,
invalid reference
Preprocessinvalid reference
Preprocess
- parse
- responsibilities: parsing a token stream to produce an ANTLR tree representation of a translation unit
- uses: util, config, token
- interface:
,
invalid reference
dev.civl.abc.front.c.parse.IFinvalid reference
dev.civl.abc.front.fortran.parse.IF - entry point:
,
invalid reference
Parseinvalid reference
Parse
- ptree
- preproc
- ast
- responsibilities: representation and manipulation of an Abstract Syntax Tree and associated entities
- uses: util, token
- interface:
dev.civl.abc.ast.IF - entry point:
ASTs - submodules
- value
- responsibilities: representation of concrete value, such as characters, integers, floating point values
- interface:
dev.civl.abc.ast.value.IF - entry point:
Values
- type
- responsibilities: representation of types
- interface:
dev.civl.abc.ast.type.IF - entry point:
Types
- entity
- responsibilities: representation of abstract program entities which can be named by an identifier, including variables, functions, labels, scopes, structures, unions, enumerations, enumerators, and typedefs
- interface:
dev.civl.abc.ast.entity.IF - entry point:
Entities
- conversion
- responsibilities: representation of C's implicit conversions, such as the conversion of an array to a pointer to the first element of the array, and so on
- interface:
dev.civl.abc.ast.conversion.IF - entry point:
Conversions
- node
- responsibilities: representation of AST nodes
- interface:
dev.civl.abc.ast.node.IF - entry point:
Nodes
- value
- astgen
- responsibilities: translation of ANTLR tree to AST
- uses: util, token, front, ast
- interface:
,
invalid reference
dev.civl.abc.astgen.IF,invalid reference
dev.civl.abc.astgen.c.IFinvalid reference
dev.civl.abc.astgen.fortran.IF - entry point:
invalid reference
dev.civl.abc.astgen.IF.ASTGenerator
- analysis
- responsibilities: analyzing AST, creation of entities, resolution of all identifiers, determination of all scopes, types, and entities
- uses: config, token, ast
- interface:
dev.civl.abc.analysis.IF - entry point:
Analysis
- transform
- responsibilities: transformations of an AST
- uses: token, ast
- interface:
dev.civl.abc.transform.IF - entry point:
Transform
- program
- responsibilities: mutable representation of a program
- uses: token, ast, analysis, transform
- interface:
dev.civl.abc.program.IF - entry point:
Programs
- main
- responsibilities: command line interface, Activator class for marshaling of tools in tool chain
- uses: util, token, front, ast, astgen, analysis, transform, program
- interface:
invalid reference
dev.civl.abc - entry point:
invalid reference
ABC
Modules