PUMA Library Reference Manual
Loading...
Searching...
No Matches
Puma::CCSemantic Class Reference

#include <CCSemantic.h>

Inheritance diagram for Puma::CCSemantic:

Public Types

enum  MemberAccessOperator {
  MAO_NONE = 0 ,
  MAO_PTS ,
  MAO_DOT
}

Public Member Functions

 CCSemantic (CCSyntax &, CCBuilder &)
void init (CSemDatabase &, Unit &)
 Initialize the semantic analysis.
void init (CSemDatabase &, Unit &, CStructure *, bool, bool, CCInstantiation *)
CCInstantiation * Instantiation () const
virtual CTree * access_spec ()
virtual CTree * typedef_name ()
virtual CTree * class_name ()
virtual CTree * enum_name ()
virtual CTree * condition ()
virtual CTree * colon_colon ()
virtual CTree * decl_spec_seq1 ()
virtual CTree * nested_name_spec ()
virtual CTree * nested_name_spec1 ()
virtual CTree * valid_id_expr ()
virtual CTree * postfix_expr1 ()
virtual CTree * postfix_expr2 ()
virtual CTree * pseudo_dtor_name ()
virtual CTree * simple_type_spec ()
virtual CTree * direct_new_declarator ()
virtual CTree * class_spec_err ()
virtual CTree * member_decl1 ()
virtual CTree * member_declarator_err ()
virtual void declarator_id (bool)
virtual CTree * finish_init_declarator ()
virtual CTree * obj_decl (CTree *)
virtual bool implicit_int ()
virtual CTree * init_declarator ()
virtual CTree * const_expr ()
virtual CTree * enumerator_def ()
virtual CTree * pure_spec ()
virtual CTree * const_init ()
virtual CTree * template_param ()
virtual CTree * class_spec ()
virtual CTree * ctor_init ()
virtual CTree * handler ()
virtual CTree * exception_spec ()
virtual CTree * introduce_orig_ns ()
virtual CTree * introduce_ns_extension ()
virtual CTree * introduce_unnamed_ns ()
virtual CTree * introduce_ns_alias ()
virtual CTree * namespace_def ()
virtual CTree * original_ns_name ()
virtual CTree * namespace_alias ()
virtual CTree * using_directive ()
virtual CTree * using_decl ()
virtual CTree * access_decl (CTree *=0)
virtual CTree * introduce_type_param ()
virtual CTree * introduce_non_type_param ()
virtual CTree * introduce_template_instance ()
virtual CTree * template_param_list ()
virtual CTree * template_decl ()
virtual CTree * template_name (bool class_only=false)
virtual CTree * template_key ()
virtual CTree * explicit_instantiation ()
virtual CTree * explicit_specialization ()
virtual CTree * introduce_enum ()
virtual CTree * introduce_enumerator ()
virtual CTree * introduce_object (CTree *=0)
virtual CTree * introduce_named_type ()
virtual CTree * introduce_function ()
virtual CTree * introduce_parameter ()
virtual CTree * introduce_class ()
virtual CTree * introduce_member ()
virtual CTree * introduce_tag ()
virtual CTree * introduce_exception ()
void enter_param_decl_clause ()
 Enter a function parameter declaration clause.
void enter_template_param_list (Syntax::State)
void enter_base_spec ()
void enter_class_def ()
void enter_template_decl ()
void enter_member_access (MemberAccessOperator)
void enter_postfix_expr ()
void enter_exception_spec ()
void enter_template_arg_list (Syntax::State)
void enter_conv_type_id ()
void enter_entity_name (bool v=true)
void enter_nested_name ()
bool enter_expr ()
void enter_extern_decl (bool block_decl)
void leave_param_decl_clause ()
 Leave a function parameter declaration clause.
void leave_template_param_list ()
void leave_base_spec ()
void leave_class_def (bool reject=false)
void leave_member_access ()
void leave_postfix_expr ()
void leave_exception_spec ()
void leave_template_arg_list ()
void leave_conv_type_id ()
void leave_entity_name ()
void leave_nested_name ()
bool leave_expr ()
void leave_extern_decl ()
bool in_base_spec () const
bool in_class_def () const
bool in_conv_type_id () const
bool in_nested_name () const
bool in_expr () const
bool in_extern_decl () const
bool is_entity_name () const
Syntax::State in_template_param_list () const
Syntax::State in_template_arg_list () const
virtual CProtection::Type protection () const
bool non_project_loc ()
bool non_primary_loc ()
bool skip_tpl_fct_bodies () const
bool reset_search_scope (bool=false)
CStructure * array_delim (CStructure *=0)
CStructure * conv_fct_id (CStructure *=0)
CTree * postfix_expr ()
virtual void parse_delayed (bool(CCSyntax::*)(), CTree *)
virtual CTree * add_base_classes ()
Public Member Functions inherited from Puma::CSemantic
 CSemantic (CSyntax &, CBuilder &)
void configure (Config &)
 Configure the semantic analysis.
