예제 #1
0
        SList pFileList(bool justone)
        {
            SList h = new SList();
            SList t = h;

            while (!scn.EOT())
            {
                t.nxt = new SList();
                t     = t.nxt;
                if (scn.C == '"')
                {
                    char d = pDelim();
                    scn.GetChar();
                    scn.SetDelim(d);
                    t.s = scn.GetStr();
                }
                else
                {
                    t.s = scn.GetStrSpDelim();
                }
                if (justone)
                {
                    return(h.nxt);
                }
            }
            return(h.nxt);
        }
예제 #2
0
        ssEvent pEvent(ssScanner scnr, ssForm f)
        {
            ssEvent e;

            try {
                scnr.GetStrSpDelim();
                eSet es = FindEventSet(subsets, scnr.S);
                if (es != null)
                {
                    e = es.e.nxt.copy();
                    if (!AtEventBoundry(scnr))
                    {
                        scnr.GetChar();
                    }
                }
                else
                {
                    e   = new ssEvent();
                    e.k = (Keys)keyconv.ConvertFromString(scnr.S);
                    scnr.GetStrSpDelim(); e.t = pType(scnr.S);
                    if (e.t == ssEventType.press)
                    {
                        scnr.GetStrSpDelim(); e.c = pChar(scnr.S);
                    }
                    if (!AtEventBoundry(scnr))
                    {
                        scnr.GetStrSpDelim(); e.a = pAction(scnr.S, ref e.cmdopt);
                    }
                    if (!AtEventBoundry(scnr))
                    {
                        scnr.GetStrSpDelim(); e.cont = bool.Parse(scnr.S);
                    }
                    if (e.cmdopt != ssEventCmdOption.none)
                    {
                        scnr.SetDelim("\n");
                        scnr.AllowComment    = false;
                        scnr.GetStr(); e.cmd = scnr.S;
                        scnr.AllowComment    = true;
                        scnr.SetDelim("");
                        if (!AtEventBoundry(scnr))
                        {
                            scnr.GetChar();
                        }
                    }
                }
            }
            catch (Exception ee) {
                scnr.SetDelim("");
                scnr.AllowComment = true;
                throw new ssException("error parsing event in events file" + "\r\n?" + ee.Message);
            }
            return(e);
        }