CBMC
Loading...
Searching...
No Matches
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
Parser Class Reference
+ Collaboration diagram for Parser:

Public Member Functions

 
 

Protected Types

 
 

Protected Member Functions

 
 
 
 
 
 
 
 
 
 
std::optional< codetrTypedefStatement ()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
std::optional< codetrCompoundStatement ()
 
std::optional< codetrStatement ()
 
std::optional< codetrIfStatement ()
 
std::optional< codetrSwitchStatement ()
 
std::optional< codetrWhileStatement ()
 
std::optional< codetrDoStatement ()
 
std::optional< codetrForStatement ()
 
std::optional< codetrTryStatement ()
 
std::optional< codetrExprStatement ()
 
std::optional< codetrDeclarationStatement ()
 
 
 
 
void  SkipTo (int token)
 
 
 
std::optional< codetrGCCAsmStatement ()
 
std::optional< codetrMSC_tryStatement ()
 
std::optional< codetrMSC_leaveStatement ()
 
std::optional< codetrMSCAsmStatement ()
 
std::optional< codetrMSC_if_existsStatement ()
 
 
 
 
void  merge_types (const typet &src, typet &dest)
 
 
void  make_subtype (const typet &src, typet &dest)
 

Protected Attributes

 
 
 
 
 
std::size_t  number_of_errors
 
 
 
 

Detailed Description

Definition at line 195 of file parse.cpp.

Member Enumeration Documentation

◆  DeclKind

Enumerator
kDeclarator 
kArgDeclarator 
kCastDeclarator 

Definition at line 227 of file parse.cpp.

◆  TemplateDeclKind

Enumerator
tdk_unknown 
tdk_decl 
tdk_instantiation 
tdk_specialization 
num_tdks 

Definition at line 228 of file parse.cpp.

Constructor & Destructor Documentation

◆  Parser()

Parser::Parser ( cpp_parsert_cpp_parser,
message_handlertmessage_handler 
)
inline

Definition at line 198 of file parse.cpp.

Member Function Documentation

◆  add_id() [1/2]

new_scopet & Parser::add_id ( const irep_idtid,
)
protected

Definition at line 439 of file parse.cpp.

◆  add_id() [2/2]

new_scopet & Parser::add_id ( const ireptname,
)
protected

Definition at line 426 of file parse.cpp.

◆  isAllocateExpr()

bool Parser::isAllocateExpr ( int  t )
protected

Definition at line 6099 of file parse.cpp.

◆  isConstructorDecl()

bool Parser::isConstructorDecl ( )
protected

Definition at line 1895 of file parse.cpp.

◆  isPtrToMember()

bool Parser::isPtrToMember ( int  i )
protected

Definition at line 1931 of file parse.cpp.

◆  isTypeSpecifier()

bool Parser::isTypeSpecifier ( )
protected

Definition at line 763 of file parse.cpp.

◆  make_sub_scope() [1/2]

void Parser::make_sub_scope ( const irep_idtid,
)
protected

Definition at line 456 of file parse.cpp.

◆  make_sub_scope() [2/2]

void Parser::make_sub_scope ( const ireptname,
)
protected

Definition at line 450 of file parse.cpp.

◆  make_subtype()

void Parser::make_subtype ( const typetsrc,
typetdest 
)
inlineprotected

Definition at line 399 of file parse.cpp.

◆  maybeTemplateArgs()

bool Parser::maybeTemplateArgs ( )
protected

Definition at line 7133 of file parse.cpp.

◆  MaybeTypeNameOrClassTemplate()

bool Parser::MaybeTypeNameOrClassTemplate ( cpp_tokent &  )
protected

Definition at line 8397 of file parse.cpp.

◆  merge_types()

void Parser::merge_types ( const typetsrc,
typetdest 
)
protected

Definition at line 470 of file parse.cpp.

◆  moreVarName()

bool Parser::moreVarName ( )
protected

Definition at line 7116 of file parse.cpp.

◆  operator()()

bool Parser::operator() ( )

Definition at line 8416 of file parse.cpp.

◆  optAlignas()

bool Parser::optAlignas ( typetcv )
protected

Definition at line 2142 of file parse.cpp.

◆  optAttribute()

bool Parser::optAttribute ( typett )
protected

Definition at line 2398 of file parse.cpp.

◆  optCvQualify()

bool Parser::optCvQualify ( typetcv )
protected

Definition at line 2056 of file parse.cpp.

◆  optIntegralTypeOrClassSpec()

bool Parser::optIntegralTypeOrClassSpec ( typetp )
protected

Definition at line 2463 of file parse.cpp.

◆  optMemberSpec()