virtual CTree * id_expr ()
virtual CTree * abst_declarator ()
virtual CTree * direct_abst_declarator ()
virtual CTree * param_decl_clause ()
virtual CTree * finish_fct_def ()
virtual CTree * arg_decl_seq ()
virtual CTree * decl_spec_seq_err ()
virtual CTree * declare_parameter ()
virtual CTree * identifier_list ()
virtual bool finish_param_check (bool)
virtual CTree * begin_decl ()
virtual CTree * array_delim ()
virtual CTree * trans_unit ()
virtual CTree * cmpd_stmt ()
virtual CTree * select_stmt ()
virtual CTree * iter_stmt ()
virtual void introduce_label (CTree *&)
void enter_arg_decl_seq ()
void leave_arg_decl_seq ()
void begin_param_check ()
bool in_arg_decl_seq () const
bool decl_spec_seq ()
bool empty_decl_spec_seq ()
void reenter_class_scope ()
void enter_scope (CStructure *scp)
 Enter the given scope.
void reenter_scope (CStructure *scp)
 Reenter the given scope.
void leave_scopes ()
 Leave all scopes entered up to the current scope.
Public Member Functions inherited from Puma::Semantic
void error_sink (ErrorSink &e)
 Set the error output stream object.
void undo (CTree *tree)
 Undo the declaration analysis of the given syntax tree node.
CTree * PrivateName ()
 Create a new anonymous (private) name.
void save_state ()
 Save the current semantic analysis state.
void forget_state ()
 Discard the saved semantic analysis state.
void restore_state ()
 Restore the saved semantic analysis state.
CFileInfo * getFile ()
 Get the root node of the semantic tree.
void enter_local_scope ()
 Enter a local scope.
bool in_param_decl_clause ()
 Check if in the declaration of a function parameter clause.
void finish_decl ()
 Finish the analysis of the current declaration.
void finish_declarator ()
 Finish the analysis of the current declarator.
Public Member Functions inherited from Puma::PtrStack< CObjectInfo >
 PtrStack (long size=8192, long incr=8192)
 Construct a new layered stack.
virtual ~PtrStack ()
 Destructor.
void Push (const CObjectInfo *item)
 Add a new item on the top of the current layer.
void Pop ()
 Remove the top item from the current layer.
CObjectInfo * Top () const
 Get the top item from the current layer.
long Length () const
 Get the number of items added to the current layer.
CObjectInfo * Get (long n) const
 Get the n-th item on the current layer.
void New ()
 Create a new layer.
void Forget ()
 Remove the top layer and add its items to the underlying layer.
void Reject ()
 Remove the top layer.
void Destroy ()
 Remove the top layer and delete its items.
long Stacks () const
 Get the number of layers.
void Reset ()
 Remove all layers.

Public Attributes

CStructure * search_scope
CStructure * last_search_scope
CStructure * last_scope
bool dep_nested_name

Protected Member Functions

virtual CCBuilder & builder () const
virtual CCSyntax & syntax () const
virtual void Delete ()
 Delete the top item on the semantic stack.
CTree * createDelayedParse (bool(CCSyntax::*)(), CTree *)
void parseDelayed ()
void instantiateDelayed (CT_DelayedParse *, CTree *)
void enter_scope (CStructure *)
 Enter the given scope.
