You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by pk...@apache.org on 2012/01/18 13:54:54 UTC

svn commit: r1232868 [3/4] - in /uima/sandbox/trunk/TextMarker: uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/action/ uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/parser/ uimaj-ep-textmarker-ide/src/main/jav...

Modified: uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/TextMarkerKeywords.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/TextMarkerKeywords.java?rev=1232868&r1=1232867&r2=1232868&view=diff
==============================================================================
--- uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/TextMarkerKeywords.java (original)
+++ uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/TextMarkerKeywords.java Wed Jan 18 12:54:54 2012
@@ -27,8 +27,8 @@ public class TextMarkerKeywords implemen
       "AFTER", "STARTSWITH", "ENDSWITH", "PARTOFNEQ", "SIZE" };
 
   private static String[] declaration = { "WORDLIST", "DECLARE", "BOOLEAN", "PACKAGE", "TYPE",
-      "TYPESYSTEM", "INT", "DOUBLE", "FLOAT", "STRING", "SCRIPT", "WORDTABLE", "ENGINE", "ACTION",
-      "CONDITION", "BLOCK", "RULES", "BOOLEANLIST", "INTLIST", "DOUBLELIST", "FLOATLIST","STRINGLIST",
+      "TYPESYSTEM", "INT", "DOUBLE", "FLOAT", "STRING", "SCRIPT", "WORDTABLE", "ENGINE", 
+      "BLOCK", "RULES", "BOOLEANLIST", "INTLIST", "DOUBLELIST", "FLOATLIST","STRINGLIST",
       "TYPELIST" };
 
   private static String[] action = { "DEL", "CALL", "MARK", "MARKSCORE", "COLOR", "LOG", "TAG",

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=1232868&r1=1232867&r2=1232868&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 Wed Jan 18 12:54:54 2012
@@ -423,28 +423,28 @@ variableDeclaration returns [List<Statem
         decls.add(StatementFactory.createVarListVariable(id,type,list, TMTypeConstants.TM_TYPE_TL));
         stmts.add(StatementFactory.createDeclarationsStatement(type, decls, list));
         }       
-	|
-	stmt = conditionDeclaration {stmts.add(stmt);}
-	|
-	stmt = actionDeclaration {stmts.add(stmt);}
+	//|
+	//stmt = conditionDeclaration {stmts.add(stmt);}
+	//|
+	//stmt = actionDeclaration {stmts.add(stmt);}
 	;
 
-conditionDeclaration returns [Statement stmt = null]
-    :
-    declareToken = CONDITION id = Identifier {addVariable(id.getText(), declareToken.getText());}
-    ASSIGN_EQUAL 
-    LPAREN cons = conditions RPAREN SEMI
-    {stmt = StatementFactory.createComposedVariableConditionDeclaration(id, cons);}
-    ;
+//conditionDeclaration returns [Statement stmt = null]
+//    :
+//    declareToken = CONDITION id = Identifier {addVariable(id.getText(), declareToken.getText());}
+//    ASSIGN_EQUAL 
+//    LPAREN cons = conditions RPAREN SEMI
+//    {stmt = StatementFactory.createComposedVariableConditionDeclaration(id, cons);}
+//    ;
 
 //TODO added rule
-actionDeclaration returns [Statement stmt = null]
-    :
-    declareToken = ACTION id = Identifier {addVariable(id.getText(), declareToken.getText());}
-    ASSIGN_EQUAL
-    LPAREN a = actions RPAREN SEMI
-    {stmt = StatementFactory.createComposedVariableActionDeclaration(id, a);}
-    ;
+//actionDeclaration returns [Statement stmt = null]
+//    :
+//    declareToken = ACTION id = Identifier {addVariable(id.getText(), declareToken.getText());}
+//    ASSIGN_EQUAL
+//    LPAREN a = actions RPAREN SEMI
+//    {stmt = StatementFactory.createComposedVariableActionDeclaration(id, a);}
+//    ;
 
 declaration returns [List<Statement> stmts = new ArrayList<Statement>()]
 @init {
@@ -853,20 +853,21 @@ condition returns [TextMarkerCondition r
 	| c = conditionPartOfNeq
 	| c = conditionSize
 	| (c = externalCondition)=> c = externalCondition
-	| c = variableCondition
+	//| c = variableCondition
 	) {result = c;}
 	;
 	
 //TODO added rule
-variableCondition returns [TextMarkerCondition condition = null]
-	:		
-	// also create condition for auto-completion
-	//{isVariableOfType(input.LT(1).getText(), "CONDITION")}? 
-	id = Identifier
-	{
-		condition = ConditionFactory.createCondition(id);
-	}
-	;	
+//variableCondition returns [TextMarkerCondition condition = null]
+//	:		
+//	// also create condition for auto-completion
+//	//{isVariableOfType(input.LT(1).getText(), "CONDITION")}? 
+//	id = Identifier
+//	{
+//		condition = ConditionFactory.createCondition(id);
+//	}
+//	;	
+	
 	
 externalCondition returns [TextMarkerCondition condition = null]
 	:
@@ -1146,20 +1147,21 @@ action returns [TextMarkerAction result 
 	| a = actionConfigure
 	| a = actionDynamicAnchoring
 	| (a = externalAction)=> a = externalAction
-	| a = variableAction
+	//| a = variableAction
 	) {result = a;}
 	;
 
 
-variableAction returns [TextMarkerAction action = null]
-	:
-	// also create an dummy action for auto-completion
-	//{isVariableOfType(input.LT(1).getText(), "ACTION")}?
-	 id = Identifier
-	{
-		action = ActionFactory.createAction(id);
-	}
-	;
+//variableAction returns [TextMarkerAction action = null]
+//	:
+//	// also create an dummy action for auto-completion
+//	//{isVariableOfType(input.LT(1).getText(), "ACTION")}?
+//	 id = Identifier
+//	{
+//		action = ActionFactory.createAction(id);
+//	}
+//	;
+	
 externalAction returns [TextMarkerAction action = null]
 	:
 	{isVariableOfType(input.LT(1).getText(), "ACTION")}? id = Identifier