Package analysis :: Package output :: Package generators :: Module C :: Class CodeGenerator
[show private | hide private]
[frames | no frames]

Class CodeGenerator

Generator --+        
            |        
 RawGenerator --+    
                |    
       CGenerator --+
                    |
                   CodeGenerator


A generator for C program instructions.
Method Summary
  __init__(self, visitor)
  attr(self, node, obj, attr, attrname, write_case)
For the given 'node' expressing an attribute lookup, Write a reference to the attribute of the given object or class 'obj' using the suggested 'attr' and having the given 'attrname'.
  call_function(self, node)
Write function calls, associated with the given 'node'.
  class_attr(self, name, attrname)
  class_test(self, name)
  compare(self, compare)
  end_statement(self)
  end_target_test(self, refcontext)
Write the end of the function call selection test.
  end_test(self)
  fname_top(self, name)
  get_argnode(self, node, argname, key)
  get_argnodes(self, node, key)
  get_highest_local(self)
  import_module(self, name)
  instance_attr(self, name, attrname)
  method_attr(self, name)
  module_attr(self, name, attrname)
  module_test(self, name)
  name(self, node)
  new(self, node, annotation)
Write a reference to a new object instantiated by the given 'node'.
  new_object(self, name)
  parameters(self, node, locals, argnames, refcontext, target, key)
Write the parameters associated with the given function call 'node' using the given call 'locals' and a 'refcontext' used to indicate how reference objects used in the call are to be represented.
  start_statement(self)
  start_target_test(self, node, locals, argnames, refcontext, target, key)
Write the test which selects a particular function call.
  start_test(self)
  type_of(self, node, name)
  type_of_choice(self, node, choice)
  type_of_stack(self, obj, func)
  type_of_stack_choice(self, choice, func)
  type_of_stack_class(self, cls, func)
  type_of_stack_context(self, obj, func)
  type_of_stack_context_choice(self, choice, func)
  uses_reference(self, node, argnames, key)
    Inherited from CGenerator
  end_guard(self, module_name)
  function_signature(self, name, argnames)
  get_output(self)
  include(self, module_name)
  main_signature(self, name)
  start_guard(self, module_name)
    Inherited from RawGenerator
  write(self, *args)
  writeln(self, *args)
    Inherited from Generator
  dedent(self)
  indent(self)

Method Details

attr(self, node, obj, attr, attrname, write_case=0)

For the given 'node' expressing an attribute lookup, Write a reference to the attribute of the given object or class 'obj' using the suggested 'attr' and having the given 'attrname'.

call_function(self, node)

Write function calls, associated with the given 'node'.

end_target_test(self, refcontext)

Write the end of the function call selection test.

new(self, node, annotation='_instantiates')

Write a reference to a new object instantiated by the given 'node'.

parameters(self, node, locals, argnames, refcontext, target, key)

Write the parameters associated with the given function call 'node' using the given call 'locals' and a 'refcontext' used to indicate how reference objects used in the call are to be represented.

start_target_test(self, node, locals, argnames, refcontext, target, key)

Write the test which selects a particular function call.

Generated by Epydoc 2.1 on Fri May 19 01:52:26 2006 http://epydoc.sf.net