package org.whole.lang.grammarbased;
import org.whole.lang.builders.IBuilderOperation;
import org.whole.lang.templates.AbstractTemplateFactory;
public class GrammarsToGrammarBasedQuery extends AbstractTemplateFactory<org.whole.lang.queries.model.Scope> {
public void apply(IBuilderOperation op) {
org.whole.lang.queries.builders.IQueriesBuilder b0 = (org.whole.lang.queries.builders.IQueriesBuilder) op.wGetBuilder(org.whole.lang.queries.reflect.QueriesLanguageKit.URI);
b0.Scope_();
b0.Names_(7);
b0.Name("newLineNT");
b0.Name("phraseStructure");
b0.Name("phraseStructureMap");
b0.Name("lexicalStructure");
b0.Name("lexicalStructureMap");
b0.Name("editPart");
b0.Name("productionName");
b0._Names();
b0.Block_(14);
b0.Filter_();
b0.FeatureStep("phraseStructure");
b0.VariableTest("phraseStructure");
b0._Filter();
b0.Filter_();
org.whole.lang.commons.builders.ICommonsBuilder b1 = (org.whole.lang.commons.builders.ICommonsBuilder) op.wGetBuilder(org.whole.lang.commons.reflect.CommonsLanguageKit.URI);
b1.SameStageFragment_();
org.whole.lang.workflows.builders.IWorkflowsBuilder b2 = (org.whole.lang.workflows.builders.IWorkflowsBuilder) op.wGetBuilder(org.whole.lang.workflows.reflect.WorkflowsLanguageKit.URI);
b2.CreateJavaClassInstance_();
b2.Text("create an HashMap");
b1.Resolver();
b1.Resolver();
b2.StringLiteral("java.util.HashMap");
b2.StringLiteral("HashMap()");
b1.Resolver();
b2._CreateJavaClassInstance();
b1._SameStageFragment();
b0.VariableTest("phraseStructureMap");
b0._Filter();
b0.QueryDeclaration_();
b0.Name("getProductionRule");
b0.Names_(4);
b0.Name("nonTerminal");
b0.Name("nonTerminalString");
b0.Name("key");
b0.Name("keyString");
b0._Names();
b0.Block_(3);
b0.Filter_();
b0.SelfStep();
b0.VariableTest("nonTerminal");
b0._Filter();
b0.If_();
b0.ExpressionTest_();
b1.SameStageFragment_();
b2.InvokeJavaInstanceMethod_();
b2.Text("is phraseStructureMap empty?");
b1.Resolver();
b2.Variable("phraseStructureMap");
b1.Resolver();
b2.StringLiteral("java.util.HashMap");
b2.StringLiteral("isEmpty()");
b1.Resolver();
b2._InvokeJavaInstanceMethod();
b1._SameStageFragment();
b0._ExpressionTest();
b0.For_();
b0.Path_(3);
b0.VariableRefStep("phraseStructure");
b0.Filter_();
b0.ChildStep();
b0.ExpressionTest_();
b0.Filter_();
b0.FeatureStep("name");
b0.VariableTest("key");
b0._Filter();
b0._ExpressionTest();
b0._Filter();
b0.FeatureStep("rule");
b0._Path();
b1.SameStageFragment_();
b2.Sequence_();
b2.Text("sequence");
b2.FlowObjects_(2);
b2.InvokeJavaInstanceMethod_();
b2.Text("key to string value");
b2.Variable("keyString");
b2.Variable("key");
b1.Resolver();
b2.StringLiteral("org.whole.lang.model.IEntity");
b2.StringLiteral("wStringValue()");
b1.Resolver();
b2._InvokeJavaInstanceMethod();
b2.InvokeJavaInstanceMethod_();
b2.Text("put edit part");
b1.Resolver();
b2.Variable("phraseStructureMap");
b1.Resolver();
b2.StringLiteral("java.util.HashMap");
b2.StringLiteral("put(java.lang.Object, java.lang.Object)");
b2.Expressions_(2);
b2.Variable("keyString");
b2.Variable("self");
b2._Expressions();
b2._InvokeJavaInstanceMethod();
b2._FlowObjects();
b2._Sequence();
b1._SameStageFragment();
b0._For();
b0._If();
b1.SameStageFragment_();
b2.Sequence_();
b2.Text("sequence");
b2.FlowObjects_(2);
b2.InvokeJavaInstanceMethod_();
b2.Text("nonTerminal to string value");
b2.Variable("nonTerminalString");
b2.Variable("nonTerminal");
b1.Resolver();
b2.StringLiteral("org.whole.lang.model.IEntity");
b2.StringLiteral("wStringValue()");
b1.Resolver();
b2._InvokeJavaInstanceMethod();
b2.InvokeJavaInstanceMethod_();
b2.Text("get edit part");
b1.Resolver();
b2.Variable("phraseStructureMap");
b1.Resolver();
b2.StringLiteral("java.util.HashMap");
b2.StringLiteral("get(java.lang.Object)");
b2.Expressions_(1);
b2.Variable("nonTerminalString");
b2._Expressions();
b2._InvokeJavaInstanceMethod();
b2._FlowObjects();
b2._Sequence();
b1._SameStageFragment();
b0._Block();
b0._QueryDeclaration();
b0.Filter_();
b0.FeatureStep("lexicalStructure");
b0.VariableTest("lexicalStructure");
b0._Filter();
b0.Filter_();
b1.SameStageFragment_();
b2.CreateJavaClassInstance_();
b2.Text("create an HashMap");
b1.Resolver();
b1.Resolver();
b2.StringLiteral("java.util.HashMap");
b2.StringLiteral("HashMap()");
b1.Resolver();
b2._CreateJavaClassInstance();
b1._SameStageFragment();
b0.VariableTest("lexicalStructureMap");
b0._Filter();
b0.QueryDeclaration_();
b0.Name("getLexicalRule");
b0.Names_(4);
b0.Name("nonTerminal");
b0.Name("nonTerminalString");
b0.Name("key");
b0.Name("keyString");
b0._Names();
b0.Block_(3);
b0.Filter_();
b0.SelfStep();
b0.VariableTest("nonTerminal");
b0._Filter();
b0.If_();
b0.ExpressionTest_();
b1.SameStageFragment_();
b2.InvokeJavaInstanceMethod_();
b2.Text("is lexicalStructureMap empty?");
b1.Resolver();
b2.Variable("lexicalStructureMap");
b1.Resolver();
b2.StringLiteral("java.util.HashMap");
b2.StringLiteral("isEmpty()");
b1.Resolver();
b2._InvokeJavaInstanceMethod();
b1._SameStageFragment();
b0._ExpressionTest();
b0.For_();
b0.Path_(3);
b0.VariableRefStep("lexicalStructure");
b0.Filter_();
b0.ChildStep();
b0.ExpressionTest_();
b0.Filter_();
b0.FeatureStep("name");
b0.VariableTest("key");
b0._Filter();
b0._ExpressionTest();
b0._Filter();
b0.FeatureStep("rule");
b0._Path();
b1.SameStageFragment_();
b2.Sequence_();
b2.Text("sequence");
b2.FlowObjects_(2);
b2.InvokeJavaInstanceMethod_();
b2.Text("key to string value");
b2.Variable("keyString");
b2.Variable("key");
b1.Resolver();
b2.StringLiteral("org.whole.lang.model.IEntity");
b2.StringLiteral("wStringValue()");
b1.Resolver();
b2._InvokeJavaInstanceMethod();
b2.InvokeJavaInstanceMethod_();
b2.Text("put rule");
b1.Resolver();
b2.Variable("lexicalStructureMap");
b1.Resolver();
b2.StringLiteral("java.util.HashMap");
b2.StringLiteral("put(java.lang.Object, java.lang.Object)");
b2.Expressions_(2);
b2.Variable("keyString");
b2.Variable("self");
b2._Expressions();
b2._InvokeJavaInstanceMethod();
b2._FlowObjects();
b2._Sequence();
b1._SameStageFragment();
b0._For();
b0._If();
b1.SameStageFragment_();
b2.Sequence_();
b2.Text("sequence");
b2.FlowObjects_(2);
b2.InvokeJavaInstanceMethod_();
b2.Text("nonTerminal to string value");
b2.Variable("nonTerminalString");
b2.Variable("nonTerminal");
b1.Resolver();
b2.StringLiteral("org.whole.lang.model.IEntity");
b2.StringLiteral("wStringValue()");
b1.Resolver();
b2._InvokeJavaInstanceMethod();
b2.InvokeJavaInstanceMethod_();
b2.Text("get rule");
b1.Resolver();
b2.Variable("lexicalStructureMap");
b1.Resolver();
b2.StringLiteral("java.util.HashMap");
b2.StringLiteral("get(java.lang.Object)");
b2.Expressions_(1);
b2.Variable("nonTerminalString");
b2._Expressions();
b2._InvokeJavaInstanceMethod();
b2._FlowObjects();
b2._Sequence();
b1._SameStageFragment();
b0._Block();
b0._QueryDeclaration();
b0.QueryDeclaration_();
b0.Name("isNewLineTerminated");
b0.Names_(2);
b0.Name("nonTerminals");
b0.Name("nt");
b0._Names();
b0.Block_(3);
b0.QueryDeclaration_();
b0.Name("traversed");
b0.Names_(1);
b0.Name("nt");
b0._Names();
b0.Block_(2);
b0.Filter_();
b0.SelfStep();
b0.VariableTest("nt");
b0._Filter();
b0.Path_(2);
b0.VariableRefStep("nonTerminals");
b0.Filter_();
b0.ChildStep();
b0.VariableTest("nt");
b0._Filter();
b0._Path();
b0._Block();
b0._QueryDeclaration();
b0.Filter_();
b0.Union_();
b0.Expressions_(0);
b0._Expressions();
b1.Resolver();
b0._Union();
b0.VariableTest("nonTerminals");
b0._Filter();
b0.Choose_(6);
b0.If_();
b0.And_(2);
b0.TypeTest("Repeat");
b0.Some_();
b0.Sequence_(2);
b0.FeatureStep("separator");
b0.FeatureStep("rule");
b0._Sequence();
b0.ExpressionTest_();
b0.Singleton_();
b0.Call_();
b0.Name("isNewLineTerminated");
b0.Expressions_(1);
b0.VariableRefStep("nonTerminals");
b0._Expressions();
b0._Call();
b0._Singleton();
b0._ExpressionTest();
b0._Some();
b0._And();
b0.BooleanLiteral(true);
b0._If();
b0.If_();
b0.And_(2);
b0.TypeTest("Concatenate");
b0.ExpressionTest_();
b0.Singleton_();
b0.Path_(2);
b0.Filter_();
b0.ChildStep();
b0.Not_();
b0.ExpressionTest_();
b0.FollowingSiblingStep();
b0._ExpressionTest();
b0._Not();
b0._Filter();
b0.Call_();
b0.Name("isNewLineTerminated");
b0.Expressions_(1);
b0.VariableRefStep("nonTerminals");
b0._Expressions();
b0._Call();
b0._Path();
b0._Singleton();
b0._ExpressionTest();
b0._And();
b0.BooleanLiteral(true);
b0._If();
b0.If_();
b0.And_(2);
b0.TypeTest("Choose");
b0.Some_();
b0.ChildStep();
b0.ExpressionTest_();
b0.Singleton_();
b0.Call_();
b0.Name("isNewLineTerminated");
b0.Expressions_(1);
b0.VariableRefStep("nonTerminals");
b0._Expressions();
b0._Call();
b0._Singleton();
b0._ExpressionTest();
b0._Some();
b0._And();
b0.BooleanLiteral(true);
b0._If();
b0.If_();
b0.And_(2);
b0.Or_(2);
b0.TypeTest("Optional");
b0.TypeTest("When");
b0._Or();
b0.ExpressionTest_();
b0.Singleton_();
b0.Path_(2);
b0.FeatureStep("rule");
b0.Call_();
b0.Name("isNewLineTerminated");
b0.Expressions_(1);
b0.VariableRefStep("nonTerminals");
b0._Expressions();
b0._Call();
b0._Path();
b0._Singleton();
b0._ExpressionTest();
b0._And();
b0.BooleanLiteral(true);
b0._If();
b0.If_();
b0.And_(2);
b0.And_(3);
b0.TypeTest("NonTerminal");
b0.Not_();
b0.ExpressionTest_();
b0.Call_();
b0.Name("traversed");
b1.Resolver();
b0._Call();
b0._ExpressionTest();
b0._Not();
b0.VariableTest("nt");
b0._And();
b0.ExpressionTest_();
b0.Choose_(2);
b0.Filter_();
b0.Call_();
b0.Name("getLexicalRule");
b1.Resolver();
b0._Call();
b0.Or_(2);
b0.TypeTest("NewLine");
b0.ExpressionTest_();
b0.Filter_();
b0.DescendantOrSelfStep();
b0.And_(2);
b0.Not_();
b0.ExpressionTest_();
b0.FollowingStep();
b0._ExpressionTest();
b0._Not();
b0.TypeTest("NewLine");
b0._And();
b0._Filter();
b0._ExpressionTest();
b0._Or();
b0._Filter();
b0.Filter_();
b0.Call_();
b0.Name("getProductionRule");
b1.Resolver();
b0._Call();
b0.ExpressionTest_();
b0.Singleton_();
b0.Call_();
b0.Name("isNewLineTerminated");
b0.Expressions_(1);
b0.Union_();
b0.Expressions_(2);
b0.Path_(2);
b0.VariableRefStep("nonTerminals");
b0.ChildStep();
b0._Path();
b0.VariableRefStep("nt");
b0._Expressions();
b1.Resolver();
b0._Union();
b0._Expressions();
b0._Call();
b0._Singleton();
b0._ExpressionTest();
b0._Filter();
b0._Choose();
b0._ExpressionTest();
b0._And();
b0.BooleanLiteral(true);
b0._If();
b0.Do_();
b0.BooleanLiteral(false);
b0._Do();
b0._Choose();
b0._Block();
b0._QueryDeclaration();
b0.QueryDeclaration_();
b0.Name("allNonLookaheadNonTerminals");
b1.Resolver();
b0.Path_(2);
b0.Filter_();
b0.DescendantOrSelfStep();
b0.Prune_();
b0.Or_(2);
b0.TypeTest("NonTerminal");
b0.TypeTest("When");
b0._Or();
b0._Prune();
b0._Filter();
b0.Choose_(2);
b0.Path_(2);
b0.FeatureStep("rule");
b0.Filter_();
b0.DescendantOrSelfStep();
b0.TypeTest("NonTerminal");
b0._Filter();
b0._Path();
b0.SelfStep();
b0._Choose();
b0._Path();
b0._QueryDeclaration();
b0.QueryDeclaration_();
b0.Name("createFigure");
b0.Names_(3);
b0.Name("iterator");
b0.Name("rowFigure");
b0.Name("nonTerminal");
b0._Names();
b0.Block_(1);
b0.Select_();
b1.StageUpFragment_();
org.whole.lang.reflect.EntityDescriptorEnum e3 = org.whole.lang.reflect.ReflectionFactory.getLanguageKit("http://lang.whole.org/GrammarBased", true, null).getEntityDescriptorEnum();
b1.wEntity_(e3.valueOf("SequenceFigure"));
b1.Resolver();
b1.Resolver();
b1.wEntity_(e3.valueOf("Figures"), 1);
b1.Variable_();
b1.VarType("http://lang.whole.org/GrammarBased#Figure");
b1.VarName("rowFigure");
b1.Quantifier("*");
b1._Variable();
b1._wEntity(e3.valueOf("Figures"));
b1._wEntity(e3.valueOf("SequenceFigure"));
b1._StageUpFragment();
b0.SelfStep();
b0.Path_(2);
b0.Filter_();
b0.Call_();
b0.Name("iterator");
b1.Resolver();
b0._Call();
b0.And_(2);
b0.TypeTest("NonTerminal");
b0.VariableTest("nonTerminal");
b0._And();
b0._Filter();
b0.Filter_();
b0.Choose_(2);
b0.Path_(2);
b0.Call_();
b0.Name("getLexicalRule");
b1.Resolver();
b0._Call();
b0.Choose_(4);
b0.If_();
b0.TypeTest("Space");
b0.VoidLiteral();
b0._If();
b0.If_();
b0.Or_(2);
b0.TypeTest("LiteralTerminal");
b0.TypeTest("Empty");
b0._Or();
b1.StageUpFragment_();
b1.wEntity_(e3.valueOf("TerminalFigure"));
b1.StageDownFragment_();
b0.Choose_(2);
b0.FeatureStep("category");
b0.StringLiteral("LITERAL");
b0._Choose();
b1._StageDownFragment();
b1.StageDownFragment_();
b0.FeatureStep("literal");
b1._StageDownFragment();
b1._wEntity(e3.valueOf("TerminalFigure"));
b1._StageUpFragment();
b0._If();
b0.If_();
b0.TypeTest("Indent");
b1.StageUpFragment_();
b1.wEntity(e3.valueOf("Indent"));
b1._StageUpFragment();
b0._If();
b0.If_();
b0.TypeTest("NewLine");
b1.StageUpFragment_();
b1.wEntity(e3.valueOf("NewLine"));
b1._StageUpFragment();
b0._If();
b0._Choose();
b0._Path();
b0.Do_();
b1.StageUpFragment_();
b1.wEntity_(e3.valueOf("NonTerminalFigure"));
b1.Variable_();
b1.VarType("http://lang.whole.org/GrammarBased#Name");
b1.VarName("nonTerminal");
b1.Quantifier("!");
b1._Variable();
b1._wEntity(e3.valueOf("NonTerminalFigure"));
b1._StageUpFragment();
b0._Do();
b0._Choose();
b0.VariableTest("rowFigure");
b0._Filter();
b0._Path();
b0.TemplateNames();
b0._Select();
b0._Block();
b0._QueryDeclaration();
b0.QueryDeclaration_();
b0.Name("createBeforeFigure");
b0.Names_(1);
b0.Name("subject");
b0._Names();
b0.Block_(2);
b0.QueryDeclaration_();
b0.Name("precedingSiblingReversed");
b0.Names_(0);
b0._Names();
b0.Path_(2);
b0.Filter_();
b0.PrecedingSiblingStep();
b0.IndexTest_();
b0.IntLiteral(0);
b0._IndexTest();
b0._Filter();
b0.Sequence_(2);
b0.Call_();
b0.Name("precedingSiblingReversed");
b1.Resolver();
b0._Call();
b0.SelfStep();
b0._Sequence();
b0._Path();
b0._QueryDeclaration();
b0.Path_(2);
b0.Filter_();
b0.SelfStep();
b0.Not_();
b0.VariableTest("subject");
b0._Not();
b0._Filter();
b0.Call_();
b0.Name("createFigure");
b0.Expressions_(1);
b1.StageUpFragment_();
b0.Path_(3);
b0.Filter_();
b0.VariableRefStep("subject");
b0.Not_();
b0.ExpressionTest_();
b0.Filter_();
b0.ParentStep();
b0.TypeTest("When");
b0._Filter();
b0._ExpressionTest();
b0._Not();
b0._Filter();
b0.Call_();
b0.Name("precedingSiblingReversed");
b1.Resolver();
b0._Call();
b0.Call_();
b0.Name("allNonLookaheadNonTerminals");
b1.Resolver();
b0._Call();
b0._Path();
b1._StageUpFragment();
b0._Expressions();
b0._Call();
b0._Path();
b0._Block();
b0._QueryDeclaration();
b0.QueryDeclaration_();
b0.Name("createAfterFigure");
b0.Names_(1);
b0.Name("subject");
b0._Names();
b0.Path_(2);
b0.Filter_();
b0.SelfStep();
b0.Not_();
b0.VariableTest("subject");
b0._Not();
b0._Filter();
b0.Call_();
b0.Name("createFigure");
b0.Expressions_(1);
b1.StageUpFragment_();
b0.Path_(3);
b0.VariableRefStep("subject");
b0.FollowingSiblingStep();
b0.Call_();
b0.Name("allNonLookaheadNonTerminals");
b1.Resolver();
b0._Call();
b0._Path();
b1._StageUpFragment();
b0._Expressions();
b0._Call();
b0._Path();
b0._QueryDeclaration();
b0.QueryDeclaration_();
b0.Name("createSimplePartContentsFigure");
b0.Names_(4);
b0.Name("ancestor");
b0.Name("literals");
b0.Name("childFigure");
b0.Name("rowFigure");
b0._Names();
b0.Block_(3);
b0.QueryDeclaration_();
b0.Name("children");
b1.Resolver();
b0.Choose_(3);
b0.If_();
b0.TypeTest("Concatenate");
b0.Path_(2);
b0.ChildStep();
b0.Call_();
b0.Name("children");
b1.Resolver();
b0._Call();
b0._Path();
b0._If();
b0.If_();
b0.Or_(3);
b0.TypeTest("Optional");
b0.TypeTest("Split");
b0.TypeTest("When");
b0._Or();
b0.Path_(2);
b0.FeatureStep("rule");
b0.Call_();
b0.Name("children");
b1.Resolver();
b0._Call();
b0._Path();
b0._If();
b0.Do_();
b0.SelfStep();
b0._Do();
b0._Choose();
b0._QueryDeclaration();
b0.QueryDeclaration_();
b0.Name("isOptional");
b0.Names_(1);
b0.Name("ancestor");
b0._Names();
b0.Path_(2);
b0.ParentStep();
b0.Choose_(3);
b0.If_();
b0.TypeTest("Optional");
b0.BooleanLiteral(true);
b0._If();
b0.If_();
b0.VariableTest("ancestor");
b0.BooleanLiteral(false);
b0._If();
b0.Do_();
b0.Call_();
b0.Name("isOptional");
b1.Resolver();
b0._Call();
b0._Do();
b0._Choose();
b0._Path();
b0._QueryDeclaration();
b0.Select_();
b1.StageUpFragment_();
b1.wEntity_(e3.valueOf("SequenceFigure"));
b1.Resolver();
b1.Resolver();
b1.wEntity_(e3.valueOf("Figures"), 1);
b1.Variable_();
b1.VarType("http://lang.whole.org/GrammarBased#Figure");
b1.VarName("rowFigure");
b1.Quantifier("*");
b1._Variable();
b1._wEntity(e3.valueOf("Figures"));
b1._wEntity(e3.valueOf("SequenceFigure"));
b1._StageUpFragment();
b0.SelfStep();
b0.Sequence_(3);
b0.Filter_();
b0.Union_();
b0.Expressions_(0);
b0._Expressions();
b1.Resolver();
b0._Union();
b0.VariableTest("literals");
b0._Filter();
b0.For_();
b0.Path_(2);
b0.Filter_();
b0.SelfStep();
b0.VariableTest("ancestor");
b0._Filter();
b0.Call_();
b0.Name("children");
b1.Resolver();
b0._Call();
b0._Path();
b0.Choose_(2);
b0.If_();
b0.TypeTest("As");
b0.Filter_();
b0.Sequence_(2);
b0.If_();
b0.ExpressionTest_();
b0.Path_(2);
b0.VariableRefStep("literals");
b0.ChildStep();
b0._Path();
b0._ExpressionTest();
b0.Call_();
b0.Name("createFigure");
b0.Expressions_(1);
b1.StageUpFragment_();
b0.Delete_();
b0.Path_(2);
b0.VariableRefStep("literals");
b0.ChildStep();
b0._Path();
b0._Delete();
b1._StageUpFragment();
b0._Expressions();
b0._Call();
b0._If();
b0.Do_();
b0.Block_(3);
b0.Filter_();
b0.Call_();
b0.Name("createFigure");
b0.Expressions_(1);
b1.StageUpFragment_();
b0.Filter_();
b0.DescendantOrSelfStep();
b0.TypeTest("NonTerminal");
b0._Filter();
b1._StageUpFragment();
b0._Expressions();
b0._Call();
b0.VariableTest("childFigure");
b0._Filter();
b0.If_();
b0.ExpressionTest_();
b0.Singleton_();
b0.Call_();
b0.Name("isOptional");
b0.Expressions_(1);
b0.VariableRefStep("ancestor");
b0._Expressions();
b0._Call();
b0._Singleton();
b0._ExpressionTest();
b0.PointwiseUpdate_();
b0.Path_(2);
b0.VariableRefStep("childFigure");
b0.FeatureStep("optional");
b0._Path();
b0.BooleanLiteral(true);
b0._PointwiseUpdate();
b0._If();
b0.VariableRefStep("childFigure");
b0._Block();
b0._Do();
b0._Sequence();
b0.VariableTest("rowFigure");
b0._Filter();
b0._If();
b0.Do_();
b0.PointwiseInsert_();
b0.Placement("INTO");
b0.VariableRefStep("literals");
b0.SelfStep();
b0._PointwiseInsert();
b0._Do();
b0._Choose();
b0._For();
b0.Filter_();
b0.Call_();
b0.Name("createFigure");
b0.Expressions_(1);
b1.StageUpFragment_();
b0.Path_(2);
b0.VariableRefStep("literals");
b0.ChildStep();
b0._Path();
b1._StageUpFragment();
b0._Expressions();
b0._Call();
b0.VariableTest("rowFigure");
b0._Filter();
b0._Sequence();
b0.TemplateNames();
b0._Select();
b0._Block();
b0._QueryDeclaration();
b0.QueryDeclaration_();
b0.Name("mapProduction");
b0.Names_(10);
b0.Name("productionName");
b0.Name("repeat");
b0.Name("multiline");
b0.Name("separator");
b0.Name("before");
b0.Name("after");
b0.Name("dataTerminal");
b0.Name("category");
b0.Name("choose");
b0.Name("name");
b0._Names();
b0.Choose_(5);
b0.Select_();
b1.StageUpFragment_();
b1.wEntity_(e3.valueOf("CompositePart"));
b1.Variable_();
b1.VarType("http://lang.whole.org/GrammarBased#Name");
b1.VarName("productionName");
b1.Quantifier("!");
b1._Variable();
b1.Variable_();
b1.VarType("http://lang.whole.org/GrammarBased#BoolValue");
b1.VarName("multiline");
b1.Quantifier("!");
b1._Variable();
b1.Resolver();
b1.Variable_();
b1.VarType("http://lang.whole.org/GrammarBased#Figure");
b1.VarName("separator");
b1.Quantifier("?");
b1._Variable();
b1.Variable_();
b1.VarType("http://lang.whole.org/GrammarBased#Figure");
b1.VarName("contents");
b1.Quantifier("!");
b1._Variable();
b1.Variable_();
b1.VarType("http://lang.whole.org/GrammarBased#Figure");
b1.VarName("before");
b1.Quantifier("?");
b1._Variable();
b1.Variable_();
b1.VarType("http://lang.whole.org/GrammarBased#Figure");
b1.VarName("after");
b1.Quantifier("?");
b1._Variable();
b1._wEntity(e3.valueOf("CompositePart"));
b1._StageUpFragment();
b0.Filter_();
b0.SelfStep();
b0.One_();
b0.DescendantOrSelfStep();
b0.And_(2);
b0.TypeTest("Repeat");
b0.VariableTest("repeat");
b0._And();
b0._One();
b0._Filter();
b0.Sequence_(5);
b0.Path_(2);
b0.VariableRefStep("repeat");
b0.Filter_();
b0.Call_();
b0.Name("isNewLineTerminated");
b1.Resolver();
b0._Call();
b0.VariableTest("multiline");
b0._Filter();
b0._Path();
b0.Filter_();
b0.Call_();
b0.Name("createFigure");
b0.Expressions_(1);
b1.StageUpFragment_();
b0.Path_(3);
b0.VariableRefStep("repeat");
b0.FeatureStep("separator");
b0.DescendantOrSelfStep();
b0._Path();
b1._StageUpFragment();
b0._Expressions();
b0._Call();
b0.VariableTest("separator");
b0._Filter();
b0.Filter_();
b0.Call_();
b0.Name("createFigure");
b0.Expressions_(1);
b1.StageUpFragment_();
b0.Path_(3);
b0.VariableRefStep("repeat");
b0.FeatureStep("rule");
b0.DescendantOrSelfStep();
b0._Path();
b1._StageUpFragment();
b0._Expressions();
b0._Call();
b0.VariableTest("contents");
b0._Filter();
b0.Filter_();
b0.Call_();
b0.Name("createBeforeFigure");
b0.Expressions_(1);
b0.VariableRefStep("repeat");
b0._Expressions();
b0._Call();
b0.VariableTest("before");
b0._Filter();
b0.Filter_();
b0.Call_();
b0.Name("createAfterFigure");
b0.Expressions_(1);
b0.VariableRefStep("repeat");
b0._Expressions();
b0._Call();
b0.VariableTest("after");
b0._Filter();
b0._Sequence();
b0.TemplateNames();
b0._Select();
b0.Select_();
b1.StageUpFragment_();
b1.wEntity_(e3.valueOf("DataPart"));
b1.Variable_();
b1.VarType("http://lang.whole.org/GrammarBased#Name");
b1.VarName("productionName");
b1.Quantifier("!");
b1._Variable();
b1.Variable_();
b1.VarType("http://lang.whole.org/GrammarBased#Category");
b1.VarName("category");
b1.Quantifier("!");
b1._Variable();
b1.Variable_();
b1.VarType("http://lang.whole.org/GrammarBased#Figure");
b1.VarName("before");
b1.Quantifier("?");
b1._Variable();
b1.Variable_();
b1.VarType("http://lang.whole.org/GrammarBased#Figure");
b1.VarName("after");
b1.Quantifier("?");
b1._Variable();
b1._wEntity(e3.valueOf("DataPart"));
b1._StageUpFragment();
b0.Filter_();
b0.SelfStep();
b0.One_();
b0.Path_(2);
b0.Choose_(2);
b0.If_();
b0.TypeTest("NonTerminal");
b0.Call_();
b0.Name("getLexicalRule");
b1.Resolver();
b0._Call();
b0._If();
b0.SelfStep();
b0._Choose();
b0.DescendantOrSelfStep();
b0._Path();
b0.And_(3);
b0.TypeTest("DataTerminal");
b0.VariableTest("dataTerminal");
b0.ExpressionTest_();
b0.Filter_();
b0.FeatureStep("category");
b0.VariableTest("category");
b0._Filter();
b0._ExpressionTest();
b0._And();
b0._One();
b0._Filter();
b0.Sequence_(2);
b0.Filter_();
b0.Call_();
b0.Name("createBeforeFigure");
b0.Expressions_(1);
b0.VariableRefStep("dataTerminal");
b0._Expressions();
b0._Call();
b0.VariableTest("before");
b0._Filter();
b0.Filter_();
b0.Call_();
b0.Name("createAfterFigure");
b0.Expressions_(1);
b0.VariableRefStep("dataTerminal");
b0._Expressions();
b0._Call();
b0.VariableTest("after");
b0._Filter();
b0._Sequence();
b0.TemplateNames();
b0._Select();
b0.Select_();
b1.StageUpFragment_();
b1.wEntity_(e3.valueOf("EnumPart"));
b1.Variable_();
b1.VarType("http://lang.whole.org/GrammarBased#Name");
b1.VarName("productionName");
b1.Quantifier("!");
b1._Variable();
b1.wEntity(e3.valueOf("Category"), "LITERAL");
b1._wEntity(e3.valueOf("EnumPart"));
b1._StageUpFragment();
b0.Filter_();
b0.SelfStep();
b0.One_();
b0.DescendantOrSelfStep();
b0.And_(2);
b0.TypeTest("Choose");
b0.ExpressionTest_();
b0.Filter_();
b0.ChildStep();
b0.TypeTest("As");
b0._Filter();
b0._ExpressionTest();
b0._And();
b0._One();
b0._Filter();
b1.Resolver();
b0.TemplateNames();
b0._Select();
b0.Select_();
b1.StageUpFragment_();
b1.wEntity_(e3.valueOf("SugarPart"));
b1.Variable_();
b1.VarType("http://lang.whole.org/GrammarBased#Name");
b1.VarName("productionName");
b1.Quantifier("!");
b1._Variable();
b1.Variable_();
b1.VarType("http://lang.whole.org/GrammarBased#Figure");
b1.VarName("before");
b1.Quantifier("?");
b1._Variable();
b1.Variable_();
b1.VarType("http://lang.whole.org/GrammarBased#Figure");
b1.VarName("after");
b1.Quantifier("?");
b1._Variable();
b1._wEntity(e3.valueOf("SugarPart"));
b1._StageUpFragment();
b0.Filter_();
b0.SelfStep();
b0.One_();
b0.DescendantOrSelfStep();
b0.And_(3);
b0.TypeTest("Choose");
b0.VariableTest("choose");
b0.ExpressionTest_();
b0.Filter_();
b0.ParentStep();
b0.And_(2);
b0.TypeTest("Concatenate");
b0.ExpressionTest_();
b0.Filter_();
b0.ChildStep();
b0.IndexTest_();
b0.IntLiteral(1);
b0._IndexTest();
b0._Filter();
b0._ExpressionTest();
b0._And();
b0._Filter();
b0._ExpressionTest();
b0._And();
b0._One();
b0._Filter();
b0.Sequence_(2);
b0.Filter_();
b0.Call_();
b0.Name("createBeforeFigure");
b0.Expressions_(1);
b0.VariableRefStep("choose");
b0._Expressions();
b0._Call();
b0.VariableTest("before");
b0._Filter();
b0.Filter_();
b0.Call_();
b0.Name("createAfterFigure");
b0.Expressions_(1);
b0.VariableRefStep("choose");
b0._Expressions();
b0._Call();
b0.VariableTest("after");
b0._Filter();
b0._Sequence();
b0.TemplateNames();
b0._Select();
b0.Select_();
b1.StageUpFragment_();
b1.wEntity_(e3.valueOf("SimplePart"));
b1.Variable_();
b1.VarType("http://lang.whole.org/GrammarBased#Name");
b1.VarName("productionName");
b1.Quantifier("!");
b1._Variable();
b1.Resolver();
b1.Resolver();
b1.Variable_();
b1.VarType("http://lang.whole.org/GrammarBased#Figure");
b1.VarName("contents");
b1.Quantifier("!");
b1._Variable();
b1._wEntity(e3.valueOf("SimplePart"));
b1._StageUpFragment();
b0.Filter_();
b0.SelfStep();
b0.And_(2);
b0.Every_();
b0.DescendantOrSelfStep();
b0.Not_();
b0.TypeTest("Choose");
b0._Not();
b0._Every();
b0.ExpressionTest_();
b0.BooleanLiteral(true);
b0._ExpressionTest();
b0._And();
b0._Filter();
b0.Path_(1);
b0.Filter_();
b0.Call_();
b0.Name("createSimplePartContentsFigure");
b1.Resolver();
b0._Call();
b0.VariableTest("contents");
b0._Filter();
b0._Path();
b0.TemplateNames();
b0._Select();
b0._Choose();
b0._QueryDeclaration();
b0.Select_();
b1.StageUpFragment_();
b1.wEntity_(e3.valueOf("EditParts"), 1);
b1.Variable_();
b1.VarType("http://lang.whole.org/GrammarBased#EditPart");
b1.VarName("editPart");
b1.Quantifier("+");
b1._Variable();
b1._wEntity(e3.valueOf("EditParts"));
b1._StageUpFragment();
b0.SelfStep();
b0.Path_(4);
b0.FeatureStep("phraseStructure");
b0.Filter_();
b0.ChildStep();
b0.ExpressionTest_();
b0.Filter_();
b0.FeatureStep("name");
b0.VariableTest("productionName");
b0._Filter();
b0._ExpressionTest();
b0._Filter();
b0.FeatureStep("rule");
b0.Filter_();
b0.Call_();
b0.Name("mapProduction");
b0.Expressions_(1);
b0.VariableRefStep("productionName");
b0._Expressions();
b0._Call();
b0.VariableTest("editPart");
b0._Filter();
b0._Path();
b0.TemplateNames();
b0._Select();
b0._Block();
b0._Scope();
}
}