Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
cpp.ast.AstBuilder Class Reference
Inheritance diagram for cpp.ast.AstBuilder:
Inheritance graph
[legend]

Public Member Functions

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

Public Attributes

 converter
 
 current_token
 
 filename
 
 in_class
 
 in_class_name_only
 
 in_function
 
 namespace_stack
 
 token_queue
 
 tokens
 
 visibility
 

Private Member Functions

def _AddBackToken (self, token)
 
def _AddBackTokens (self, tokens)
 
def _CreateVariable (self, pos_token, name, type_name, type_modifiers, ref_pointer_name_seq, templated_types, value=None)
 
def _GenerateOne (self, token)
 
def _GetBases (self)
 
def _GetClass (self, class_type, visibility, templated_types)
 
def _GetMatchingChar (self, open_paren, close_paren, GetNextToken=None)
 
def _GetMethod (self, return_type_and_name, modifiers, templated_types, get_paren)
 
def _GetNestedType (self, ctor)
 
def _GetNextToken (self)
 
def _GetParameters (self)
 
def _GetReturnTypeAndClassName (self, token_seq)
 
def _GetTemplatedTypes (self)
 
def _GetTokensUpTo (self, expected_token_type, expected_token)
 
def _GetVarTokensUpTo (self, expected_token_type, *expected_tokens)
 
def _IgnoreUpTo (self, token_type, token)
 
def _SkipIf0Blocks (self)
 

Private Attributes

 _handling_typedef
 

Detailed Description

Definition at line 676 of file ast.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 677 of file ast.py.

Member Function Documentation

◆ _AddBackToken()

def cpp.ast.AstBuilder._AddBackToken (   self,
  token 
)
private

Definition at line 910 of file ast.py.

◆ _AddBackTokens()

def cpp.ast.AstBuilder._AddBackTokens (   self,
  tokens 
)
private

Definition at line 918 of file ast.py.

◆ _CreateVariable()

def cpp.ast.AstBuilder._CreateVariable (   self,
  pos_token,
  name,
  type_name,
  type_modifiers,
  ref_pointer_name_seq,
  templated_types,
  value = None 
)
private

Definition at line 727 of file ast.py.

◆ _GenerateOne()

def cpp.ast.AstBuilder._GenerateOne (   self,
  token 
)
private

Definition at line 738 of file ast.py.

◆ _GetBases()

def cpp.ast.AstBuilder._GetBases (   self)
private

Definition at line 1460 of file ast.py.

◆ _GetClass()

def cpp.ast.AstBuilder._GetClass (   self,
  class_type,
  visibility,
  templated_types 
)
private

Definition at line 1492 of file ast.py.

◆ _GetMatchingChar()

def cpp.ast.AstBuilder._GetMatchingChar (   self,
  open_paren,
  close_paren,
  GetNextToken = None 
)
private

Definition at line 880 of file ast.py.

◆ _GetMethod()

def cpp.ast.AstBuilder._GetMethod (   self,
  return_type_and_name,
  modifiers,
  templated_types,
  get_paren 
)
private

Definition at line 959 of file ast.py.

◆ _GetNestedType()

def cpp.ast.AstBuilder._GetNestedType (   self,
  ctor 
)
private

Definition at line 1193 of file ast.py.

◆ _GetNextToken()

def cpp.ast.AstBuilder._GetNextToken (   self)
private

Definition at line 905 of file ast.py.

◆ _GetParameters()

def cpp.ast.AstBuilder._GetParameters (   self)
private

Definition at line 899 of file ast.py.

◆ _GetReturnTypeAndClassName()

def cpp.ast.AstBuilder._GetReturnTypeAndClassName (   self,
  token_seq 
)
private

Definition at line 1116 of file ast.py.

◆ _GetTemplatedTypes()

def cpp.ast.AstBuilder._GetTemplatedTypes (   self)
private

Definition at line 1398 of file ast.py.

◆ _GetTokensUpTo()

def cpp.ast.AstBuilder._GetTokensUpTo (   self,
  expected_token_type,
  expected_token 
)
private

Definition at line 849 of file ast.py.

◆ _GetVarTokensUpTo()

def cpp.ast.AstBuilder._GetVarTokensUpTo (   self,
  expected_token_type,
expected_tokens 
)
private

Definition at line 852 of file ast.py.

◆ _IgnoreUpTo()

def cpp.ast.AstBuilder._IgnoreUpTo (   self,
  token_type,
  token 
)
private

Definition at line 862 of file ast.py.

◆ _SkipIf0Blocks()

def cpp.ast.AstBuilder._SkipIf0Blocks (   self)
private

Definition at line 865 of file ast.py.

◆ Generate()

def cpp.ast.AstBuilder.Generate (   self)

Definition at line 704 of file ast.py.

◆ GetMethod()

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

Definition at line 953 of file ast.py.

