org.python.compiler
Class ScopesCompiler

java.lang.Object
  extended byorg.python.parser.Visitor
      extended byorg.python.compiler.ScopesCompiler
All Implemented Interfaces:
ScopeConstants

public class ScopesCompiler
extends Visitor
implements ScopeConstants


Field Summary
 
Fields inherited from interface org.python.compiler.ScopeConstants
BOUND, CELL, CLASS_GLOBAL, CLASSSCOPE, FREE, FROM_PARAM, FUNCSCOPE, GLOBAL, NGLOBAL, PARAM, TOPSCOPE
 
Constructor Summary
ScopesCompiler(CompilationContext code_compiler)
           
 
Method Summary
 Object add_2op(SimpleNode node)
           
 Object and_2op(SimpleNode node)
           
 Object and_boolean(SimpleNode node)
           
 Object assert_stmt(SimpleNode node)
           
 Object aug_and(SimpleNode node)
           
 void aug_assign(SimpleNode node)
           
 Object aug_divide(SimpleNode node)
           
 Object aug_lshift(SimpleNode node)
           
 Object aug_minus(SimpleNode node)
           
 Object aug_modulo(SimpleNode node)
           
 Object aug_multiply(SimpleNode node)
           
 Object aug_or(SimpleNode node)
           
 Object aug_plus(SimpleNode node)
           
 Object aug_power(SimpleNode node)
           
 Object aug_rshift(SimpleNode node)
           
 Object aug_xor(SimpleNode node)
           
 Object augset(SimpleNode node)
           
 void beginScope(String name, int kind, SimpleNode node, ArgListCompiler ac)
           
 void binaryop(SimpleNode node)
           
 Object break_stmt(SimpleNode n)
           
 Object Call_Op(SimpleNode node)
           
 Object classdef(SimpleNode node)
           
 Object comparision(SimpleNode node)
           
 Object Complex(SimpleNode node)
           
 Object continue_stmt(SimpleNode n)
           
 Object del_stmt(SimpleNode node)
           
 Object del(SimpleNode node)
           
 Object dictionary(SimpleNode node)
           
 Object div_2op(SimpleNode node)
           
 Object Dot_Op(SimpleNode node)
           
 Object Ellipses(SimpleNode n)
           
 void endScope()
           
 Object eval_input(SimpleNode node)
           
 Object exec_stmt(SimpleNode node)
           
 Object expr_stmt(SimpleNode node)
           
 Object file_input(SimpleNode node)
           
 Object Float(SimpleNode node)
           
 Object for_stmt(SimpleNode node)
           
 Object fplist(SimpleNode node)
           
 Object funcdef(SimpleNode node)
           
 Object global_stmt(SimpleNode node)
           
 Object if_stmt(SimpleNode node)
           
 Object Import(SimpleNode node)
           
 Object ImportFrom(SimpleNode node)
           
 Object Index_Op(SimpleNode node)
           
 Object Int(SimpleNode node)
           
 Object invert_1op(SimpleNode node)
           
 Object lambdef(SimpleNode node)
           
 Object list_iter(SimpleNode node)
           
 Object list(SimpleNode node)
           
 Object lshift_2op(SimpleNode node)
           
 Object mod_2op(SimpleNode node)
           
 Object modal(SimpleNode node, int newmode)
           
 Object mul_2op(SimpleNode node)
           
 Object Name(SimpleNode node)
           
 Object neg_1op(SimpleNode node)
           
 Object not_1op(SimpleNode node)
           
 Object or_2op(SimpleNode node)
           
 Object or_boolean(SimpleNode node)
           
 void parse(SimpleNode node)
           
 Object pass_stmt(SimpleNode n)
           
 Object pos_1op(SimpleNode node)
           
 Object pow_2op(SimpleNode node)
           
 Object print_ext(SimpleNode node)
           
 Object print_stmt(SimpleNode node)
           
 Object raise_stmt(SimpleNode node)
           
 Object return_stmt(SimpleNode node)
           
 Object rshift_2op(SimpleNode node)
           
 Object set(SimpleNode node)
           
 Object single_input(SimpleNode node)
           
 Object Slice(SimpleNode node)
           
 void stmt(SimpleNode node)
           
 Object str_1op(SimpleNode node)
           
 Object String(SimpleNode node)
           
 Object strjoin(SimpleNode node)
           
 Object sub_2op(SimpleNode node)
           
 Object suite(SimpleNode node)
           
 Object try_stmt(SimpleNode node)
           
 Object tuple(SimpleNode node)
           
 void unaryop(SimpleNode node)
           
 Object while_stmt(SimpleNode node)
           
 Object xor_2op(SimpleNode node)
           
 