void deleteContainer (int)
void setQualName (CObjectInfo *, CObjectInfo *) const
CStructure * getQualifiedScope (CStructure *scope) const
CTypeInfo * resolveExpr (CTree *, CTree *=(CTree *) 0) const
void calculateAddress (CTree *) const
CObjectInfo * getLastResolvedName (CT_SimpleName *) const
CStructure * getNameScope (CT_SimpleName *, bool=true) const
CStructure * getScope (CObjectInfo *obj) const
CStructure * getFriendScope (bool skip_tpl_scope=false) const
CStructure * getNonTplScope (bool consider_instance_scope=false) const
CClassInfo * getOutermostIncompleteParsedRecord ()
Token * getCloseCurly ()
void qualifiedScopeName (CT_SimpleName *, std::ostringstream &) const
bool isQualName (CT_SimpleName *) const
bool realTypedef (CObjectInfo *) const
bool equalType (CTypeInfo *, CTypeInfo *, bool=true) const
void lookupName (const Token *, CStructure *, bool)
bool isClassOrEnum (CObjectInfo *) const
bool inTemplateDecl (CScopeInfo *scope) const
void introduceTemplate (CObjectInfo *, CTemplateInfo *, bool is_friend=false)
void setTemplateScope (CCNameLookup &, CObjectInfo *, CTypeInfo *, CTemplateInfo *, bool)
bool isSpecialization (CTree *) const
void setSpecializationName (CTree *, CTemplateInfo *) const
bool matchArguments (CT_TemplateName *n1, CT_TemplateName *n2) const
CLinkage::Type determine_linkage (CSemDeclSpecs *, SemObjType, CObjectInfo *=(CObjectInfo *) 0) const
CStorage::Type determine_storage_class (CSemDeclSpecs *) const
void setLanguage (CObjectInfo *) const
void setProtection (CObjectInfo *) const
void linkFctDecls (CCNameLookup &, CObjectInfo *) const
void linkCtorDecls (CObjectInfo *) const
void addImplicitThisObject (CFunctionInfo *, CTypeInfo *, CTree *)
void declareNamespaceStd ()
void declareImplicitFcts ()
void declareSpecialMembers ()
CFunctionInfo * createMethod (const char *, CRecord *, CTypeInfo *)
bool isRefToClass (CTypeInfo *, CRecord *) const
bool isBaseClass (CClassInfo *, CClassInfo *) const
void addBaseClasses (CClassInfo *, CT_ClassDef *)
void addBaseClass (CClassInfo *, CT_BaseSpec *)
virtual bool check_function_lookup (CCNameLookup &, CStructure *, CSemDeclSpecs *, CCSemDeclarator &, CTree *, bool)
virtual bool check_member_lookup (CCNameLookup &, CStructure *, CSemDeclSpecs *, CCSemDeclarator &, CTree *, bool &, bool)
virtual bool check_object_lookup (CCNameLookup &, CStructure *, CSemDeclSpecs *, CCSemDeclarator &, CTree *, bool &, CObjectInfo *&)
Protected Member Functions inherited from Puma::CSemantic
void declareImplicitFcts ()
CObjectInfo * lookup (const char *, SemObjType, bool=false) const
CObjectInfo * lookup (CT_SimpleName *, SemObjType, bool=false) const
CObjectInfo * lookup (const char *, CStructure *, SemObjType, bool) const
CObjectInfo * lookupBuiltin (const char *name) const
CLinkage::Type determine_linkage (CSemDeclSpecs *, SemObjType, CObjectInfo *=(CObjectInfo *) 0) const
CStorage::Type determine_storage_class (CSemDeclSpecs *, SemObjType, CLinkage::Type) const
bool typeMatch (CTypeInfo *, CTypeInfo *) const
CStructure * findParent () const
void setSpecifiers (CObjectInfo *, CSemDeclSpecs *) const
bool isRedefiningTypedef (CObjectInfo *, int obj_type) const
bool isRedefinedFunction (CFunctionInfo *) const
CAttributeInfo * createAttribute (const char *, CStructure *, CTypeInfo *, bool=false)
CTypedefInfo * createTypedef (const char *, CStructure *, CTypeInfo *)
void createParameter (CFunctionInfo *, CTypeInfo *)
CFunctionInfo * createFunction (const char *, CStructure *, CTypeInfo *)
CTypeInfo * resolveExpr (CTree *expr, CTree *base) const
Protected Member Functions inherited from Puma::Semantic
 Semantic ()
 Constructor.
virtual ~Semantic ()
 Destructor.
void common_settings (CObjectInfo *info, CTree *tree)
 Apply command settings on the given semantic object.
void common_settings (CObjectInfo *info, CTree *tree, CSemDeclarator *d)
 Apply command settings on the given semantic object.
void Push (CObjectInfo *info)
 Push the given semantic information object on the semantic stack.
bool in_decl () const
 Check if currently analysing a declaration.
void decl_begin (CSemDeclSpecs *ds)
 Begin analysing a declaration.
void decl_end ()
 Finish analysing a declaration.
void decl_specs_begin (CT_DeclSpecSeq *dss)
 Begin analysing a declaration specifier sequence.
void decl_specs_end ()
 Finish analysing a declaration specifier sequence.
CSemDeclSpecs * sem_decl_specs () const
 Get the semantic information for the currently analysed declaration specifier sequence.
CT_DeclSpecSeq * decl_specs () const
 Get the currently analysed declaration specifier sequence.
virtual void Remove ()
 Remove the top item of the current layer.

Protected Attributes

CRecord * _outermost_class_def
Stack< bool > _in_base_spec
Stack< bool > _in_nested_name
Stack< bool > _in_conv_type_id
Stack< const char * > _in_extern_decl
Stack< CProtection::Type > _protection
CCNameLookup shared_nl
struct { 
   const Token *   tok 
   CStructure *   scope 
   bool   nested 
   bool   nested_name 
   bool   base_spec 
} last_token_nl
Stack< Syntax::State > _in_template_arg_list
Stack< Syntax::State > _in_template_param_list
Stack< bool > parsing_entity_name
Stack< bool > _in_expr
Stack< CTree * > _postfix_expr
Stack< MemberAccessOperator > _in_memb_access_expr
bool expect_template
bool parsing_fct_inst
bool parsing_class_inst
bool real_inst
CCInstantiation * tpl_inst
Unit * _last_unit
bool _last_body_skipped
Protected Attributes inherited from Puma::CSemantic
bool in_arg_decl
bool _in_arg_decl_seq
bool is_type_name
bool support_implicit_int
PtrStack< CStructure > non_record_scopes
Protected Attributes inherited from Puma::Semantic
CSemDatabase * _db
 Database of all semantic objects of the semantic tree.