◆ GetName()

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

Definition at line 928 of file ast.py.

◆ GetScope()

def cpp.ast.AstBuilder.GetScope (   self)

Definition at line 902 of file ast.py.

◆ handle_asm()

def cpp.ast.AstBuilder.handle_asm (   self)

Definition at line 1454 of file ast.py.

◆ handle_auto()

def cpp.ast.AstBuilder.handle_auto (   self)

Definition at line 1272 of file ast.py.

◆ handle_bool()

def cpp.ast.AstBuilder.handle_bool (   self)

Definition at line 1160 of file ast.py.

◆ handle_break()

def cpp.ast.AstBuilder.handle_break (   self)

Definition at line 1659 of file ast.py.

◆ handle_case()

def cpp.ast.AstBuilder.handle_case (   self)

Definition at line 1613 of file ast.py.

◆ handle_catch()

def cpp.ast.AstBuilder.handle_catch (   self)

Definition at line 1644 of file ast.py.

◆ handle_char()

def cpp.ast.AstBuilder.handle_char (   self)

Definition at line 1163 of file ast.py.

◆ handle_class()

def cpp.ast.AstBuilder.handle_class (   self)

Definition at line 1457 of file ast.py.

◆ handle_const()

def cpp.ast.AstBuilder.handle_const (   self)

Definition at line 1280 of file ast.py.

◆ handle_const_cast()

def cpp.ast.AstBuilder.handle_const_cast (   self)

Definition at line 1335 of file ast.py.

◆ handle_continue()

def cpp.ast.AstBuilder.handle_continue (   self)

Definition at line 1662 of file ast.py.

◆ handle_default()

def cpp.ast.AstBuilder.handle_default (   self)

Definition at line 1619 of file ast.py.

◆ handle_delete()

def cpp.ast.AstBuilder.handle_delete (   self)

Definition at line 1347 of file ast.py.

◆ handle_do()

def cpp.ast.AstBuilder.handle_do (   self)

Definition at line 1653 of file ast.py.

◆ handle_double()

def cpp.ast.AstBuilder.handle_double (   self)

Definition at line 1175 of file ast.py.

◆ handle_dynamic_cast()

def cpp.ast.AstBuilder.handle_dynamic_cast (   self)

Definition at line 1338 of file ast.py.

◆ handle_else()

def cpp.ast.AstBuilder.handle_else (   self)

Definition at line 1627 of file ast.py.

◆ handle_enum()

def cpp.ast.AstBuilder.handle_enum (   self)

Definition at line 1266 of file ast.py.

◆ handle_explicit()

def cpp.ast.AstBuilder.handle_explicit (   self)

Definition at line 1596 of file ast.py.

◆ handle_extern()

def cpp.ast.AstBuilder.handle_extern (   self)

Definition at line 1286 of file ast.py.

◆ handle_false()

def cpp.ast.AstBuilder.handle_false (   self)

Definition at line 1451 of file ast.py.

◆ handle_float()

def cpp.ast.AstBuilder.handle_float (   self)

Definition at line 1178 of file ast.py.

◆ handle_for()

def cpp.ast.AstBuilder.handle_for (   self)

Definition at line 1656 of file ast.py.

◆ handle_friend()

def cpp.ast.AstBuilder.handle_friend (   self)

Definition at line 1326 of file ast.py.

◆ handle_goto()

def cpp.ast.AstBuilder.handle_goto (   self)

Definition at line 1636 of file ast.py.

◆ handle_if()

def cpp.ast.AstBuilder.handle_if (   self)

Definition at line 1624 of file ast.py.

◆ handle_inline()

def cpp.ast.AstBuilder.handle_inline (   self)

Definition at line 1283 of file ast.py.

◆ handle_int()

def cpp.ast.AstBuilder.handle_int (   self)

Definition at line 1166 of file ast.py.

◆ handle_long()

def cpp.ast.AstBuilder.handle_long (   self)

Definition at line 1169 of file ast.py.

◆ handle_mutable()

def cpp.ast.AstBuilder.handle_mutable (   self)

Definition at line 1311 of file ast.py.

◆ handle_namespace()

def cpp.ast.AstBuilder.handle_namespace (   self)

Definition at line 1564 of file ast.py.

◆ handle_new()

def cpp.ast.AstBuilder.handle_new (   self)

Definition at line 1344 of file ast.py.

◆ handle_operator()

def cpp.ast.AstBuilder.handle_operator (   self)

Definition at line 1606 of file ast.py.

◆ handle_private()

def cpp.ast.AstBuilder.handle_private (   self)

Definition at line 1322 of file ast.py.

◆ handle_protected()

def cpp.ast.AstBuilder.handle_protected (   self)

Definition at line 1318 of file ast.py.

◆ handle_public()

def cpp.ast.AstBuilder.handle_public (   self)