Methods inherited from class org.python.parser.Visitor
arglist, augassign, bidiredge, Colon, Comma, defaultarg, dotted_name, equal_cmp, except_clause, ExtraArgList, ExtraKeywordList, greater_cmp, greater_equal_cmp, in_cmp, is_cmp, is_not_cmp, Keyword, leftdiredge, less_cmp, less_equal_cmp, like, not_in_cmp, notequal_cmp, questionm, rcontained, rcontains, rexact, rightdiredge, roverlaps, varargslist
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScopesCompiler

public ScopesCompiler(CompilationContext code_compiler)
Method Detail

set

public Object set(SimpleNode node)
           throws Exception
Throws:
Exception

del

public Object del(SimpleNode node)
           throws Exception
Throws:
Exception

augset

public Object augset(SimpleNode node)
              throws Exception
Throws:
Exception

modal

public Object modal(SimpleNode node,
                    int newmode)
             throws Exception
Throws:
Exception

beginScope

public void beginScope(String name,
                       int kind,
                       SimpleNode node,
                       ArgListCompiler ac)

endScope

public void endScope()
              throws Exception
Throws:
Exception

parse

public void parse(SimpleNode node)
           throws Exception
Throws:
Exception

single_input

public Object single_input(SimpleNode node)
                    throws Exception
Overrides:
single_input in class Visitor
Throws:
Exception

file_input

public Object file_input(SimpleNode node)
                  throws Exception
Overrides:
file_input in class Visitor
Throws:
Exception

eval_input

public Object eval_input(SimpleNode node)
                  throws Exception
Overrides:
eval_input in class Visitor
Throws:
Exception

funcdef

public Object funcdef(SimpleNode node)
               throws Exception
Overrides:
funcdef in class Visitor
Throws:
Exception

expr_stmt

public Object expr_stmt(SimpleNode node)
                 throws Exception
Overrides:
expr_stmt in class Visitor
Throws:
Exception

print_ext

public Object print_ext(SimpleNode node)
                 throws Exception
Overrides:
print_ext in class Visitor
Throws:
Exception

print_stmt

public Object print_stmt(SimpleNode node)
                  throws Exception
Overrides:
print_stmt in class Visitor
Throws:
Exception

del_stmt

public Object del_stmt(SimpleNode node)
                throws Exception
Overrides:
del_stmt in class Visitor
Throws:
Exception

pass_stmt

public Object pass_stmt(SimpleNode n)
                 throws Exception
Overrides:
pass_stmt in class Visitor
Throws:
Exception

break_stmt

public Object break_stmt(SimpleNode n)
                  throws Exception
Overrides:
break_stmt in class Visitor
Throws:
Exception

continue_stmt

public Object continue_stmt(SimpleNode n)
                     throws Exception
Overrides:
continue_stmt in class Visitor
Throws:
Exception

return_stmt

public Object return_stmt(SimpleNode node)
                   throws Exception
Overrides:
return_stmt in class Visitor
Throws:
Exception

stmt

public void stmt(SimpleNode node)
          throws Exception
Throws:
Exception

raise_stmt

public Object raise_stmt(SimpleNode node)
                  throws Exception
Overrides:
raise_stmt in class Visitor
Throws:
Exception

Import

public Object Import(SimpleNode node)
              throws Exception
Overrides:
Import in class Visitor
Throws:
Exception

ImportFrom

public Object ImportFrom(SimpleNode node)
                  throws Exception
Overrides:
ImportFrom in class Visitor
Throws:
Exception

global_stmt

