Package pyraf :: Module cl2py :: Class Tree2Python
[hide private]
[frames] | no frames]

Class Tree2Python

source code


Instance Methods [hide private]
 
__init__(self, ast, vars, filename='', taskObj=None) source code
 
_ecl_linemapping(self, header) source code
 
incrIndent(self)
Increment indentation count
source code
 
decrIndent(self)
Decrement indentation count and write 'pass' if required
source code
 
write(self, s, requireType=None, exprType=None)
Write string to output code buffer
source code
 
writeIndent(self, value=None)
Write newline and indent
source code
 
writeProcHeader(self)
Write function definition and other header info
source code
 
n_proc_stmt(self, node) source code
 
n_declaration_block(self, node) source code
 
n_declaration_stmt(self, node) source code
 
n_BEGIN(self, node) source code
 
n_END(self, node) source code
 
n_NEWLINE(self, node) source code
 
n_BKGD(self, node) source code
 
n_FLOAT(self, node) source code
 
n_INTEGER(self, node) source code
 
n_SEXAGESIMAL(self, node) source code
 
n_IDENT(self, node, array_ref=0) source code
 
_print_subscript(self, node) source code
 
n_array_ref(self, node) source code
 
n_param_name(self, node) source code
 
n_LOGOP(self, node) source code
 
n_function_call(self, node) source code
 
modify_scan_args(self, functionname, sargs) source code
 
default(self, node)
Handle other tokens
source code
 
n_term(self, node) source code
 
n_statement_block(self, node) source code
 
n_compound_stmt(self, node) source code
 
n_compound_stmt_exit(self, node) source code
 
n_nonnull_stmt(self, node) source code
 
n_osescape_stmt(self, node) source code
 
n_assignment_stmt(self, node) source code
 
n_else_clause(self, node) source code
 
n_ELSE(self, node) source code
 
n_iferr_stmt(self, node) source code
 
n_while_stmt(self, node)
we've got a 'while' statement
source code
 
n_for_stmt(self, node) source code
 
n_next_stmt(self, node) source code
 
n_label_stmt(self, node) source code
 
n_goto_stmt(self, node) source code
 
n_inspect_stmt(self, node) source code
 
n_switch_stmt(self, node) source code
 
n_case_block(self, node) source code
 
n_case_stmt_block(self, node) source code
 
n_default_stmt_block(self, node) source code
 
n_task_pipe_stmt(self, node) source code
 
n_task_call_stmt(self, node) source code
 
n_task_arglist(self, node) source code
 
captureArgs(self, node)
Process the arguments list and return a list of the args
source code
 
writeChunks(self, arglist, linelength=78) source code
 
n_empty_arg(self, node) source code
 
n_bool_arg(self, node) source code
 
n_redir_arg(self, node) source code
 
n_keyword_arg(self, node) source code

Inherited from generic.GenericASTTraversal: collectRules, postorder, preorder, prune

Inherited from ErrorTracker: error, errorappend, getlineno, printerrors, warning

Inherited from ErrorTracker (private): _error_init

Method Details [hide private]

__init__(self, ast, vars, filename='', taskObj=None)
(Constructor)

source code 
Overrides: generic.GenericASTTraversal.__init__

default(self, node)

source code 

Handle other tokens

Overrides: generic.GenericASTTraversal.default