Definition at line 1314 of file ast.py.

◆ handle_register()

def cpp.ast.AstBuilder.handle_register (   self)

Definition at line 1277 of file ast.py.

◆ handle_reinterpret_cast()

def cpp.ast.AstBuilder.handle_reinterpret_cast (   self)

Definition at line 1341 of file ast.py.

◆ handle_return()

def cpp.ast.AstBuilder.handle_return (   self)

Definition at line 1630 of file ast.py.

◆ handle_short()

def cpp.ast.AstBuilder.handle_short (   self)

Definition at line 1172 of file ast.py.

◆ handle_signed()

def cpp.ast.AstBuilder.handle_signed (   self)

Definition at line 1190 of file ast.py.

◆ handle_sizeof()

def cpp.ast.AstBuilder.handle_sizeof (   self)

Definition at line 1610 of file ast.py.

◆ handle_static()

def cpp.ast.AstBuilder.handle_static (   self)

Definition at line 1289 of file ast.py.

◆ handle_static_cast()

def cpp.ast.AstBuilder.handle_static_cast (   self)

Definition at line 1332 of file ast.py.

◆ handle_struct()

def cpp.ast.AstBuilder.handle_struct (   self)

Definition at line 1227 of file ast.py.

◆ handle_switch()

def cpp.ast.AstBuilder.handle_switch (   self)

Definition at line 1616 of file ast.py.

◆ handle_template()

def cpp.ast.AstBuilder.handle_template (   self)

Definition at line 1425 of file ast.py.

◆ handle_this()

def cpp.ast.AstBuilder.handle_this (   self)

Definition at line 1603 of file ast.py.

◆ handle_throw()

def cpp.ast.AstBuilder.handle_throw (   self)

Definition at line 1647 of file ast.py.

◆ handle_true()

def cpp.ast.AstBuilder.handle_true (   self)

Definition at line 1448 of file ast.py.

◆ handle_try()

def cpp.ast.AstBuilder.handle_try (   self)

Definition at line 1641 of file ast.py.

◆ handle_typedef()

def cpp.ast.AstBuilder.handle_typedef (   self)

Definition at line 1352 of file ast.py.

◆ handle_typeid()

def cpp.ast.AstBuilder.handle_typeid (   self)

Definition at line 1392 of file ast.py.

◆ handle_typename()

def cpp.ast.AstBuilder.handle_typename (   self)

Definition at line 1395 of file ast.py.

◆ handle_union()

def cpp.ast.AstBuilder.handle_union (   self)

Definition at line 1263 of file ast.py.

◆ handle_unsigned()

def cpp.ast.AstBuilder.handle_unsigned (   self)

Definition at line 1187 of file ast.py.

◆ handle_using()

def cpp.ast.AstBuilder.handle_using (   self)

Definition at line 1591 of file ast.py.

◆ handle_virtual()

def cpp.ast.AstBuilder.handle_virtual (   self)

Definition at line 1292 of file ast.py.

◆ handle_void()

def cpp.ast.AstBuilder.handle_void (   self)

Definition at line 1181 of file ast.py.

◆ handle_volatile()

def cpp.ast.AstBuilder.handle_volatile (   self)

Definition at line 1308 of file ast.py.

◆ handle_wchar_t()

def cpp.ast.AstBuilder.handle_wchar_t (   self)

Definition at line 1184 of file ast.py.

◆ handle_while()

def cpp.ast.AstBuilder.handle_while (   self)

Definition at line 1650 of file ast.py.

◆ HandleError()

def cpp.ast.AstBuilder.HandleError (   self,
  msg,
  token 
)

Definition at line 699 of file ast.py.

Member Data Documentation

◆ _handling_typedef

cpp.ast.AstBuilder._handling_typedef
private

Definition at line 694 of file ast.py.

◆ converter

cpp.ast.AstBuilder.converter

Definition at line 696 of file ast.py.

◆ current_token

cpp.ast.AstBuilder.current_token

Definition at line 692 of file ast.py.

◆ filename

cpp.ast.AstBuilder.filename

Definition at line 679 of file ast.py.

◆ in_class

cpp.ast.AstBuilder.in_class

Definition at line 685 of file ast.py.

◆ in_class_name_only

cpp.ast.AstBuilder.in_class_name_only

Definition at line 687 of file ast.py.

◆ in_function

cpp.ast.AstBuilder.in_function

Definition at line 691 of file ast.py.

◆ namespace_stack

cpp.ast.AstBuilder.namespace_stack

Definition at line 684 of file ast.py.

◆ token_queue

cpp.ast.AstBuilder.token_queue

Definition at line 683 of file ast.py.

◆ tokens

cpp.ast.AstBuilder.tokens

Definition at line 678 of file ast.py.

◆ visibility

cpp.ast.AstBuilder.visibility

Definition at line 690 of file ast.py.


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


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:08