CFileInfo * _file
 Top level semantic object representing the file scope.
ErrorSink * _err
 Error output stream.
long _Anonymous
 Counter for generating anonymous (private) names.
CEnumInfo * current_enum
 The current enumeration, if inside the definition of an enumeration.
CStructure * current_fct
 The current function, if inside the definition of a function.
CStructure * current_scope
 The current scope.
BCStack< CSemDeclSpecs *, 256 > _sem_decl_specs
 Stack for the type analysis of declarations.
BCStack< CT_DeclSpecSeq *, 256 > _decl_specs
 Stack for collecting declaration specifiers.
BCStack< bool, 256 > _in_param_decl_clause
 Stack for the state of analysing a function parameter list.
BCStack< bool, 256 > _in_decl
 Stack for the state of analysing a declaration.

Additional Inherited Members

Protected Types inherited from Puma::CSemantic
enum  SemObjType {
  CLASS ,
  UNION ,
  ENUM ,
  TYPEDEF ,
  FCT ,
  ATTRIB ,
  ARG ,
  TAG ,
  NON_TAG ,
  ANY
}

Member Enumeration Documentation

◆ MemberAccessOperator

Enumerator
MAO_NONE 
MAO_PTS 
MAO_DOT 

Constructor & Destructor Documentation

◆ CCSemantic()

Puma::CCSemantic::CCSemantic ( CCSyntax & ,
CCBuilder &  )

Member Function Documentation

◆ access_decl()

virtual CTree * Puma::CCSemantic::access_decl ( CTree * = 0)
virtual

◆ access_spec()

virtual CTree * Puma::CCSemantic::access_spec ( )
virtual

◆ add_base_classes()

virtual CTree * Puma::CCSemantic::add_base_classes ( )
virtual

◆ addBaseClass()

void Puma::CCSemantic::addBaseClass ( CClassInfo * ,
CT_BaseSpec *  )
protected

◆ addBaseClasses()

void Puma::CCSemantic::addBaseClasses ( CClassInfo * ,
CT_ClassDef *  )
protected

◆ addImplicitThisObject()

void Puma::CCSemantic::addImplicitThisObject ( CFunctionInfo * ,
CTypeInfo * ,
CTree *  )
protected

◆ array_delim()

CStructure * Puma::CCSemantic::array_delim ( CStructure * = 0)

◆ builder()

CCBuilder & Puma::CCSemantic::builder ( ) const
inlineprotectedvirtual

Reimplemented from Puma::CSemantic.

Reimplemented in Puma::InstantiationSemantic.

◆ calculateAddress()

void Puma::CCSemantic::calculateAddress ( CTree * ) const
protected

◆ check_function_lookup()

virtual bool Puma::CCSemantic::check_function_lookup ( CCNameLookup & ,
CStructure * ,
CSemDeclSpecs * ,
CCSemDeclarator & ,
CTree * ,
bool  )
protectedvirtual

◆ check_member_lookup()

virtual bool Puma::CCSemantic::check_member_lookup ( CCNameLookup & ,
CStructure * ,
CSemDeclSpecs * ,
CCSemDeclarator & ,
CTree * ,
bool & ,
bool  )
protectedvirtual

◆ check_object_lookup()

virtual bool Puma::CCSemantic::check_object_lookup ( CCNameLookup & ,
CStructure * ,
CSemDeclSpecs * ,
CCSemDeclarator & ,
CTree * ,
bool & ,
CObjectInfo *&  )
protectedvirtual

◆ class_name()

virtual CTree * Puma::CCSemantic::class_name ( )
virtual

◆ class_spec()

virtual CTree * Puma::CCSemantic::class_spec ( )
virtual

Reimplemented from Puma::CSemantic.

◆ class_spec_err()

virtual CTree * Puma::CCSemantic::class_spec_err ( )
virtual

◆ colon_colon()

virtual CTree * Puma::CCSemantic::colon_colon ( )
virtual

◆ condition()

virtual CTree * Puma::CCSemantic::condition ( )
virtual

◆ const_expr()

virtual CTree * Puma::CCSemantic::const_expr ( )
virtual

◆ const_init()

virtual CTree * Puma::CCSemantic::const_init ( )
virtual

◆ conv_fct_id()

CStructure * Puma::CCSemantic::conv_fct_id ( CStructure * = 0)

◆ createDelayedParse()

CTree * Puma::CCSemantic::createDelayedParse ( bool(CCSyntax::*  )(),
CTree *  )
protected

◆ createMethod()

CFunctionInfo * Puma::CCSemantic::createMethod ( const char * ,
CRecord * ,
CTypeInfo *  )
protected

◆ ctor_init()

virtual CTree * Puma::CCSemantic::ctor_init ( )
virtual

◆ decl_spec_seq1()

