EBNF Production Rules for OPPL:

Statements

OPPL Statement ::= ( <VariableDeclaration> )? ( <Query> )? ( <Actions> )? ";"
VariableDeclaration ::= <VariableDefinition> ( "," <VariableDefinition> )*
Actions ::= "BEGIN" Action ( "," Action )+ "END"
VariableDefinition ::= <InputVariableDefinition> | <GeneratedVariableDefinition>
InputVariableDefinition ::= <VARIABLE_NAME> ":" <variableType> (<VariableTypeScope>)? | VARIABLE_NAME <variableType> " = " "MATCH" <RegularExpression>
GeneratedVariableDefinition ::= <VARIABLE_NAME> ":" <variableType> "=" <opplFunction>
opplFunction ::= <create> | <creatInteserctions> | <createDisjunction>| Any Manchester Syntax with variables expression compatible with the generated variable.
create ::="create("<value>")"
createIntersection ::="createIntersection("<variablevalues>")"
createDisjunction ::="createDisjunction("< variablevalues>")"
variablealues ::=<VARIABLE_NAME>".VALUES"
value ::= a string constant | <generatedValue> | <stringOperation>
stringOperation ::= < value > <caseOperator>
caseOperator ::= ".toLowerCase" | ".toUpperCase"
generatedValue ::=<variableAttribute> (<aggregator> <variableAttribute>)*
aggregator ::="+"
variableAttribute ::=<VARIABLE_NAME>"."<attributeName>
attributeName ::="RENDERING" | "GROUP(" <DIGIT>+")" | "IRI"
VariableTypeScope ::= "[" <direction> <VariableFreeOWLExpression>"]"
direction ::= "subClassOf" | "superClassOf" | subPropertyOf | "superPropertyOf" | "instanceOf"
/*Direction production is not context free as it depends on which variable type the variable
is being applied to. The scope, therefore, is not context free either*/
Constraint ::= <VARIABLE_NAME> "!=" <OWLExpression>
| <VARIABLE_NAME> "MATCH" <RegularExpression>
| <VARIABLE_NAME> "IN" "{" <OWLExpression> ("," <OWLExpression>)* "}"
"FAIL" <axiom>
variableType ::= "CLASS" | "OBJECTPROPERTY | "DATAPROPERTY" | "INDIVIDUAL" | "CONSTANT"
Query ::= "SELECT" ("ASSERTED")? <Axiom> ( ", ("ASSERTED")?" <Axiom> )* ( "WHERE" <Constraint> ("," <Constraint> )* )?
Action ::= "ADD" | "REMOVE" <Axiom>
IDENTIFIER ::= <LETTER> (<LETTER>|<DIGIT>)*
VARIABLE_NAME ::= "?"<IDENTIFIER>
LETTER ::= ["_","a"-"z","A"-"Z", ,"\u00e0"-"\u00f9"]
DIGIT ::= ["0"-"9"]
OWLExpression ::= An OWL entity in Manchester OWL Syntax (possibly containing variables)
VariableFreeOWLExpression ::= An OWL entity in Manchester OWL Syntax (without variables)
RegularExpression ::= "("" A regular expression for string matching (applies to the entity rendering) "")"


Manchester OWL Syntax axioms

Axiom <SubClassAxiom
| <EquivalentClassAxiom>
| <DisjointClassAxiom>
| <FunctionalObjectPropertyAxiom>
| <SymmetricObjectPropertyAxiom>
| <ReflexiveObjectPropertyAxiom>
| <TransitiveObjectPropertyAxiom>
| <AntiSymmetricObjectPropertyAxiom>
| <IrreflexiveObjectPropertyAxiom>
| <SubObjectPropertyAxiom>
| <EquivalentObjectPropertyAxiom>
| <DisjointPropertyAxiom>
| <InversePropertyAxiom>
| <InverseFunctionalPropertyAxiom>
| <FunctionalDataPropertyAxiom>
| <ObjectPropertyRangeAxiom>
| <ObjectPropertyDomainAxiom>
| <SubDataPropertyAxiom>
| <EquivalentDataPropertyAxiom>
| <DisjointPropertyAxiom>
| <DataPropertyDomainAxiom>
| <DataPropertyRangeAxiom>
| <ClassAssertionAxiom>
| <ObjectPropertyAssertionAxiom>
| <DataPropertyAssertionAxiom>
| <NegativeObjectPropertyAssertionAxiom>
| <NegativeDataPropertyAssertionAxiom>
| <SameAsAxiom>
| <DifferentFromAxiom> | <EntityAnnotatonAxiom>

