Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Anders Nilsson
OwlCompiler
Commits
8483d772
Commit
8483d772
authored
Aug 21, 2006
by
Anders Nilsson
Browse files
Can now parse ontology v0.6 from IPA
parent
cf190438
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
owl.ast
View file @
8483d772
...
...
@@ -17,6 +17,7 @@ RdfsRange : ComplexElement;
RdfsSubClassOf : ComplexElement;
RdfsSubPropertyOf : ComplexElement;
OwlOntology : ComplexElement;
OwlAllDifferent : ComplexElement;
OwlAllValuesFrom : ComplexElement;
OwlCardinality : ComplexElement;
OwlClass : ComplexElement;
...
...
@@ -39,6 +40,7 @@ OwlUnionOf : ComplexElement;
abstract SimpleElement : Element;
StringElement : SimpleElement ::= <IDENTIFIER>;
IntElement : SimpleElement ::= <INTEGER_LITERAL>;
FloatElement : SimpleElement ::= <FLOAT_LITERAL>;
abstract Attribute ::= Value;
Version : Attribute;
...
...
owl.jjt
View file @
8483d772
...
...
@@ -56,6 +56,7 @@ SPECIAL_TOKEN : /* COMMENTS */
<
DEFAULT
,
BOUNDS
>
TOKEN
:
/*
RESERVED
WORDS
AND
LITERALS
*/
{
<
OWL_ALLVALUESFROM
:
"owl:allValuesFrom"
>
|
<
OWL_ALLDIFFERENT
:
"owl:AllDifferent"
>
|
<
OWL_CARDINALITY
:
"owl:cardinality"
>
|
<
OWL_CLASS
:
"owl:Class"
>
|
<
OWL_DATARANGE
:
"owl:DataRange"
>
...
...
@@ -118,7 +119,7 @@ SPECIAL_TOKEN : /* COMMENTS */
|
<
#
OCTAL_LITERAL
:
"0"
([
"0"
-
"7"
])*
>
|
<
FLOAT
ING_POINT
_LITERAL
:
<
FLOAT_LITERAL
:
([
"0"
-
"9"
])+
"."
([
"0"
-
"9"
])*
(<
EXPONENT
>)?
([
"f"
,
"F"
,
"d"
,
"D"
])?
|
"."
([
"0"
-
"9"
])+
(<
EXPONENT
>)?
([
"f"
,
"F"
,
"d"
,
"D"
])?
...
...
@@ -165,7 +166,7 @@ SPECIAL_TOKEN : /* COMMENTS */
<
DEFAULT
,
BOUNDS
>
TOKEN
:
/*
IDENTIFIERS
*/
{
<
IDENTIFIER
:
<
LETTER
>
(<
LETTER
>|<
DIGIT
>)*
>
<
IDENTIFIER
:
<
LETTER
>
(<
LETTER
>|<
DIGIT
>
|
"-"
)*
>
|
<
#
LETTER
:
[
...
...
@@ -312,6 +313,7 @@ void Element() : {}
void
SimpleElement
()
:
{}
{
IntElement
()
|
FloatElement
()
|
StringElement
()
}
...
...
@@ -321,6 +323,12 @@ void IntElement() #IntElement : { Token t; }
{
jjtThis
.
setINTEGER_LITERAL
(
t
.
image
);}
}
void
FloatElement
()
#
FloatElement
:
{
Token
t
;
}
{
t
=
<
FLOAT_LITERAL
>
{
jjtThis
.
setFLOAT_LITERAL
(
t
.
image
);}
}
void
StringElement
()
#
StringElement
:
{
Token
t
;
}
{
t
=
<
IDENTIFIER
>
...
...
@@ -330,6 +338,7 @@ void StringElement() #StringElement : { Token t; }
void
OwlElement
()
:
{}
{
OwlOntology
()
|
OwlAllDifferent
()
|
OwlAllValuesFrom
()
|
OwlCardinality
()
|
OwlClass
()
...
...
@@ -356,6 +365,12 @@ void OwlOntology() #OwlOntology : {}
(
">"
ElementList
()
"</"
<
OWL_ONTOLOGY
>
">"
|
ElementList
()
"/>"
)
}
void
OwlAllDifferent
()
#
OwlAllDifferent
:
{}
{
<
OWL_ALLDIFFERENT
>
AttributeList
()
(
">"
ElementList
()
"</"
<
OWL_ALLDIFFERENT
>
">"
|
ElementList
()
"/>"
)
}
void
OwlAllValuesFrom
()
#
OwlAllValuesFrom
:
{}
{
<
OWL_ALLVALUESFROM
>
AttributeList
()
...
...
@@ -648,4 +663,4 @@ void Value() #Value : { Token t; }
{
t
=
<
STRING_LITERAL
>
{
jjtThis
.
setSTRING_LITERAL
(
t
.
image
);}
}
\ No newline at end of file
}
SensorOntologyV01.owl
→
testontologies/
SensorOntologyV01.owl
View file @
8483d772
File moved
testontologies/ontologyV06.owl
0 → 100644
View file @
8483d772
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment