Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions PSOA2X/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr3-maven-plugin</artifactId>
<version>3.4</version>
<version>3.5.2</version>
<executions>
<execution>
<goals>
Expand Down Expand Up @@ -72,7 +72,7 @@
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr-runtime</artifactId>
<version>3.4</version>
<version>3.5.2</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
Expand Down
123 changes: 62 additions & 61 deletions PSOA2X/src/main/antlr3/imports/PSOAPS.tokens
Original file line number Diff line number Diff line change
@@ -1,61 +1,62 @@
T__59=59
T__60=60
T__61=61
ALPHA=4
AND=5
BASE=6
COMMENT=7
DEPSIGN=8
DIGIT=9
DOCUMENT=10
ECHAR=11
EOL=12
EQUAL=13
EXISTS=14
EXTERNAL=15
FALSITY=16
FORALL=17
GREATER=18
GROUP=19
HEX=20
IMPLICATION=21
IMPORT=22
INSTANCE=23
IRI=24
IRI_REF=25
IRI_REF_CHARACTERS=26
LESS=27
LITERAL=28
LOCAL=29
LPAR=30
LSQBR=31
MULTI_LINE_COMMENT=32
NAF=33
NAMESPACE=34
NUMBER=35
OR=36
PERCENT=37
PLX=38
PN_CHARS=39
PN_CHARS_BASE=40
PN_CHARS_U=41
PN_LOCAL=42
PN_LOCAL_ESC=43
PN_PREFIX=44
PREFIX=45
PSOA=46
RPAR=47
RSQBR=48
SHORTCONST=49
SLOT=50
SLOT_ARROW=51
STRING=52
SUBCLASS=53
SYMSPACE_OPER=54
TOP=55
TUPLE=56
VAR_ID=57
WHITESPACE=58
'@'=59
'no'=60
'yes'=61
T__60=60
T__61=61
T__62=62
ALPHA=4
AND=5
BASE=6
COMMENT=7
DEPSIGN=8
DIGIT=9
DOCUMENT=10
ECHAR=11
EOL=12
EQUAL=13
EXISTS=14
EXTERNAL=15
FALSITY=16
FORALL=17
GREATER=18
GROUP=19
HEX=20
IMPLICATION=21
IMPORT=22
INSTANCE=23
IRI=24
IRI_REF=25
IRI_REF_CHAR=26
LESS=27
LITERAL=28
LOCAL=29
LPAR=30
LSQBR=31
MULTI_LINE_COMMENT=32
NAF=33
NAMESPACE=34
NUMBER=35
OIDLESSEMBATOM=36
OR=37
PERCENT=38
PLX=39
PN_CHARS=40
PN_CHARS_BASE=41
PN_CHARS_U=42
PN_LOCAL=43
PN_LOCAL_ESC=44
PN_PREFIX=45
PREFIX=46
PSOA=47
RPAR=48
RSQBR=49
SHORTCONST=50
SLOT=51
SLOT_ARROW=52
STRING=53
SUBCLASS=54
SYMSPACE_OPER=55
TOP=56
TUPLE=57
VAR_ID=58
WHITESPACE=59
'@'=60
'no'=61
'yes'=62
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ public Map<String, String> getQueryVarMap()
public List<String> getQueryVars() {
return new ArrayList<String>(m_queryVarMap.keySet());
}
}
}
4 changes: 2 additions & 2 deletions PSOACore/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr3-maven-plugin</artifactId>
<version>3.4</version>
<version>3.5.2</version>
<executions>
<execution>
<goals>
Expand Down Expand Up @@ -68,7 +68,7 @@
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr-runtime</artifactId>
<version>3.4</version>
<version>3.5.2</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ external

psoa
: ^(PSOA term? ^(INSTANCE term) tuple* slot*)
| ^(OIDLESSEMBATOM ^(INSTANCE term) tuple* slot*)
;

tuple
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,14 @@ psoa[boolean isAtomicFormula]
if (isAtomicFormula)
addPsoaTermInfo($pred.tree.toStringTree(), arities, oid != null, hasIndepTuple, hasMultiTuple, hasSlot);
}
| ^(OIDLESSEMBATOM ^(INSTANCE term)
((t=tuple { arities.add($t.length); hasIndepTuple = !$t.dep; })
(t=tuple { arities.add($t.length); if (!$t.dep) hasIndepTuple = true; hasMultiTuple = true; } )*)?
(slot { hasSlot = true; })*)
{
if (isAtomicFormula)
addPsoaTermInfo($pred.tree.toStringTree(), arities, false, hasIndepTuple, hasMultiTuple, hasSlot);
}
;

tuple returns [int length, boolean dep]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ external
;

psoa
: ^(PSOA term? ^(INSTANCE term) tuple* (slots+=slot)*)
: ^(OIDLESSEMBATOM ^(INSTANCE term) tuple* slot*)
| ^(PSOA term? ^(INSTANCE term) tuple* (slots+=slot)*)
;

tuple
Expand Down
Loading