Search in sources :

Example 1 with GrammarsToGrammarBasedQuery

use of org.whole.lang.grammarbased.GrammarsToGrammarBasedQuery in project whole by wholeplatform.

the class GrammarsUIInterpreterVisitor method createGrammarBased.

public static IEntity createGrammarBased(Grammar entity, IBindingManager bm) {
    // FIXME ensure normalized: NormalizerOperation.normalize(entity);
    Grammar g = entity;
    PathExpression pathExpression = new GrammarsToGrammarBasedQuery().create();
    IEntity grammarBased = BehaviorUtils.evaluateFirstResult(pathExpression, g, bm);
    return NormalizerOperation.normalize(grammarBased);
}
Also used : PathExpression(org.whole.lang.queries.model.PathExpression) IEntity(org.whole.lang.model.IEntity) GrammarsToGrammarBasedQuery(org.whole.lang.grammarbased.GrammarsToGrammarBasedQuery) Grammar(org.whole.lang.grammars.model.Grammar)

Aggregations

GrammarsToGrammarBasedQuery (org.whole.lang.grammarbased.GrammarsToGrammarBasedQuery)1 Grammar (org.whole.lang.grammars.model.Grammar)1 IEntity (org.whole.lang.model.IEntity)1 PathExpression (org.whole.lang.queries.model.PathExpression)1