Skip to content

Commit 3dcb4c9

Browse files
committed
Make an actual connection
1 parent 306ce04 commit 3dcb4c9

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/edu/stanford/nlp/semgraph/semgrex/SemgrexParser.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,13 @@ final public SemgrexPattern Root() throws ParseException {// Root pattern for th
122122
}
123123
for (String key : uniqKeys) {
124124
if (!knownVariables.contains(key)) {
125-
{if (true) throw new SemgrexParseException("Semgrex pattern |" + startToken + "| asked for uniq of node " + key + " which does not exist in the pattern");}
125+
{if (true) throw new SemgrexParseException("Semgrex pattern asked for uniq of node " + key + " which does not exist in the pattern");}
126126
}
127127
}
128-
// TODO: do shit here
129-
128+
// TODO: can error check that the keys are unique between node and edge names
129+
// that might require keeping edge names in a known set
130+
// TODO: edge names might need some upgrades anyway - shouldn't name them under negation, for example
131+
node = new UniqPattern(node, uniqKeys);
130132
break;
131133
}
132134
default:
@@ -535,7 +537,7 @@ final public SemgrexPattern Root() throws ParseException {// Root pattern for th
535537
}
536538
case 17:{
537539
jj_consume_token(17);
538-
startUnderNeg = underNodeNegation;
540+
startUnderNeg = underNodeNegation; // TODO: can negations be nested? If so, should they cancel?
539541
underNodeNegation = true;
540542
child = Child(r);
541543
underNodeNegation = startUnderNeg;

0 commit comments

Comments
 (0)