Go to the source code of this file.
Compounds | |
struct | extern_entry |
struct | _ecl_code_struct |
Typedefs | |
typedef parse_struct * | ecl_parse_context |
typedef sm_struct * | sm_ref |
typedef extern_entry | ecl_extern_entry |
typedef ecl_extern_entry * | ecl_extern_list |
typedef _ecl_code_struct * | ecl_code |
typedef void(* | err_out_func_t )(void *client_data, char *string) |
Functions | |
ecl_parse_context | new_ecl_parse_context () |
void | ecl_free_parse_context (ecl_parse_context context) |
void | ecl_assoc_externs (ecl_parse_context context, ecl_extern_list externs) |
void | ecl_add_decl_to_parse_context (const char *id, sm_ref node, ecl_parse_context context) |
This is used to make a semantic reference to a structured type available in a particular context. More... | |
void | ecl_add_struct_type (const char *name, IOFieldList field_list, ecl_parse_context context) |
Make a structured type, represented by a PBIO-style IOFieldList, available in a particular context. More... | |
sm_ref | ecl_build_type_node (const char *name, IOFieldList field_list) |
This is used to create a semantic reference to a structured type directly from a PBIO-style IOFieldList. More... | |
sm_ref | ecl_build_param_node (const char *id, sm_ref typ, int param_num) |
This is used to declare a parameter to the routine to be generated. More... | |
void | ecl_add_param (const char *id, const char *typ, int param_num, ecl_parse_context context) |
Declare a parameter to the generated function. More... | |
void | ecl_set_return_type (char *typ, ecl_parse_context context) |
This establishes the return type for the generated function. More... | |
ecl_code | ecl_code_gen (char *code, ecl_parse_context context) |
int | ecl_code_verify (char *code, ecl_parse_context context) |
void | ecl_code_free (ecl_code code) |
int | ecl_parse_for_context (char *code, ecl_parse_context context) |
This parses a string to determine what external functions and variables are visible during code generation. More... | |
ecl_parse_context | ecl_copy_context (ecl_parse_context context) |
void | ecl_set_error_func (ecl_parse_context context, err_out_func_t err_func) |
void | ecl_dump (ecl_code code) |
|
ecl_parse_context is the basic handle controlling generation of subroutines and functions. It is used in nearly all calls to setup parameter profiles and other information and to generate the code. Using a separate handle rather than static variables to store this information over the multiple calls needed for code generation ensures thread safety. |
|
sm_ref is a pointer to an internal ECL data structure representing a semantic element of a program fragment (E.G. a parameter definition). |
|
A structure to hold external entries. This is used to associate textual names with addresses. |
|
A list of ecl_extern_entry structures. This is used to specify the addresses of external functions or variables that a function may access. |
|
ecl_code is a handle to the generated code. In addition to the generated code block, it holds external data pointers and supplemental information. |
|
err_out_func_t is a function pointer type. Functions matching this profile can be used as call-out handlers for ECL errors.
|
|
Create a handle to a new ecl_parse_context. This is generally the first call in dynamically generating a subroutine/function. The ecl_parse_context created here is used in all future calls, setting up the parameter profile and generating the code.
|
|
Free a handle to an ecl_parse_context.
|
|
Associate a set of "name, external address" pairs with a parse context These names and addresses are used to resolve (external references in generated code). In addition to associating the addresses, the full prototypes of the functions or variables must be added to the parse context, usually with ecl_parse_for_context().
|
|
This is used to make a semantic reference to a structured type available in a particular context.
This is used with a sm_ref that is generated from ecl_build_type_node().
|
|
Make a structured type, represented by a PBIO-style IOFieldList, available in a particular context.
|
|
This is used to create a semantic reference to a structured type directly from a PBIO-style IOFieldList.
This is used to generate the sm_ref that is then used with ecl_add_decl_to_parse_context() or ecl_build_param_node();
|
|
This is used to declare a parameter to the routine to be generated.
|
|
Declare a parameter to the generated function.
The parameter declaration consist of a textual id that will be used to reference the parameter, a character type that is parsed to determine the semantic type of the parameter and a parameter number (starting at zero) that determines the position of the parameter.
|
|
This establishes the return type for the generated function.
|
|
generate code for a function body in a given context
|
|
perform syntactical and semantic checking of a function body without actually generating code.
|
|
Free all resources associated with the generated code associated with the ecl_code handle.
|
|
This parses a string to determine what external functions and variables are visible during code generation.
The input string is of standard C syntax for external variable and function declarations. All previously registered types are available.
|
|
Duplicate a handle to an ecl_parse_context.
|
|
ecl_set_error_func establishes a new error output routine for ECL. By default, errors are sent to stdout. If the error output is set then errors can be captured for other disposition.
|
|
This will dump (to stdout) a disassembled version of the machine code that has been generated
|