python/ctrump/ctrumpmodule.c File Reference

Pythonインターフェース定義. More...

#include "Python.h"
#include "structmember.h"
#include "ctrump/ctrump.h"
#include "ctrump/ast/builtin-types.def"
#include "astobj.h"
#include "build-ast.h"
#include "constants.h"

Include dependency graph for ctrumpmodule.c:

Go to the source code of this file.

Data Structures

struct  abiObject
 python abi オブジェクト More...
struct  symbolObject
struct  recordFieldObject
struct  texprObject
struct  bitmapObject
 python bitmap オブジェクト More...
struct  CompilationErrorObject
 python CompilationError オブジェクト More...
struct  TypeEnvObject
 python typeEnv オブジェクト More...
struct  EnvObject
struct  ParserOptionObject
struct  BuilderObject
 python Builder オブジェクト More...
struct  ctrump_abi_register_node

Defines

#define PyIndex_Check(obj)   PyInt_Check(obj)
#define PyNumber_AsSsize_t(obj, exc)   PyInt_AsLong(obj)
#define DEFINE_BUILTIN_TYPE(str_name, code, sym)   texprObject *str_name;
#define DEFINE_BUILTIN_TYPE(str_name, c, sym)
#define DEFINE_BUILTIN_TYPE(str_name, c, sym)   {#str_name, T_OBJECT, offsetof(TypeEnvObject, str_name), READONLY},
#define NELEM(a)   (sizeof(a)/sizeof(a[0]))
#define EnvObject_Check(v)   ((v)->ob_type == &EnvObject_Type)
#define TranslationUnitObject_Check(v)   ((v)->ob_type == &translation_unit_Type)
#define CompilationErrorObject_Check(v)   ((v)->ob_type == &CompilationErrorObject_Type)

Typedefs

typedef int Py_ssize_t
typedef inquiry lenfunc
typedef intargfunc ssizeargfunc

Enumerations

enum  { ERROR_BUILD_CFG, ERROR_CFRONT_PARSE }

Functions

