owl.ast 2.25 KB
Newer Older
1
// -*-Java-*-
2

Anders Nilsson's avatar
Anders Nilsson committed
3
4
5
6
7
 
// Copyright (C) 2006  Anders Nilsson <anders.nilsson@cs.lth.se>
//
// This file is part of OntologyCompiler.

8

9
10
Start ::= Specification;

11
Specification ::= XmlHeader RdfDeclaration;
12

13
14
XmlHeader ::= Attribute*;

15
16
17
abstract Element;
abstract ComplexElement : Element ::= Attribute* Element*;
RdfDeclaration : ComplexElement;
18
RdfDescription : ComplexElement;
19
20
21
RdfFirst : ComplexElement;
RdfRest : ComplexElement;
RdfType : ComplexElement;
22
RdfsComment : ComplexElement;
23
24
RdfsDomain : ComplexElement;
RdfsRange : ComplexElement;
25
26
RdfsSubClassOf : ComplexElement;
RdfsSubPropertyOf : ComplexElement;
27
OwlOntology : ComplexElement;
28
OwlAllDifferent : ComplexElement;
29
OwlAllValuesFrom : OwlValuesFrom;
30
OwlCardinality : ComplexElement;
31
32
33
34
OwlClass : ComplexElement;
OwlDataRange : ComplexElement;
OwlDatatypeProperty : ComplexElement;
OwlDisjointWith : ComplexElement;
35
OwlDistinctMembers: ComplexElement;
36
OwlEquivalentClass : ComplexElement;
Anders Nilsson's avatar
Anders Nilsson committed
37
OwlFunctionalProperty : OwlProperty;
38
39
OwlImports : ComplexElement;
OwlIntersectionOf : ComplexElement;
40
OwlInverseOf : ComplexElement;
41
OwlMinCardinality : ComplexElement;
42
OwlMaxCardinality : ComplexElement;
Anders Nilsson's avatar
Anders Nilsson committed
43
OwlObjectProperty : OwlProperty;
44
OwlOneOf : ComplexElement;
Anders Nilsson's avatar
Anders Nilsson committed
45
OwlOnProperty : OwlProperty;
46
OwlSomeValuesFrom : OwlValuesFrom;
47
48
49
50
51
52
OwlRestriction : ComplexElement;
OwlUnionOf : ComplexElement;

abstract SimpleElement : Element;
StringElement : SimpleElement ::= <IDENTIFIER>;
IntElement : SimpleElement ::= <INTEGER_LITERAL>;
53
FloatElement : SimpleElement ::= <FLOAT_LITERAL>;
54
55
56
57

abstract Attribute ::= Value;
Version : Attribute;
RdfAbout : Attribute;
58
RdfDatatype : Attribute;
59
RdfId : Attribute;
60
RdfParseType : Attribute;
61
62
63
RdfResource : Attribute;
XmlBase : Attribute;
Xmlns : Attribute;
64
65
XmlnsDaml : Attribute;
XmlnsDc : Attribute;
66
XmlnsP1 : Attribute;
67
XmlnsProtege : Attribute;
68
69
70
71
XmlnsRdf : Attribute;
XmlnsXsd : Attribute;
XmlnsRdfs : Attribute;
XmlnsOwl : Attribute;
72

73
DiscardedElement : Element ::= Identifier Attribute* Element*;
74

75
76
Value ::= <STRING_LITERAL>;
Identifier ::= <IDENTIFIER>;
77

78
// Types used by rewrite rules
79
80
81
abstract OClass : ComplexElement ::= <Id:String>;
OwlClassDecl : OClass;
OwlClassUse : OClass;
82

83
84
85
abstract OwlValuesFrom: ComplexElement;


86
Properties ::= Property:Element*;
Anders Nilsson's avatar
Anders Nilsson committed
87
Restrictions ::= OwlRestriction*;
Anders Nilsson's avatar
Anders Nilsson committed
88

89
abstract OwlProperty : ComplexElement;