protocol
toon_protocolï
TOON (Token-Oriented Object Notation) parser and generator protocol.
Availability:
logtalk_load(toon(loader))Author: Paulo Moura
Version: 0:1:0
Date: 2025-12-15
Compilation flags:
staticDependencies:
(none)
Remarks:
(none)
Inherited public predicates:
(none)
Public predicatesï
parse/2ï
Parses the TOON contents read from the given source (codes(List), stream(Stream), file(Path), chars(List), or atom(Atom)) into a term. Throws an error if the TOON contents cannot be parsed.
Compilation flags:
staticTemplate:
parse(Source,Term)Mode and number of proofs:
parse(++compound,--term) - one_or_errorExceptions:
Source is a variable:instantiation_errorSource is neither a variable nor a valid source:domain_error(toon_source,Source)generate/2ï
Generates the content using the representation specified in the first argument (codes(List), stream(Stream), file(Path), chars(List), or atom(Atom)) for the term in the second argument. Throws an error if this term cannot be processed.
Compilation flags:
staticTemplate:
generate(Sink,Term)Mode and number of proofs:
generate(+compound,++term) - one_or_errorExceptions:
Sink is a variable:instantiation_errorSink is neither a variable nor a valid sink:domain_error(toon_sink,Sink)Protected predicatesï
(none)
Private predicatesï
(none)
Operatorsï
(none)