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); }
ssEvent pEvent(ssScanner scnr, ssForm f) { ssEvent e = new ssEvent(); try { scnr.GetStrSpDelim(); 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 (scnr.C != '|' && scnr.C != '+' && scnr.C != ';') { scnr.GetStrSpDelim(); e.a = pAction(scnr.S); } if (scnr.C != '|' && scnr.C != '+' && scnr.C != ';') { scnr.GetStrSpDelim(); e.cont = bool.Parse(scnr.S); } } catch (Exception ee) { throw new ssException("error parsing event in events file" + "\r\n?" + ee.Message); } return(e); }
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); }
eSet pSet(ssScanner scnr, ssForm f) { eSet es = null; eSet ss = null; for (;;) { switch (scnr.C) { case '=': case '<': char c = scnr.C; scnr.GetChar(); scnr.GetStrSpDelim(); eSet s = new eSet(null); s.nm = scnr.S; s.e = new ssEvent(); s.e.nxt = pEventTree(scnr, f); if (c == '=') { s.nxt = es; es = s; } else { s.nxt = subsets; subsets = s; } break; case '\0': return(es); default: if (char.IsWhiteSpace(scnr.C)) { scnr.GetChar(); } else { throw new ssException("error parsing event set in events file"); } break; } } }