예제 #1
0
 static void f_es(myPaserResult res, myToken tk)
 {
     res.count++;
     res.arr.Add(res.gerCurObj());
     res.curObj.iCur++;
     //res.fields.Add(res.curObj);
 }
예제 #2
0
        protected string[] parseLine(string line, bool isCSV)
        {
            myPaserResult m = myparser2(line);

            if (isCSV)
            {
                m.arr.Add(m.gerCurObj());
            }
            return(m.arr.ToArray());
        }
예제 #3
0
        void executeRule()
        {
            cur    = nState;
            nState = tbl[(int)cur, (int)type];
            cbid id = cbidTbl[(int)cur, (int)type];

            switch (id)
            {
            case cbid.o1:
                //do nonthing
                break;

            case cbid.ss:
                res.count++;
                res.arr.Add("");
                res.curObj.iStart = ++res.curObj.iCur;
                break;

            case cbid.sa:
                res.curObj.iStart = ++res.curObj.iCur;
                break;

            case cbid.aa:
                res.curObj.iCur++;
                break;

            case cbid.bs:
                res.count++;
                res.arr.Add(res.gerCurObj());
                res.curObj.iCur += 2;
                break;

            case cbid.es:
                res.count++;
                res.arr.Add(res.gerCurObj());
                res.curObj.iCur++;
                break;

            case cbid.ba:
                res.curObj.iCur += 2;
                res.curObj.dblQt = true;
                break;

            case cbid.sz:
                res.curObj.iStart = res.curObj.iCur;
                goto case cbid.en;

            case cbid.en:
                res.arr.Add(res.gerCurObj());
                //save rec & reset
#if use_res_queue
                m_resQueue.push(res.arr);
#else
                m_res.Add(res.arr);
#endif
                m_recCount++;
                res.reset();
                break;

            case cbid.se:
                res.curObj.iStart = res.curObj.iCur++;
                break;

            case cbid.zz:
                res.curObj.iCur++;
                break;

            default:
                throw new Exception();
            }
        }
예제 #4
0
 static void f_en(myPaserResult res, myToken tk)
 {
     res.arr.Add(res.gerCurObj());
 }