|
Defines |
| #define | EXTERN extern |
| #define | FALSE 0 |
| #define | TRUE 1 |
| #define | CHECK_LEAKS() |
| #define | ICL_TRUE icl_True() |
| #define | ICL_FALSE icl_False() |
| #define | ICL_EMPTY icl_Empty() |
| #define | ICL_VAR icl_Var() |
| #define | icl_Free(A) if (A) {icl_FreeTerm(A); A = 0;} |
| #define | icl_copy_term(T, V) icl_copy_term_nonrec(T,V) |
Typedefs |
| typedef iclTerm | ICLTerm |
| typedef iclListType | ICLListType |
| typedef iclGroupType | ICLGroupType |
| typedef iclStructType | ICLStructType |
Enumerations |
| enum | ICLType {
icl_no_type,
icl_int_type,
icl_float_type,
icl_str_type,
icl_struct_type,
icl_list_type,
icl_group_type,
icl_var_type,
icl_callback_type,
icl_dataq_type
} |
Functions |
| EXTERN ICLTerm * | icl_NewTermFromString (char *s) |
| | Returns a pointer to a new structured Icl term given string containing an ICL expression, or NULL if a valid object could not be created.
|
| EXTERN ICLTerm * | icl_NewTermFromData (char *data, size_t len) |
| | Create a new IclTerm from the given data.
|
| EXTERN char * | icl_NewStringFromTerm (ICLTerm const *t) |
| | Creates a string representation from an ICL term.
|
| EXTERN char * | icl_NewStringStructFromTerm (ICLTerm *t) |
| | Creates a string representation from an ICL term.
|
| EXTERN char * | icl_UnquotedStringFromStr (ICLTerm *t) |
| | Get an unquoted string from an IclStr.
|
| EXTERN char * | icl_ForcedQuotedStringFromStr (ICLTerm *t) |
| | Get a string from an IclStr, quoting it even if the quotes are not necessary.
|
| EXTERN char * | icl_MinimallyQuotedStringFromStr (ICLTerm *t) |
| | Get a minimally quoted string from an IclStr.
|
| EXTERN int | icl_WriteTerm (ICLTerm *t) |
| | Writes a term to standard out.
|
| EXTERN ICLTerm * | icl_CopyTerm (ICLTerm const *t) |
| | Creates a copy of the term, all in new memory.
|
| EXTERN ICLListType * | icl_CopyListType (ICLListType *list) |
| | Creates a new copy of a ListType list.
|
| EXTERN ICLTerm * | icl_NewInt (gint64 i) |
| | Creates a new ICL object of type integer.
|
| EXTERN ICLTerm * | icl_NewFloat (double f) |
| | Creates a new ICL object of type float.
|
| EXTERN ICLTerm * | icl_NewStr (char const *s) |
| | Creates a new ICL object of type string.
|
| EXTERN ICLTerm * | icl_NewVar (char *name) |
| | Creates a new ICL object of type variable.
|
| EXTERN ICLTerm * | icl_NewStruct (char const *functor, int arity,...) |
| | Creates a new ICL object of type structure.
|
| EXTERN ICLTerm * | icl_NewStructFromList (char const *functor, ICLTerm *args) |
| | Creates a new ICL object of type structure given args as a list.
|
| EXTERN ICLListType * | icl_NewCons (ICLTerm *elt, ICLListType *tail) |
| | Returns a new element of ICLListType.
|
| EXTERN ICLTerm * | icl_NewList (ICLListType *list) |
| | Creates a new ICL object of type list.
|
| EXTERN ICLTerm * | icl_NewGroup (char sChar, char *sep, ICLListType *list) |
| | Creates a new ICL object of type group.
|
| EXTERN ICLTerm * | icl_NewDataQ (void const *data, size_t dataLen) |
| EXTERN void | icl_FreeTerm (ICLTerm *elt) |
| EXTERN void | icl_FreeTermSingle (ICLTerm *elt) |
| EXTERN int | icl_IsList (ICLTerm const *elt) |
| | Returns TRUE if object is of type List.
|
| EXTERN int | icl_IsGroup (ICLTerm const *elt) |
| | Returns TRUE if object is of type Group.
|
| EXTERN int | icl_IsStruct (ICLTerm const *elt) |
| | Returns TRUE if object is of type Struct.
|
| EXTERN int | icl_IsStr (ICLTerm const *elt) |
| | Returns TRUE if object is of type Str.
|
| EXTERN int | icl_IsVar (ICLTerm const *elt) |
| | Returns TRUE if object is of type Var.
|
| EXTERN int | icl_IsInt (ICLTerm const *elt) |
| | Returns TRUE if object is of type Int.
|
| EXTERN int | icl_IsFloat (ICLTerm const *elt) |
| | Returns TRUE if object is of type Float.
|
| EXTERN int | icl_IsDataQ (ICLTerm const *elt) |
| EXTERN int | icl_IsValid (ICLTerm const *elt) |
| | Returns TRUE if object is valid.
|
| EXTERN int | icl_IsGround (ICLTerm const *elt) |
| EXTERN void * | icl_DataQ (ICLTerm const *elt) |
| | Get the data associated with this ICLTerm if it is of type icl_dataq_type.
|
| EXTERN size_t | icl_DataQLen (ICLTerm const *elt) |
| EXTERN size_t | icl_Len (ICLTerm const *elt) |
| | Returns 0 if invalid.
|
| EXTERN gint64 | icl_Int (ICLTerm const *elt) |
| | Returns the value for an ICL int.
|
| EXTERN double | icl_Float (ICLTerm const *elt) |
| | Returns the value for an ICL float.
|
| EXTERN char * | icl_Str (ICLTerm const *elt) |
| | Returns the value for an ICL str (minimally quoted), struct (functor), or an ICL var (returns name).
|
| EXTERN char * | icl_Functor (ICLTerm const *elt) |
| | Returns the functor for an ICL struct.
|
| EXTERN ICLListType * | icl_Arguments (ICLTerm const *elt) |
| | Returns a pointer to the list of arguments for an ICL structure.
|
| EXTERN int | icl_GetGroupChars (ICLTerm const *group, char *startC, char **sep) |
| | Returns the start character and separators for a group.
|
| EXTERN int | icl_Arity (ICLTerm const *inTerm) |
| | Return the arity of an incoming term.
|
| EXTERN int | icl_ReplaceElement (ICLTerm *term, int index, ICLTerm *replacement, int freeReplaced) |
| | Replace the element at the given index with the replacement term.
|
| EXTERN int | icl_ReplaceUnifying (ICLTerm *term, ICLTerm const *selector, ICLTerm const *replacement, int freeReplaced) |
| | Replace elements that unify with the selector with the replacement term.
|
| EXTERN ICLListType * | icl_List (ICLTerm const *elt) |
| | Returns a pointer to the list of elements for an ICL list.
|
| EXTERN ICLListType * | icl_ListNext (ICLListType const *t) |
| EXTERN ICLTerm * | icl_ListElt (ICLListType const *t) |
| EXTERN ICLListType * | icl_ListCopy (ICLTerm const *elt) |
| | Returns a pointer to the list of elements for an ICL list.
|
| EXTERN ICLTerm * | icl_NthTerm (ICLTerm const *elt, int n) |
| | Returns a pointer to the Nth argument in a structure, or the Nth element of a list or of a group.
|
| EXTERN int | icl_NthTermAsInt (ICLTerm const *elt, int n, int *Value) |
| | Returns the integer value of the nth element in a term.
|
| EXTERN int | icl_NumTerms (ICLTerm const *elt) |
| | Returns the number of terms in a list (or group) object, or the number of arguments in a structure.
|
| EXTERN int | icl_ListLen (ICLTerm const *elt) |
| | Returns the number of terms in a list (or group) object, or the number of arguments in a structure.
|
| EXTERN int | icl_AddToList (ICLTerm *list, ICLTerm *elt, int atEnd) |
| | Adds an object at the beginning or the end of the list or a group.
|
| EXTERN int | icl_ClearList (ICLTerm *list) |
| | Removes all the components of the incoming list.
|
| EXTERN int | icl_SortList (ICLTerm *list, int(*user_function)(ICLTerm *Elt1, ICLTerm *Elt2)) |
| | Sorts the incoming list, using the given sorting function.
|
| EXTERN int | icl_Append (ICLTerm *list1, ICLTerm *list2) |
| | Append list2 to the end of list1.
|
| EXTERN int | icl_AppendCopy (ICLTerm *list1, ICLTerm const *list2) |
| | Append a copy of list2 to the end of list1.
|
| EXTERN int | icl_Union (ICLTerm *list1, ICLTerm *list2, ICLTerm **dest) |
| | Merges two incoming lists into a third one.
|
| EXTERN int | icl_ListHasMoreElements (ICLListType const *l) |
| | Determine if you have iterated to the end of a list.
|
| EXTERN ICLListType * | icl_ListNextElement (ICLListType const *l) |
| | Return the next element in a list.
|
| EXTERN ICLTerm * | icl_ListElement (ICLListType const *list) |
| | Return the icl term associated with this list element.
|
| EXTERN int | icl_ListDelete (ICLTerm *list, ICLTerm *elem, ICLTerm **residue) |
| | Return TRUE if list is a list.
|
| EXTERN ICLTerm * | icl_GenerateSimpleUnifyingTerm (ICLTerm const *term) |
| | Generate a general unifying term for the given term.
|
| EXTERN int | icl_Unify (ICLTerm const *t1, ICLTerm const *t2, ICLTerm **answer) |
| | Perform true unification and return resulting term.
|
| EXTERN int | icl_ParamValue (char *func, ICLTerm *match, ICLTerm *params, ICLTerm **answer) |
| | Searches for a parameter in a parameter list.
|
| EXTERN gint64 | icl_ParamValueAsInt (char *func, ICLTerm *params, gint64 *Value) |
| | Returns integer value for a parameter in a parameter list.
|
| EXTERN int | icl_Member (ICLTerm const *elt, ICLTerm const *list, ICLTerm **res) |
| | Searches for an element in a list, returning unification.
|
| EXTERN char * | icl_stFixQuotes (char *s) |
| | Converts any '' marks inside a string to just ', and removes any external quote marks around the string.
|
| EXTERN int | icl_stIsProperlyQuoted (char *s) |
| | return TRUE if the given string is properly quoted
|
| EXTERN int | icl_list_has_more_elements (ICLListType *l) |
| | Determine if you have iterated to the end of a list.
|
| EXTERN ICLListType * | icl_list_next_element (ICLListType *l) |
| | Return the next element in a list.
|
| EXTERN ICLTerm * | icl_list_element (ICLListType *list) |
| | Return the icl term associated with this list element.
|
| EXTERN int | icl_list_delete (ICLTerm *list, ICLTerm *elem, ICLTerm **residue) |
| | Return TRUE if list is a list.
|
| EXTERN int | icl_append_to_list (ICLTerm *list1, ICLTerm *list2, ICLTerm **list3) |
| | Append list2 to the end of list1 and place the results in list3.
|
| EXTERN ICLTerm * | icl_True () |
| | Convenience functions which return a pointer to a commonly used datastructure.
|
| EXTERN ICLTerm * | icl_False () |
| EXTERN ICLTerm * | icl_Empty () |
| EXTERN ICLTerm * | icl_Var () |
| EXTERN void | icl_stFree (void *p) |
| | Free a memory pointer (string or term) and set it to NULL afterwards.
|
| EXTERN int | icl_match_terms (ICLTerm *t1, ICLTerm *t2, struct dyn_array *vars) |
| | Returns TRUE if Term1 matches Term2, saving variable bindings as it goes (if requested).
|
| EXTERN ICLTerm * | icl_copy_term_nonrec (ICLTerm const *t, struct dyn_array *vars) |
| | Creates a copy of the term, all in new memory.
|
| EXTERN void | icl_init_dyn_array (struct dyn_array *da) |
| | Initializes a dynamic array.
|