// Parset reads IRI or literal or anonymous individual, which is shortened as "t" in the OWL spec
Parset reads IRI or literal or anonymous individual, which is shortened as "t" in the OWL spec
// Parset reads IRI or literal or anonymous individual which is shortened as " t " in the OWL spec
func Parset(p *parser.Parser, decls store.Decls, prefixes tech.Prefixes) (expr string, argtype ARGTYPE, err error) {
	var tok parser.Token
	pos := p.Pos()
	tok, expr, _ = p.ScanIgnoreWSAndComment()
	if expr == "_" { 
		argtype = ArgtypeAnonymousIndividual
		return
	}
	p.Unscan()
	if literal.MaybeOWLLiteral(tok) {
		var l literal.OWLLiteral
		l, err = ParseOWLLiteral(p, prefixes)
		if err == nil {
			expr = l.LiteralString()
			argtype = ArgtypeLiteral
		}
		return
	}
	expr, err = parsehelper.ParseUnprefixedIRI(p)
	if err == nil {
		argtype = ArgtypeIRI
		return
	}
	p.Unscan()
	var ident *tech.IRI
	ident, err = parsehelper.ParseAndResolveIRI(p, prefixes)
	if err == nil {
		expr = ident.String()
		argtype = ArgtypeIRI
		return
	}
	pos.EnrichErrorMsg(err, "expected IRI,anonymous individual or literal")
	return
}
func Parset ( p * parser . Parser , decls store . Decls , prefixes tech . Prefixes ) ( expr string , argtype ARGTYPE , err error ) { var tok parser . Token pos := p . Pos ( ) tok , expr , _ = p . ScanIgnoreWSAndComment ( ) if expr == " " { argtype = ArgtypeAnonymousIndividual return } p . Unscan ( ) if literal . MaybeOWLLiteral ( tok ) { var l literal . OWLLiteral l , err = ParseOWLLiteral ( p , prefixes ) if err == nil { expr = l . LiteralString ( ) argtype = ArgtypeLiteral } return } expr , err = parsehelper . ParseUnprefixedIRI ( p ) if err == nil { argtype = ArgtypeIRI return } p . Unscan ( ) var ident * tech . IRI ident , err = parsehelper . ParseAndResolveIRI ( p , prefixes ) if err == nil { expr = ident . String ( ) argtype = ArgtypeIRI return } pos . EnrichErrorMsg ( err , " " ) return }
Parset reads IRI or literal or anonymous individual, which is shortened as "t" in the OWL spec
Parset reads IRI or literal or anonymous individual which is shortened as " t " in the OWL spec
//todo Is this right?