CBMC
mini_c_parsert Class Reference
+ Collaboration diagram for mini_c_parsert:

Public Member Functions

 mini_c_parsert ()
 
c_translation_unitt parse (std::istream &)
 

Protected Types

using tokenst = std::vector< ctokent >
 

Protected Member Functions

bool eof () const
 
c_declarationt parse_declaration ()
 
tokenst parse_pre_declarator ()
 
tokenst parse_declarator ()
 
tokenst parse_post_declarator ()
 
tokenst parse_initializer ()
 
const ctokentpeek () const
 
const ctokentpeek (std::size_t how_many) const
 
const ctokentconsume_token ()
 
void skip_ws (tokenst &)
 
void parse_brackets (char open, char close, tokenst &dest)
 

Static Protected Member Functions

static bool is_storage_class (const ctokent &token)
 
static bool is_type_qualifier (const ctokent &token)
 

Protected Attributes

std::size_t token_index
 
tokenst tokens
 

Detailed Description

Definition at line 19 of file mini_c_parser.cpp.

Member Typedef Documentation

◆ tokenst

using mini_c_parsert::tokenst = std::vector<ctokent>
protected

Definition at line 30 of file mini_c_parser.cpp.

Constructor & Destructor Documentation

◆ mini_c_parsert()

mini_c_parsert::mini_c_parsert ( )
inline

Definition at line 22 of file mini_c_parser.cpp.

Member Function Documentation

◆ consume_token()

const ctokent& mini_c_parsert::consume_token ( )
inlineprotected

Definition at line 56 of file mini_c_parser.cpp.

◆ eof()

bool mini_c_parsert::eof ( ) const
inlineprotected

Definition at line 33 of file mini_c_parser.cpp.

◆ is_storage_class()

static bool mini_c_parsert::is_storage_class ( const ctokent token)
inlinestaticprotected

Definition at line 63 of file mini_c_parser.cpp.

◆ is_type_qualifier()

static bool mini_c_parsert::is_type_qualifier ( const ctokent token)
inlinestaticprotected

Definition at line 69 of file mini_c_parser.cpp.

◆ parse()

c_translation_unitt mini_c_parsert::parse ( std::istream &  in)

Definition at line 372 of file mini_c_parser.cpp.

◆ parse_brackets()

void mini_c_parsert::parse_brackets ( char  open,
char  close,
tokenst dest 
)
protected

Definition at line 137 of file mini_c_parser.cpp.

◆ parse_declaration()

c_declarationt mini_c_parsert::parse_declaration ( )
protected

Definition at line 360 of file mini_c_parser.cpp.

◆ parse_declarator()

mini_c_parsert::tokenst mini_c_parsert::parse_declarator ( )
protected

Definition at line 248 of file mini_c_parser.cpp.

◆ parse_initializer()

mini_c_parsert::tokenst mini_c_parsert::parse_initializer ( )
protected

Definition at line 313 of file mini_c_parser.cpp.

◆ parse_post_declarator()

mini_c_parsert::tokenst mini_c_parsert::parse_post_declarator ( )
protected

Definition at line 277 of file mini_c_parser.cpp.

◆ parse_pre_declarator()

mini_c_parsert::tokenst mini_c_parsert::parse_pre_declarator ( )
protected

Definition at line 161 of file mini_c_parser.cpp.

◆ peek() [1/2]

const ctokent& mini_c_parsert::peek ( ) const
inlineprotected

Definition at line 44 of file mini_c_parser.cpp.

◆ peek() [2/2]

const ctokent& mini_c_parsert::peek ( std::size_t  how_many) const
inlineprotected

Definition at line 50 of file mini_c_parser.cpp.

◆ skip_ws()

void mini_c_parsert::skip_ws ( tokenst dest)
protected

Definition at line 125 of file mini_c_parser.cpp.

Member Data Documentation

◆ token_index

std::size_t mini_c_parsert::token_index
protected

Definition at line 29 of file mini_c_parser.cpp.

◆ tokens

tokenst mini_c_parsert::tokens
protected

Definition at line 31 of file mini_c_parser.cpp.


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