Exemple #1
0
        void IDENTIFIER(out AST e)
        {
            e = null; List <AST> elist = new List <AST>(); AST ei = null;
            Expect(3);
            string id = t.val; e = new SymReferencing(id);

            if (la.kind == 25 || la.kind == 26)
            {
                if (la.kind == 25)
                {
                    Get();
                    IDENTIFIER(out ei);
                    e = new DotReferencing(e, ei);
                }
                else
                {
                    Get();
                    EXPR(out ei);
                    Expect(27);
                    elist.Add(ei);
                    while (la.kind == 26)
                    {
                        Get();
                        EXPR(out ei);
                        Expect(27);
                        elist.Add(ei);
                    }
                    e = new ListReferencing(e, elist);
                    if (la.kind == 25)
                    {
                        Get();
                        IDENTIFIER(out ei);
                        e = new DotReferencing(e, ei);
                    }
                }
            }
        }
Exemple #2
0
 public abstract void Visit(ListReferencing n);