Documentation
¶
Overview ¶
gofp is an Owl Functional Parser. gofp reads OWL-Functional input into Golang structures, for further processing.
Index ¶
- func ErrorMsgWithPosition(err error) string
- func OntologyFromParser(p *parser.Parser, rc owlfunctional.StoreConfig) (ontology *owlfunctional.Ontology, err error)
- func OntologyFromReader(r io.Reader, sourceName string) (ontology *owlfunctional.Ontology, err error)
- func ParserPositionMsg(pos parser.ParserPosition) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorMsgWithPosition ¶
ErrorMsgWithPosition produces a user message like "untempting topping on margherita pizza in: pizza.owl 18:32 after '...Pizza ObjectSomeValuesFrom(:hasTopping'" for errors or type parser.PErr. For other error types, err.Error() is returned.
func OntologyFromParser ¶
func OntologyFromParser(p *parser.Parser, rc owlfunctional.StoreConfig) (ontology *owlfunctional.Ontology, err error)
OntologyFromReader uses the Parser p to create an Ontology struct. The configuration rc allows custom storage of Declarations and Axioms. As a usage example of OntologyFromParser, see the code of the OntologyFromReader function. Note that the API may change and Gofp, in its early state, does not use a semantic version number.
func OntologyFromReader ¶
func OntologyFromReader(r io.Reader, sourceName string) (ontology *owlfunctional.Ontology, err error)
OntologyFromReader parses an owl-functional file contents into an Ontology struct. r is the OWL-Functional file contents. sourceName: see parser.NewParser() For less convenience but more control, see the OntologyFromParser function.
func ParserPositionMsg ¶
func ParserPositionMsg(pos parser.ParserPosition) string
ParserPositionMsg returns a position desciption for the user , like "pizza.owl 18:32 after '...Pizza ObjectSomeValuesFrom(:hasTopping'"
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
example
|
|
|
mini
command
|
|
|
pizza
command
|
|
|
mock are functions and types for unit tests.
|
mock are functions and types for unit tests. |
|
parser
parser takes the concept from: https://blog.gopheracademy.com/advent-2014/parsers-lexers/
|
parser takes the concept from: https://blog.gopheracademy.com/advent-2014/parsers-lexers/ |
|
tech are types not required by OWL but internally.
|
tech are types not required by OWL but internally. |