virtual CTree * Puma::CCSemantic::decl_spec_seq1 ( )
virtual

Reimplemented from Puma::CSemantic.

◆ declarator_id()

virtual void Puma::CCSemantic::declarator_id ( bool )
virtual

◆ declareImplicitFcts()

void Puma::CCSemantic::declareImplicitFcts ( )
protected

◆ declareNamespaceStd()

void Puma::CCSemantic::declareNamespaceStd ( )
protected

◆ declareSpecialMembers()

void Puma::CCSemantic::declareSpecialMembers ( )
protected

◆ Delete()

virtual void Puma::CCSemantic::Delete ( )
protectedvirtual

Delete the top item on the semantic stack.

To be implemented by derived classes.

Reimplemented from Puma::CSemantic.

◆ deleteContainer()

void Puma::CCSemantic::deleteContainer ( int )
protected

◆ determine_linkage()

CLinkage::Type Puma::CCSemantic::determine_linkage ( CSemDeclSpecs * ,
SemObjType ,
CObjectInfo * = (CObjectInfo *) 0 ) const
protected

◆ determine_storage_class()

CStorage::Type Puma::CCSemantic::determine_storage_class ( CSemDeclSpecs * ) const
protected

◆ direct_new_declarator()

virtual CTree * Puma::CCSemantic::direct_new_declarator ( )
virtual

◆ enter_base_spec()

void Puma::CCSemantic::enter_base_spec ( )
inline

◆ enter_class_def()

void Puma::CCSemantic::enter_class_def ( )

◆ enter_conv_type_id()

void Puma::CCSemantic::enter_conv_type_id ( )
inline

◆ enter_entity_name()

void Puma::CCSemantic::enter_entity_name ( bool v = true)
inline

◆ enter_exception_spec()

void Puma::CCSemantic::enter_exception_spec ( )

◆ enter_expr()

bool Puma::CCSemantic::enter_expr ( )
inline

◆ enter_extern_decl()

void Puma::CCSemantic::enter_extern_decl ( bool block_decl)

◆ enter_member_access()

void Puma::CCSemantic::enter_member_access ( MemberAccessOperator mao)
inline

◆ enter_nested_name()

void Puma::CCSemantic::enter_nested_name ( )
inline

◆ enter_param_decl_clause()

void Puma::CCSemantic::enter_param_decl_clause ( )
virtual

Enter a function parameter declaration clause.

Reimplemented from Puma::Semantic.

◆ enter_postfix_expr()

void Puma::CCSemantic::enter_postfix_expr ( )
inline

◆ enter_scope()

void Puma::CCSemantic::enter_scope ( CStructure * scope)
protectedvirtual

Enter the given scope.

Sets the parent of the entered scope to the current scope.

Parameters
scopeThe scope to enter.

Reimplemented from Puma::Semantic.

◆ enter_template_arg_list()

void Puma::CCSemantic::enter_template_arg_list ( Syntax::State state)
inline

◆ enter_template_decl()

void Puma::CCSemantic::enter_template_decl ( )

◆ enter_template_param_list()

void Puma::CCSemantic::enter_template_param_list ( Syntax::State )

◆ enum_name()

virtual CTree * Puma::CCSemantic::enum_name ( )
virtual

◆ enumerator_def()

virtual CTree * Puma::CCSemantic::enumerator_def ( )
virtual

Reimplemented from Puma::CSemantic.

◆ equalType()

bool Puma::CCSemantic::equalType ( CTypeInfo * ,
CTypeInfo * ,
bool = true ) const
protected

◆ exception_spec()

virtual CTree * Puma::CCSemantic::exception_spec ( )
virtual

◆ explicit_instantiation()

virtual CTree * Puma::CCSemantic::explicit_instantiation ( )
virtual

◆ explicit_specialization()

virtual CTree * Puma::CCSemantic::explicit_specialization ( )
virtual

◆ finish_init_declarator()

virtual CTree * Puma::CCSemantic::finish_init_declarator ( )
virtual

◆ getCloseCurly()

Token * Puma::CCSemantic::getCloseCurly ( )
protected

◆ getFriendScope()

CStructure * Puma::CCSemantic::getFriendScope ( bool skip_tpl_scope = false) const
protected

◆ getLastResolvedName()

CObjectInfo * Puma::CCSemantic::getLastResolvedName ( CT_SimpleName * ) const
protected

◆ getNameScope()

CStructure * Puma::CCSemantic::getNameScope ( CT_SimpleName * ,
bool = true ) const
protected

◆ getNonTplScope()

CStructure * Puma::CCSemantic::getNonTplScope ( bool consider_instance_scope = false) const
protected

◆ getOutermostIncompleteParsedRecord()

CClassInfo * Puma::CCSemantic::getOutermostIncompleteParsedRecord ( )
protected

◆ getQualifiedScope()

CStructure * Puma::CCSemantic::getQualifiedScope ( CStructure * scope) const
protected

◆ getScope()

CStructure * Puma::CCSemantic::getScope ( CObjectInfo * obj) const
protected