static PyObject * symbol_obj (struct EnvObject *env, const struct ctrump_symbol *tobj)
static PyObject * texpr_obj (struct EnvObject *env, struct ctrump_texpr *tobj)
static void * alloc_table (int num_entry)
static void expand_table_size (int *current_size, PyObject ***table, int assert_size)
static void expand_table_size_memtbl (int *current_size, PyObject ***id2tree_table, PyObject ****memobj_table, int assert_size)
static PyObject * symbol_str (symbolObject *obj)
static PyObject * record_field_getattr (recordFieldObject *self, char *name)
static PyObject * record_field_obj (struct EnvObject *env, struct ctrump_record_type_field *tree)
static PyObject * texpr_getattr (texprObject *self, char *name)
static PyObject * texpr_str (texprObject *self)
static PyObject * bitmap_str (bitmapObject *self)
static PyObject * bitmap_item (bitmapObject *self, Py_ssize_t i)
static Py_ssize_t bitmap_length (bitmapObject *self)
static PyObject * bitmap_subscript (bitmapObject *self, PyObject *item)
static PyObject * bitmap_pop (bitmapObject *self)
static PyObject * error_get_error_token (CompilationErrorObject *self, PyObject *args)
static PyObject * error_get_lineno (CompilationErrorObject *self)
static PyObject * error_get_reason (CompilationErrorObject *self)
static PyObject * error_get_path (CompilationErrorObject *self)
static PyObject * error_get_message (CompilationErrorObject *self)
static CompilationErrorObjectbuild_cfg_error_New (struct ctrump_build_cfg_error *e)
static CompilationErrorObjectcfront_parse_error_New (struct ctrump_loginfo *loginfo)
static int typeenv_Init (TypeEnvObject *self, struct EnvObject *env, PyObject *args, PyObject *kwds)
static void typeenv_dealloc (TypeEnvObject *o)
static int env_Init (EnvObject *self, PyObject *args, PyObject *kwds)
static PyObject * member_obj (PyObject **mem_tbl, int index)
static int parserOption_Init (ParserOptionObject *self, PyObject *args, PyObject *kwds)
static PyObject * fill_table_symbol (EnvObject *env, const struct ctrump_symbol *sym)
static PyObject * fill_table_texpr (EnvObject *env, const struct ctrump_texpr *sym)
static PyObject * cfront_parse (EnvObject *self, PyObject *args)
static PyObject * pprint0 (PyObject *args, int print_ssa)
static PyObject * pprint (EnvObject *self, PyObject *args)
static PyObject * pprint_ssa (EnvObject *self, PyObject *args)
static PyObject * pprint_stmt (PyObject *self, PyObject *args)
static PyObject * pprint_expr0 (PyObject *args, int print_ssa)
static PyObject * pprint_expr (PyObject *self, PyObject *args)
static PyObject * pprint_ssa_expr (PyObject *self, PyObject *args)
static struct
ctrump_loop_subscript
subscript_typecheck (PyObject *o)
static struct ctrump_loop_indexindex_typecheck (PyObject *o)
static PyObject * loop_subscript_hash (PyObject *self, PyObject *args)
static PyObject * loop_subscript_equal (PyObject *self, PyObject *args)
static PyObject * loop_index_equal (PyObject *self, PyObject *args)
static texprObjecttexpr_arg (PyObject *args)
static PyObject * is_pointer_type (PyObject *self, PyObject *args)
static PyObject * type_apply_unary_pointer_conversion (PyObject *self, PyObject *args)
static PyObject * fold_const (PyObject *self, PyObject *args)
static PyObject * calc_type_size (PyObject *self, PyObject *args)
static PyObject * struct_field_offset (PyObject *self, PyObject *args)
static PyObject * retrieve_pointer_type (PyObject *self, PyObject *args)
static PyObject * retrieve_address_type (PyObject *self, PyObject *args)
static void EnvObject_dealloc (EnvObject *o)
static PyObject * expr_prec (PyObject *self, PyObject *args)
static PyObject * get_stmt_loc (PyObject *self, PyObject *args)
static void BuilderObject_dealloc (BuilderObject *self)
static int builder_Init (BuilderObject *self, PyObject *args)
static PyObject * build_symbol (BuilderObject *self, PyObject *args)
static PyObject * build_struct (BuilderObject *self, PyObject *args)
static PyObject * build_incomplete_field_type (BuilderObject *self, PyObject *args)
static PyObject * build_typedef_name (BuilderObject *self, PyObject *args)
static PyObject * build_func_type (BuilderObject *self, PyObject *args)
static PyObject * build_array_type (BuilderObject *self, PyObject *args)
static PyObject * build_pointer_type (BuilderObject *self, PyObject *args)
static PyObject * build_qualified_type (BuilderObject *self, PyObject *args)
 PyDoc_STRVAR (module_doc,"Python interface for ctrump.")
static void register_abis (PyObject *dict)
CTRUMP_EXTDEF PyMODINIT_FUNC init_ctrump (void)

Variables

static PyTypeObject abiObject_Type
static PyTypeObject symbolObject_Type
static PyTypeObject recordFieldObject_Type
static PyTypeObject texprObject_Type
static PyObject * indexerr = NULL
static PyMethodDef bitmap_methods []
static PySequenceMethods bitmap_as_sequence
static PyTypeObject bitmapObject_Type
static struct PyMethodDef compile_error_methods []
static PyTypeObject CompilationErrorObject_Type
static PyMethodDef typeenv_methods []
static PyMemberDef typeenv_members []
static PyTypeObject TypeEnvObject_Type
static PyTypeObject EnvObject_Type
static PyMemberDef parserOption_members []
static PyTypeObject ParserOption_Type
static PyMethodDef env_methods []
static PyMemberDef env_members []
static PyMethodDef builder_methods []
static PyTypeObject BuilderObject_Type
static struct PyMethodDef ctrump_methods []
static PyMemberDef abi_members []
static struct
ctrump_abi_register_node 
abis []


