Exemplo n.º 1
0
 public override void ResolveNames(LexicalScope scope)
 {
     if (this.exp != null)
     {
         this.exp.ResolveNames(scope);
     }
 }
Exemplo n.º 2
0
        public override void ResolveNames(LexicalScope scope)
        {
            this.AddToSymbolTable(scope);

            foreach (LocalVariable localVariable in this.localVariables)
            {
                localVariable.ResolveNames(scope);
            }
        }
Exemplo n.º 3
0
        public override void ResolveNames(LexicalScope scope)
        {
            this.symboltable = new LexicalScope(scope);

            foreach (Statement statement in this.statements)
            {
                statement.ResolveNames(this.symboltable);
            }
        }
Exemplo n.º 4
0
        public override void ResolveNames(LexicalScope scope)
        {
            this.symboltable = new LexicalScope(scope);

            foreach (Declaration declaration in this.declarations)
            {
                declaration.ResolveNames(this.symboltable);
            }
        }
Exemplo n.º 5
0
        public override void ResolveNames(LexicalScope scope)
        {
            if (scope != null)
            {
                this.declaration = scope.Resolve(this.name);
            }

            if (this.declaration == null)
            {
                Console.WriteLine("Error : Undefined identifier {0}\n", this.name);
                throw new Exception("Undefined identifier");
            }
        }
Exemplo n.º 6
0
        public override void ResolveNames(LexicalScope scope)
        {
            this.AddToSymbolTable(scope);
            this.symboltable = new LexicalScope(scope);

            this.result.ResolveNames(this.symboltable);

            foreach (FormalParameter formalParameter in this.formalParameters)
            {
                formalParameter.ResolveNames(this.symboltable);
            }

            this.statement.ResolveNames(this.symboltable);
        }
Exemplo n.º 7
0
        public override void ResolveNames(LexicalScope scope)
        {
            foreach (Expression fi in this.forinit)
            {
                fi.ResolveNames(scope);
            }

            if (this.exp != null)
            {
                this.exp.ResolveNames(scope);
            }
            foreach (Expression up in this.updates)
            {
                up.ResolveNames(scope);
            }
        }
Exemplo n.º 8
0
 public override void ResolveNames(LexicalScope scope)
 {
 }
Exemplo n.º 9
0
 public override void ResolveNames(LexicalScope scope)
 {
     this.lhs.ResolveNames(scope);
     this.rhs.ResolveNames(scope);
 }
Exemplo n.º 10
0
 public override void AddToSymbolTable(LexicalScope scope)
 {
     scope.Add(className, this);
 }
Exemplo n.º 11
0
 public abstract void AddToSymbolTable(LexicalScope scope);
Exemplo n.º 12
0
 public override void AddToSymbolTable(LexicalScope scope)
 {
     scope.Add(this.methodName, this);
 }
Exemplo n.º 13
0
        public override void ResolveNames(LexicalScope scope)
        {
            this.AddToSymbolTable(scope);

            this.type.ResolveNames(scope);
        }
Exemplo n.º 14
0
 public override void ResolveNames(LexicalScope scope)
 {
     this.declaration.ResolveNames(scope);
 }
Exemplo n.º 15
0
 public abstract void ResolveNames(LexicalScope scope);
Exemplo n.º 16
0
 public LexicalScope(LexicalScope parent)
 {
     this.symbol_table = new Dictionary <string, Declaration>();
     this.parent       = parent;
 }
Exemplo n.º 17
0
 public override void AddToSymbolTable(LexicalScope scope)
 {
 }