void Restriction(out ActionRestrictions ar)
 {
     ar = null; ChannelRestrictions res = new ChannelRestrictions();
     Expect(24);
     if (la.kind == 3) {
     Get();
     res.Add(t.val); SetPos(res, t); res.ParenCount = 0; ar = res;
     } else if (la.kind == 25) {
     Get();
     res.ParenCount = 1;
     Expect(3);
     res.Add(t.val); SetPos(res, t);
     while (la.kind == 11) {
         Get();
         Expect(3);
         res.Add(t.val);
     }
     Expect(26);
     ar = res;
     } else if (la.kind == 6) {
     Get();
     ar = new CustomRestrictions(t.val.Replace(":", "")); SetPos(ar, t);
     } else SynErr(45);
 }
 //ActionHandling
 public virtual void Visit(ActionRestrictions restrictions)
 {
 }
 public virtual string Format(ActionRestrictions res)
 {
     if (res.HasParens) {
         return " \\{" + Join(", ", res) + '}';
     } else if (res.Count == 1 && !res.HasParens) {
         return " \\" + res[0];
     } else if (res.Count == 0) {
         return "";
     } else {
         throw new Exception("Should never happen!");
     }
 }