Detailed Description

Pythonインターフェース定義.

Definition in file ctrumpmodule.c.


Define Documentation

#define CompilationErrorObject_Check (  )     ((v)->ob_type == &CompilationErrorObject_Type)

Definition at line 1964 of file ctrumpmodule.c.

#define DEFINE_BUILTIN_TYPE ( str_name,
c,
sym   )     {#str_name, T_OBJECT, offsetof(TypeEnvObject, str_name), READONLY},

Definition at line 689 of file ctrumpmodule.c.

#define DEFINE_BUILTIN_TYPE ( str_name,
c,
sym   ) 

Value:

type_obj = PyObject_New(texprObject, &texprObject_Type);        \
        type_obj->tree = &ctrump_builtin_##str_name;                    \
        type_obj->env = env;                                            \
        self->id2texpr_obj_table[type_obj->tree->id] = (PyObject*)type_obj; \
        self->str_name = type_obj;

Definition at line 689 of file ctrumpmodule.c.

#define DEFINE_BUILTIN_TYPE ( str_name,
code,
sym   )     texprObject *str_name;

Definition at line 689 of file ctrumpmodule.c.

#define EnvObject_Check (  )     ((v)->ob_type == &EnvObject_Type)

Definition at line 1600 of file ctrumpmodule.c.

#define NELEM (  )     (sizeof(a)/sizeof(a[0]))

Definition at line 1492 of file ctrumpmodule.c.

#define PyIndex_Check ( obj   )     PyInt_Check(obj)

Definition at line 43 of file ctrumpmodule.c.

Referenced by bitmap_subscript().

#define PyNumber_AsSsize_t ( obj,
exc   )     PyInt_AsLong(obj)

Definition at line 44 of file ctrumpmodule.c.

Referenced by bitmap_subscript().

#define TranslationUnitObject_Check (  )     ((v)->ob_type == &translation_unit_Type)

Definition at line 1963 of file ctrumpmodule.c.


Typedef Documentation

typedef inquiry lenfunc

Definition at line 41 of file ctrumpmodule.c.

typedef int Py_ssize_t

Definition at line 40 of file ctrumpmodule.c.

typedef intargfunc ssizeargfunc

Definition at line 42 of file ctrumpmodule.c.


Enumeration Type Documentation

anonymous enum

Enumerator:
ERROR_BUILD_CFG 
ERROR_CFRONT_PARSE 

Definition at line 493 of file ctrumpmodule.c.


Function Documentation

static void* alloc_table ( int  num_entry  )  [static]

Definition at line 60 of file ctrumpmodule.c.

Referenced by env_Init(), and typeenv_Init().

static PyObject* bitmap_item ( bitmapObject self,
Py_ssize_t  i 
) [static]

Definition at line 398 of file ctrumpmodule.c.

References ctrump_bitmap_p().

Referenced by bitmap_subscript().

static Py_ssize_t bitmap_length ( bitmapObject self  )  [static]

Definition at line 416 of file ctrumpmodule.c.

static PyObject* bitmap_pop ( bitmapObject self  )  [static]

Definition at line 438 of file ctrumpmodule.c.

References ctrump_bitmap_popcnt().

static PyObject* bitmap_str ( bitmapObject self  )  [static]

Definition at line 374 of file ctrumpmodule.c.

References ctrump_bitmap_p().

static PyObject* bitmap_subscript ( bitmapObject self,
PyObject *  item 
) [static]

Definition at line 422 of file ctrumpmodule.c.

References bitmap_item(), PyIndex_Check, and PyNumber_AsSsize_t.

static PyObject* build_array_type ( BuilderObject self,
PyObject *  args 
) [static]

