Revision 46091 trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/grammars/BasicGrammarFactory.java

View differences:

BasicGrammarFactory.java
164 164
            theGrammar.addStatement(this.createTimeStatement(theGrammar));
165 165
            theGrammar.addStatement(this.createTimestampStatement(theGrammar));
166 166
            theGrammar.addStatement(this.createWhileStatement(theGrammar));
167
            theGrammar.addStatement(this.create$ConstantStatement(theGrammar));
167 168

  
168 169
            this.grammar = theGrammar;
169 170
        }
......
187 188
        stmt.builder(new BeginStatementBuilder("VALUES", "EXCEPT"));
188 189
        return stmt;
189 190
    }
191
	
192
    private Statement create$ConstantStatement(Grammar theGrammar) {
193
        Statement stmt;
190 194

  
195
        stmt = theGrammar.createStatement("$Constant");
196
        stmt.addRule(stmt.require_any_token("<%"));
197
        stmt.addRule(stmt.require_any_token("="));
198
        stmt.addRule(stmt.require_expression().capture_as("VALUE"));
199
        stmt.addRule(stmt.require_any_token("%>"));
200
		stmt.code(
201
				  ExpressionBuilder.FUNCTION_$CONSTANT,
202
				  stmt.args_names("VALUE")
203
			  );
204
        return stmt;
205
    }
206

  
191 207
    private Statement createIfStatement(Grammar theGrammar) {
192 208
        Statement stmt;
193 209

  

Also available in: Unified diff