svn commit: r1229085 [3/5] - in /uima/sandbox/trunk/TextMarker: uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/ uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker
Modified: uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/parser/TextMarkerLexer.tokens URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/parser/TextMarkerLexer.tokens?rev=1229085&r1=1229084&r2=1229085&view=diff == --- uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/parser/TextMarkerLexer.tokens (original) +++ uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/parser/TextMarkerLexer.tokens Mon Jan 9 10:22:03 2012 @@ -52,101 +52,103 @@ FEATURE=54 FILL=55 FILTERMARKUP=56 FILTERTYPE=57 -FloatTypeSuffix=58 -FloatingPointLiteral=59 -GATHER=60 -GET=61 -GETFEATURE=62 -GETLIST=63 -GREATER=64 -GREATEREQUAL=65 -HexDigit=66 -HexLiteral=67 -IF=68 -INLIST=69 -INTLIST=70 -IS=71 -ISINTAG=72 -Identifier=73 -IntString=74 -IntegerTypeSuffix=75 -JavaIDDigit=76 -LAST=77 -LBRACK=78 -LCURLY=79 -LESS=80 -LESSEQUAL=81 -LINE_COMMENT=82 -LOG=83 -LOGN=84 -LPAREN=85 -Letter=86 -ListIdentifier=87 -LogLevel=88 -MARK=89 -MARKFAST=90 -MARKLAST=91 -MARKONCE=92 -MARKSCORE=93 -MARKTABLE=94 -MATCHEDTEXT=95 -MERGE=96 -MINUS=97 -MOFN=98 -NEAR=99 -NOT=100 -NOTEQUAL=101 -OR=102 -OctalEscape=103 -OctalLiteral=104 -OldColor=105 -PARSE=106 -PARTOF=107 -PARTOFNEQ=108 -PERCENT=109 -PLUS=110 -POSITION=111 -PackageString=112 -QUESTION=113 -RBRACK=114 -RCURLY=115 -REGEXP=116 -REMOVE=117 -REMOVEDUPLICATE=118 -REMOVESTRING=119 -REPLACE=120 -RETAINMARKUP=121 -RETAINTYPE=122 -RPAREN=123 -RessourceLiteral=124 -SCORE=125 -SEMI=126 -SETFEATURE=127 -SIN=128 -SIZE=129 -SLASH=130 -STAR=131 -STARTSWITH=132 -STRINGLIST=133 -ScriptString=134 -StringLiteral=135 -StringString=136 -SymbolString=137 -TAN=138 -THEN=139 -TOTALCOUNT=140 -TRANSFER=141 -TRIE=142 -TRUE=143 -TYPELIST=144 -TypeString=145 -TypeSystemString=146 -UNMARK=147 -UNMARKALL=148 -UnicodeEscape=149 -VBAR=150 -VOTE=151 -WORDLIST=152 -WORDTABLE=153 -WS=154 -XOR=155 +FLOATLIST=58 +FloatString=59 +FloatTypeSuffix=60 +FloatingPointLiteral=61 +GATHER=62 +GET=63 +GETFEATURE=64 +GETLIST=65 +GREATER=66 +GREATEREQUAL=67 +HexDigit=68 +HexLiteral=69 +IF=70 +INLIST=71 +INTLIST=72 +IS=73 +ISINTAG=74 +Identifier=75 +IntString=76 +IntegerTypeSuffix=77 +JavaIDDigit=78 +LAST=79 +LBRACK=80 +LCURLY=81 +LESS=82 +LESSEQUAL=83 +LINE_COMMENT=84 +LOG=85 +LOGN=86 +LPAREN=87 +Letter=88 +ListIdentifier=89 +LogLevel=90 +MARK=91 +MARKFAST=92 +MARKLAST=93 +MARKONCE=94 +MARKSCORE=95 +MARKTABLE=96 +MATCHEDTEXT=97 +MERGE=98 +MINUS=99 +MOFN=100 +NEAR=101 +NOT=102 +NOTEQUAL=103 +OR=104 +OctalEscape=105 +OctalLiteral=106 +OldColor=107 +PARSE=108 +PARTOF=109 +PARTOFNEQ=110 +PERCENT=111 +PLUS=112 +POSITION=113 +PackageString=114 +QUESTION=115 +RBRACK=116 +RCURLY=117 +REGEXP=118 +REMOVE=119 +REMOVEDUPLICATE=120 +REMOVESTRING=121 +REPLACE=122 +RETAINMARKUP=123 +RETAINTYPE=124 +RPAREN=125 +RessourceLiteral=126 +SCORE=127 +SEMI=128 +SETFEATURE=129 +SIN=130 +SIZE=131 +SLASH=132 +STAR=133 +STARTSWITH=134 +STRINGLIST=135 +ScriptString=136 +StringLiteral=137 +StringString=138 +SymbolString=139 +TAN=140 +THEN=141 +TOTALCOUNT=142 +TRANSFER=143 +TRIE=144 +TRUE=145 +TYPELIST=146 +TypeString=147 +TypeSystemString=148 +UNMARK=149 +UNMARKALL=150 +UnicodeEscape=151 +VBAR=152 +VOTE=153 +WORDLIST=154 +WORDTABLE=155 +WS=156 +XOR=157 Modified: uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/parser/TextMarkerParser.g URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/parser/TextMarkerParser.g?rev=1229085&r1=1229084&r2=1229085&view=diff == --- uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/parser/TextMarkerParser.g (original) +++ uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/parser/TextMarkerParser.g Mon Jan 9 10:22:03 2012 @@ -258,6 +258,11 @@ variableDeclaration returns [TextMarkerS (COMMA {!ownsVariable($blockDeclaration::env, input.LT(1).getText())}? id = Identifier {addVariable($blockDeclaration::env, id.getText(), type.getText());} )* (ASSIGN_EQUAL value2 = numberExpression)? {setValue($blockDeclaration::env, id.getText(), value2);} SEMI | + type = FloatString + {!ownsVariable($blockDeclaration::env, input.LT(1).getText())}? id = Identifier {addVariable($blockDeclaration::env, id.getText(), type.getText());} + (COMMA {!ownsVariable($blockDeclaration::env, input.LT(1).getText())}? id = Identifier {addVariable($blockDeclaration::env, id.getText(), type.getText());} +)* (ASSIGN_EQUAL value2 = numberExpression)? {setValue($blockDeclaration::env, id.getTe
svn commit: r1229085 [5/5] - in /uima/sandbox/trunk/TextMarker: uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/ uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker
Modified: uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/parser/TextMarkerParser.tokens URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/parser/TextMarkerParser.tokens?rev=1229085&r1=1229084&r2=1229085&view=diff == --- uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/parser/TextMarkerParser.tokens (original) +++ uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/parser/TextMarkerParser.tokens Mon Jan 9 10:22:03 2012 @@ -52,101 +52,103 @@ FEATURE=54 FILL=55 FILTERMARKUP=56 FILTERTYPE=57 -FloatTypeSuffix=58 -FloatingPointLiteral=59 -GATHER=60 -GET=61 -GETFEATURE=62 -GETLIST=63 -GREATER=64 -GREATEREQUAL=65 -HexDigit=66 -HexLiteral=67 -IF=68 -INLIST=69 -INTLIST=70 -IS=71 -ISINTAG=72 -Identifier=73 -IntString=74 -IntegerTypeSuffix=75 -JavaIDDigit=76 -LAST=77 -LBRACK=78 -LCURLY=79 -LESS=80 -LESSEQUAL=81 -LINE_COMMENT=82 -LOG=83 -LOGN=84 -LPAREN=85 -Letter=86 -ListIdentifier=87 -LogLevel=88 -MARK=89 -MARKFAST=90 -MARKLAST=91 -MARKONCE=92 -MARKSCORE=93 -MARKTABLE=94 -MATCHEDTEXT=95 -MERGE=96 -MINUS=97 -MOFN=98 -NEAR=99 -NOT=100 -NOTEQUAL=101 -OR=102 -OctalEscape=103 -OctalLiteral=104 -OldColor=105 -PARSE=106 -PARTOF=107 -PARTOFNEQ=108 -PERCENT=109 -PLUS=110 -POSITION=111 -PackageString=112 -QUESTION=113 -RBRACK=114 -RCURLY=115 -REGEXP=116 -REMOVE=117 -REMOVEDUPLICATE=118 -REMOVESTRING=119 -REPLACE=120 -RETAINMARKUP=121 -RETAINTYPE=122 -RPAREN=123 -RessourceLiteral=124 -SCORE=125 -SEMI=126 -SETFEATURE=127 -SIN=128 -SIZE=129 -SLASH=130 -STAR=131 -STARTSWITH=132 -STRINGLIST=133 -ScriptString=134 -StringLiteral=135 -StringString=136 -SymbolString=137 -TAN=138 -THEN=139 -TOTALCOUNT=140 -TRANSFER=141 -TRIE=142 -TRUE=143 -TYPELIST=144 -TypeString=145 -TypeSystemString=146 -UNMARK=147 -UNMARKALL=148 -UnicodeEscape=149 -VBAR=150 -VOTE=151 -WORDLIST=152 -WORDTABLE=153 -WS=154 -XOR=155 +FLOATLIST=58 +FloatString=59 +FloatTypeSuffix=60 +FloatingPointLiteral=61 +GATHER=62 +GET=63 +GETFEATURE=64 +GETLIST=65 +GREATER=66 +GREATEREQUAL=67 +HexDigit=68 +HexLiteral=69 +IF=70 +INLIST=71 +INTLIST=72 +IS=73 +ISINTAG=74 +Identifier=75 +IntString=76 +IntegerTypeSuffix=77 +JavaIDDigit=78 +LAST=79 +LBRACK=80 +LCURLY=81 +LESS=82 +LESSEQUAL=83 +LINE_COMMENT=84 +LOG=85 +LOGN=86 +LPAREN=87 +Letter=88 +ListIdentifier=89 +LogLevel=90 +MARK=91 +MARKFAST=92 +MARKLAST=93 +MARKONCE=94 +MARKSCORE=95 +MARKTABLE=96 +MATCHEDTEXT=97 +MERGE=98 +MINUS=99 +MOFN=100 +NEAR=101 +NOT=102 +NOTEQUAL=103 +OR=104 +OctalEscape=105 +OctalLiteral=106 +OldColor=107 +PARSE=108 +PARTOF=109 +PARTOFNEQ=110 +PERCENT=111 +PLUS=112 +POSITION=113 +PackageString=114 +QUESTION=115 +RBRACK=116 +RCURLY=117 +REGEXP=118 +REMOVE=119 +REMOVEDUPLICATE=120 +REMOVESTRING=121 +REPLACE=122 +RETAINMARKUP=123 +RETAINTYPE=124 +RPAREN=125 +RessourceLiteral=126 +SCORE=127 +SEMI=128 +SETFEATURE=129 +SIN=130 +SIZE=131 +SLASH=132 +STAR=133 +STARTSWITH=134 +STRINGLIST=135 +ScriptString=136 +StringLiteral=137 +StringString=138 +SymbolString=139 +TAN=140 +THEN=141 +TOTALCOUNT=142 +TRANSFER=143 +TRIE=144 +TRUE=145 +TYPELIST=146 +TypeString=147 +TypeSystemString=148 +UNMARK=149 +UNMARKALL=150 +UnicodeEscape=151 +VBAR=152 +VOTE=153 +WORDLIST=154 +WORDTABLE=155 +WS=156 +XOR=157 Modified: uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/verbalize/ExpressionVerbalizer.java URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/verbalize/ExpressionVerbalizer.java?rev=1229085&r1=1229084&r2=1229085&view=diff == --- uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/verbalize/ExpressionVerbalizer.java (original) +++ uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/verbalize/ExpressionVerbalizer.java Mon Jan 9 10:22:03 2012 @@ -36,12 +36,10 @@ import org.apache.uima.textmarker.expres import org.apache.uima.textmarker.expression.list.SimpleNumberListExpression; import org.apache.uima.textmarker.expression.list.SimpleStringListExpression; import org.apache.uima.textmarker.expression.list.SimpleTypeListExpression; -import org.apache.uima.textmarker.expression.number.ComposedDoubleExpression; -import org.apache.uima.textmarker.expression.number.ComposedIntegerExpression; +import org.apache.uima.textmarker.expression.number.ComposedNumberExpression; import org.apache.uima.textmarker.expression.number.NegativeNumberExpression; import org.apache.uima.textmarker.expression.number.NumberExpression; -import org.apache.uima.textmarker.expression.number.ReferenceDoubleExpression; -import org.apache.uima.text
svn commit: r1229085 [1/5] - in /uima/sandbox/trunk/TextMarker: uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/ uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker
Author: pkluegl Date: Mon Jan 9 10:22:03 2012 New Revision: 1229085 URL: http://svn.apache.org/viewvc?rev=1229085&view=rev Log: UIMA-2319 added prototypical language elements for float support. Added: uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/expression/number/ComposedNumberExpression.java - copied, changed from r1181740, uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/expression/number/ComposedDoubleExpression.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/expression/number/ReferenceNumberExpression.java - copied, changed from r1181740, uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/expression/number/ReferenceDoubleExpression.java Removed: uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/expression/number/ComposedDoubleExpression.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/expression/number/ComposedIntegerExpression.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/expression/number/ReferenceDoubleExpression.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/expression/number/ReferenceIntegerExpression.java Modified: uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/TextMarkerEnvironment.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/expression/ExpressionFactory.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/expression/number/NegativeNumberExpression.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/expression/number/NumberExpression.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/expression/number/SimpleNumberExpression.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/parser/TextMarkerLexer.g uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/parser/TextMarkerLexer.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/parser/TextMarkerLexer.tokens uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/parser/TextMarkerParser.g uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/parser/TextMarkerParser.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/parser/TextMarkerParser.tokens uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/verbalize/ExpressionVerbalizer.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/parser/TextMarkerParser.g Modified: uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/TextMarkerEnvironment.java URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/TextMarkerEnvironment.java?rev=1229085&r1=1229084&r2=1229085&view=diff == --- uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/TextMarkerEnvironment.java (original) +++ uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/TextMarkerEnvironment.java Mon Jan 9 10:22:03 2012 @@ -91,6 +91,7 @@ public class TextMarkerEnvironment { availableTypes.put("INT", Integer.class); availableTypes.put("STRING", String.class); availableTypes.put("DOUBLE", Double.class); +availableTypes.put("FLOAT", Double.class); availableTypes.put("BOOLEAN", Boolean.class); availableTypes.put("TYPE", Type.class); availableTypes.put("CONDITION", AbstractTextMarkerCondition.class); @@ -100,12 +101,14 @@ public class TextMarkerEnvironment { availableTypes.put("BOOLEANLIST", List.class); availableTypes.put("INTLIST", List.class); availableTypes.put("DOUBLELIST", List.class); +availableTypes.put("FLOATLIST", List.class); availableTypes.put("STRINGLIST", List.class); availableTypes.put("TYPELIST", List.class); availableListTypes = new HashMap>(); availableListTypes.put("BOOLEANLIST", Boolean.class); availableListTypes.put("INTLIST", Integer.class); availableListTypes.put("DOUBLELIST", Double.class); +availabl
svn commit: r1229104 - in /uima/sandbox/trunk/TextMarker: uimaj-ep-textmarker-addons/src/main/java/org/apache/uima/textmarker/testing/evaluator/ uimaj-ep-textmarker-engine/src/main/java/org/apache/uim
Author: pkluegl Date: Mon Jan 9 12:08:45 2012 New Revision: 1229104 URL: http://svn.apache.org/viewvc?rev=1229104&view=rev Log: UIMA-2319 added constants for primitive types added keywords for float Added: uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/UIMAConstants.java Modified: uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-addons/src/main/java/org/apache/uima/textmarker/testing/evaluator/FeatureCasEvaluator.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-addons/src/main/java/org/apache/uima/textmarker/testing/evaluator/StringFeatureCasEvaluator.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/action/AbstractStructureAction.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/action/GetFeatureAction.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/action/MarkTableAction.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/action/SetFeatureAction.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/condition/FeatureCondition.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/TextMarkerKeywords.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/builder/TextMarkerSimpleBuilder.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/parser/ast/TMTypeConstants.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/validator/TextMarkerTypeChecker.java Modified: uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-addons/src/main/java/org/apache/uima/textmarker/testing/evaluator/FeatureCasEvaluator.java URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-addons/src/main/java/org/apache/uima/textmarker/testing/evaluator/FeatureCasEvaluator.java?rev=1229104&r1=1229103&r2=1229104&view=diff == --- uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-addons/src/main/java/org/apache/uima/textmarker/testing/evaluator/FeatureCasEvaluator.java (original) +++ uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-addons/src/main/java/org/apache/uima/textmarker/testing/evaluator/FeatureCasEvaluator.java Mon Jan 9 12:08:45 2012 @@ -34,6 +34,7 @@ import org.apache.uima.cas.Type; import org.apache.uima.cas.TypeSystem; import org.apache.uima.cas.text.AnnotationFS; import org.apache.uima.jcas.tcas.Annotation; +import org.apache.uima.textmarker.UIMAConstants; import org.apache.uima.textmarker.engine.TextMarkerEngine; public class FeatureCasEvaluator implements ICasEvaluator { @@ -47,7 +48,7 @@ public class FeatureCasEvaluator impleme Type truePositiveType = run.getTypeSystem().getType(ICasEvaluator.TRUE_POSITIVE); Feature feature = falsePositiveType.getFeatureByBaseName(ICasEvaluator.ORIGINAL); Type annotationType = test.getAnnotationType(); -Type stringType = run.getTypeSystem().getType("uima.cas.String"); +Type stringType = run.getTypeSystem().getType(UIMAConstants.TYPE_STRING); Type basicType = run.getTypeSystem().getType(TextMarkerEngine.BASIC_TYPE); List allTypes = test.getTypeSystem().getProperlySubsumedTypes(annotationType); List types = new ArrayList(); @@ -208,7 +209,7 @@ public class FeatureCasEvaluator impleme } } -if ("uima.cas.String".equals(range.getName())) { +if (UIMAConstants.TYPE_STRING.equals(range.getName())) { String valueTest = fs.getFeatureValueAsString(feature); if (valueTest != null) { Feature feature2 = newFS.getType().getFeatureByBaseName(feature.getShortName()); @@ -245,7 +246,7 @@ public class FeatureCasEvaluator impleme for (Feature feature : features) { Type range = feature.getRange(); if (typeSystem.subsumes(annotationType, range) -|| "uima.cas.String".equals(range.getName())) { +|| UIMAConstants.TYPE_STRING.equals(range.getName())) { result.add(fs); break; } @@ -322,7 +323,7 @@ public class FeatureCasEvaluator impleme } - if ("uima.cas.String".equals(range.getName())) { + if (UIMAConstants.TYPE_STRING.equals(range.getName())) { String name = eachFeature1.getShortName(); Modified: uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-addons/src/main/java/org/apache/uima/textmarker/testing/evaluator/StringFeatureCasEvaluator.java URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-addons/src/main/java/org/apa
svn commit: r1229131 [1/3] - in /uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide: core/parser/ parser/ast/
Author: pkluegl Date: Mon Jan 9 13:02:07 2012 New Revision: 1229131 URL: http://svn.apache.org/viewvc?rev=1229131&view=rev Log: UIMA-2319 fixed bug/typo in ide parser grammar 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/core/parser/TextMarkerParser.tokens uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/parser/ast/StatementFactory.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=1229131&r1=1229130&r2=1229131&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 Mon Jan 9 13:02:07 2012 @@ -1873,7 +1873,7 @@ externalNumberFunction returns [Expressi numberVariable returns [Expression expr = null] : ( {isVariableOfType(input.LT(1).getText(), "INT")}? numVarRef = Identifier // -| {isVariableOfType(input.LT(1).getText(), "DOUBLE")}? numVarRef = Identifier) +| {isVariableOfType(input.LT(1).getText(), "DOUBLE")}? numVarRef = Identifier | {isVariableOfType(input.LT(1).getText(), "FLOAT")}? numVarRef = Identifier) { expr = ExpressionFactory.createNumberVariableReference(numVarRef);} ;
svn commit: r1229131 [3/3] - in /uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide: core/parser/ parser/ast/
Modified: uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/parser/TextMarkerParser.tokens 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.tokens?rev=1229131&r1=1229130&r2=1229131&view=diff == --- uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/parser/TextMarkerParser.tokens (original) +++ uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/parser/TextMarkerParser.tokens Mon Jan 9 13:02:07 2012 @@ -52,101 +52,103 @@ FEATURE=54 FILL=55 FILTERMARKUP=56 FILTERTYPE=57 -FloatTypeSuffix=58 -FloatingPointLiteral=59 -GATHER=60 -GET=61 -GETFEATURE=62 -GETLIST=63 -GREATER=64 -GREATEREQUAL=65 -HexDigit=66 -HexLiteral=67 -IF=68 -INLIST=69 -INTLIST=70 -IS=71 -ISINTAG=72 -Identifier=73 -IntString=74 -IntegerTypeSuffix=75 -JavaIDDigit=76 -LAST=77 -LBRACK=78 -LCURLY=79 -LESS=80 -LESSEQUAL=81 -LINE_COMMENT=82 -LOG=83 -LOGN=84 -LPAREN=85 -Letter=86 -ListIdentifier=87 -LogLevel=88 -MARK=89 -MARKFAST=90 -MARKLAST=91 -MARKONCE=92 -MARKSCORE=93 -MARKTABLE=94 -MATCHEDTEXT=95 -MERGE=96 -MINUS=97 -MOFN=98 -NEAR=99 -NOT=100 -NOTEQUAL=101 -OR=102 -OctalEscape=103 -OctalLiteral=104 -OldColor=105 -PARSE=106 -PARTOF=107 -PARTOFNEQ=108 -PERCENT=109 -PLUS=110 -POSITION=111 -PackageString=112 -QUESTION=113 -RBRACK=114 -RCURLY=115 -REGEXP=116 -REMOVE=117 -REMOVEDUPLICATE=118 -REMOVESTRING=119 -REPLACE=120 -RETAINMARKUP=121 -RETAINTYPE=122 -RPAREN=123 -RessourceLiteral=124 -SCORE=125 -SEMI=126 -SETFEATURE=127 -SIN=128 -SIZE=129 -SLASH=130 -STAR=131 -STARTSWITH=132 -STRINGLIST=133 -ScriptString=134 -StringLiteral=135 -StringString=136 -SymbolString=137 -TAN=138 -THEN=139 -TOTALCOUNT=140 -TRANSFER=141 -TRIE=142 -TRUE=143 -TYPELIST=144 -TypeString=145 -TypeSystemString=146 -UNMARK=147 -UNMARKALL=148 -UnicodeEscape=149 -VBAR=150 -VOTE=151 -WORDLIST=152 -WORDTABLE=153 -WS=154 -XOR=155 +FLOATLIST=58 +FloatString=59 +FloatTypeSuffix=60 +FloatingPointLiteral=61 +GATHER=62 +GET=63 +GETFEATURE=64 +GETLIST=65 +GREATER=66 +GREATEREQUAL=67 +HexDigit=68 +HexLiteral=69 +IF=70 +INLIST=71 +INTLIST=72 +IS=73 +ISINTAG=74 +Identifier=75 +IntString=76 +IntegerTypeSuffix=77 +JavaIDDigit=78 +LAST=79 +LBRACK=80 +LCURLY=81 +LESS=82 +LESSEQUAL=83 +LINE_COMMENT=84 +LOG=85 +LOGN=86 +LPAREN=87 +Letter=88 +ListIdentifier=89 +LogLevel=90 +MARK=91 +MARKFAST=92 +MARKLAST=93 +MARKONCE=94 +MARKSCORE=95 +MARKTABLE=96 +MATCHEDTEXT=97 +MERGE=98 +MINUS=99 +MOFN=100 +NEAR=101 +NOT=102 +NOTEQUAL=103 +OR=104 +OctalEscape=105 +OctalLiteral=106 +OldColor=107 +PARSE=108 +PARTOF=109 +PARTOFNEQ=110 +PERCENT=111 +PLUS=112 +POSITION=113 +PackageString=114 +QUESTION=115 +RBRACK=116 +RCURLY=117 +REGEXP=118 +REMOVE=119 +REMOVEDUPLICATE=120 +REMOVESTRING=121 +REPLACE=122 +RETAINMARKUP=123 +RETAINTYPE=124 +RPAREN=125 +RessourceLiteral=126 +SCORE=127 +SEMI=128 +SETFEATURE=129 +SIN=130 +SIZE=131 +SLASH=132 +STAR=133 +STARTSWITH=134 +STRINGLIST=135 +ScriptString=136 +StringLiteral=137 +StringString=138 +SymbolString=139 +TAN=140 +THEN=141 +TOTALCOUNT=142 +TRANSFER=143 +TRIE=144 +TRUE=145 +TYPELIST=146 +TypeString=147 +TypeSystemString=148 +UNMARK=149 +UNMARKALL=150 +UnicodeEscape=151 +VBAR=152 +VOTE=153 +WORDLIST=154 +WORDTABLE=155 +WS=156 +XOR=157 Modified: uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/parser/ast/StatementFactory.java URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/parser/ast/StatementFactory.java?rev=1229131&r1=1229130&r2=1229131&view=diff == --- uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/parser/ast/StatementFactory.java (original) +++ uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/parser/ast/StatementFactory.java Mon Jan 9 13:02:07 2012 @@ -123,6 +123,15 @@ public class StatementFactory extends Ab * @param type * @return */ + public static Object createFloatVariable(Token id, Token type) { +return createVariable(id, type, TMTypeConstants.TM_TYPE_F); + } + + /** + * @param id + * @param type + * @return + */ public static TextMarkerVariableDeclaration createDoubleVariable(Token id, Token type) { return createVariable(id, type, TMTypeConstants.TM_TYPE_D); } @@ -312,4 +321,6 @@ public class StatementFactory extends Ab return new ComponentDeclaration(nameBounds[0], nameBounds[1], ct.getText()); } + + }
svn commit: r1229161 - in /uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide: ./ src/main/java/org/apache/uima/textmarker/ide/core/ src/main/java/org/apache/uima/textmarker/ide/ui/preferences/
Author: pkluegl Date: Mon Jan 9 14:11:11 2012 New Revision: 1229161 URL: http://svn.apache.org/viewvc?rev=1229161&view=rev Log: UIMA-2322 was not able to find a solution and therefore replaced the complete page by a simpler version. Also deactivated TaskTag preferences. Removed: uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/ui/preferences/TextMarkerBuilderConfigurationBlock.java Modified: uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/plugin.xml uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/TextMarkerPreferenceInitializer.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/ui/preferences/TextMarkerBuilderPreferencePage.java Modified: uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/plugin.xml URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/plugin.xml?rev=1229161&r1=1229160&r2=1229161&view=diff == --- uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/plugin.xml (original) +++ uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/plugin.xml Mon Jan 9 14:11:11 2012 @@ -195,6 +195,15 @@ under the License. + + + + + + @@ -237,12 +246,6 @@ under the License. - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -658,14 +733,6 @@ under the License. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + Modified: uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/TextMarkerPreferenceInitializer.java URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/TextMarkerPreferenceInitializer.java?rev=1229161&r1=1229160&r2=1229161&view=diff == --- uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/TextMarkerPreferenceInitializer.java (original) +++ uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/TextMarkerPreferenceInitializer.java Mon Jan 9 14:11:11 2012 @@ -20,9 +20,8 @@ package org.apache.uima.textmarker.ide.core; import org.apache.uima.textmarker.ide.TextMarkerIdePlugin; -import org.eclipse.core.runtime.Preferences; import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; -import org.eclipse.dltk.compiler.task.TaskTagUtils; +import org.eclipse.jface.preference.IPreferenceStore; public class TextMarkerPreferenceInitializer extends AbstractPreferenceInitializer { @@ -31,8 +30,8 @@ public class TextMarkerPreferenceInitial @Override public void initializeDefaultPreferences() { -Preferences store = TextMarkerIdePlugin.getDefault().getPluginPreferences(); -TaskTagUtils.initializeDefaultValues(store); +IPreferenceStore store = TextMarkerIdePlugin.getDefault().getPreferenceStore(); +//TaskTagUtils.initializeDefaultValues(store); store.setDefault(TextMarkerCorePreferences.BUILDER_IMPORT_BY_NAME, false); store.setDefault(TextMarkerCorePreferences.BUILDER_RESOLVE_IMPORTS, false); store.setDefault(TextMarkerCorePreferences.BUILDER_IGNORE_DUPLICATE_SHORTNAMES, false); Modified: uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/ui/preferences/TextMarkerBuilderPreferencePage.java URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/ui/preferences/TextMarkerBuilderPreferencePage.java?rev=1229161&r1=1229160&r2=1229161&view=diff == --- uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/ui/preferences/TextMarkerBuilderPreferencePage.java (original) +++ uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/ui/preferences/TextMarkerBuilderPreferencePage.java Mon Jan 9 14:11:11 2012 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - *
svn commit: r1229219 - /uima/uimacpp/tags/uimacpp-2.4.0-rc1/
Author: bhavani Date: Mon Jan 9 15:42:02 2012 New Revision: 1229219 URL: http://svn.apache.org/viewvc?rev=1229219&view=rev Log: create tag for 2.4.0 release Added: uima/uimacpp/tags/uimacpp-2.4.0-rc1/ (props changed) - copied from r1229218, uima/uimacpp/trunk/ Propchange: uima/uimacpp/tags/uimacpp-2.4.0-rc1/ -- --- svn:ignore (added) +++ svn:ignore Mon Jan 9 15:42:02 2012 @@ -0,0 +1,4 @@ +install +Release +Debug +.project Propchange: uima/uimacpp/tags/uimacpp-2.4.0-rc1/ -- --- svn:mergeinfo (added) +++ svn:mergeinfo Mon Jan 9 15:42:02 2012 @@ -0,0 +1,2 @@ +/incubator/uima/uimacpp/branches/uimacpp-2.3.0:831288-933272 +/uima/uimacpp/branches/uimacpp-2.3.0:933273-997790
svn commit: r1229263 - in /uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/builder: TextMarkerBuilder.java TextMarkerProjectUtils.java TextMarke
Author: pkluegl Date: Mon Jan 9 17:20:01 2012 New Revision: 1229263 URL: http://svn.apache.org/viewvc?rev=1229263&view=rev Log: UIMA-2321 added ResourceManager for resolving type systems Modified: uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/builder/TextMarkerBuilder.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/builder/TextMarkerProjectUtils.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/builder/TextMarkerSimpleBuilder.java Modified: uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/builder/TextMarkerBuilder.java URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/builder/TextMarkerBuilder.java?rev=1229263&r1=1229262&r2=1229263&view=diff == --- uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/builder/TextMarkerBuilder.java (original) +++ uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/builder/TextMarkerBuilder.java Mon Jan 9 17:20:01 2012 @@ -49,7 +49,6 @@ import org.eclipse.core.runtime.IProgres import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.Preferences; import org.eclipse.core.runtime.SubProgressMonitor; import org.eclipse.dltk.ast.declarations.ModuleDeclaration; import org.eclipse.dltk.core.DLTKCore; @@ -64,6 +63,7 @@ import org.eclipse.dltk.internal.core.bu import org.eclipse.dltk.internal.core.builder.Messages; import org.eclipse.dltk.internal.core.builder.SourceModuleBuildContext; import org.eclipse.dltk.internal.core.builder.StandardScriptBuilder; +import org.eclipse.jface.preference.IPreferenceStore; public class TextMarkerBuilder extends StandardScriptBuilder { @@ -259,7 +259,7 @@ public class TextMarkerBuilder extends S try { TextMarkerBuildOptions option = new TextMarkerBuildOptions(language, engines); - Preferences store = TextMarkerIdePlugin.getDefault().getPluginPreferences(); + IPreferenceStore store = TextMarkerIdePlugin.getDefault().getPreferenceStore(); option.setImportByName(store.getBoolean(TextMarkerCorePreferences.BUILDER_IMPORT_BY_NAME)); option.setResolveImports(store.getBoolean(TextMarkerCorePreferences.BUILDER_RESOLVE_IMPORTS)); builder.build(sm, typeSystemDest, engineDest, option, mainScript, scriptPaths, enginePaths); Modified: uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/builder/TextMarkerProjectUtils.java URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/builder/TextMarkerProjectUtils.java?rev=1229263&r1=1229262&r2=1229263&view=diff == --- uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/builder/TextMarkerProjectUtils.java (original) +++ uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/builder/TextMarkerProjectUtils.java Mon Jan 9 17:20:01 2012 @@ -155,10 +155,13 @@ public class TextMarkerProjectUtils { } public static void setProjectDataPath(IProject project, IFolder folder) throws CoreException { +//TODO: what about referenced projects? project.setPersistentProperty(new QualifiedName("", "CDEdataPath"), folder.getLocation() .toPortableString()); - } + + + public static String getDefaultInputLocation() { return "input"; Modified: uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/builder/TextMarkerSimpleBuilder.java URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/builder/TextMarkerSimpleBuilder.java?rev=1229263&r1=1229262&r2=1229263&view=diff == --- uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/builder/TextMarkerSimpleBuilder.java (original) +++ uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/builder/TextMarkerSimpleBuilder.java Mon Jan 9 17:20:01 2012 @@ -42,6 +42,8 @@ import org.apache.uima.cas.CAS; import org.apache.uima.cas.Type; import org.apache.uima.cas.TypeSystem; import org.apache.uima.resource.ResourceInitializationException; +import org
svn commit: r1229282 - in /uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/parser: TextMarkerLexer.g TextMarkerLexer.tokens
Author: pkluegl Date: Mon Jan 9 18:23:08 2012 New Revision: 1229282 URL: http://svn.apache.org/viewvc?rev=1229282&view=rev Log: UIMA-2319 added lexer tokens missed by last commit Modified: uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/parser/TextMarkerLexer.g uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/parser/TextMarkerLexer.tokens Modified: uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/parser/TextMarkerLexer.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/TextMarkerLexer.g?rev=1229282&r1=1229281&r2=1229282&view=diff == --- uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/parser/TextMarkerLexer.g (original) +++ uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/java/org/apache/uima/textmarker/ide/core/parser/TextMarkerLexer.g Mon Jan 9 18:23:08 2012 @@ -1,13 +1,13 @@ lexer grammar TextMarkerLexer; options { - language = Java; + language = Java; } tokens { - DocComment; - Annotation; - ListIdentifier; + DocComment; + Annotation; + ListIdentifier; } @lexer::header { @@ -30,323 +30,326 @@ tokens { * under the License. */ - package org.apache.uima.textmarker.parser; + package org.apache.uima.textmarker.parser; } @lexer::members { - public int implicitLineJoiningLevel = 0; - public int startPos=-1; - public void emitErrorMessage(String msg) { - } + public int implicitLineJoiningLevel = 0; + public int startPos=-1; + public void emitErrorMessage(String msg) { + } } TRIE - : 'TRIE' - ; + : 'TRIE' + ; CONTAINS - : 'CONTAINS' - ; + : 'CONTAINS' + ; DECLARE - : 'DECLARE' - ; + : 'DECLARE' + ; WORDLIST - : 'WORDLIST' - ; + : 'WORDLIST' + ; WORDTABLE - : 'WORDTABLE' - ; + : 'WORDTABLE' + ; AND - : 'AND' - ; + : 'AND' + ; CONTEXTCOUNT - : 'CONTEXTCOUNT' - ; + : 'CONTEXTCOUNT' + ; COUNT - : 'COUNT' - ; + : 'COUNT' + ; TOTALCOUNT - : 'TOTALCOUNT' - ; + : 'TOTALCOUNT' + ; CURRENTCOUNT - : 'CURRENTCOUNT' - ; + : 'CURRENTCOUNT' + ; INLIST - : 'INLIST' - ; + : 'INLIST' + ; ISINTAG - : 'ISINTAG' - ; + : 'ISINTAG' + ; LAST - : 'LAST' - ; + : 'LAST' + ; MOFN - : 'MOFN' - ; + : 'MOFN' + ; NEAR - : 'NEAR' - ; + : 'NEAR' + ; OR - : 'OR' - ; + : 'OR' + ; PARTOF - : 'PARTOF' - ; - + : 'PARTOF' + ; + PARTOFNEQ - : 'PARTOFNEQ' - ; + : 'PARTOFNEQ' + ; POSITION - : 'POSITION' - ; + : 'POSITION' + ; REGEXP - : 'REGEXP' - ; + : 'REGEXP' + ; SCORE - : 'SCORE' - ; + : 'SCORE' + ; VOTE - : 'VOTE' - ; + : 'VOTE' + ; IF - : 'IF' - ; + : 'IF' + ; FEATURE - : 'FEATURE' - ; + : 'FEATURE' + ; PARSE - : 'PARSE' - ; + : 'PARSE' + ; CREATE - : 'CREATE' - ; + : 'CREATE' + ; GATHER - : 'GATHER' - ; + : 'GATHER' + ; FILL - : 'FILL' - ; + : 'FILL' + ; ATTRIBUTE - : 'ATTRIBUTE' - ; + : 'ATTRIBUTE' + ; COLOR - : 'COLOR' - ; + : 'COLOR' + ; DEL - : 'DEL' - ; + : 'DEL' + ; LOG - : 'LOG' - ; + : 'LOG' + ; MARK - : 'MARK' - ; + : 'MARK' + ; MARKSCORE - : 'MARKSCORE' - ; + : 'MARKSCORE' + ; MARKONCE - : 'MARKONCE' - ; + : 'MARKONCE' + ; MARKFAST - : 'MARKFAST' - ; - + : 'MARKFAST' + ; + MARKTABLE - : 'MARKTABLE' - ; - + : 'MARKTABLE' + ; + MARKLAST - : 'MARKLAST' - ; + : 'MARKLAST' + ; REPLACE - : 'REPLACE' - ; + : 'REPLACE' + ; RETAINMARKUP - : 'RETAINMARKUP' - ; + : 'RETAINMARKUP' + ; RETAINTYPE - : 'RETAINTYPE' - ; + : 'RETAINTYPE' + ; FILTERMARKUP - : 'FILTERMARKUP' - ; + : 'FILTERMARKUP' + ; FILTERTYPE - : 'FILTERTYPE' - ; + : 'FILTERTYPE' + ; CALL - : 'CALL' - ; + : 'CALL' + ; EXEC - : 'EXEC' - ; + : 'EXEC' + ; CONFIGURE - : 'CONFIGURE' - ; + : 'CONFIGURE' + ; ASSIGN - :
svn commit: r1229297 - in /uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker: action/ condition/ expression/number/ parser/
Author: pkluegl Date: Mon Jan 9 19:02:22 2012 New Revision: 1229297 URL: http://svn.apache.org/viewvc?rev=1229297&view=rev Log: UIMA-2313 fixed SETFEATURE, FEATURE, GETFEATURE, MARKTABLE and actions based on structure (CREATE) for other primitive types. Tested with floats and SETFEATURE. Fixed wrong return type in number expressions. Modified: uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/action/AbstractStructureAction.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/action/GetFeatureAction.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/action/MarkTableAction.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/action/SetFeatureAction.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/condition/FeatureCondition.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/expression/number/AbstractNumberExpression.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/expression/number/ComposedNumberExpression.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/expression/number/NegativeNumberExpression.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/expression/number/NumberExpression.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/expression/number/ReferenceNumberExpression.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/expression/number/SimpleNumberExpression.java uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/parser/TextMarkerParser.java Modified: uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/action/AbstractStructureAction.java URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/action/AbstractStructureAction.java?rev=1229297&r1=1229296&r2=1229297&view=diff == --- uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/action/AbstractStructureAction.java (original) +++ uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/action/AbstractStructureAction.java Mon Jan 9 19:02:22 2012 @@ -77,14 +77,26 @@ public abstract class AbstractStructureA AnnotationFS annotation = annotationsInWindow.get(0); structure.setStringValue(targetFeature, annotation.getCoveredText()); } -} else if (valueObject instanceof NumberExpression -&& range.getName().equals(UIMAConstants.TYPE_INTEGER)) { - structure.setIntValue(targetFeature, - ((NumberExpression) valueObject).getIntegerValue(element.getParent())); -} else if (valueObject instanceof NumberExpression -&& range.getName().equals(UIMAConstants.TYPE_DOUBLE)) { - structure.setDoubleValue(targetFeature, - ((NumberExpression) valueObject).getDoubleValue(element.getParent())); +} else if (valueObject instanceof NumberExpression) { + if(range.getName().equals(UIMAConstants.TYPE_INTEGER)) { +structure.setIntValue(targetFeature, +((NumberExpression) valueObject).getIntegerValue(element.getParent())); + } else if(range.getName().equals(UIMAConstants.TYPE_DOUBLE)) { +structure.setDoubleValue(targetFeature, +((NumberExpression) valueObject).getDoubleValue(element.getParent())); + } else if(range.getName().equals(UIMAConstants.TYPE_FLOAT)) { +structure.setFloatValue(targetFeature, +((NumberExpression) valueObject).getFloatValue(element.getParent())); + } else if(range.getName().equals(UIMAConstants.TYPE_BYTE)) { +structure.setByteValue(targetFeature, (byte) +((NumberExpression) valueObject).getIntegerValue(element.getParent())); + } else if(range.getName().equals(UIMAConstants.TYPE_SHORT)) { +structure.setShortValue(targetFeature, (short) +((NumberExpression) valueObject).getIntegerValue(element.getParent())); + } else if(range.getName().equals(UIMAConstants.TYPE_LONG)) { +structure.setLongValue(targetFeature, (long) +((NumberExpression) valueObject).getIntegerValue(element.getParent())); + } } else if (va