Definition at line 1837 of file ctrumpmodule.c.

References ctrump_get_array_type(), and texpr_obj().

static CompilationErrorObject* build_cfg_error_New ( struct ctrump_build_cfg_error e  )  [static]

static PyObject* build_func_type ( BuilderObject self,
PyObject *  args 
) [static]

static PyObject* build_incomplete_field_type ( BuilderObject self,
PyObject *  args 
) [static]

static PyObject* build_pointer_type ( BuilderObject self,
PyObject *  args 
) [static]

static PyObject* build_qualified_type ( BuilderObject self,
PyObject *  args 
) [static]

static PyObject* build_struct ( BuilderObject self,
PyObject *  args 
) [static]

static PyObject* build_symbol ( BuilderObject self,
PyObject *  args 
) [static]

Definition at line 1645 of file ctrumpmodule.c.

References ctrump_intern(), and symbol_obj().

static PyObject* build_typedef_name ( BuilderObject self,
PyObject *  args 
) [static]

static int builder_Init ( BuilderObject self,
PyObject *  args 
) [static]

Definition at line 1623 of file ctrumpmodule.c.

static void BuilderObject_dealloc ( BuilderObject self  )  [static]

Definition at line 1616 of file ctrumpmodule.c.

static PyObject* calc_type_size ( PyObject *  self,
PyObject *  args 
) [static]

Definition at line 1351 of file ctrumpmodule.c.

References abiObject_Type, and ctrump_texpr_size().

static PyObject* cfront_parse ( EnvObject self,
PyObject *  args 
) [static]

static CompilationErrorObject* cfront_parse_error_New ( struct ctrump_loginfo loginfo  )  [static]

static int env_Init ( EnvObject self,
PyObject *  args,
PyObject *  kwds 
) [static]

static void EnvObject_dealloc ( EnvObject o  )  [static]

static PyObject* error_get_error_token ( CompilationErrorObject self,
PyObject *  args 
) [static]

static PyObject* error_get_lineno ( CompilationErrorObject self  )  [static]

static PyObject* error_get_message ( CompilationErrorObject self  )  [static]

Definition at line 583 of file ctrumpmodule.c.

References ctrump_get_loginfo_message(), ERROR_BUILD_CFG, and ERROR_CFRONT_PARSE.

static PyObject* error_get_path ( CompilationErrorObject self  )  [static]

static PyObject* error_get_reason ( CompilationErrorObject self  )  [static]

Definition at line 553 of file ctrumpmodule.c.

References ERROR_BUILD_CFG, and ERROR_CFRONT_PARSE.

static void expand_table_size ( int *  current_size,
PyObject ***  table,
int  assert_size 
) [static]

Definition at line 75 of file ctrumpmodule.c.

Referenced by symbol_obj(), and texpr_obj().

static void expand_table_size_memtbl ( int *  current_size,
PyObject ***  id2tree_table,
PyObject ****  memobj_table,
int  assert_size 
) [static]

Definition at line 94 of file ctrumpmodule.c.

Referenced by cfront_parse().

static PyObject* expr_prec ( PyObject *  self,
PyObject *  args 
) [static]

Definition at line 1495 of file ctrumpmodule.c.

References CTRUMP_EXPR_EMPTY, and ctrump_expr_prec_table.

static PyObject* fill_table_symbol ( EnvObject env,
const struct ctrump_symbol sym 
) [static]

Definition at line 960 of file ctrumpmodule.c.

static PyObject* fill_table_texpr ( EnvObject env,
const struct ctrump_texpr sym 
) [static]

Definition at line 966 of file ctrumpmodule.c.

static PyObject* fold_const ( PyObject *  self,
PyObject *  args 
) [static]

Definition at line 1322 of file ctrumpmodule.c.

References ctrump_ast_fold_const_sint().

static PyObject* get_stmt_loc ( PyObject *  self,
PyObject *  args 
) [static]

