field_value (library)
Author(s): Göran Smedbäck.Usage and interface
- Library usage:
:- use_module(library(field_value)). - Exports:
- Predicates:
fieldValue/6, mfstringValue/5. - Properties:
parse/1.
- Predicates:
- Imports:
- System library modules:
lists, provrml/provrml_parser, provrml/parser_util, provrml/provrmlerror. - Packages:
prelude, nonpure, assertions, isomodes, dcg.
- System library modules:
Documentation on exports
PREDICATE
Usage:fieldValue(ParseIn,ParseOut,FieldTypeId,FieldValue,L,T)
The predicate read the fieldValue from the input token stream and return the value of the parsing. The resulting list might be of numbers, strings or VRML code dependnig on the FieldTypeId.
- Call and exit should be compatible with:
(field_value:parse/1)field_value:parse(ParseIn)
(field_value:parse/1)field_value:parse(ParseOut)
(basic_props:atm/1)FieldTypeId is an atom.
(basic_props:list/2)FieldValue is a list of terms.
(basic_props:list/1)L is a list.
(basic_props:list/1)T is a list. - The following properties should hold at call time:
(term_typing:nonvar/1)ParseIn is currently a term which is not a free variable.
(term_typing:var/1)ParseOut is a free variable.
(term_typing:nonvar/1)FieldTypeId is currently a term which is not a free variable.
(term_typing:var/1)FieldValue is a free variable.
PREDICATE
Usage:mfstringValue(ParseIn,ParseOut,Value,L,T)
The predicate is exported for 'EXTERNPROTO' use, where names for locations are given. Reads one string value or multiple stringvalues from a list.
- Call and exit should be compatible with:
(field_value:parse/1)field_value:parse(ParseIn)
(field_value:parse/1)field_value:parse(ParseOut)
(basic_props:list/2)Value is a list of strings.
(basic_props:list/1)L is a list.
(basic_props:list/1)T is a list. - The following properties should hold at call time:
(term_typing:nonvar/1)ParseIn is currently a term which is not a free variable.
(term_typing:var/1)ParseOut is a free variable.
(term_typing:var/1)Value is a free variable.
PROPERTY
A property, defined as follows:
parse(_1). parse(parse(In,Out,Env,Dic)) :- list(In), list(Out), environment(Env), dictionary(Dic).