◆ handler()

virtual CTree * Puma::CCSemantic::handler ( )
virtual

◆ implicit_int()

virtual bool Puma::CCSemantic::implicit_int ( )
virtual

Reimplemented from Puma::CSemantic.

◆ in_base_spec()

bool Puma::CCSemantic::in_base_spec ( ) const
inline

◆ in_class_def()

bool Puma::CCSemantic::in_class_def ( ) const
inline

◆ in_conv_type_id()

bool Puma::CCSemantic::in_conv_type_id ( ) const
inline

◆ in_expr()

bool Puma::CCSemantic::in_expr ( ) const
inline

◆ in_extern_decl()

bool Puma::CCSemantic::in_extern_decl ( ) const
inline

◆ in_nested_name()

bool Puma::CCSemantic::in_nested_name ( ) const
inline

◆ in_template_arg_list()

Syntax::State Puma::CCSemantic::in_template_arg_list ( ) const
inline

◆ in_template_param_list()

Syntax::State Puma::CCSemantic::in_template_param_list ( ) const
inline

◆ init() [1/2]

void Puma::CCSemantic::init ( CSemDatabase & db,
Unit & file )
virtual

Initialize the semantic analysis.

Parameters
dbThe semantic object database.
fileThe input file.

Reimplemented from Puma::CSemantic.

◆ init() [2/2]

void Puma::CCSemantic::init ( CSemDatabase & ,
Unit & ,
CStructure * ,
bool ,
bool ,
CCInstantiation *  )

◆ init_declarator()

virtual CTree * Puma::CCSemantic::init_declarator ( )
virtual

Reimplemented from Puma::CSemantic.

◆ instantiateDelayed()

void Puma::CCSemantic::instantiateDelayed ( CT_DelayedParse * ,
CTree *  )
protected

◆ Instantiation()

CCInstantiation * Puma::CCSemantic::Instantiation ( ) const
inline

◆ inTemplateDecl()

bool Puma::CCSemantic::inTemplateDecl ( CScopeInfo * scope) const
protected

◆ introduce_class()

virtual CTree * Puma::CCSemantic::introduce_class ( )
virtual

Reimplemented from Puma::CSemantic.

Reimplemented in Puma::InstantiationSemantic.

◆ introduce_enum()

virtual CTree * Puma::CCSemantic::introduce_enum ( )
virtual

Reimplemented from Puma::CSemantic.

◆ introduce_enumerator()

virtual CTree * Puma::CCSemantic::introduce_enumerator ( )
virtual

Reimplemented from Puma::CSemantic.

◆ introduce_exception()

virtual CTree * Puma::CCSemantic::introduce_exception ( )
virtual

◆ introduce_function()

virtual CTree * Puma::CCSemantic::introduce_function ( )
virtual

Reimplemented from Puma::CSemantic.

Reimplemented in Puma::InstantiationSemantic.

◆ introduce_member()

virtual CTree * Puma::CCSemantic::introduce_member ( )
virtual

Reimplemented from Puma::CSemantic.

◆ introduce_named_type()

virtual CTree * Puma::CCSemantic::introduce_named_type ( )
virtual

Reimplemented from Puma::CSemantic.

◆ introduce_non_type_param()

virtual CTree * Puma::CCSemantic::introduce_non_type_param ( )
virtual

◆ introduce_ns_alias()

virtual CTree * Puma::CCSemantic::introduce_ns_alias ( )
virtual

◆ introduce_ns_extension()

virtual CTree * Puma::CCSemantic::introduce_ns_extension ( )
virtual

◆ introduce_object()

virtual CTree * Puma::CCSemantic::introduce_object ( CTree * = 0)
virtual

Reimplemented from Puma::CSemantic.

Reimplemented in Puma::InstantiationSemantic.

◆ introduce_orig_ns()

virtual CTree * Puma::CCSemantic::introduce_orig_ns ( )
virtual

◆ introduce_parameter()

virtual CTree * Puma::CCSemantic::introduce_parameter ( )
virtual

Reimplemented from Puma::CSemantic.

◆ introduce_tag()

virtual CTree * Puma::CCSemantic::introduce_tag ( )
virtual

Reimplemented from Puma::CSemantic.

◆ introduce_template_instance()

virtual CTree * Puma::CCSemantic::introduce_template_instance ( )
virtual

◆ introduce_type_param()

virtual CTree * Puma::CCSemantic::introduce_type_param ( )
virtual

◆ introduce_unnamed_ns()

virtual CTree * Puma::CCSemantic::introduce_unnamed_ns ( )
virtual

◆ introduceTemplate()

void Puma::CCSemantic::introduceTemplate ( CObjectInfo * ,
CTemplateInfo * ,
bool is_friend = false )
protected

◆ is_entity_name()

bool Puma::CCSemantic::is_entity_name ( ) const
inline

◆ isBaseClass()

bool Puma::CCSemantic::isBaseClass ( CClassInfo * ,
CClassInfo *  ) const
protected