bool Parser::optMemberSpec ( cpp_member_spectmember_spec )
protected

Definition at line 1988 of file parse.cpp.

◆  optPtrOperator()

bool Parser::optPtrOperator ( typetptrs )
protected

Definition at line 3318 of file parse.cpp.

◆  optStorageSpec()

bool Parser::optStorageSpec ( cpp_storage_spectstorage_spec )
protected

Definition at line 2023 of file parse.cpp.

◆  optThrowDecl()

bool Parser::optThrowDecl ( ireptthrow_decl )
protected

Definition at line 2821 of file parse.cpp.

◆  rAccessDecl()

bool Parser::rAccessDecl ( cpp_declarationtmem )
protected

Definition at line 4797 of file parse.cpp.

◆  rAdditiveExpr()

bool Parser::rAdditiveExpr ( exprtexp )
protected

Definition at line 5322 of file parse.cpp.

◆  rAlignofExpr()

bool Parser::rAlignofExpr ( exprtexp )
protected

Definition at line 6034 of file parse.cpp.

◆  rAllocateExpr()

bool Parser::rAllocateExpr ( exprtexp )
protected

Definition at line 6112 of file parse.cpp.

◆  rAllocateInitializer()

bool Parser::rAllocateInitializer ( exprtinit )
protected

Definition at line 6329 of file parse.cpp.

◆  rAllocateType()

bool Parser::rAllocateType ( exprtarguments,
typetatype,
exprtinitializer 
)
protected

Definition at line 6202 of file parse.cpp.

◆  rAndExpr()

bool Parser::rAndExpr ( exprtexp,
bool  template_args 
)
protected

Definition at line 5151 of file parse.cpp.

◆  rArgDeclaration()

bool Parser::rArgDeclaration ( cpp_declarationtdeclaration )
protected

Definition at line 4180 of file parse.cpp.

◆  rArgDeclList()

bool Parser::rArgDeclList ( ireptarglist )
protected

Definition at line 4127 of file parse.cpp.

◆  rArgDeclListOrInit()

bool Parser::rArgDeclListOrInit ( exprtarglist,
boolis_args,
bool  maybe_init 
)
protected

Definition at line 4088 of file parse.cpp.

◆  rBaseSpecifiers()

bool Parser::rBaseSpecifiers ( ireptbases )
protected

Definition at line 4602 of file parse.cpp.

◆  rCastExpr()

bool Parser::rCastExpr ( exprtexp )
protected

Definition at line 5466 of file parse.cpp.

◆  rCastOperatorName()

bool Parser::rCastOperatorName ( ireptname )
protected

Definition at line 3800 of file parse.cpp.

◆  rClassBody()

bool Parser::rClassBody ( exprtbody )
protected

Definition at line 4673 of file parse.cpp.

◆  rClassMember()

bool Parser::rClassMember ( cpp_itemtmember )
protected

Definition at line 4733 of file parse.cpp.

◆  rClassSpec()

bool Parser::rClassSpec ( typetspec )
protected

Definition at line 4492 of file parse.cpp.

◆  rCommaExpression()

bool Parser::rCommaExpression ( exprtexp )
protected

Definition at line 4822 of file parse.cpp.

◆  rCompoundStatement()

std::optional< codet > Parser::rCompoundStatement ( )
protected

Definition at line 7281 of file parse.cpp.

◆  rCondition()

bool Parser::rCondition ( exprtstatement )
protected

Definition at line 8198 of file parse.cpp.

◆  rConditionalExpr()

bool Parser::rConditionalExpr ( exprtexp,
bool  template_args 
)
protected

Definition at line 4946 of file parse.cpp.

◆  rConstDeclaration()

bool Parser::rConstDeclaration ( cpp_declarationtdeclaration )
protected

Definition at line 1690 of file parse.cpp.

◆  rConstructorDecl()

bool Parser::rConstructorDecl ( cpp_declaratortconstructor,
typettype_name,
typettrailing_return_type 
)
protected

Definition at line 2691 of file parse.cpp.

◆  rDeclaration()

bool Parser::rDeclaration ( cpp_declarationtdeclaration )
protected

Definition at line 1412 of file parse.cpp.

◆  rDeclarationStatement()

std::optional< codet > Parser::rDeclarationStatement ( )
protected

Definition at line 8237 of file parse.cpp.

◆  rDeclarator()

bool Parser::rDeclarator ( cpp_declaratortdeclarator,
DeclKind  kind,
bool  should_be_declarator,
bool  is_statement 
)
protected

Definition at line 3060 of file parse.cpp.

◆  rDeclaratorQualifier()