static struct ctrump_loop_index* index_typecheck ( PyObject *  o  )  [static, read]

Definition at line 1184 of file ctrumpmodule.c.

Referenced by loop_index_equal().

CTRUMP_EXTDEF PyMODINIT_FUNC init_ctrump ( void   ) 

Definition at line 2081 of file ctrumpmodule.c.

References ctrump_init_all(), register_abis(), and symbolObject_Type.

static PyObject* is_pointer_type ( PyObject *  self,
PyObject *  args 
) [static]

Definition at line 1281 of file ctrumpmodule.c.

References ctrump_texpr_is_pointer(), texpr_arg(), and texprObject::tree.

static PyObject* loop_index_equal ( PyObject *  self,
PyObject *  args 
) [static]

Definition at line 1240 of file ctrumpmodule.c.

References ctrump_loop_index_equal(), and index_typecheck().

static PyObject* loop_subscript_equal ( PyObject *  self,
PyObject *  args 
) [static]

Definition at line 1216 of file ctrumpmodule.c.

References ctrump_loop_subscript_equal(), s1, s2, and subscript_typecheck().

static PyObject* loop_subscript_hash ( PyObject *  self,
PyObject *  args 
) [static]

Definition at line 1199 of file ctrumpmodule.c.

References ctrump_loop_subscript_hash(), and subscript_typecheck().

static PyObject* member_obj ( PyObject **  mem_tbl,
int  index 
) [static]

Definition at line 881 of file ctrumpmodule.c.

static int parserOption_Init ( ParserOptionObject self,
PyObject *  args,
PyObject *  kwds 
) [static]

Definition at line 910 of file ctrumpmodule.c.

References ctrump_get_default_parser_option().

static PyObject* pprint ( EnvObject self,
PyObject *  args 
) [static]

Definition at line 1097 of file ctrumpmodule.c.

References pprint0().

static PyObject* pprint0 ( PyObject *  args,
int  print_ssa 
) [static]

Definition at line 1066 of file ctrumpmodule.c.

References ctrump_generate_pprint_format(), and ctrump_print_translation_unit_format().

Referenced by pprint(), and pprint_ssa().

static PyObject* pprint_expr ( PyObject *  self,
PyObject *  args 
) [static]

Definition at line 1160 of file ctrumpmodule.c.

References pprint_expr0().

static PyObject* pprint_expr0 ( PyObject *  args,
int  print_ssa 
) [static]

Definition at line 1134 of file ctrumpmodule.c.

References ctrump_generate_pprint_format(), and ctrump_print_expr_format().

Referenced by pprint_expr(), and pprint_ssa_expr().

static PyObject* pprint_ssa ( EnvObject self,
PyObject *  args 
) [static]

Definition at line 1102 of file ctrumpmodule.c.

References pprint0().

static PyObject* pprint_ssa_expr ( PyObject *  self,
PyObject *  args 
) [static]

Definition at line 1165 of file ctrumpmodule.c.

References pprint_expr0().

static PyObject* pprint_stmt ( PyObject *  self,
PyObject *  args 
) [static]

Definition at line 1109 of file ctrumpmodule.c.

References ctrump_generate_pprint_format(), and ctrump_print_stmt_format().

PyDoc_STRVAR ( module_doc  ,
"Python interface for ctrump."   
)

static PyObject* record_field_getattr ( recordFieldObject self,
char *  name 
) [static]

static PyObject * record_field_obj ( struct EnvObject env,
struct ctrump_record_type_field tree 
) [static]

Definition at line 888 of file ctrumpmodule.c.

References recordFieldObject::env, and recordFieldObject::tree.

Referenced by texpr_getattr().

static void register_abis ( PyObject *  dict  )  [static]

static PyObject* retrieve_address_type ( PyObject *  self,
PyObject *  args 
) [static]

static PyObject* retrieve_pointer_type ( PyObject *  self,
PyObject *  args 
) [static]