◆ isClassOrEnum()

bool Puma::CCSemantic::isClassOrEnum ( CObjectInfo * ) const
protected

◆ isQualName()

bool Puma::CCSemantic::isQualName ( CT_SimpleName * ) const
protected

◆ isRefToClass()

bool Puma::CCSemantic::isRefToClass ( CTypeInfo * ,
CRecord *  ) const
protected

◆ isSpecialization()

bool Puma::CCSemantic::isSpecialization ( CTree * ) const
protected

◆ leave_base_spec()

void Puma::CCSemantic::leave_base_spec ( )
inline

◆ leave_class_def()

void Puma::CCSemantic::leave_class_def ( bool reject = false)

◆ leave_conv_type_id()

void Puma::CCSemantic::leave_conv_type_id ( )
inline

◆ leave_entity_name()

void Puma::CCSemantic::leave_entity_name ( )
inline

◆ leave_exception_spec()

void Puma::CCSemantic::leave_exception_spec ( )

◆ leave_expr()

bool Puma::CCSemantic::leave_expr ( )
inline

◆ leave_extern_decl()

void Puma::CCSemantic::leave_extern_decl ( )
inline

◆ leave_member_access()

void Puma::CCSemantic::leave_member_access ( )
inline

◆ leave_nested_name()

void Puma::CCSemantic::leave_nested_name ( )
inline

◆ leave_param_decl_clause()

void Puma::CCSemantic::leave_param_decl_clause ( )
virtual

Leave a function parameter declaration clause.

Reimplemented from Puma::Semantic.

◆ leave_postfix_expr()

void Puma::CCSemantic::leave_postfix_expr ( )
inline

◆ leave_template_arg_list()

void Puma::CCSemantic::leave_template_arg_list ( )
inline

◆ leave_template_param_list()

void Puma::CCSemantic::leave_template_param_list ( )
inline

◆ linkCtorDecls()

void Puma::CCSemantic::linkCtorDecls ( CObjectInfo * ) const
protected

◆ linkFctDecls()

void Puma::CCSemantic::linkFctDecls ( CCNameLookup & ,
CObjectInfo *  ) const
protected

◆ lookupName()

void Puma::CCSemantic::lookupName ( const Token * ,
CStructure * ,
bool  )
protected

◆ matchArguments()

bool Puma::CCSemantic::matchArguments ( CT_TemplateName * n1,
CT_TemplateName * n2 ) const
protected

◆ member_decl1()

virtual CTree * Puma::CCSemantic::member_decl1 ( )
virtual

◆ member_declarator_err()

virtual CTree * Puma::CCSemantic::member_declarator_err ( )
virtual

◆ namespace_alias()

virtual CTree * Puma::CCSemantic::namespace_alias ( )
virtual

◆ namespace_def()

virtual CTree * Puma::CCSemantic::namespace_def ( )
virtual

◆ nested_name_spec()

virtual CTree * Puma::CCSemantic::nested_name_spec ( )
virtual

◆ nested_name_spec1()

virtual CTree * Puma::CCSemantic::nested_name_spec1 ( )
virtual

◆ non_primary_loc()

bool Puma::CCSemantic::non_primary_loc ( )

◆ non_project_loc()

bool Puma::CCSemantic::non_project_loc ( )

◆ obj_decl()

virtual CTree * Puma::CCSemantic::obj_decl ( CTree * )
virtual

◆ original_ns_name()

virtual CTree * Puma::CCSemantic::original_ns_name ( )
virtual

◆ parse_delayed()

virtual void Puma::CCSemantic::parse_delayed ( bool(CCSyntax::*  )(),
CTree *  )
virtual

Reimplemented in Puma::InstantiationSemantic.

◆ parseDelayed()

void Puma::CCSemantic::parseDelayed ( )
protected

◆ postfix_expr()

CTree * Puma::CCSemantic::postfix_expr ( )

◆ postfix_expr1()

virtual CTree * Puma::CCSemantic::postfix_expr1 ( )
virtual

◆ postfix_expr2()

virtual CTree * Puma::CCSemantic::postfix_expr2 ( )
virtual

◆ protection()

CProtection::Type Puma::CCSemantic::protection ( ) const
inlinevirtual

Reimplemented from Puma::CSemantic.

◆ pseudo_dtor_name()

virtual CTree * Puma::CCSemantic::pseudo_dtor_name ( )
virtual

◆ pure_spec()

virtual CTree * Puma::CCSemantic::pure_spec ( )
virtual

◆ qualifiedScopeName()

void Puma::CCSemantic::qualifiedScopeName ( CT_SimpleName * ,
std::ostringstream &  ) const
protected

◆ realTypedef()

bool Puma::CCSemantic::realTypedef ( CObjectInfo * ) const
protected

◆ reset_search_scope()

bool Puma::CCSemantic::reset_search_scope ( bool = false)

◆ resolveExpr()