bool Parser::rDeclaratorQualifier ( )
protected

Definition at line 3027 of file parse.cpp.

◆  rDeclarators()

bool Parser::rDeclarators ( cpp_declarationt::declaratorstdeclarators,
bool  should_be_declarator,
bool  is_statement = false  
)
protected

Definition at line 2889 of file parse.cpp.

◆  rDeclaratorWithInit()

bool Parser::rDeclaratorWithInit ( cpp_declaratortdw,
bool  should_be_declarator,
bool  is_statement 
)
protected

Definition at line 2918 of file parse.cpp.

◆  rDefinition()

bool Parser::rDefinition ( cpp_itemtitem )
protected

Definition at line 561 of file parse.cpp.

◆  rDoStatement()

std::optional< codet > Parser::rDoStatement ( )
protected

Definition at line 7703 of file parse.cpp.

◆  rEnumBody()

bool Parser::rEnumBody ( ireptbody )
protected

Definition at line 4436 of file parse.cpp.

◆  rEnumSpec()

bool Parser::rEnumSpec ( typetspec )
protected

Definition at line 4353 of file parse.cpp.

◆  rEqualityExpr()

bool Parser::rEqualityExpr ( exprtexp,
bool  template_args 
)
protected

Definition at line 5190 of file parse.cpp.

◆  rExclusiveOrExpr()

bool Parser::rExclusiveOrExpr ( exprtexp,
bool  template_args 
)
protected

Definition at line 5112 of file parse.cpp.

◆  rExpression()

bool Parser::rExpression ( exprtexp,
bool  template_args 
)
protected

Definition at line 4865 of file parse.cpp.

◆  rExprStatement()

std::optional< codet > Parser::rExprStatement ( )
protected

Definition at line 8126 of file parse.cpp.

◆  rExternTemplateDecl()

bool Parser::rExternTemplateDecl ( cpp_declarationtdecl )
protected

Definition at line 1364 of file parse.cpp.

◆  rForStatement()

std::optional< codet > Parser::rForStatement ( )
protected

Definition at line 7740 of file parse.cpp.

◆  rFunctionArguments()

bool Parser::rFunctionArguments ( exprtargs )
protected

Definition at line 4313 of file parse.cpp.

◆  rFunctionBody()

bool Parser::rFunctionBody ( cpp_declaratortdeclarator )
protected

Definition at line 7234 of file parse.cpp.

◆  rGCCAsmStatement()

std::optional< codet > Parser::rGCCAsmStatement ( )
protected

Definition at line 7951 of file parse.cpp.

◆  rGCCAttribute()

bool Parser::rGCCAttribute ( typett )
protected

Definition at line 2197 of file parse.cpp.

◆  rIfStatement()

std::optional< codet > Parser::rIfStatement ( )
protected

Definition at line 7594 of file parse.cpp.

◆  rInclusiveOrExpr()

bool Parser::rInclusiveOrExpr ( exprtexp,
bool  template_args 
)
protected

Definition at line 5073 of file parse.cpp.

◆  rInitializeExpr()

bool Parser::rInitializeExpr ( exprtexpr )
protected

Definition at line 4225 of file parse.cpp.

◆  rIntegralDeclaration()

bool Parser::rIntegralDeclaration ( cpp_declarationtdeclaration,
cpp_storage_spectstorage_spec,
cpp_member_spectmember_spec,
typetintegral,
typetcv_q 
)
protected

Definition at line 1565 of file parse.cpp.

◆  rIntegralDeclStatement()

std::optional< codet > Parser::rIntegralDeclStatement ( cpp_storage_spectstorage_spec,
typetintegral,
typetcv_q 
)
protected

Definition at line 8307 of file parse.cpp.

◆  rLinkageBody()

bool Parser::rLinkageBody ( cpp_linkage_spect::itemstitems )
protected

Definition at line 984 of file parse.cpp.

◆  rLinkageSpec()

bool Parser::rLinkageSpec ( cpp_linkage_spectlinkage_spec )
protected

Definition at line 788 of file parse.cpp.

◆  rLogicalAndExpr()

bool Parser::rLogicalAndExpr ( exprtexp,
bool  template_args 
)
protected

Definition at line 5034 of file parse.cpp.

◆  rLogicalOrExpr()

bool Parser::rLogicalOrExpr ( exprtexp,
bool  template_args 
)
protected

Definition at line 4995 of file parse.cpp.

◆  rMemberInit()

bool Parser::rMemberInit ( exprtinit )
protected

Definition at line 3470 of file parse.cpp.

◆  rMemberInitializers()

bool Parser::rMemberInitializers ( ireptinit )
protected

