- 3.0.1 core module.
cpp.ast.AstBuilder Class Reference
Inheritance diagram for cpp.ast.AstBuilder:

Public Member Functions

def __init__ (self, token_stream, filename, in_class='', visibility=None, namespace_stack=[])
 
def HandleError (self, msg, token)
 
def Generate (self)
 
def GetScope (self)
 
def GetName (self, seq=None)
 
def GetMethod (self, modifiers, templated_types)
 
def handle_bool (self)
 
def handle_char (self)
 
def handle_int (self)
 
def handle_long (self)
 
def handle_short (self)
 
def handle_double (self)
 
def handle_float (self)
 
def handle_void (self)
 
def handle_wchar_t (self)
 
def handle_unsigned (self)
 
def handle_signed (self)
 
def handle_struct (self)
 
def handle_union (self)
 
def handle_enum (self)
 
def handle_auto (self)
 
def handle_register (self)
 
def handle_const (self)
 
def handle_inline (self)
 
def handle_extern (self)
 
def handle_static (self)
 
def handle_virtual (self)
 
def handle_volatile (self)
 
def handle_mutable (self)
 
def handle_public (self)
 
def handle_protected (self)
 
def handle_private (self)
 
def handle_friend (self)
 
def handle_static_cast (self)
 
def handle_const_cast (self)
 
def handle_dynamic_cast (self)
 
def handle_reinterpret_cast (self)
 
def handle_new (self)
 
def handle_delete (self)
 
def handle_typedef (self)
 
def handle_typeid (self)
 
def handle_typename (self)
 
def handle_template (self)
 
def handle_true (self)
 
def handle_false (self)
 
def handle_asm (self)
 
def handle_class (self)
 
def handle_namespace (self)
 
def handle_using (self)
 
def handle_explicit (self)
 
def handle_this (self)
 
def handle_operator (self)
 
def handle_sizeof (self)
 
def handle_case (self)
 
def handle_switch (self)
 
def handle_default (self)
 
def handle_if (self)
 
def handle_else (self)
 
def handle_return (self)
 
def handle_goto (self)
 
def handle_try (self)
 
def handle_catch (self)
 
def handle_throw (self)
 
def handle_while (self)
 
def handle_do (self)
 
def handle_for (self)
 
def handle_break (self)
 
def handle_continue (self)
 

Public Attributes

 tokens
 
 filename
 
 token_queue
 
 namespace_stack
 
 in_class
 
 in_class_name_only
 
 visibility
 
 in_function
 
 current_token
 
 converter
 

Constructor & Destructor Documentation

def cpp.ast.AstBuilder.__init__ (   self,
  token_stream,
  filename,
  in_class = '',
  visibility = None,
  namespace_stack = [] 
)

Member Function Documentation

def cpp.ast.AstBuilder.Generate (   self)

References cpp.ast.AstBuilder._AddBackToken(), cpp.ast.AstBuilder._AddBackTokens(), cpp.ast.AstBuilder._CreateVariable(), cpp.ast.AstBuilder._GenerateOne(), cpp.ast.AstBuilder._GetMatchingChar(), cpp.ast.AstBuilder._GetMethod(), cpp.ast.AstBuilder._GetNextToken(), cpp.ast.AstBuilder._GetTokensUpTo(), cpp.ast.AstBuilder._GetVarTokensUpTo(), cpp.ast.AstBuilder._SkipIf0Blocks(), cpp.ast.AstBuilder.current_token, cpp.ast.AstBuilder.HandleError(), cpp.ast.Method.in_class, cpp.ast.AstBuilder.in_class, cpp.ast.AstBuilder.in_class_name_only, cpp.ast.TypeConverter.namespace_stack, and cpp.ast.AstBuilder.namespace_stack.

def cpp.ast.AstBuilder.GetScope (   self)
def cpp.ast.AstBuilder.GetName (   self,
  seq = None 
)
Returns ([tokens], next_token_info).

References cpp.ast.AstBuilder._GetMatchingChar(), cpp.ast.AstBuilder._GetNextToken(), and cpp.ast.next().

Referenced by cpp.ast.AstBuilder.GetMethod(), cpp.ast.AstBuilder.handle_class(), cpp.ast.AstBuilder.handle_namespace(), cpp.ast.AstBuilder.handle_struct(), and cpp.ast.AstBuilder.handle_typename().

