Skip to content

Commit

Permalink
simplified grew grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Heinecke committed Jan 22, 2023
1 parent 95c1b71 commit 4fa0e52
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
7 changes: 3 additions & 4 deletions src/main/antlr4/com/orange/labs/conllparser/Grewmatch.g4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* This library is under the 3-Clause BSD License
Copyright (c) 2018-2022, Orange S.A.
Copyright (c) 2018-2023, Orange S.A.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -28,7 +28,7 @@ are permitted provided that the following conditions are met:
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@author Johannes Heinecke
@version 2.20.0 as of 10th December 2022
@version 2.20.0 as of 22nd January 2023
*/


Expand All @@ -39,9 +39,8 @@ are permitted provided that the following conditions are met:
grammar Grewmatch;

expression
// : pattern without* globals* EOF # final
: (pattern | without | globals)+ EOF # final
| globals # globalrule
// | globals # globalrule
;

globals
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/orange/labs/conllparser/GrewVisitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -917,11 +917,11 @@ public Boolean visitNamedrelation(GrewmatchParser.NamedrelationContext ctx) {
return true;
}

@Override
public Boolean visitGlobalrule(GrewmatchParser.GlobalruleContext ctx) {
boolean value = visit(ctx.globals());
return value;
}
// @Override
// public Boolean visitGlobalrule(GrewmatchParser.GlobalruleContext ctx) {
// boolean value = visit(ctx.globals());
// return value;
// }

@Override
public Boolean visitGloballist(GrewmatchParser.GloballistContext ctx) {
Expand Down

0 comments on commit 4fa0e52

Please sign in to comment.