static PyObject* struct_field_offset ( PyObject *  self,
PyObject *  args 
) [static]

static struct ctrump_loop_subscript* subscript_typecheck ( PyObject *  o  )  [static, read]

Definition at line 1171 of file ctrumpmodule.c.

Referenced by loop_subscript_equal(), and loop_subscript_hash().

static PyObject * symbol_obj ( struct EnvObject env,
const struct ctrump_symbol tobj 
) [static]

static PyObject* symbol_str ( symbolObject obj  )  [static]

Definition at line 128 of file ctrumpmodule.c.

References ctrump_symbol::symlen, ctrump_symbol::symstr, and symbolObject::tree.

static texprObject* texpr_arg ( PyObject *  args  )  [static]

static PyObject* texpr_getattr ( texprObject self,
char *  name 
) [static]

static PyObject * texpr_obj ( struct EnvObject env,
struct ctrump_texpr tobj 
) [static]

static PyObject* texpr_str ( texprObject self  )  [static]

Definition at line 315 of file ctrumpmodule.c.

References ctrump_print_texpr_as_internal().

static PyObject* type_apply_unary_pointer_conversion ( PyObject *  self,
PyObject *  args 
) [static]

static void typeenv_dealloc ( TypeEnvObject o  )  [static]

static int typeenv_Init ( TypeEnvObject self,
struct EnvObject env,
PyObject *  args,
PyObject *  kwds 
) [static]

Definition at line 701 of file ctrumpmodule.c.

References alloc_table(), and ctrump_type_env_init().

Referenced by env_Init().


Variable Documentation

PyMemberDef abi_members[] [static]

Initial value:

 {
        {"sizeof_pointer", T_INT, offsetof(abiObject, abi.sizeof_pointer), READONLY},
        {"sizeof_long", T_INT, offsetof(abiObject, abi.sizeof_long), READONLY},
        {"sizeof_int", T_INT, offsetof(abiObject, abi.sizeof_int), READONLY},
        {"sizeof_short", T_INT, offsetof(abiObject, abi.sizeof_short), READONLY},
        {"sizeof_bool", T_INT, offsetof(abiObject, abi.sizeof_bool), READONLY},
        {"sizeof_longlong", T_INT, offsetof(abiObject, abi.sizeof_longlong), READONLY},
        {"sizeof_float", T_INT, offsetof(abiObject, abi.sizeof_float), READONLY},
        {"sizeof_double", T_INT, offsetof(abiObject, abi.sizeof_double), READONLY},
        {"sizeof_long_double", T_INT, offsetof(abiObject, abi.sizeof_long_double), READONLY},
        {"sizeof_enum", T_INT, offsetof(abiObject, abi.sizeof_enum), READONLY},
        {"sizeof_vector", T_INT, offsetof(abiObject, abi.sizeof_vector), READONLY},

        {"alignof_pointer", T_INT, offsetof(abiObject,abi.alignof_pointer), READONLY},
        {"alignof_long", T_INT, offsetof(abiObject,abi.alignof_long), READONLY},
        {"alignof_int", T_INT, offsetof(abiObject,abi.alignof_int), READONLY},
        {"alignof_short", T_INT, offsetof(abiObject,abi.alignof_short), READONLY},
        {"alignof_bool", T_INT, offsetof(abiObject,abi.alignof_bool), READONLY},
        {"alignof_longlong", T_INT, offsetof(abiObject,abi.alignof_longlong), READONLY},
        {"alignof_float", T_INT, offsetof(abiObject,abi.alignof_float), READONLY},
        {"alignof_double", T_INT, offsetof(abiObject,abi.alignof_double), READONLY},
        {"alignof_long_double", T_INT, offsetof(abiObject,abi.alignof_long_double), READONLY},
        {"alignof_enum", T_INT, offsetof(abiObject,abi.alignof_enum), READONLY},
        {"alignof_vector", T_INT, offsetof(abiObject,abi.alignof_vector), READONLY},

        {"is_char_signed", T_INT, offsetof(abiObject, abi.is_char_signed), READONLY},
        {0},
}