public Object global_stmt(SimpleNode node)
                   throws Exception
Overrides:
global_stmt in class Visitor
Throws:
Exception

exec_stmt

public Object exec_stmt(SimpleNode node)
                 throws Exception
Overrides:
exec_stmt in class Visitor
Throws:
Exception

assert_stmt

public Object assert_stmt(SimpleNode node)
                   throws Exception
Overrides:
assert_stmt in class Visitor
Throws:
Exception

if_stmt

public Object if_stmt(SimpleNode node)
               throws Exception
Overrides:
if_stmt in class Visitor
Throws:
Exception

while_stmt

public Object while_stmt(SimpleNode node)
                  throws Exception
Overrides:
while_stmt in class Visitor
Throws:
Exception

for_stmt

public Object for_stmt(SimpleNode node)
                throws Exception
Overrides:
for_stmt in class Visitor
Throws:
Exception

try_stmt

public Object try_stmt(SimpleNode node)
                throws Exception
Overrides:
try_stmt in class Visitor
Throws:
Exception

suite

public Object suite(SimpleNode node)
             throws Exception
Overrides:
suite in class Visitor
Throws:
Exception

binaryop

public void binaryop(SimpleNode node)
              throws Exception
Throws:
Exception

unaryop

public void unaryop(SimpleNode node)
             throws Exception
Throws:
Exception

or_boolean

public Object or_boolean(SimpleNode node)
                  throws Exception
Overrides:
or_boolean in class Visitor
Throws:
Exception

and_boolean

public Object and_boolean(SimpleNode node)
                   throws Exception
Overrides:
and_boolean in class Visitor
Throws:
Exception

not_1op

public Object not_1op(SimpleNode node)
               throws Exception
Overrides:
not_1op in class Visitor
Throws:
Exception

comparision

public Object comparision(SimpleNode node)
                   throws Exception
Overrides:
comparision in class Visitor
Throws:
Exception

or_2op

public Object or_2op(SimpleNode node)
              throws Exception
Overrides:
or_2op in class Visitor
Throws:
Exception

xor_2op

public Object xor_2op(SimpleNode node)
               throws Exception
Overrides:
xor_2op in class Visitor
Throws:
Exception

and_2op

public Object and_2op(SimpleNode node)
               throws Exception
Overrides:
and_2op in class Visitor
Throws:
Exception

lshift_2op

public Object lshift_2op(SimpleNode node)
                  throws Exception
Overrides:
lshift_2op in class Visitor
Throws:
Exception

rshift_2op

public Object rshift_2op(SimpleNode node)
                  throws Exception
Overrides:
rshift_2op in class Visitor
Throws:
Exception

add_2op

public Object add_2op(SimpleNode node)
               throws Exception
Overrides:
add_2op in class Visitor
Throws:
Exception

sub_2op

public Object sub_2op(SimpleNode node)
               throws Exception
Overrides:
sub_2op in class Visitor
Throws:
Exception

mul_2op

public Object mul_2op(SimpleNode node)
               throws Exception
Overrides:
mul_2op in class Visitor
Throws:
Exception

div_2op

public Object div_2op(SimpleNode node)
               throws Exception
Overrides:
div_2op in class Visitor
Throws:
Exception

mod_2op

public Object mod_2op(SimpleNode node)
               throws Exception
Overrides:
mod_2op in class Visitor
Throws:
Exception

pos_1op

public Object pos_1op(SimpleNode node)
               throws Exception
Overrides:
pos_1op in class Visitor
Throws:
Exception

neg_1op

public Object neg_1op(SimpleNode node)
               throws Exception
Overrides:
neg_1op in class Visitor
Throws:
Exception

invert_1op

public Object invert_1op(SimpleNode node)
                  throws Exception
Overrides:
invert_1op in class Visitor
Throws:
Exception

pow_2op

public Object pow_2op(SimpleNode node)
               throws Exception
Overrides:
pow_2op in class Visitor
Throws:
Exception

str_1op

public Object str_1op(SimpleNode node)
               throws Exception
Overrides:
str_1op in class Visitor
Throws:
Exception

strjoin

