Search in sources :

Example 1 with GrammarBasedUnparserVisitor

use of org.whole.lang.grammars.visitors.GrammarBasedUnparserVisitor in project whole by wholeplatform.

the class GrammarsUtils method unparse.

public static void unparse(IEntity e, Appendable appendable, String grammarUri, IBindingManager bm) {
    Grammar g = GrammarsRegistry.instance().getGrammar(grammarUri);
    if (g == null)
        throw new IllegalArgumentException("Grammar not deployed: " + grammarUri);
    new GrammarBasedUnparserVisitor(e, appendable, bm).visit(g);
}
Also used : GrammarBasedUnparserVisitor(org.whole.lang.grammars.visitors.GrammarBasedUnparserVisitor) Grammar(org.whole.lang.grammars.model.Grammar)

Aggregations

Grammar (org.whole.lang.grammars.model.Grammar)1 GrammarBasedUnparserVisitor (org.whole.lang.grammars.visitors.GrammarBasedUnparserVisitor)1