示例#1
0
        static void Get()
        {
            for (;;)
            {
                token = la;         /* pdt */
                la    = Scanner.Scan();
                if (la.kind <= maxT)
                {
                    ++errDist; break;
                }
                if (la.kind == DebugOn_Sym)
                {
                    debug = true;
                }
                if (la.kind == DebugOff_Sym)
                {
                    debug = false;
                }
                if (la.kind == StackDump_Sym)
                {
                    CodeGen.Stack();
                }
                if (la.kind == HeapDump_Sym)
                {
                    CodeGen.Heap();
                }
                if (la.kind == TableDump_Sym)
                {
                    Table.PrintTable(OutFile.StdOut);
                }

                la = token;         /* pdt */
            }
        }
示例#2
0
        static void Get()
        {
            for (;;)
            {
                token = la;         /* pdt */
                la    = Scanner.Scan();
                if (la.kind <= maxT)
                {
                    ++errDist; break;
                }
                if (la.kind == DebugOn_Sym)
                {
                    debug = true;
                }
                if (la.kind == DebugOff_Sym)
                {
                    debug = false;
                }
                if (la.kind == StackDump_Sym)
                {
                    if (debug)
                    {
                        CodeGen.Stack();
                    }
                }
                if (la.kind == HeapDump_Sym)
                {
                    if (debug)
                    {
                        CodeGen.Heap();
                    }
                }
                if (la.kind == TableDump_Sym)
                {
                    if (debug)
                    {
                        Table.PrintTable(OutFile.StdOut);
                    }
                }
                if (la.kind == GiveCOD_Sym)
                {
                    givecod = true;
                }
                if (la.kind == NoGiveCOD_Sym)
                {
                    givecod = false;
                }
                if (la.kind == ShowWarning_Sym)
                {
                    warnings = true;
                }
                if (la.kind == NoWarning_Sym)
                {
                    warnings = false;
                }

                la = token;         /* pdt */
            }
        }