private static int[] newPC;        // pc after recovery


    public static void MiniCSynMethod(Utils.ModuleAction action, out String moduleName)
    {
        //-----------------------------------|----------------------------------------
        moduleName = MODULENAME;
        switch (action)
        {
        case Utils.ModuleAction.getModuleName:
            return;

        case Utils.ModuleAction.initModule:
            Errors.InstallStopParsingMethod(StopParsing);
            gt       = new GrammarTable();
            stk      = new int[MAXSTACKLEN];
            stkAtErr = new int[MAXSTACKLEN];
            newSP    = new int[LASTTERM + 1];
            newPC    = new int[LASTTERM + 1];
            break;

        case Utils.ModuleAction.resetModule:
            break;

        case Utils.ModuleAction.cleanupModule:
            gt       = null;
            stk      = null;
            stkAtErr = null;
            newSP    = null;
            newPC    = null;
            break;
        } // switch
    }     // MiniCSynMethod
        public GrammarDataSet()
        {
            _tableGrammar = new GrammarTable();
            _tableTopics = new TopicsTable();
            _tableRules = new RulesTable();
            _tableExamples = new ExamplesTable();

            this.Tables.AddRange(new DataTable[] {_tableGrammar, _tableTopics, _tableRules, _tableExamples} );

            AddForeignKey(_tableTopics, _tableTopics, Strings.COL_TOPIC_ID, Strings.COL_PARENT_TOPIC_ID, Strings.FK_TOPICS_TOPICS, true, true);
            AddForeignKey(_tableTopics, _tableRules, Strings.COL_TOPIC_ID, Strings.FK_RULES_TOPICS, true);
            AddForeignKey(_tableRules, _tableExamples, Strings.COL_RULE_ID, Strings.FK_EXAMPLES_RULES, true);

            _tableGrammar.DefaultView.Sort = Strings.COL_GRAMMAR_ID;
            _tableTopics.DefaultView.Sort = "ParentTopicId, Position";
            _tableRules.DefaultView.Sort = "TopicId, Position";
            _tableExamples.DefaultView.Sort = "RuleId, Position";

            this.EnforceConstraints = true;
        }
  private static int[] newPC;          // pc after recovery


  public static void GrammarTranslatorSynMethod(Utils.ModuleAction action, out String moduleName) {
  //-----------------------------------|----------------------------------------
    moduleName = MODULENAME;
    switch (action) {
      case Utils.ModuleAction.getModuleName:
        return;
      case Utils.ModuleAction.initModule:
        Errors.InstallStopParsingMethod(StopParsing);
        gt       = new GrammarTable();
        stk      = new int[MAXSTACKLEN];
        stkAtErr = new int[MAXSTACKLEN];
        newSP    = new int[LASTTERM + 1];
        newPC    = new int[LASTTERM + 1];
        break;
      case Utils.ModuleAction.resetModule:
        break;
      case Utils.ModuleAction.cleanupModule:
        gt       = null;
        stk      = null;
        stkAtErr = null;
        newSP    = null;
        newPC    = null;
        break;
    } // switch
  } // GrammarTranslatorSynMethod