CTypeInfo * Puma::CCSemantic::resolveExpr ( CTree * ,
CTree * = (CTree *) 0 ) const
protected

◆ setLanguage()

void Puma::CCSemantic::setLanguage ( CObjectInfo * ) const
protected

◆ setProtection()

void Puma::CCSemantic::setProtection ( CObjectInfo * info) const
inlineprotected

◆ setQualName()

void Puma::CCSemantic::setQualName ( CObjectInfo * ,
CObjectInfo *  ) const
protected

◆ setSpecializationName()

void Puma::CCSemantic::setSpecializationName ( CTree * ,
CTemplateInfo *  ) const
protected

◆ setTemplateScope()

void Puma::CCSemantic::setTemplateScope ( CCNameLookup & ,
CObjectInfo * ,
CTypeInfo * ,
CTemplateInfo * ,
bool  )
protected

◆ simple_type_spec()

virtual CTree * Puma::CCSemantic::simple_type_spec ( )
virtual

◆ skip_tpl_fct_bodies()

bool Puma::CCSemantic::skip_tpl_fct_bodies ( ) const

◆ syntax()

CCSyntax & Puma::CCSemantic::syntax ( ) const
inlineprotectedvirtual

Reimplemented from Puma::CSemantic.

Reimplemented in Puma::InstantiationSemantic.

◆ template_decl()

virtual CTree * Puma::CCSemantic::template_decl ( )
virtual

◆ template_key()

virtual CTree * Puma::CCSemantic::template_key ( )
virtual

◆ template_name()

virtual CTree * Puma::CCSemantic::template_name ( bool class_only = false)
virtual

◆ template_param()

virtual CTree * Puma::CCSemantic::template_param ( )
virtual

◆ template_param_list()

virtual CTree * Puma::CCSemantic::template_param_list ( )
virtual

◆ typedef_name()

virtual CTree * Puma::CCSemantic::typedef_name ( )
virtual

Reimplemented from Puma::CSemantic.

◆ using_decl()

virtual CTree * Puma::CCSemantic::using_decl ( )
virtual

◆ using_directive()

virtual CTree * Puma::CCSemantic::using_directive ( )
virtual

◆ valid_id_expr()

virtual CTree * Puma::CCSemantic::valid_id_expr ( )
virtual

Member Data Documentation

◆ _in_base_spec

Stack<bool> Puma::CCSemantic::_in_base_spec
protected

◆ _in_conv_type_id

Stack<bool> Puma::CCSemantic::_in_conv_type_id
protected

◆ _in_expr

Stack<bool> Puma::CCSemantic::_in_expr
protected

◆ _in_extern_decl

Stack<const char*> Puma::CCSemantic::_in_extern_decl
protected

◆ _in_memb_access_expr

Stack<MemberAccessOperator> Puma::CCSemantic::_in_memb_access_expr
protected

◆ _in_nested_name

Stack<bool> Puma::CCSemantic::_in_nested_name
protected

◆ _in_template_arg_list

Stack<Syntax::State> Puma::CCSemantic::_in_template_arg_list
protected

◆ _in_template_param_list

Stack<Syntax::State> Puma::CCSemantic::_in_template_param_list
protected

◆ _last_body_skipped

bool Puma::CCSemantic::_last_body_skipped
protected

◆ _last_unit

Unit* Puma::CCSemantic::_last_unit
protected

◆ _outermost_class_def

CRecord* Puma::CCSemantic::_outermost_class_def
protected

◆ _postfix_expr

Stack<CTree*> Puma::CCSemantic::_postfix_expr
protected

◆ _protection

Stack<CProtection::Type> Puma::CCSemantic::_protection
protected

◆ base_spec

bool Puma::CCSemantic::base_spec

◆ dep_nested_name

bool Puma::CCSemantic::dep_nested_name

◆ expect_template

bool Puma::CCSemantic::expect_template
protected

◆ last_scope

CStructure* Puma::CCSemantic::last_scope

◆ last_search_scope

CStructure* Puma::CCSemantic::last_search_scope

◆ [struct]

struct { ... } Puma::CCSemantic::last_token_nl

◆ nested

bool Puma::CCSemantic::nested

◆ nested_name

bool Puma::CCSemantic::nested_name

◆ parsing_class_inst

bool Puma::CCSemantic::parsing_class_inst
protected

◆ parsing_entity_name

Stack<bool> Puma::CCSemantic::parsing_entity_name
protected

◆ parsing_fct_inst

bool Puma::CCSemantic::parsing_fct_inst
protected

◆ real_inst

bool Puma::CCSemantic::real_inst
protected

◆ scope

CStructure* Puma::CCSemantic::scope

◆ search_scope

CStructure* Puma::CCSemantic::search_scope

◆ shared_nl

CCNameLookup Puma::CCSemantic::shared_nl
protected

◆ tok

const Token* Puma::CCSemantic::tok

◆ tpl_inst

CCInstantiation* Puma::CCSemantic::tpl_inst
protected