Monero
Loading...
Searching...
No Matches
cpp.ast.AstBuilder Class Reference
Inheritance diagram for cpp.ast.AstBuilder:
Collaboration diagram for cpp.ast.AstBuilder:

Public Member Functions

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

Public Attributes

 tokens = token_stream
 filename = filename
list token_queue = []
 namespace_stack = namespace_stack[:]
 in_class = in_class
 in_class_name_only = None
 visibility = visibility
bool in_function = False
 current_token = None
 converter = TypeConverter(self.namespace_stack)

Protected Member Functions

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

Protected Attributes

bool _handling_typedef = False

Constructor & Destructor Documentation

◆ __init__()

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

Member Function Documentation

◆ _AddBackToken()

cpp.ast.AstBuilder._AddBackToken ( self,
token )
protected

◆ _AddBackTokens()

cpp.ast.AstBuilder._AddBackTokens ( self,
tokens )
protected

◆ _CreateVariable()

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

◆ _GenerateOne()

cpp.ast.AstBuilder._GenerateOne ( self,
token )
protected

◆ _GetBases()

cpp.ast.AstBuilder._GetBases ( self)
protected

◆ _GetClass()

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

◆ _GetMatchingChar()

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

◆ _GetMethod()

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

◆ _GetNestedType()

cpp.ast.AstBuilder._GetNestedType ( self,
ctor )
protected

◆ _GetNextToken()

cpp.ast.AstBuilder._GetNextToken ( self)
protected

◆ _GetParameters()

cpp.ast.AstBuilder._GetParameters ( self)
protected

◆ _GetReturnTypeAndClassName()

cpp.ast.AstBuilder._GetReturnTypeAndClassName ( self,
token_seq )
protected

◆ _GetTemplatedTypes()

cpp.ast.AstBuilder._GetTemplatedTypes ( self)
protected

◆ _GetTokensUpTo()

cpp.ast.AstBuilder._GetTokensUpTo ( self,
expected_token_type,
expected_token )
protected

◆ _GetVarTokensUpTo()

cpp.ast.AstBuilder._GetVarTokensUpTo ( self,
expected_token_type,
* expected_tokens )
protected

◆ _IgnoreUpTo()

cpp.ast.AstBuilder._IgnoreUpTo ( self,
token_type,
token )
protected

◆ _SkipIf0Blocks()

cpp.ast.AstBuilder._SkipIf0Blocks ( self)
protected

◆ Generate()

cpp.ast.AstBuilder.Generate ( self)

◆ GetMethod()

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

◆ GetName()

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

◆ GetScope()

cpp.ast.AstBuilder.GetScope ( self)

◆ handle_asm()

cpp.ast.AstBuilder.handle_asm ( self)

◆ handle_auto()

cpp.ast.AstBuilder.handle_auto ( self)

◆ handle_bool()

cpp.ast.AstBuilder.handle_bool ( self)

◆ handle_break()

cpp.ast.AstBuilder.handle_break ( self)

◆ handle_case()

cpp.ast.AstBuilder.handle_case ( self)

◆ handle_catch()

cpp.ast.AstBuilder.handle_catch ( self)

◆ handle_char()

cpp.ast.AstBuilder.handle_char ( self)

◆ handle_class()

cpp.ast.AstBuilder.handle_class ( self)

◆ handle_const()

cpp.ast.AstBuilder.handle_const ( self)

◆ handle_const_cast()

cpp.ast.AstBuilder.handle_const_cast ( self)

◆ handle_continue()

cpp.ast.AstBuilder.handle_continue ( self)

◆ handle_default()

cpp.ast.AstBuilder.handle_default ( self)

◆ handle_delete()

cpp.ast.AstBuilder.handle_delete ( self)

◆ handle_do()

cpp.ast.AstBuilder.handle_do ( self)

◆ handle_double()

cpp.ast.AstBuilder.handle_double ( self)

◆ handle_dynamic_cast()

cpp.ast.AstBuilder.handle_dynamic_cast ( self)

◆ handle_else()

cpp.ast.AstBuilder.handle_else ( self)

◆ handle_enum()

cpp.ast.AstBuilder.handle_enum ( self)

◆ handle_explicit()

cpp.ast.AstBuilder.handle_explicit ( self)

◆ handle_extern()

cpp.ast.AstBuilder.handle_extern ( self)

◆ handle_false()

cpp.ast.AstBuilder.handle_false ( self)

◆ handle_float()