Definition at line 1990 of file ctrumpmodule.c.

static PyTypeObject abiObject_Type [static]

Definition at line 55 of file ctrumpmodule.c.

Referenced by calc_type_size(), and struct_field_offset().

struct ctrump_abi_register_node abis[] [static]

Initial value:

 {
        {"spu_abi", &ctrump_spu_abi},
        {"ppc32_abi", &ctrump_ppc32_abi},
        {"ppc64_abi", &ctrump_ppc64_abi}
}

Definition at line 2057 of file ctrumpmodule.c.

PySequenceMethods bitmap_as_sequence [static]

Initial value:

 {
        (lenfunc)bitmap_length,
        (binaryfunc)NULL,
        NULL,
        (ssizeargfunc)bitmap_item,
}

Definition at line 449 of file ctrumpmodule.c.

PyMethodDef bitmap_methods[] [static]

Initial value:

 {
        {"__getitem__", (PyCFunction)bitmap_subscript, METH_O|METH_COEXIST},
        {"popcount", (PyCFunction)bitmap_pop, METH_NOARGS},
        {NULL, (PyCFunction)NULL, 0, NULL},
}

Definition at line 443 of file ctrumpmodule.c.

PyTypeObject bitmapObject_Type [static]

Definition at line 456 of file ctrumpmodule.c.

PyMethodDef builder_methods[] [static]

Initial value:

 {
        {"symbol", (PyCFunction)build_symbol, METH_VARARGS, NULL},
        {"decls_to_struct_texpr", (PyCFunction)build_struct, METH_VARARGS, NULL},
        {"incomplete_struct", (PyCFunction)build_incomplete_field_type,METH_VARARGS, NULL},
        {"array_type", (PyCFunction)build_array_type, METH_VARARGS, NULL},
        {"typedef_name", (PyCFunction)build_typedef_name, METH_VARARGS, NULL},
        {"func_type", (PyCFunction)build_func_type, METH_VARARGS, NULL},
        {"pointer_type", (PyCFunction)build_pointer_type, METH_VARARGS, NULL},
        {"qualified_type", (PyCFunction)build_qualified_type, METH_VARARGS, NULL},
        BUILDER_METHOD_TABLE
        {NULL, NULL, 0, NULL}
}

Definition at line 1906 of file ctrumpmodule.c.

PyTypeObject BuilderObject_Type [static]

Definition at line 1919 of file ctrumpmodule.c.

PyTypeObject CompilationErrorObject_Type [static]

Definition at line 611 of file ctrumpmodule.c.

struct PyMethodDef compile_error_methods[] [static]

Initial value:

 {
        {"get_error_token", (PyCFunction)error_get_error_token, METH_VARARGS, NULL},
        {"lineno", (PyCFunction)error_get_lineno, METH_NOARGS, NULL},
        {"path", (PyCFunction)error_get_path, METH_NOARGS, NULL},
        {"reason", (PyCFunction)error_get_reason, METH_NOARGS, NULL},
        {"message", (PyCFunction)error_get_message, METH_NOARGS, NULL},
        {NULL,   (PyCFunction)NULL, 0, NULL}            
}

Definition at line 602 of file ctrumpmodule.c.

struct PyMethodDef ctrump_methods[] [static]

