Esempio n. 1
0
        void Relabelling(out PreProcessActions preproc)
        {
            preproc = null; string relabelTo, relabelFrom; RelabelActions labels = new RelabelActions();
            Expect(21);
            Token first = t;

            if (la.kind == 6)
            {
                Get();
                preproc = new CustomPreprocess(t.val.Replace(":", "")); SetPos(preproc, first);
            }
            else if (la.kind == 3)
            {
                Get();
                relabelTo = t.val; SetPos(labels, first);
                Expect(22);
                Expect(3);
                relabelFrom = t.val; labels.Add(relabelFrom, relabelTo);
                while (la.kind == 11)
                {
                    Get();
                    Expect(3);
                    relabelTo = t.val;
                    Expect(22);
                    Expect(3);
                    relabelFrom = t.val; labels.Add(relabelFrom, relabelTo);
                }
                preproc = labels;
            }
            else
            {
                SynErr(44);
            }
            Expect(23);
        }
 public virtual void Visit(CustomPreprocess preprocess)
 {
 }
Esempio n. 3
0
 public override void Visit(CustomPreprocess preprocess)
 {
     PopChildren();
     Return("<sub>[:" + preprocess.MethodName + "]</sub>");
 }