SubClassAxiom ::= <ClassDescription> "SubClassOf" <ClassDescription>
EquivalentClassAxiom ::= <ClassDescription> "EquivalentTo" (<ClassDescription>)+
DisjointClassAxiom ::= <ClassDescription> "DisjointWith" (<ClassDescription>)+
FunctionalObjectPropertyAxiom ::= "Functional" <ObjectProperty>
SymmetricObjectPropertyAxiom ::= "Symmetric" <ObjectProperty>
ReflexiveObjectPropertyAxiom ::= "Reflexive" <ObjectProperty>
TransitiveObjectPropertyAxiom ::= "Transitive" <ObjectProperty>
AntiSymmetricObjectPropertyAxiom ::= "AntiSymmetric" <ObjectProperty>
IrreflexiveObjectPropertyAxiom ::= "Irreflexive" <ObjectProperty>
SubObjectPropertyAxiom ::= <ObjectProperty> "SubPropertyOf" <ObjectProperty>
EquivalentObjectPropertyAxiom ::= <ObjectProperty> "EquivalentTo" (<ObjectProperty>)+
DisjointPropertyAxiom ::= <ObjectProperty> "DisjointWith" (<ObjectProperty>)+
InversePropertyAxiom ::= <ObjectProperty> "InverseOf" "("<ObjectProperty>")"
InverseFunctionalPropertyAxiom ::= <ObjectProperty> "InverseFunctional" "("<ObjectProperty>")"
FunctionalDataPropertyAxiom ::= "Functional" <DataProperty>
ObjectPropertyRangeAxiom ::= <ObjectProperty> "Range" <ClassDescription>
ObjectPropertyDomainAxiom ::= <ObjectProperty> "Domain" <ClassDescription>
SubDataPropertyAxiom ::= <DataProperty> "SubPropertyOf" <DataProperty>
EquivalentDataPropertyAxiom ::= <DataProperty> "EquivalentTo" (<DataProperty>)+
DisjointPropertyAxiom ::= <DataProperty> "DisjointWith" (<DataProperty>)+
DataPropertyDomainAxiom ::= <DataProperty> "Domain" <ClassDescription>
DataPropertyRangeAxiom ::= <DataProperty> "Range" <DataRange>
ClassAssertionAxiom ::=  <Individual> "InstanceOf" | "Types" <ClassDescription>
ObjectPropertyAssertionAxiom ::= <Individual> <ObjectProperty> <Individual>
DataPropertyAssertionAxiom ::= <Individual> <DataProperty> <Constant>
NegativeObjectPropertyAssertionAxiom ::= "not" <Individual> <ObjectProperty> <Individual>
NegativeDataPropertyAssertionAxiom ::= "not" <Individual> <DataProperty> <Constant>
SameAsAxiom ::= <Individual> "sameAs" (<Individual>)+
DifferentFromAxiom ::= <Individual> "differentFrom" (<Individual>)+
EntityAnnotationAxiom ::= <IRI> <AnnotationProperty> <Constant>

Manchester OWL Syntax with variables entities

ClassDescription ::= <ClassIntersection>
ClassIntersection ::= <ClassUnion> ("and" <ClassUnion>)*
ClassUnion ::= <NonN-aryDescription> ("or " <NonN-aryDescription>)*
NonN-aryDescription ::= <PrimitiveClass> | <ObjectRestriction> | <DataRestriction> | "not" <ClassDescription> | "oneOf {" <Individual> (, <Individual>)* "}"
DataRestriction ::= <DataProperty> "some" <DataRange> | <DataProperty> "only" <DataRange> | <DataProperty> "value" <Constant> | <DataProperty> "min" <NonNegativeInteger> (<DataRange>)? | <DataProperty> "exactly" <NonNegativeInteger> (<DataRange>)? | <DataProperty> "max" <NonNegativeInteger> (<DataRange>)?
ObjectRestriction ::= <ObjectProperty> "some" <ClassDescription> | <ObjectProperty> "only" <ClassDescription> | <ObjectProperty> "value" <Individual> | <ObjectProperty> "min" <NonNegativeInteger> (<ClassDescription>)? | <ObjectProperty> "exactly" <NonNegativeInteger> (<ClassDescription>)? | <ObjectProperty> "max" <NonNegativeInteger> (<ClassDescription>)?
PrimitiveClass ::=<ClassName> | <VariableName>
ObjectProperty ::=<ObjectPropertyName> | <VariableName>
DataProperty ::=<DataPropertyName> | <VariableName>
AnnotationProperty ::=<AnnotationPropertyName> | <VariableName>
Individual ::=<IndividualName> | <VariableName>
Constant ::=<ConstantLiteral> | <VariableName>
ClassName ::= <LETTER> (<LETTER>|<DIGIT>)*
ObjectPropertyName ::= <LETTER> (<LETTER>|<DIGIT>)*
DataPropertyName ::= <LETTER> (<LETTER>|<DIGIT>)*
IndividualName ::= <LETTER> (<LETTER>|<DIGIT>)*
ConstantLiteral ::= "See the OWL specification"
DataRange ::= See Manchester OWL Syntax references above
NonNegativeInteger ::= Any integer greater than or equal to zero
ClassName ::= <LETTER> (<LETTER>|<DIGIT>)*
IRI ::= ["<"a valid IRI as defined in IETF RFC 3987">" | <VariableName>".IRI"
VariableName ::= "?" <LETTER> (<LETTER>|<DIGIT>)*
LETTER ::= ["_","a"-"z","A"-"Z","\u00e0"-"\u00f9"]
DIGIT ::= ["0"-"9"]