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 static int curLine, curCol; // position of curCh public static void MiniCppLexMethod(Utils.ModuleAction action, out String moduleName) { //-----------------------------------|---------------------------------------- moduleName = MODULENAME; switch (action) { case Utils.ModuleAction.getModuleName: return; case Utils.ModuleAction.initModule: caseSensitive = true; lt = new LexicalTable(); tokenStrArr = new char[256]; kwHt = CreateHashtable(); nHt = CreateHashtable(); nl = new ArrayList(); break; case Utils.ModuleAction.resetModule: kwHt.Clear(); nHt.Clear(); nl.Clear(); break; case Utils.ModuleAction.cleanupModule: lt = null; tokenStrArr = null; kwHt = null; nHt = null; nl = null; break; } // switch } // MiniCppLexMethod
public static void BinaryTreeSemMethod(Utils.ModuleAction action, out String moduleName) { //-----------------------------------|---------------------------------------- moduleName = MODULENAME; switch (action) { case Utils.ModuleAction.getModuleName: return; case Utils.ModuleAction.initModule: break; case Utils.ModuleAction.resetModule: break; case Utils.ModuleAction.cleanupModule: return; } // switch } // BinaryTreeSemMethod
public static void SetsMethod(Utils.ModuleAction action, out String moduleName) { //-----------------------------------|---------------------------------------- moduleName = MODULENAME; switch (action) { case Utils.ModuleAction.getModuleName: return; case Utils.ModuleAction.initModule: emptySet = new Set256(); break; case Utils.ModuleAction.resetModule: break; case Utils.ModuleAction.cleanupModule: break; } // switch } // SetsFunc
public static void ErrorsMethod(Utils.ModuleAction action, out String moduleName) { //-----------------------------------|---------------------------------------- moduleName = MODULENAME; switch (action) { case Utils.ModuleAction.getModuleName: return; case Utils.ModuleAction.initModule: aps = new AbortMethod[MAXABORTPROCS]; sp = 0; PushAbortMethod(DefaultAbort); stopParsing = null; eowCnt = new int[4]; curEoW = new ErrorWarn[4]; break; case Utils.ModuleAction.resetModule: break; case Utils.ModuleAction.cleanupModule: eowl = null; eowCnt = null; curEoW = null; return; } // switch // --- for initModule and resetModule --- eowl = null; numOfErrs = 0; numOfWarns = 0; for (int i = 0; i < 4; i++) { eowCnt[i] = 0; } } // ErrorsMethod