Initial value:

 {
        {"pprint", (PyCFunction)pprint, METH_VARARGS},
        {"pprint_ssa", (PyCFunction)pprint_ssa, METH_VARARGS},
        {"pprint_expr", (PyCFunction)pprint_expr, METH_VARARGS},
        {"pprint_ssa_expr", (PyCFunction)pprint_ssa_expr, METH_VARARGS},
        {"pprint_stmt", (PyCFunction)pprint_stmt, METH_VARARGS},
        {"fold_const", (PyCFunction)fold_const, METH_VARARGS},
        {"expr_prec", (PyCFunction)expr_prec, METH_VARARGS},
        {"is_pointer_type", (PyCFunction)is_pointer_type, METH_VARARGS},
        {"type_apply_unary_pointer_conversion", (PyCFunction)type_apply_unary_pointer_conversion, METH_VARARGS},
        {"calc_type_size", (PyCFunction)calc_type_size, METH_VARARGS},
        {"get_stmt_loc", (PyCFunction)get_stmt_loc, METH_VARARGS},
        {"retrieve_pointer_type", (PyCFunction)retrieve_pointer_type, METH_VARARGS},
        {"retrieve_address_type", (PyCFunction)retrieve_address_type, METH_VARARGS},
        {"struct_field_offset", (PyCFunction)struct_field_offset, METH_VARARGS},
        {"loop_index_equal", (PyCFunction)loop_index_equal, METH_VARARGS},
        {"loop_subscript_equal", (PyCFunction)loop_subscript_equal, METH_VARARGS},
        {"loop_subscript_hash", (PyCFunction)loop_subscript_hash, METH_VARARGS},
        {NULL,   (PyCFunction)NULL, 0, NULL}            
}

Definition at line 1966 of file ctrumpmodule.c.

PyMemberDef env_members[] [static]

Initial value:

 {
        {"type_env", T_OBJECT, offsetof(EnvObject, type_env), READONLY},
        {0},
}

Definition at line 1552 of file ctrumpmodule.c.

PyMethodDef env_methods[] [static]

Initial value:

 {
        {"parse", (PyCFunction)cfront_parse, METH_VARARGS},
        {"cfront_parse", (PyCFunction)cfront_parse, METH_VARARGS},
        {NULL,   (PyCFunction)NULL, 0, NULL}            
}

Definition at line 1546 of file ctrumpmodule.c.

static PyTypeObject EnvObject_Type [static]

Definition at line 793 of file ctrumpmodule.c.

PyObject* indexerr = NULL [static]

Definition at line 395 of file ctrumpmodule.c.

PyMemberDef parserOption_members[] [static]

Initial value:

 {
        {"is_vector_keyword", T_INT, offsetof(ParserOptionObject, tree.is_vector_keyword), 0, "whether `vector' is keyword or not"},
        {0},
}

Definition at line 904 of file ctrumpmodule.c.

PyTypeObject ParserOption_Type [static]

Definition at line 916 of file ctrumpmodule.c.

PyTypeObject recordFieldObject_Type [static]

Definition at line 183 of file ctrumpmodule.c.

PyTypeObject symbolObject_Type [static]

Initial value:

 {
  PyObject_HEAD_INIT (NULL) 0,  
  "ctrump.symbol",      
  sizeof (symbolObject),                
  0,                            
  
  0,                            
  0,                            
  (getattrfunc) 0, 
  0,                            
  0,                            
  0,                            
  0,                            
  0,                            
  0,                            
  0,                            
  0,                            
  (reprfunc)symbol_str,                 
}

Definition at line 135 of file ctrumpmodule.c.

Referenced by build_incomplete_field_type(), build_struct(), build_typedef_name(), init_ctrump(), struct_field_offset(), and symbol_obj().

static PyTypeObject texprObject_Type [static]

Definition at line 312 of file ctrumpmodule.c.

PyMemberDef typeenv_members[] [static]

Definition at line 734 of file ctrumpmodule.c.

PyMethodDef typeenv_methods[] [static]

Initial value:

 {
        {NULL, (PyCFunction)NULL, 0, NULL},
}

Definition at line 696 of file ctrumpmodule.c.

PyTypeObject TypeEnvObject_Type [static]

Definition at line 743 of file ctrumpmodule.c.


Generated on Tue Mar 31 20:19:25 2009 for ctrump by  doxygen 1.5.6