// ParseAnnotations parses 0..n Annotation(...) expressions, as long as such expressions are found.
// OWL allows these as variadic first arguments of each Axiom, including Declarations.
ParseAnnotations parses 0..n Annotation(...) expressions, as long as such expressions are found.
OWL allows these as variadic first arguments of each Axiom, including Declarations.
// ParseAnnotations parses 0 .. n Annotation ( ... ) expressions as long as such expressions are found . // OWL allows these as variadic first arguments of each Axiom including Declarations .
func ParseAnnotations(p *parser.Parser, decls store.Decls, prefixes tech.Prefixes) (exprs []meta.Annotation, err error) {
	for i := 1; err == nil; i++ {
		tok, _, _ := p.ScanIgnoreWSAndComment()
		p.Unscan()
		switch tok {
		case parser.Annotation:
			pos := p.Pos()
			var expr *annotations.Annotation
			expr, err = ParseAnnotation(p, decls, prefixes)
			if err != nil {
				err = pos.EnrichErrorMsg(err, fmt.Sprintf("parsing %d. Annotation", i))
				return
			}
			exprs = append(exprs, expr)
		default:
			return
		}
	}
	return
}
func ParseAnnotations ( p * parser . Parser , decls store . Decls , prefixes tech . Prefixes ) ( exprs [ ] meta . Annotation , err error ) { for i := 1 ; err == nil ; i ++ { tok , _ , _ := p . ScanIgnoreWSAndComment ( ) p . Unscan ( ) switch tok { case parser . Annotation : pos := p . Pos ( ) var expr * annotations . Annotation expr , err = ParseAnnotation ( p , decls , prefixes ) if err != nil { err = pos . EnrichErrorMsg ( err , fmt . Sprintf ( " " , i ) ) return } exprs = append ( exprs , expr ) default : return } } return }
ParseAnnotations parses 0..n Annotation(...) expressions, as long as such expressions are found.
ParseAnnotations parses 0 .. n Annotation ( ... ) expressions as long as such expressions are found .
// test if one or more Annotation expressions are found // no (more) Annotation