cpp.ast.AstBuilder.handle_float ( self)

◆ handle_for()

cpp.ast.AstBuilder.handle_for ( self)

◆ handle_friend()

cpp.ast.AstBuilder.handle_friend ( self)

◆ handle_goto()

cpp.ast.AstBuilder.handle_goto ( self)

◆ handle_if()

cpp.ast.AstBuilder.handle_if ( self)

◆ handle_inline()

cpp.ast.AstBuilder.handle_inline ( self)

◆ handle_int()

cpp.ast.AstBuilder.handle_int ( self)

◆ handle_long()

cpp.ast.AstBuilder.handle_long ( self)

◆ handle_mutable()

cpp.ast.AstBuilder.handle_mutable ( self)

◆ handle_namespace()

cpp.ast.AstBuilder.handle_namespace ( self)

◆ handle_new()

cpp.ast.AstBuilder.handle_new ( self)

◆ handle_operator()

cpp.ast.AstBuilder.handle_operator ( self)

◆ handle_private()

cpp.ast.AstBuilder.handle_private ( self)

◆ handle_protected()

cpp.ast.AstBuilder.handle_protected ( self)

◆ handle_public()

cpp.ast.AstBuilder.handle_public ( self)

◆ handle_register()

cpp.ast.AstBuilder.handle_register ( self)

◆ handle_reinterpret_cast()

cpp.ast.AstBuilder.handle_reinterpret_cast ( self)

◆ handle_return()

cpp.ast.AstBuilder.handle_return ( self)

◆ handle_short()

cpp.ast.AstBuilder.handle_short ( self)

◆ handle_signed()

cpp.ast.AstBuilder.handle_signed ( self)

◆ handle_sizeof()

cpp.ast.AstBuilder.handle_sizeof ( self)

◆ handle_static()

cpp.ast.AstBuilder.handle_static ( self)

◆ handle_static_cast()

cpp.ast.AstBuilder.handle_static_cast ( self)

◆ handle_struct()

cpp.ast.AstBuilder.handle_struct ( self)

◆ handle_switch()

cpp.ast.AstBuilder.handle_switch ( self)

◆ handle_template()

cpp.ast.AstBuilder.handle_template ( self)

◆ handle_this()

cpp.ast.AstBuilder.handle_this ( self)

◆ handle_throw()

cpp.ast.AstBuilder.handle_throw ( self)

◆ handle_true()

cpp.ast.AstBuilder.handle_true ( self)

◆ handle_try()

cpp.ast.AstBuilder.handle_try ( self)

◆ handle_typedef()

cpp.ast.AstBuilder.handle_typedef ( self)

◆ handle_typeid()

cpp.ast.AstBuilder.handle_typeid ( self)

◆ handle_typename()

cpp.ast.AstBuilder.handle_typename ( self)

◆ handle_union()

cpp.ast.AstBuilder.handle_union ( self)

◆ handle_unsigned()

cpp.ast.AstBuilder.handle_unsigned ( self)

◆ handle_using()

cpp.ast.AstBuilder.handle_using ( self)

◆ handle_virtual()

cpp.ast.AstBuilder.handle_virtual ( self)

◆ handle_void()

cpp.ast.AstBuilder.handle_void ( self)

◆ handle_volatile()

cpp.ast.AstBuilder.handle_volatile ( self)

◆ handle_wchar_t()

cpp.ast.AstBuilder.handle_wchar_t ( self)

◆ handle_while()

cpp.ast.AstBuilder.handle_while ( self)

◆ HandleError()

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

Member Data Documentation

◆ _handling_typedef

cpp.ast.AstBuilder._handling_typedef = False
protected

◆ converter

cpp.ast.AstBuilder.converter = TypeConverter(self.namespace_stack)

◆ current_token

cpp.ast.AstBuilder.current_token = None

◆ filename

cpp.ast.AstBuilder.filename = filename

◆ in_class

cpp.ast.AstBuilder.in_class = in_class

◆ in_class_name_only

cpp.ast.AstBuilder.in_class_name_only = None

◆ in_function

bool cpp.ast.AstBuilder.in_function = False

◆ namespace_stack

cpp.ast.AstBuilder.namespace_stack = namespace_stack[:]

◆ token_queue

list cpp.ast.AstBuilder.token_queue = []

◆ tokens

cpp.ast.AstBuilder.tokens = token_stream

◆ visibility

cpp.ast.AstBuilder.visibility = visibility

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