Definition at line 3437 of file parse.cpp.

◆  rMSC_if_existsExpr()

bool Parser::rMSC_if_existsExpr ( exprtexpr )
protected

Definition at line 6574 of file parse.cpp.

◆  rMSC_if_existsStatement()

std::optional< codet > Parser::rMSC_if_existsStatement ( )
protected

Definition at line 6619 of file parse.cpp.

◆  rMSC_leaveStatement()

std::optional< codet > Parser::rMSC_leaveStatement ( )
protected

Definition at line 7935 of file parse.cpp.

◆  rMSC_tryStatement()

std::optional< codet > Parser::rMSC_tryStatement ( )
protected

Definition at line 7873 of file parse.cpp.

◆  rMSCAsmStatement()

std::optional< codet > Parser::rMSCAsmStatement ( )
protected

Definition at line 8050 of file parse.cpp.

◆  rMSCuuidof()

bool Parser::rMSCuuidof ( exprtexpr )
protected

Definition at line 6525 of file parse.cpp.

◆  rMultiplyExpr()

bool Parser::rMultiplyExpr ( exprtexp )
protected

Definition at line 5369 of file parse.cpp.

◆  rName()

bool Parser::rName ( ireptname )
protected

Definition at line 3552 of file parse.cpp.

◆  rNamespaceSpec()

bool Parser::rNamespaceSpec ( cpp_namespace_spectnamespace_spec )
protected

Definition at line 828 of file parse.cpp.

◆  rNewDeclarator()

bool Parser::rNewDeclarator ( typetdecl )
protected

Definition at line 6298 of file parse.cpp.

◆  rNoexceptExpr()

bool Parser::rNoexceptExpr ( exprtexp )
protected

Definition at line 6062 of file parse.cpp.

◆  rNullDeclaration()

bool Parser::rNullDeclaration ( cpp_declarationtdecl )
protected

Definition at line 593 of file parse.cpp.

◆  rOperatorName()

bool Parser::rOperatorName ( ireptname )
protected

Definition at line 3696 of file parse.cpp.

◆  rOtherDeclaration()

bool Parser::rOtherDeclaration ( cpp_declarationtdeclaration,
cpp_storage_spectstorage_spec,
cpp_member_spectmember_spec,
typetcv_q 
)
protected

Definition at line 1709 of file parse.cpp.

◆  rOtherDeclStatement()

std::optional< codet > Parser::rOtherDeclStatement ( cpp_storage_spectstorage_spec,
typetcv_q 
)
protected

Definition at line 8351 of file parse.cpp.

◆  rPmExpr()

bool Parser::rPmExpr ( exprtexp )
protected

Definition at line 5422 of file parse.cpp.

◆  rPostfixExpr()

bool Parser::rPostfixExpr ( exprtexp )
protected

Definition at line 6386 of file parse.cpp.

◆  rPrimaryExpr()

bool Parser::rPrimaryExpr ( exprtexp )
protected

Definition at line 6736 of file parse.cpp.

◆  rProgram()

bool Parser::rProgram ( cpp_itemtitem )
protected

Definition at line 531 of file parse.cpp.

◆  rPtrToMember()

bool Parser::rPtrToMember ( ireptptr_to_mem )
protected

Definition at line 3840 of file parse.cpp.

◆  rRelationalExpr()

bool Parser::rRelationalExpr ( exprtexp,
bool  template_args 
)
protected

Definition at line 5230 of file parse.cpp.

◆  rShiftExpr()

bool Parser::rShiftExpr ( exprtexp,
bool  template_args 
)
protected

Definition at line 5282 of file parse.cpp.

◆  rSimpleDeclaration()

bool Parser::rSimpleDeclaration ( cpp_declarationtdeclaration )
protected

Definition at line 1507 of file parse.cpp.

◆  rSizeofExpr()

bool Parser::rSizeofExpr ( exprtexp )
protected

Definition at line 5962 of file parse.cpp.

◆  rStatement()

std::optional< codet > Parser::rStatement ( )
protected

Definition at line 7342 of file parse.cpp.

◆  rStaticAssert()

bool Parser::rStaticAssert ( cpp_static_asserttcpp_static_assert )
protected

Definition at line 943 of file parse.cpp.

◆  rString()

bool Parser::rString ( cpp_tokenttk )
protected

Definition at line 462 of file parse.cpp.

◆  rSwitchStatement()

std::optional< codet > Parser::rSwitchStatement ( )
protected

Definition at line 7641 of file parse.cpp.

◆  rTempArgDeclaration()

bool Parser::rTempArgDeclaration ( cpp_declarationtdeclaration )
protected