def cpp.ast.AstBuilder.GetMethod (   self,
  modifiers,
  templated_types 
)

References cpp.ast.AstBuilder._CreateVariable(), cpp.ast.AstBuilder._GetMatchingChar(), cpp.ast.AstBuilder._GetMethod(), cpp.ast.AstBuilder._GetNextToken(), cpp.ast.AstBuilder._GetParameters(), cpp.ast.AstBuilder._GetReturnTypeAndClassName(), cpp.ast.AstBuilder._GetTokensUpTo(), cpp.ast.AstBuilder.GetName(), cpp.ast.AstBuilder.GetScope(), cpp.ast.AstBuilder.HandleError(), cpp.ast.Method.in_class, cpp.ast.AstBuilder.in_class, cpp.ast.TypeConverter.namespace_stack, and cpp.ast.AstBuilder.namespace_stack.

Referenced by cpp.ast.AstBuilder.handle_class(), cpp.ast.AstBuilder.handle_explicit(), and cpp.ast.AstBuilder.handle_template().

def cpp.ast.AstBuilder.handle_bool (   self)
def cpp.ast.AstBuilder.handle_char (   self)
def cpp.ast.AstBuilder.handle_int (   self)
def cpp.ast.AstBuilder.handle_long (   self)
def cpp.ast.AstBuilder.handle_short (   self)
def cpp.ast.AstBuilder.handle_double (   self)
def cpp.ast.AstBuilder.handle_float (   self)
def cpp.ast.AstBuilder.handle_void (   self)
def cpp.ast.AstBuilder.handle_wchar_t (   self)
def cpp.ast.AstBuilder.handle_unsigned (   self)
def cpp.ast.AstBuilder.handle_signed (   self)
def cpp.ast.AstBuilder.handle_struct (   self)

References cpp.ast.AstBuilder._AddBackToken(), cpp.ast.AstBuilder._AddBackTokens(), cpp.ast.AstBuilder._CreateVariable(), cpp.ast.AstBuilder._GetClass(), cpp.ast.AstBuilder._GetMethod(), cpp.ast.AstBuilder._GetNextToken(), cpp.ast.AstBuilder._handling_typedef, and cpp.ast.AstBuilder.GetName().

def cpp.ast.AstBuilder.handle_union (   self)

References cpp.ast.AstBuilder._GetNestedType().

def cpp.ast.AstBuilder.handle_enum (   self)

References cpp.ast.AstBuilder._AddBackToken(), cpp.ast.AstBuilder._GetNestedType(), and cpp.ast.AstBuilder._GetNextToken().

def cpp.ast.AstBuilder.handle_auto (   self)
def cpp.ast.AstBuilder.handle_register (   self)
def cpp.ast.AstBuilder.handle_const (   self)
def cpp.ast.AstBuilder.handle_inline (   self)
def cpp.ast.AstBuilder.handle_extern (   self)
def cpp.ast.AstBuilder.handle_static (   self)
def cpp.ast.AstBuilder.handle_virtual (   self)
def cpp.ast.AstBuilder.handle_volatile (   self)
def cpp.ast.AstBuilder.handle_mutable (   self)
def cpp.ast.AstBuilder.handle_public (   self)
def cpp.ast.AstBuilder.handle_protected (   self)
def cpp.ast.AstBuilder.handle_private (   self)
def cpp.ast.AstBuilder.handle_friend (   self)

References cpp.ast.AstBuilder._GetTokensUpTo(), cpp.ast.TypeConverter.namespace_stack, and cpp.ast.AstBuilder.namespace_stack.

Referenced by cpp.ast.AstBuilder.handle_template().

def cpp.ast.AstBuilder.handle_static_cast (   self)
def cpp.ast.AstBuilder.handle_const_cast (   self)
def cpp.ast.AstBuilder.handle_dynamic_cast (   self)
def cpp.ast.AstBuilder.handle_reinterpret_cast (   self)
def cpp.ast.AstBuilder.handle_new (   self)
def cpp.ast.AstBuilder.handle_delete (   self)
def cpp.ast.AstBuilder.handle_typedef (   self)

