Author: pkluegl
Date: Fri May 25 16:26:54 2012
New Revision: 1342714

URL: http://svn.apache.org/viewvc?rev=1342714&view=rev
Log:
UIMA-2402
- changed language definition in order to provide new arguments for MARKTABLE
- adapted ast and inference implementation for additional arguments
- some smaller changes in supporting IDE functionality due to changes in ast 
implementation of StructuredAction

Modified:
    
uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/parser/TextMarkerParser.g
    
uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/parser/TextMarkerParser.java
    
uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/formatter/TextMarkerFormattedPrinter.java
    
uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/parser/ast/ActionFactory.java
    
uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/parser/ast/TextMarkerStructureAction.java
    
uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/validator/TextMarkerVarRefChecker.java
    
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/ActionFactory.java
    
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/MarkTableAction.java
    
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/parser/TextMarkerParser.g
    
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/parser/TextMarkerParser.java
    
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/resource/CSVTable.java

Modified: 
uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/parser/TextMarkerParser.g
URL: 
http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/parser/TextMarkerParser.g?rev=1342714&r1=1342713&r2=1342714&view=diff
==============================================================================
--- 
uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/parser/TextMarkerParser.g
 (original)
+++ 
uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/parser/TextMarkerParser.g
 Fri May 25 16:26:54 2012
@@ -1197,19 +1197,30 @@ actionCreate returns [TextMarkerAction a
 
 actionMarkTable returns [TextMarkerAction action = null]
 @init {
-    List left = new ArrayList();
-    List right = new ArrayList();
+    List<Expression> left = new ArrayList<Expression>();
+    List<Expression> right = new ArrayList<Expression>();
 }
     :
     name = MARKTABLE LPAREN 
     structure = typeExpression COMMA 
     index = numberExpression COMMA
     table = wordTableExpression 
-    (COMMA 
-    fname = stringExpression ASSIGN_EQUAL obj1 = numberExpression 
{left.add(fname); right.add(obj1);} 
-    (COMMA fname = stringExpression ASSIGN_EQUAL obj1 = numberExpression 
{left.add(fname);right.add(obj1);})*
-    )? 
-    {action = ActionFactory.createStructureAction(name, structure, index, 
table, left, right);}
+   
+    (COMMA key=stringExpression ASSIGN_EQUAL value = numberExpression)=>(COMMA 
key = stringExpression {left.add(key);} ASSIGN_EQUAL value = 
numberExpression{right.add(value);} )+
+    (COMMA ignoreCase = booleanExpression)=>(COMMA ignoreCase = 
booleanExpression 
+    COMMA ignoreLength = numberExpression 
+    COMMA ignoreChar = stringExpression
+    COMMA maxIgnoreChar = numberExpression)?
+    
+    {
+    List<Expression> args = new ArrayList<Expression>();
+    args.add(index);
+    args.add(table);
+       args.add(ignoreCase);
+       args.add(ignoreLength);
+       args.add(ignoreChar);
+       args.add(maxIgnoreChar);
+    action = ActionFactory.createStructureAction(name, args, left, right, 
structure);}
     RPAREN
     ;
 
@@ -1539,14 +1550,14 @@ List<Expression> right = new ArrayList<E
     //TODO cost parameter
     
     {
-    List args = new ArrayList();
+    List<Expression> args = new ArrayList<Expression>();
        args.add(ignoreCase);
        args.add(ignoreLength);
        args.add(edit);
        args.add(distance);
        args.add(ignoreChar);
     
-    action = ActionFactory.createStructureAction(name, list, args, left, 
right);}
+    action = ActionFactory.createStructureAction(name, args, left, right, 
list);}
     RPAREN
     ;   
 


Reply via email to