public Object strjoin(SimpleNode node)
               throws Exception
Overrides:
strjoin in class Visitor
Throws:
Exception

Call_Op

public Object Call_Op(SimpleNode node)
               throws Exception
Overrides:
Call_Op in class Visitor
Throws:
Exception

Index_Op

public Object Index_Op(SimpleNode node)
                throws Exception
Overrides:
Index_Op in class Visitor
Throws:
Exception

Dot_Op

public Object Dot_Op(SimpleNode node)
              throws Exception
Overrides:
Dot_Op in class Visitor
Throws:
Exception

tuple

public Object tuple(SimpleNode node)
             throws Exception
Overrides:
tuple in class Visitor
Throws:
Exception

fplist

public Object fplist(SimpleNode node)
              throws Exception
Overrides:
fplist in class Visitor
Throws:
Exception

list

public Object list(SimpleNode node)
            throws Exception
Overrides:
list in class Visitor
Throws:
Exception

list_iter

public Object list_iter(SimpleNode node)
                 throws Exception
Overrides:
list_iter in class Visitor
Throws:
Exception

dictionary

public Object dictionary(SimpleNode node)
                  throws Exception
Overrides:
dictionary in class Visitor
Throws:
Exception

lambdef

public Object lambdef(SimpleNode node)
               throws Exception
Overrides:
lambdef in class Visitor
Throws:
Exception

Ellipses

public Object Ellipses(SimpleNode n)
                throws Exception
Overrides:
Ellipses in class Visitor
Throws:
Exception

Slice

public Object Slice(SimpleNode node)
             throws Exception
Overrides:
Slice in class Visitor
Throws:
Exception

classdef

public Object classdef(SimpleNode node)
                throws Exception
Overrides:
classdef in class Visitor
Throws:
Exception

Int

public Object Int(SimpleNode node)
           throws Exception
Overrides:
Int in class Visitor
Throws:
Exception

Float

public Object Float(SimpleNode node)
             throws Exception
Overrides:
Float in class Visitor
Throws:
Exception

Complex

public Object Complex(SimpleNode node)
               throws Exception
Overrides:
Complex in class Visitor
Throws:
Exception

Name

public Object Name(SimpleNode node)
            throws Exception
Overrides:
Name in class Visitor
Throws:
Exception

String

public Object String(SimpleNode node)
              throws Exception
Overrides:
String in class Visitor
Throws:
Exception

aug_assign

public void aug_assign(SimpleNode node)
                throws Exception
Throws:
Exception

aug_plus

public Object aug_plus(SimpleNode node)
                throws Exception
Overrides:
aug_plus in class Visitor
Throws:
Exception

aug_minus

public Object aug_minus(SimpleNode node)
                 throws Exception
Overrides:
aug_minus in class Visitor
Throws:
Exception

aug_multiply

public Object aug_multiply(SimpleNode node)
                    throws Exception
Overrides:
aug_multiply in class Visitor
Throws:
Exception

aug_divide

public Object aug_divide(SimpleNode node)
                  throws Exception
Overrides:
aug_divide in class Visitor
Throws:
Exception

aug_modulo

public Object aug_modulo(SimpleNode node)
                  throws Exception
Overrides:
aug_modulo in class Visitor
Throws:
Exception

aug_and

public Object aug_and(SimpleNode node)
               throws Exception
Overrides:
aug_and in class Visitor
Throws:
Exception

aug_or

public Object aug_or(SimpleNode node)
              throws Exception
Overrides:
aug_or in class Visitor
Throws:
Exception

aug_xor

public Object aug_xor(SimpleNode node)
               throws Exception
Overrides:
aug_xor in class Visitor
Throws:
Exception

aug_lshift

public Object aug_lshift(SimpleNode node)
                  throws Exception
Overrides:
aug_lshift in class Visitor
Throws:
Exception

aug_rshift

public Object aug_rshift(SimpleNode node)
                  throws Exception
Overrides:
aug_rshift in class Visitor
Throws:
Exception

aug_power

public Object aug_power(SimpleNode node)
                 throws Exception
Overrides:
aug_power in class Visitor
Throws:
Exception