Revision 47077 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
30 30
import org.gvsig.expressionevaluator.ExpressionBuilder;
31 31
import static org.gvsig.expressionevaluator.ExpressionBuilder.FUNCTION_DICT;
32 32
import org.gvsig.expressionevaluator.impl.function.programming.BreakFunction;
33
import org.gvsig.expressionevaluator.impl.function.programming.ImportFunction;
33 34

  
34 35
/**
35 36
 *
......
173 174
            theGrammar.addStatement(this.createWhileStatement(theGrammar));
174 175
            theGrammar.addStatement(this.create$ConstantStatement(theGrammar));
175 176
            theGrammar.addStatement(this.createBreakStatement(theGrammar));
177
            theGrammar.addStatement(this.createImportStatement(theGrammar));
176 178
            this.grammar = theGrammar;
177 179
        }
178 180
        return grammar;
......
583 585
        return stmt;
584 586
    }
585 587

  
588
    private Statement createImportStatement(Grammar theGrammar) {
589
        Statement stmt;
590

  
591
        stmt = theGrammar.createStatement("IMPORT");
592
        stmt.addRule(stmt.require_any_token("IMPORT"));
593
        stmt.addRule(stmt.require_expression().capture_as("NAME"));
594
        stmt.code(ImportFunction.FUNCTION_IMPORT, stmt.args_names("NAME"));
595
        return stmt;
596
    }
597

  
586 598
    private Statement createTimestampStatement(Grammar theGrammar) {
587 599
        Statement stmt;
588 600

  

Also available in: Unified diff