Commit c4cde341 authored by Anders Nilsson's avatar Anders Nilsson

Implemented parsing support for the new ontology XML format used in Protégé 4.

Added Licensing information to source files (GPL v3).
parent 69aaf486
......@@ -21,3 +21,4 @@ RoSta/GeneratedAspects.jrag
RoSta/Parser.java
RoSta/RoSta.ast
owl-s
GenCompiler.jar
/* -*-Java-*- */
/*
* Copyright (C) 2006 Anders Nilsson <anders.nilsson@cs.lth.se>
* Copyright (C) 2006,2010 Anders Nilsson <anders.nilsson@control.lth.se>
*
* This file is part of OntologyCompiler.
*
* OntologyCompiler is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* OntologyCompiler is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with OntologyCompiler. If not, see <http://www.gnu.org/licenses/>.
*/
import java.io.*;
......
// package programs;
/*
* Copyright (C) 2006 Anders Nilsson <anders.nilsson@cs.lth.se>
* Copyright (C) 2006,2010 Anders Nilsson <anders.nilsson@control.lth.se>
*
* This file is part of OntologyCompiler.
*
* OntologyCompiler is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* OntologyCompiler is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with OntologyCompiler. If not, see <http://www.gnu.org/licenses/>.
*/
import AST.Start;
......
/* -*-Java-*- */
/*
* Copyright (C) 2006 Anders Nilsson <anders.nilsson@cs.lth.se>
* Copyright (C) 2006,2010 Anders Nilsson <anders.nilsson@control.lth.se>
*
* This file is part of OntologyCompiler.
*
* OntologyCompiler is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* OntologyCompiler is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with OntologyCompiler. If not, see <http://www.gnu.org/licenses/>.
*/
import java.io.PrintStream;
......
/*
* Copyright (C) 2006 Anders Nilsson <anders.nilsson@cs.lth.se>
* Copyright (C) 2006,2010 Anders Nilsson <anders.nilsson@control.lth.se>
*
* This file is part of OntologyCompiler.
*
* OntologyCompiler is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* OntologyCompiler is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with OntologyCompiler. If not, see <http://www.gnu.org/licenses/>.
*/
......
// package programs;
/*
* Copyright (C) 2006-2008 Anders Nilsson <anders.nilsson@cs.lth.se>
* Copyright (C) 2006,2010 Anders Nilsson <anders.nilsson@control.lth.se>
*
* This file is part of OntologyCompiler.
*
* OntologyCompiler is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* OntologyCompiler is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with OntologyCompiler. If not, see <http://www.gnu.org/licenses/>.
*/
import AST.Start;
......
/* -*-Java-*- */
/*
* Copyright (C) 2006 Anders Nilsson <anders.nilsson@cs.lth.se>
* Copyright (C) 2006,2010 Anders Nilsson <anders.nilsson@control.lth.se>
*
* This file is part of OntologyCompiler.
*
* OntologyCompiler is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* OntologyCompiler is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with OntologyCompiler. If not, see <http://www.gnu.org/licenses/>.
*/
aspect JavaCCChunks {
......
This diff is collapsed.
/* -*-Java-*- */
/*
* Copyright (C) 2006 Anders Nilsson <anders.nilsson@cs.lth.se>
* Copyright (C) 2006,2010 Anders Nilsson <anders.nilsson@control.lth.se>
*
* This file is part of OntologyCompiler.
*
* OntologyCompiler is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* OntologyCompiler is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with OntologyCompiler. If not, see <http://www.gnu.org/licenses/>.
*/
......
/* -*-Java-*- */
/*
* Copyright (C) 2006 Anders Nilsson <anders.nilsson@cs.lth.se>
* Copyright (C) 2006,2010 Anders Nilsson <anders.nilsson@control.lth.se>
*
* This file is part of OntologyCompiler.
*
* OntologyCompiler is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* OntologyCompiler is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with OntologyCompiler. If not, see <http://www.gnu.org/licenses/>.
*/
aspect Names {
......
/*
* Copyright (C) 2006 Anders Nilsson <anders.nilsson@cs.lth.se>
* Copyright (C) 2006,2010 Anders Nilsson <anders.nilsson@control.lth.se>
*
* This file is part of OntologyCompiler.
*
* OntologyCompiler is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* OntologyCompiler is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with OntologyCompiler. If not, see <http://www.gnu.org/licenses/>.
*/
import java.io.FileNotFoundException;
......
/* -*-Java-*- */
/*
* Copyright (C) 2006 Anders Nilsson <anders.nilsson@cs.lth.se>
* Copyright (C) 2006,2010 Anders Nilsson <anders.nilsson@control.lth.se>
*
* This file is part of OntologyCompiler.
*
* OntologyCompiler is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* OntologyCompiler is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with OntologyCompiler. If not, see <http://www.gnu.org/licenses/>.
*/
aspect MiscUtilities {
......
/* -*-Java-*- */
/*
* Copyright (C) 2006-2008 Anders Nilsson <anders.nilsson@cs.lth.se>
* Copyright (C) 2006,2010 Anders Nilsson <anders.nilsson@control.lth.se>
*
* This file is part of OntologyCompiler.
*
* OntologyCompiler is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* OntologyCompiler is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with OntologyCompiler. If not, see <http://www.gnu.org/licenses/>.
*/
import java.util.ArrayList;
......
<!--
* Copyright (C) 2006,2010 Anders Nilsson <anders.nilsson@control.lth.se>
*
* This file is part of OntologyCompiler.
*
* OntologyCompiler is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* OntologyCompiler is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with OntologyCompiler. If not, see <http://www.gnu.org/licenses/>.
*-->
<!--
Targets for working from terminal window:
build (default) - generates java files and compiles them
......@@ -98,9 +117,9 @@
</target>
<target name="jar" depends="build">
<jar destfile="PrettyPrint.jar" basedir="." includes="**/*.class" excludes="test/**">
<jar destfile="GenCompiler.jar" basedir="." includes="**/*.class" excludes="test/**">
<manifest>
<attribute name="Main-Class" value="JavaPrettyPrinter"/>
<attribute name="Main-Class" value="GenCompiler"/>
</manifest>
</jar>
</target>
......
// -*-Java-*-
// Copyright (C) 2006 Anders Nilsson <anders.nilsson@cs.lth.se>
// Copyright (C) 2006,2010 Anders Nilsson <anders.nilsson@control.lth.se>
//
// This file is part of OntologyCompiler.
//
// OntologyCompiler is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// OntologyCompiler is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with OntologyCompiler. If not, see <http://www.gnu.org/licenses/>.
Start ::= Specification;
Specification ::= XmlHeader RdfDeclaration;
Specification ::= XmlHeader OntoDeclaration;
XmlHeader ::= Attribute*;
abstract Element;
abstract ComplexElement : Element ::= Attribute* Element*;
OntoDeclaration : ComplexElement;
// New ontology format elements
Annotation : ComplexElement;
AnnotationProperty : ComplexElement;
Clazz : ComplexElement;
ClassAssertion : ComplexElement;
DataProperty : ComplexElement;
DataPropertyDomain : ComplexElement;
DataPropertyRange : ComplexElement;
Datatype : ComplexElement;
Declaration : ComplexElement;
Literal : ComplexElement;
NamedIndividual : ComplexElement;
ObjectExactCardinality : ComplexElement;
ObjectMinCardinality : ComplexElement;
ObjectSomeValuesFrom : ComplexElement;
ObjectProperty : ComplexElement;
ObjectPropertyAssertion : ComplexElement;
ObjectPropertyDomain : ComplexElement;
Ontology : OntoDeclaration;
Prefix : ComplexElement;
SubClassOf : ComplexElement;
// Compatibility with old format below
ListFirst : ComplexElement;
ListRest : ComplexElement;
ExprKIFCondition : ComplexElement;
......@@ -22,7 +60,7 @@ ExpressionCondition : ComplexElement;
ExpressionLogicLanguage : ComplexElement;
ExpressionRefURI : ComplexElement;
ObjectListList : ComplexElement;
RdfDeclaration : ComplexElement;
RdfDeclaration : OntoDeclaration;
RdfDescription : ComplexElement;
RdfFirst : ComplexElement;
RdfProperty : ComplexElement;
......@@ -90,6 +128,16 @@ IntElement : SimpleElement ::= <LITERAL>;
FloatElement : SimpleElement ::= <LITERAL>;
abstract Attribute ::= Value;
// New ontology format attributes
AbbreviatedIRI : Attribute;
Cardinality : Attribute;
DatatypeIRI : Attribute;
OntologyIRI : Attribute;
IRI : Attribute;
Name : Attribute;
Version : Attribute;
RdfAbout : Attribute;
RdfDatatype : Attribute;
......@@ -98,6 +146,7 @@ RdfParseType : Attribute;
RdfResource : Attribute;
XmlBase : Attribute;
Xmlns : Attribute;
XmlnsXml : Attribute;
XmlnsXX : Attribute ::= <IDENTIFIER>;
// XmlnsDaml : Attribute;
// XmlnsDc : Attribute;
......
/* -*-Java-*- */
/*
* Copyright (C) 2006 Anders Nilsson <anders.nilsson@cs.lth.se>
* Copyright (C) 2006,2010 Anders Nilsson <anders.nilsson@control.lth.se>
*
* This file is part of OntologyCompiler.
*
* OntologyCompiler is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* OntologyCompiler is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with OntologyCompiler. If not, see <http://www.gnu.org/licenses/>.
*/
options {
......@@ -14,7 +27,7 @@ options {
NODE_PREFIX = "";
JAVA_UNICODE_ESCAPE = true;
STATIC = false;
// DEBUG_PARSER = true;
// DEBUG_PARSER = true;
// DEBUG_LOOKAHEAD = true;
// DEBUG_TOKEN_MANAGER = true;
} // options
......@@ -55,7 +68,7 @@ SPECIAL_TOKEN : /* COMMENTS */
// <SLASH_STAR_COMMENT : "/*" (~["*"])* "*" ("*" | (~["*","/"] (~["*"])* "*"))* "/" >
< "<!--" ( ~["-"] | ( "-" ~["-"] ) )* "-->">
| < "<rdfs:comment" ( ~["<"] | ( "<" ~["/"] ) )* "</rdfs:comment>" >
| < "<!DOCTYPE rdf:RDF [" ( ~["]"] )* "]>" >
| < "<!DOCTYPE" ( ~["]"] )* "]>" >
// <XML_COMMENT : "<!--" (~["-","-",">"])* "-->" >
}// COMMENTS
......@@ -67,7 +80,36 @@ SPECIAL_TOKEN : /* COMMENTS */
<DEFAULT, BOUNDS> TOKEN : /* RESERVED WORDS AND LITERALS */
{
< LIST_FIRST : "list:first" >
< ABBREVIATEDIRI : "abbreviatedIRI" >
| < ANNOTATION : "Annotation" >
| < ANNOTATIONPROPERTY : "AnnotationProperty" >
| < CARDINALITY : "cardinality" >
| < CLASS : "Class" >
| < CLASSASSERTION : "ClassAssertion" >
| < DATAPROPERTY : "DataProperty" >
| < DATAPROPERTYDOMAIN : "DataPropertyDomain" >
| < DATAPROPERTYRANGE : "DataPropertyRange" >
| < DATATYPE : "Datatype" >
| < DATATYPEIRI : "datatypeIRI" >
| < DECLARATION : "Declaration" >
| < IRI : "IRI" >
| < LITERAL : "Literal" >
| < NAME : "name" >
| < NAMEDINDIVIDUAL : "NamedIndividual" >
| < OBJECTEXACTCARDINALITY : "ObjectExactCardinality" >
| < OBJECTMINCARDINALITY : "ObjectMinCardinality" >
| < OBJECTSOMEVALUESFROM : "ObjectSomeValuesFrom" >
| < OBJECTPROPERTY : "ObjectProperty" >
| < OBJECTPROPERTYASSERTION : "ObjectPropertyAssertion" >
| < OBJECTPROPERTYDOMAIN : "ObjectPropertyDomain" >
| < ONTOLOGY : "Ontology" >
| < ONTOLOGYIRI : "ontologyIRI" >
| < PREFIX : "Prefix" >
| < SUBCLASSOF : "SubClassOf" >
// Compatibility with older ontology format (RDF) below.
| < LIST_FIRST : "list:first" >
| < LIST_REST : "list:rest" >
| < EXPR_KIFCONDITION : "expr:KIF-Condition" >
| < EXPR_EXPRESSIONDATA : "expr:expressionData" >
......@@ -145,6 +187,7 @@ SPECIAL_TOKEN : /* COMMENTS */
| < XML : "xml" >
| < XML_BASE : "xml:base" >
| < XMLNS : "xmlns" >
| < XMLNS_XML : "xmlns:xml" >
| < XMLNS_XX : "xmlns:" >
// | < XMLNS_DAML : "xmlns:daml" >
// | < XMLNS_DC : "xmlns:dc" >
......@@ -247,7 +290,9 @@ SPECIAL_TOKEN : /* COMMENTS */
",",
"[",
"]",
"."
".",
"&",
"@"
]
>
|
......@@ -350,7 +395,8 @@ Start Start() #Start : {}
void Specification() #Specification : {}
{
XmlHeader()
RdfDeclaration()
"<" (RdfDeclaration()
| OntologyDeclaration())
}
void XmlHeader() #XmlHeader : {}
......@@ -358,9 +404,16 @@ void XmlHeader() #XmlHeader : {}
"<?" <XML> AttributeList() "?>"
}
void OntologyDeclaration() #Ontology : {}
{
<ONTOLOGY> AttributeList() ">"
ElementList()
"</" <ONTOLOGY> ">"
}
void RdfDeclaration() #RdfDeclaration : {}
{
"<" <RDF_RDF> AttributeList() ">"
<RDF_RDF> AttributeList() ">"
ElementList()
"</" <RDF_RDF> ">"
}
......@@ -373,6 +426,7 @@ void ElementList() #List : {}
void Element() : {}
{
( "<" ( JElement()
| OntologyElement()
| OwlElement()
| RdfElement()
| P1Element()
......@@ -515,6 +569,150 @@ void ObjectListList() #ObjectListList : {}
(">" ElementList() "</" <OBJECTLIST_LIST> ">" | ElementList() "/>")
}
void OntologyElement() : {}
{
Annotation()
| AnnotationProperty()
| Clazz()
| ClassAssertion()
| DataProperty()
| DataPropertyDomain()
| DataPropertyRange()
| Datatype()
| Declaration()
| Literal()
| NamedIndividual()
| ObjectExactCardinality()
| ObjectMinCardinality()
| ObjectSomeValuesFrom()
| ObjectProperty()
| ObjectPropertyAssertion()
| ObjectPropertyDomain()
| Ontology()
| Prefix()
| SubClassOf()
}
void Annotation() #Annotation : {}
{
<ANNOTATION> AttributeList()
(">" ElementList() "</" <ANNOTATION> ">" | ElementList() "/>")
}
void AnnotationProperty() #AnnotationProperty : {}
{
<ANNOTATIONPROPERTY> AttributeList()
(">" ElementList() "</" <ANNOTATIONPROPERTY> ">" | ElementList() "/>")
}
void Clazz() #Clazz : {}
{
<CLASS> AttributeList()
(">" ElementList() "</" <CLASS> ">" | ElementList() "/>")
}
void ClassAssertion() #ClassAssertion : {}
{
<CLASSASSERTION> AttributeList()
(">" ElementList() "</" <CLASSASSERTION> ">" | ElementList() "/>")
}
void DataProperty() #DataProperty : {}
{
<DATAPROPERTY> AttributeList()
(">" ElementList() "</" <DATAPROPERTY> ">" | ElementList() "/>")
}
void DataPropertyDomain() #DataPropertyDomain : {}
{
<DATAPROPERTYDOMAIN> AttributeList()
(">" ElementList() "</" <DATAPROPERTYDOMAIN> ">" | ElementList() "/>")
}
void DataPropertyRange() #DataPropertyRange : {}
{
<DATAPROPERTYRANGE> AttributeList()
(">" ElementList() "</" <DATAPROPERTYRANGE> ">" | ElementList() "/>")
}
void Datatype() #Datatype : {}
{
<DATATYPE> AttributeList()
(">" ElementList() "</" <DATATYPE> ">" | ElementList() "/>")
}
void Declaration() #Declaration : {}
{
<DECLARATION> AttributeList()
(">" ElementList() "</" <DECLARATION> ">" | ElementList() "/>")
}
void Literal() #Literal : {}
{
<LITERAL> AttributeList()
(">" ElementList() "</" <LITERAL> ">" | ElementList() "/>")
}
void NamedIndividual() #NamedIndividual : {}
{
<NAMEDINDIVIDUAL> AttributeList()
(">" ElementList() "</" <NAMEDINDIVIDUAL> ">" | ElementList() "/>")
}
void ObjectExactCardinality() #ObjectExactCardinality : {}
{
<OBJECTEXACTCARDINALITY> AttributeList()
(">" ElementList() "</" <OBJECTEXACTCARDINALITY> ">" | ElementList() "/>")
}
void ObjectMinCardinality() #ObjectMinCardinality : {}
{
<OBJECTMINCARDINALITY> AttributeList()
(">" ElementList() "</" <OBJECTMINCARDINALITY> ">" | ElementList() "/>")
}
void ObjectSomeValuesFrom() #ObjectSomeValuesFrom : {}
{
<OBJECTSOMEVALUESFROM> AttributeList()
(">" ElementList() "</" <OBJECTSOMEVALUESFROM> ">" | ElementList() "/>")
}
void ObjectProperty() #ObjectProperty : {}
{
<OBJECTPROPERTY> AttributeList()
(">" ElementList() "</" <OBJECTPROPERTY> ">" | ElementList() "/>")
}
void ObjectPropertyAssertion() #ObjectPropertyAssertion : {}
{
<OBJECTPROPERTYASSERTION> AttributeList()
(">" ElementList() "</" <OBJECTPROPERTYASSERTION> ">" | ElementList() "/>")
}
void ObjectPropertyDomain() #ObjectPropertyDomain : {}
{
<OBJECTPROPERTYDOMAIN> AttributeList()
(">" ElementList() "</" <OBJECTPROPERTYDOMAIN> ">" | ElementList() "/>")
}
void Ontology() #Ontology : {}
{
<ONTOLOGY> AttributeList()
(">" ElementList() "</" <ONTOLOGY> ">" | ElementList() "/>")
}
void Prefix() #Prefix : {}
{
<PREFIX> AttributeList()
(">" ElementList() "</" <PREFIX> ">" | ElementList() "/>")
}
void SubClassOf() #SubClassOf : {}
{
<SUBCLASSOF> AttributeList()
(">" ElementList() "</" <SUBCLASSOF> ">" | ElementList() "/>")
}
void OwlElement() : {}
{
OwlOntology()
......@@ -960,6 +1158,7 @@ void AttributeList() #List : {}
void Attribute() : {}
{
Version()
| OntologyAttribute()
| RdfAttribute()
| XmlAttribute()
| XmlnsAttribute()
......@@ -970,6 +1169,46 @@ void Version() #Version : {}
<VERSION> <ASSIGN> Value()
}
void OntologyAttribute() : {}
{
AbbreviatedIRI()
| Cardinality()
| DatatypeIRI()
| IRI()
| Name()
| OntologyIRI()
}
void AbbreviatedIRI() #AbbreviatedIRI : {}
{
<ABBREVIATEDIRI> <ASSIGN> Value()
}
void Cardinality() #Cardinality : {}
{
<CARDINALITY> <ASSIGN> Value()
}
void DatatypeIRI() #DatatypeIRI : {}
{
<DATATYPEIRI> <ASSIGN> Value()
}
void IRI() #IRI : {}
{
<IRI> <ASSIGN> Value()
}
void Name() #Name : {}
{
<NAME> <ASSIGN> Value()
}
void OntologyIRI() #OntologyIRI : {}
{
<ONTOLOGYIRI> <ASSIGN> Value()
}
void RdfAttribute() : {}
{
RdfAbout()
......@@ -1017,6 +1256,7 @@ void XmlBase() #XmlBase : {}
void XmlnsAttribute() : {}
{
Xmlns()
| XmlnsXml()
| XmlnsXX()
// | XmlnsDaml()
// | XmlnsDc()
......@@ -1039,6 +1279,11 @@ void Xmlns() #Xmlns : {}
<XMLNS> <ASSIGN> Value()
}
void XmlnsXml() #XmlnsXml : {}
{
<XMLNS_XML> <ASSIGN> Value()
}
void XmlnsXX() #XmlnsXX : {Token t;}
{
<XMLNS_XX> t = <IDENTIFIER> <ASSIGN> Value()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment