Returns: | |||
_ NULL | : if memory allocation could not be performed | ||
else a new XCLE_ParseCtx object. |
Args: | |||
_ contx | : parsing context | ||
_ str | : string to look up in the tables |
Returns: | |||
_ NULL | : if the string or parsing context were NULL, or the string was not found in the tables | ||
else a Code of name 'str', built from the related definition. |
NOTE: | |||
Use XCLE_CodeRegister to register instructions before calling XCLE_CodeByName. |
Args: | |||
_ contx | : parsing context | ||
_ str | : string to look up in the tables |
Returns: | |||
_ NULL | : if the string or parsing context were NULL, or the string was not found in the tables | ||
else a Code of name 'str', built from the related definition. |
NOTE: | |||
Use XCLE_CodeRegister to register instructions before calling XCLE_CodeByName. |
Args: | |||
_ contx | : parsing context | ||
_ name | : module name | ||
_ table | : table of primitives definitions | ||
_ tablesize | : size of the definitions table |
Returns: | |||
_ -1 | : if the parsing context, the module name or the table were NULL | ||
_ 0 | : if the table was empty | ||
else the number of modules registered. |
Errors: | |||
_ ENOMEM | : if a reallocation failed | ||
_ EINVAL | : if the context was not properly defined, or the module name was NULL | ||
_ EINVAL | : if the table was NULL or empty |
Args: | |||
_ contx | : parsing context | ||
_ name | : module name |
Returns: | |||
_ -1 | : if the parsing context or the module name were NULL | ||
else the number of modules registered. |
Errors: | |||
_ ENOMEM | : if a reallocation failed | ||
_ EINVAL | : if the context was not properly defined | ||
_ EINVAL | : if the module name was NULL or could not be found |
Args: | |||
_ contx | : parsing context | ||
_ module | : file name of the module |
Returns: | |||
_ -1 | : if the parsing context was NULL, or the module was invalid | ||
else the size of the table. |
Errors: | |||
_ ENOMEM | : if a reallocation failed | ||
_ ENOENT | : if the module was not found | ||
_ EINVAL | : if the context was not properly defined or the module structure invalid |
NOTE: | |||
This loading interface asks for two symbol names to be defined in modules (shared | |||
objects, or dynamically loaded libraries): | |||
_ unsigned long XCL_Registry_Vers | : a version identifier produced by XCLE_MAKEVERSIONID | ||
_ unsigned long XCL_Registry_Size | : the number of CodeDef objects defined by the module | ||
_ XCLE_CodeDef XCL_Registry_Table | : a table of CodeDef objects defining the module contents | ||
To prevent loading of modules compiled with incompatibles versions of XCLE, the module is | |||
loaded only if XCL_Registry_Vers matches XCLE_versionid() in their first two bytes. | |||
Module developers should use the macro XCLE_MAKEVERSIONID with the major, minor and | |||
release version number of the XCLE library they use to produce XCL_Registry_Vers. |
Args: | |||
_ contx | : parsing context | ||
_ str | : string to parse | ||
_ off | : offset pointer in the string indicating where to begin (or NULL) |
Returns: | |||
_ NULL | : if a syntax error occurred or the end of the string was reached | ||
else the next parsed XCLE_Object. |
Errors: | |||
_ EINVAL | : if a syntax error occurred | ||
_ ENOMEM | : if no memory was available |
Args: | |||
_ contx | : parsing context | ||
_ str | : string to parse | ||
_ off | : offset pointer in the string indicating where to begin (or NULL) |
Returns: | |||
_ NULL | : if a syntax error occurred, or no object was found | ||
else an XCLE_List of all recognised XCLE_Objects. |
Errors: | |||
_ EINVAL | : if a syntax error occurred | ||
_ ENOMEM | : if no memory was available |