ctree.c package
Submodules
ctree.c.nodes module
AST nodes for C constructs.
-
ctree.c.nodes.Add(a, b=None)[source]
-
ctree.c.nodes.AddAssign(a, b)[source]
-
ctree.c.nodes.And(a, b)[source]
-
class ctree.c.nodes.ArrayDef(target=None, size=None, body=None)[source]
Bases: ctree.c.nodes.Expression
doc
-
ctree.c.nodes.ArrayRef(a, b)[source]
-
ctree.c.nodes.Arrow(a, b)[source]
-
ctree.c.nodes.Assign(a, b)[source]
-
class ctree.c.nodes.AugAssign(target=None, op=None, value=None)[source]
Bases: ctree.c.nodes.Expression
Cite me.
-
class ctree.c.nodes.BinaryOp(left=None, op=None, right=None)[source]
Bases: ctree.c.nodes.Expression
Cite me.
-
get_type()[source]
-
ctree.c.nodes.BitAnd(a, b)[source]
-
ctree.c.nodes.BitAndAssign(a, b)[source]
-
ctree.c.nodes.BitNot(a)[source]
-
ctree.c.nodes.BitOr(a, b)[source]
-
ctree.c.nodes.BitOrAssign(a, b)[source]
-
ctree.c.nodes.BitShL(a, b)[source]
-
ctree.c.nodes.BitShLAssign(a, b)[source]
-
ctree.c.nodes.BitShR(a, b)[source]
-
ctree.c.nodes.BitShRAssign(a, b)[source]
-
ctree.c.nodes.BitXor(a, b)[source]
-
ctree.c.nodes.BitXorAssign(a, b)[source]
-
class ctree.c.nodes.Block(body=None)[source]
Bases: ctree.c.nodes.Statement
Cite me.
-
class ctree.c.nodes.CFile(name='generated', body=None, config_target='c')[source]
Bases: ctree.c.nodes.CNode, ctree.nodes.File
Represents a .c file.
-
get_bc_filename()[source]
-
class ctree.c.nodes.CNode[source]
Bases: ctree.nodes.CtreeNode
Base class for all C nodes in ctree.
-
codegen(indent=0)[source]
-
label()[source]
-
class ctree.c.nodes.Cast(sym_type=None, value=None)[source]
Bases: ctree.c.nodes.Expression
doc
-
ctree.c.nodes.Comma(a, b)[source]
-
class ctree.c.nodes.Constant(value=None)[source]
Bases: ctree.c.nodes.Literal
Section B.1.4 6.1.3.
-
get_type()[source]
-
ctree.c.nodes.Deref(a)[source]
-
ctree.c.nodes.Div(a, b)[source]
-
ctree.c.nodes.DivAssign(a, b)[source]
-
class ctree.c.nodes.DoWhile(body=None, cond=None)[source]
Bases: ctree.c.nodes.Statement
-
ctree.c.nodes.Dot(a, b)[source]
-
ctree.c.nodes.Eq(a, b)[source]
-
class ctree.c.nodes.Expression[source]
Bases: ctree.c.nodes.CNode
Cite me.
-
class ctree.c.nodes.For(init=None, test=None, incr=None, body=None)[source]
Bases: ctree.c.nodes.Statement
-
class ctree.c.nodes.FunctionCall(func=None, args=None)[source]
Bases: ctree.c.nodes.Expression
Cite me.
-
class ctree.c.nodes.FunctionDecl(return_type=None, name=None, params=None, defn=None)[source]
Bases: ctree.c.nodes.Statement
Cite me.
-
get_type()[source]
-
set_inline(value=True)[source]
-
set_kernel(value=True)[source]
-
set_static(value=True)[source]
-
ctree.c.nodes.Gt(a, b)[source]
-
ctree.c.nodes.GtE(a, b)[source]
-
class ctree.c.nodes.If(cond=None, then=None, elze=None)[source]
Bases: ctree.c.nodes.Statement
Cite me.
-
class ctree.c.nodes.Literal[source]
Bases: ctree.c.nodes.Expression
Cite me.
-
ctree.c.nodes.Lt(a, b)[source]
-
ctree.c.nodes.LtE(a, b)[source]
-
ctree.c.nodes.Mod(a, b)[source]
-
ctree.c.nodes.ModAssign(a, b)[source]
-
ctree.c.nodes.Mul(a, b)[source]
-
ctree.c.nodes.MulAssign(a, b)[source]
-
ctree.c.nodes.Not(a)[source]
-
ctree.c.nodes.NotEq(a, b)[source]
-
ctree.c.nodes.Or(a, b)[source]
-
ctree.c.nodes.PostDec(a)[source]
-
ctree.c.nodes.PostInc(a)[source]
-
ctree.c.nodes.PreDec(a)[source]
-
ctree.c.nodes.PreInc(a)[source]
-
ctree.c.nodes.Ref(a)[source]
-
class ctree.c.nodes.Return(value=None)[source]
Bases: ctree.c.nodes.Statement
Section B.2.3 6.6.6 line 4.
-
ctree.c.nodes.SizeOf(a)[source]
-
class ctree.c.nodes.Statement[source]
Bases: ctree.c.nodes.CNode
Section B.2.3 6.6.
-
class ctree.c.nodes.String(*values)[source]
Bases: ctree.c.nodes.Literal
Cite me.
-
ctree.c.nodes.Sub(a, b=None)[source]
-
ctree.c.nodes.SubAssign(a, b)[source]
-
class ctree.c.nodes.SymbolRef(name=None, sym_type=None, _global=False, _local=False, _const=False)[source]
Bases: ctree.c.nodes.Literal
Cite me.
-
copy(declare=False)[source]
-
set_const(value=True)[source]
-
set_global(value=True)[source]
-
set_local(value=True)[source]
-
classmethod unique(name='name', sym_type=None)[source]
Factory for making unique symbols.
-
class ctree.c.nodes.TernaryOp(cond=None, then=None, elze=None)[source]
Bases: ctree.c.nodes.Expression
Cite me.
-
class ctree.c.nodes.UnaryOp(op=None, arg=None)[source]
Bases: ctree.c.nodes.Expression
Cite me.
-
class ctree.c.nodes.While(cond=None, body=None)[source]
Bases: ctree.c.nodes.Statement
Cite me.
Module contents