Commit 0a49ff26 authored by Anders Nilsson's avatar Anders Nilsson
Browse files

Now also includes rdfs:comment in the generated ontology. Nice to have sometimes

parent b183530a
...@@ -15,6 +15,10 @@ aspect Statistics { ...@@ -15,6 +15,10 @@ aspect Statistics {
// } // }
} }
public void StringElement.genOntology(String ind, PrintStream pStream) {
pStream.print(getLITERAL());
}
public void ComplexElement.genOntology(String ind, PrintStream pStream) { public void ComplexElement.genOntology(String ind, PrintStream pStream) {
pStream.print(ind+"<"+name()); pStream.print(ind+"<"+name());
for (int i=0; i<getNumAttribute(); i++) { for (int i=0; i<getNumAttribute(); i++) {
......
...@@ -14,9 +14,9 @@ options { ...@@ -14,9 +14,9 @@ options {
NODE_PREFIX = ""; NODE_PREFIX = "";
JAVA_UNICODE_ESCAPE = true; JAVA_UNICODE_ESCAPE = true;
STATIC = false; STATIC = false;
// DEBUG_PARSER = true; // DEBUG_PARSER = true;
// DEBUG_LOOKAHEAD = true; // DEBUG_LOOKAHEAD = true;
// DEBUG_TOKEN_MANAGER = true; // DEBUG_TOKEN_MANAGER = true;
} // options } // options
...@@ -31,7 +31,8 @@ PARSER_END(SiarasParser) ...@@ -31,7 +31,8 @@ PARSER_END(SiarasParser)
// LEXICAL TOKENS // // LEXICAL TOKENS //
//--------------------------------------------------------------------// //--------------------------------------------------------------------//
<DEFAULT, BOUNDS> SKIP : /* WHITE SPACE */ // <DEFAULT, BOUNDS> SKIP : /* WHITE SPACE */
SPECIAL_TOKEN : /* WHITE SPACE */
{ {
" " " "
| |
...@@ -49,7 +50,7 @@ PARSER_END(SiarasParser) ...@@ -49,7 +50,7 @@ PARSER_END(SiarasParser)
SPECIAL_TOKEN : /* COMMENTS */ SPECIAL_TOKEN : /* COMMENTS */
{ {
< "<!--" ( ~["-"] | ( "-" ~["-"] ) )* "-->"> < "<!--" ( ~["-"] | ( "-" ~["-"] ) )* "-->">
| < "<rdfs:comment" ( ~["<"] | ( "<" ~["/"] ) )* "</rdfs:comment>" > // | < "<rdfs:comment" ( ~["<"] | ( "<" ~["/"] ) )* "</rdfs:comment>" >
// <XML_COMMENT : "<!--" (~["-","-",">"])* "-->" > // <XML_COMMENT : "<!--" (~["-","-",">"])* "-->" >
}// COMMENTS }// COMMENTS
...@@ -78,7 +79,7 @@ SPECIAL_TOKEN : /* COMMENTS */ ...@@ -78,7 +79,7 @@ SPECIAL_TOKEN : /* COMMENTS */
// | < OWL_SOMEVALUESFROM : "owl:someValuesFrom" > // | < OWL_SOMEVALUESFROM : "owl:someValuesFrom" >
// | < OWL_UNIONOF : "owl:unionOf" > // | < OWL_UNIONOF : "owl:unionOf" >
// | < RDF_RDF : "rdf:RDF" > // | < RDF_RDF : "rdf:RDF" >
< RDF_ABOUT : "rdf:about" > < RDF_ABOUT : "rdf:about" >
| < RDF_DATATYPE : "rdf:datatype" > | < RDF_DATATYPE : "rdf:datatype" >
| < RDF_ID : "rdf:ID" > | < RDF_ID : "rdf:ID" >
// | < RDF_FIRST : "rdf:first" > // | < RDF_FIRST : "rdf:first" >
...@@ -86,7 +87,7 @@ SPECIAL_TOKEN : /* COMMENTS */ ...@@ -86,7 +87,7 @@ SPECIAL_TOKEN : /* COMMENTS */
| < RDF_PARSETYPE : "rdf:parseType" > | < RDF_PARSETYPE : "rdf:parseType" >
| < RDF_RESOURCE : "rdf:resource" > | < RDF_RESOURCE : "rdf:resource" >
// | < RDF_TYPE : "rdf:type" > // | < RDF_TYPE : "rdf:type" >
| < RDFS_COMMENT : "rdfs:comment" > // | < RDFS_COMMENT : "rdfs:comment" >
// | < RDFS_DOMAIN : "rdfs:domain" > // | < RDFS_DOMAIN : "rdfs:domain" >
// | < RDFS_RANGE : "rdfs:range" > // | < RDFS_RANGE : "rdfs:range" >
// | < RDFS_SUBCLASSOF : "rdfs:subClassOf" > // | < RDFS_SUBCLASSOF : "rdfs:subClassOf" >
...@@ -218,9 +219,9 @@ SPECIAL_TOKEN : /* COMMENTS */ ...@@ -218,9 +219,9 @@ SPECIAL_TOKEN : /* COMMENTS */
<DEFAULT,BOUNDS> TOKEN : /* SEPARATORS */ <DEFAULT,BOUNDS> TOKEN : /* SEPARATORS */
{ {
// < LPAREN : "(" > < LPAREN : "(" >
// | < RPAREN : ")" > | < RPAREN : ")" >
< LBRACE : "{" > | < LBRACE : "{" >
| < RBRACE : "}" > | < RBRACE : "}" >
| < LBRACKET : "[" > | < LBRACKET : "[" >
| < RBRACKET : "]" > | < RBRACKET : "]" >
...@@ -238,6 +239,8 @@ SPECIAL_TOKEN : /* COMMENTS */ ...@@ -238,6 +239,8 @@ SPECIAL_TOKEN : /* COMMENTS */
| < START_ENDTAG : "</" > | < START_ENDTAG : "</" >
| < START_TAG : "<" > | < START_TAG : "<" >
| < END_TAGS : "/>" > | < END_TAGS : "/>" >
| < S_QUOTE : "\'" >
| < HASH : "#" >
// | < BANG : "!" > // | < BANG : "!" >
// | < TILDE : "~" > // | < TILDE : "~" >
// | < HOOK : "?" > // | < HOOK : "?" >
......
Supports Markdown
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