References cpp.ast.AstBuilder._GetNextToken(), cpp.ast.AstBuilder._GetTokensUpTo(), cpp.ast.AstBuilder._handling_typedef, cpp.ast.TypeConverter.namespace_stack, and cpp.ast.AstBuilder.namespace_stack.

def cpp.ast.AstBuilder.handle_typeid (   self)
def cpp.ast.AstBuilder.handle_typename (   self)

References cpp.ast.AstBuilder._GetMatchingChar(), and cpp.ast.AstBuilder.GetName().

def cpp.ast.AstBuilder.handle_template (   self)

References cpp.ast.AstBuilder._AddBackToken(), cpp.ast.AstBuilder._AddBackTokens(), cpp.ast.AstBuilder._GetClass(), cpp.ast.AstBuilder._GetNextToken(), cpp.ast.AstBuilder._GetTemplatedTypes(), cpp.ast.AstBuilder._GetVarTokensUpTo(), cpp.ast.AstBuilder.GetMethod(), and cpp.ast.AstBuilder.handle_friend().

def cpp.ast.AstBuilder.handle_true (   self)
def cpp.ast.AstBuilder.handle_false (   self)
def cpp.ast.AstBuilder.handle_asm (   self)
def cpp.ast.AstBuilder.handle_class (   self)

References cpp.ast.AstBuilder._AddBackToken(), cpp.ast.AstBuilder._AddBackTokens(), cpp.ast.AstBuilder._CreateVariable(), cpp.ast.AstBuilder._GetBases(), cpp.ast.AstBuilder._GetClass(), cpp.ast.AstBuilder._GetNextToken(), cpp.ast.AstBuilder._handling_typedef, cpp.ast.Include.filename, cpp.ast.AstBuilder.filename, cpp.ast.AstBuilder.GetMethod(), cpp.ast.AstBuilder.GetName(), cpp.ast.AstBuilder.GetScope(), cpp.ast.AstBuilder.HandleError(), cpp.ast.TypeConverter.namespace_stack, and cpp.ast.AstBuilder.namespace_stack.

def cpp.ast.AstBuilder.handle_namespace (   self)

References cpp.ast.AstBuilder._AddBackToken(), cpp.ast.AstBuilder._AddBackTokens(), cpp.ast.AstBuilder._GetNextToken(), cpp.ast.AstBuilder.GetName(), and cpp.ast.AstBuilder.GetScope().

def cpp.ast.AstBuilder.handle_using (   self)

References cpp.ast.AstBuilder._GetTokensUpTo().

def cpp.ast.AstBuilder.handle_explicit (   self)
def cpp.ast.AstBuilder.handle_this (   self)
def cpp.ast.AstBuilder.handle_operator (   self)
def cpp.ast.AstBuilder.handle_sizeof (   self)
def cpp.ast.AstBuilder.handle_case (   self)
def cpp.ast.AstBuilder.handle_switch (   self)
def cpp.ast.AstBuilder.handle_default (   self)
def cpp.ast.AstBuilder.handle_if (   self)
def cpp.ast.AstBuilder.handle_else (   self)
def cpp.ast.AstBuilder.handle_return (   self)
def cpp.ast.AstBuilder.handle_goto (   self)

References cpp.ast.AstBuilder._GetTokensUpTo().

def cpp.ast.AstBuilder.handle_try (   self)
def cpp.ast.AstBuilder.handle_catch (   self)
def cpp.ast.AstBuilder.handle_throw (   self)
def cpp.ast.AstBuilder.handle_while (   self)
def cpp.ast.AstBuilder.handle_do (   self)
def cpp.ast.AstBuilder.handle_for (   self)
def cpp.ast.AstBuilder.handle_break (   self)
def cpp.ast.AstBuilder.handle_continue (   self)

References cpp.ast.AstBuilder._IgnoreUpTo().

Member Data Documentation

cpp.ast.AstBuilder.tokens
cpp.ast.AstBuilder.filename
cpp.ast.AstBuilder.token_queue
cpp.ast.AstBuilder.in_class_name_only
cpp.ast.AstBuilder.visibility
cpp.ast.AstBuilder.in_function
cpp.ast.AstBuilder.current_token
cpp.ast.AstBuilder.converter

The documentation for this class was generated from the following file: