Expand description
Functions to support complex terms.
Suiron’s complex terms (SComplex) are similar to Prolog’s complex terms. They consist of a functor, followed by a list of terms between parentheses. Some examples:
element(Argon, 18)
father($F, Luke)
pronoun(I, subject, first, singular)
In Rust, complex terms are implemented as a vector of unifiable terms.
§Note
Unlike Prolog, Suiron’s
atoms
(string constants) can be capitalized or lower case.
Logic variables
start with a dollar sign and a letter, eg. $F.
Functions§
- make_
complex - Produces a complex term from a vector of terms.
- make_
query - Produces a query from a vector of terms.
- parse_
complex - Parses a string to produce a complex term.
- parse_
functor_ terms - Parses two string arguments to produce a complex term.
- parse_
query - Parses a string to produce a query.
- validate_
complex - Validates the string to be parsed.