# Ast/parse-to-ast.api
# Compiled by:
#
src/lib/c-kit/src/ast/ast.sublib# This is the top-level interface to the C frontend.
# It is implemented by the packages Ansic, FiveESSC, and D
stipulate
package fil = file__premicrothread; # file__premicrothread is from
src/lib/std/src/posix/file--premicrothread.pkgherein
api Parse_To_Raw_Syntax_Tree {
#
# Raw_Syntax_Tree_Bundle: the collection of information
# returned as the result of typechecking:
#
Raw_Syntax_Tree_Bundle
=
{ raw_syntax_tree: raw_syntax::Raw_Syntax_Tree, # The abstract syntax representation of a trans. unit
tidtab: tidtab::Uidtab( namings::Tid_Naming ), # table of type identifiers
error_count: Int, # Count of errors occuring during parsing and elaboration
warning_count: Int, # Count of warnings occuring during parsing and elaboration
auxiliary_info: # Annotations and symbol table info
{ dictionary: state::Symtab, # Symbol table generated during typechecking.
aidtab: tables::Aidtab, # Type annotation table.
implicits: tables::Aidtab # Types associated with implicit argument conversions.
# See, e::g. "usual unary" and "usual binary" conversions
# in Harbison & Steele
}
};
prog_to_state: Raw_Syntax_Tree_Bundle -> state::State_Info;
#
# Extracts stateInfo from Raw_Syntax_Tree_Bundle
# for cascading processing of multiple
# translation units
file_to_raw_syntax_tree'
:
fil::Output_Stream # Error stream
-> (sizes::Sizes, state::State_Info) # Sizes info and initial state
-> String # source file
-> Raw_Syntax_Tree_Bundle;
#
# processs a source file given the state resulting
# from processing previous files
file_to_raw_syntax_tree
:
String # source file
->
Raw_Syntax_Tree_Bundle;
#
# Process a file in isolation.
file_to_c: String -> Void;
#
# Process a file and pretty print the resulting raw_syntax_tree.
}; # Api Parse_To_Raw_Syntax_Tree
end;
## Changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.