Definition at line 1181 of file parse.cpp.

◆  rTempArgList()

bool Parser::rTempArgList ( ireptargs )
protected

Definition at line 1147 of file parse.cpp.

◆  rTemplateArgs()

bool Parser::rTemplateArgs ( irepttemplate_args )
protected

Definition at line 3940 of file parse.cpp.

◆  rTemplateDecl()

bool Parser::rTemplateDecl ( cpp_declarationtdecl )
protected

Definition at line 1032 of file parse.cpp.

◆  rTemplateDecl2()

bool Parser::rTemplateDecl2 ( typetdecl,
TemplateDeclKindkind 
)
protected

Definition at line 1088 of file parse.cpp.

◆  rThrowExpr()

bool Parser::rThrowExpr ( exprtexp )
protected

Definition at line 5857 of file parse.cpp.

◆  rTryStatement()

std::optional< codet > Parser::rTryStatement ( )
protected

Definition at line 7797 of file parse.cpp.

◆  rTypedef()

bool Parser::rTypedef ( cpp_declarationtdeclaration )
protected

Definition at line 609 of file parse.cpp.

◆  rTypedefStatement()

std::optional< codet > Parser::rTypedefStatement ( )
protected

Definition at line 689 of file parse.cpp.

◆  rTypedefUsing()

bool Parser::rTypedefUsing ( cpp_declarationtdeclaration )
protected

Definition at line 637 of file parse.cpp.

◆  rTypeidExpr()

bool Parser::rTypeidExpr ( exprtexp )
protected

Definition at line 5896 of file parse.cpp.

◆  rTypeName()

bool Parser::rTypeName ( typettname )
protected

Definition at line 5526 of file parse.cpp.

◆  rTypeNameOrFunctionType()

bool Parser::rTypeNameOrFunctionType ( typettname )
protected

Definition at line 5570 of file parse.cpp.

◆  rTypePredicate()

bool Parser::rTypePredicate ( exprtexpr )
protected

Definition at line 6674 of file parse.cpp.

◆  rTypeSpecifier()

bool Parser::rTypeSpecifier ( typettspec,
bool  check 
)
protected

Definition at line 703 of file parse.cpp.

◆  rUnaryExpr()

bool Parser::rUnaryExpr ( exprtexp )
protected

Definition at line 5750 of file parse.cpp.

◆  rUsing()

bool Parser::rUsing ( cpp_usingtcpp_using )
protected

Definition at line 884 of file parse.cpp.

◆  rUsingOrTypedef()

bool Parser::rUsingOrTypedef ( cpp_itemtitem )
protected

Definition at line 919 of file parse.cpp.

◆  rVarName()

bool Parser::rVarName ( exprtname )
protected

Definition at line 6970 of file parse.cpp.

◆  rVarNameCore()

bool Parser::rVarNameCore ( exprtname )
protected

Definition at line 6983 of file parse.cpp.

◆  rWhileStatement()

std::optional< codet > Parser::rWhileStatement ( )
protected

Definition at line 7672 of file parse.cpp.

◆  set_location()

void Parser::set_location ( ireptdest,
const cpp_tokenttoken 
)
inlineprotected

Definition at line 389 of file parse.cpp.

◆  SkipTo()

void Parser::SkipTo ( int  token )
protected

Definition at line 8402 of file parse.cpp.

◆  SyntaxError()

bool Parser::SyntaxError ( )
protected

Definition at line 496 of file parse.cpp.

Member Data Documentation

◆  cpp11

const bool Parser::cpp11
protected

Definition at line 418 of file parse.cpp.

◆  current_function

irep_idt Parser::current_function
protected

Definition at line 385 of file parse.cpp.

◆  current_scope

new_scopet* Parser::current_scope
protected

Definition at line 221 of file parse.cpp.

◆  lex

cpp_token_buffert& Parser::lex
protected

Definition at line 215 of file parse.cpp.

◆  max_errors

unsigned int Parser::max_errors
protected

Definition at line 417 of file parse.cpp.

◆  message_handler

message_handlert& Parser::message_handler
protected

Definition at line 217 of file parse.cpp.

◆  number_of_errors

std::size_t Parser::number_of_errors
protected

Definition at line 384 of file parse.cpp.

◆  parse_tree

cpp_parse_treet& Parser::parse_tree
protected

Definition at line 216 of file parse.cpp.

◆  root_scope

new_scopet Parser::root_scope
protected

Definition at line 220 of file parse.cpp.


The documentation for this class was generated from the following file:
  • /home/runner/work/cbmc/cbmc/src/cpp/parse.cpp

AltStyle によって変換されたページ (->オリジナル) /