void ActionPrefix(out Process proc, string locality) { Process nextproc = new NilProcess(); proc = null; Action action = null; if (la.kind == 17 || la.kind == 19 || la.kind == 20) { Action(out action, locality); if (la.kind == 13) { Get(); ActionPrefix(out nextproc, locality); } proc = new ActionPrefix(action, nextproc); CopyPos(proc, action, t); } else if (la.kind == 14) { Get(); Process(out proc, locality); Expect(15); } else if (la.kind == 16) { Get(); proc = new NilProcess(); SetPos(proc, t); } else SynErr(27); }
public override void Visit(ActionPrefix node) { List<string> children = PopChildren(); Return(CheckProc(children[2] + @" \ccsdot\ " + children[3], children)); }
void ActionPrefix(out Process proc) { ActionPrefix ap = null; ActionPrefix prev = null; ActionPrefix first = null; Process nextProc = null; ProcessConstant pc; proc = null; Action act = null; while (la.kind == 3 || la.kind == 5 || la.kind == 6) { Token startAction = la; Action(out act); ap = new ActionPrefix(act, null); SetStartPos(ap,startAction); if (first == null) first = ap; if (prev != null) { prev.Process = ap;} prev = ap; SetPos(act, startAction, t); Expect(16); } if (la.kind == 10) { Get(); Process(out nextProc); Expect(12); nextProc.ParenCount++; } else if (la.kind == 17) { Get(); nextProc = new NilProcess(); SetPos(nextProc, t); } else if (la.kind == 1) { ProcessConstantInvoke(out pc); nextProc = pc; } else if (la.kind == 18) { BranchProcess(out nextProc); } else SynErr(42); if (first == null) proc = nextProc; else {ap.Process = nextProc; proc = first;}; if (la.kind == 21) { PreProcessActions ppa = null; Relabelling(out ppa); nextProc.PreProcessActions = ppa; } if (la.kind == 24) { ActionRestrictions ar = null; Restriction(out ar); nextProc.ActionRestrictions = ar; } }
//Processes public virtual void Visit(ActionPrefix node) { }
public virtual string Format(ActionPrefix ap) { return SurroundWithParens(Format(ap.Action) + "." + Format(ap.Process), ap.ParenCount); }