cprover
parsert Class Referenceabstract

#include <parser.h>

Inheritance diagram for parsert:
[legend]
Collaboration diagram for parsert:
[legend]

Public Member Functions

virtual void clear ()
 
 parsert ()
 
virtual ~parsert ()
 
bool read (char &ch)
 
virtual bool parse ()=0
 
bool eof ()
 
void parse_error (const std::string &message, const std::string &before)
 
void inc_line_no ()
 
void set_line_no (unsigned _line_no)
 
void set_file (const irep_idt &file)
 
irep_idt get_file () const
 
unsigned get_line_no () const
 
unsigned get_column () const
 
void set_column (unsigned _column)
 
void set_source_location (exprt &e)
 
void set_function (const irep_idt &function)
 
void advance_column (unsigned token_width)
 
- Public Member Functions inherited from messaget
virtual void set_message_handler (message_handlert &_message_handler)
 
message_handlertget_message_handler ()
 
 messaget ()
 
 messaget (const messaget &other)
 
 messaget (message_handlert &_message_handler)
 
virtual ~messaget ()
 
mstreamtget_mstream (unsigned message_level)
 
mstreamterror ()
 
mstreamtwarning ()
 
mstreamtresult ()
 
mstreamtstatus ()
 
mstreamtstatistics ()
 
mstreamtprogress ()
 
mstreamtdebug ()
 

Public Attributes

std::istream * in
 
std::string this_line
 
std::string last_line
 
std::vector< exprtstack
 

Protected Attributes

source_locationt source_location
 
unsigned line_no
 
unsigned previous_line_no
 
unsigned column
 
- Protected Attributes inherited from messaget
message_handlertmessage_handler
 
mstreamt mstream
 

Additional Inherited Members

- Public Types inherited from messaget
enum  message_levelt {
  M_ERROR =1, M_WARNING =2, M_RESULT =4, M_STATUS =6,
  M_STATISTICS =8, M_PROGRESS =9, M_DEBUG =10
}
 
- Static Public Member Functions inherited from messaget
static mstreamteom (mstreamt &m)
 
static mstreamtendl (mstreamt &m)
 

Detailed Description

Definition at line 23 of file parser.h.

Constructor & Destructor Documentation

◆ parsert()

parsert::parsert ( )
inline

Definition at line 42 of file parser.h.

References clear().

◆ ~parsert()

virtual parsert::~parsert ( )
inlinevirtual

Definition at line 43 of file parser.h.

Member Function Documentation

◆ advance_column()

void parsert::advance_column ( unsigned  token_width)
inline

Definition at line 129 of file parser.h.

References column.

◆ clear()

◆ eof()

bool parsert::eof ( )
inline

Definition at line 65 of file parser.h.

References in.

◆ get_column()

unsigned parsert::get_column ( ) const
inline

Definition at line 102 of file parser.h.

References column.

◆ get_file()

irep_idt parsert::get_file ( ) const
inline

Definition at line 92 of file parser.h.

References source_locationt::get_file(), and source_location.

Referenced by cpp_parsert::parse(), and cpp_token_buffert::read_token().

◆ get_line_no()

unsigned parsert::get_line_no ( ) const
inline

Definition at line 97 of file parser.h.

References line_no.

Referenced by cpp_parsert::add_location(), and cpp_token_buffert::read_token().

◆ inc_line_no()

void parsert::inc_line_no ( )
inline

Definition at line 74 of file parser.h.

References column, and line_no.

◆ parse()

virtual bool parsert::parse ( )
pure virtual

◆ parse_error()

void parsert::parse_error ( const std::string &  message,
const std::string &  before 
)

◆ read()

bool parsert::read ( char &  ch)
inline

Definition at line 47 of file parser.h.

References in, last_line, and this_line.

◆ set_column()

void parsert::set_column ( unsigned  _column)
inline

Definition at line 107 of file parser.h.

References column.

◆ set_file()

◆ set_function()

void parsert::set_function ( const irep_idt function)
inline

Definition at line 124 of file parser.h.

References source_locationt::set_function(), and source_location.

◆ set_line_no()

void parsert::set_line_no ( unsigned  _line_no)
inline

Definition at line 80 of file parser.h.

References line_no.

Referenced by ansi_c_languaget::parse(), and preprocessor_line().

◆ set_source_location()

void parsert::set_source_location ( exprt e)
inline

Member Data Documentation

◆ column

unsigned parsert::column
protected

Definition at line 137 of file parser.h.

Referenced by advance_column(), clear(), get_column(), inc_line_no(), parse_error(), and set_column().

◆ in

◆ last_line

std::string parsert::last_line

Definition at line 28 of file parser.h.

Referenced by clear(), and read().

◆ line_no

unsigned parsert::line_no
protected

Definition at line 136 of file parser.h.

Referenced by clear(), get_line_no(), inc_line_no(), set_line_no(), and set_source_location().

◆ previous_line_no

unsigned parsert::previous_line_no
protected

Definition at line 136 of file parser.h.

Referenced by clear(), and set_source_location().

◆ source_location

source_locationt parsert::source_location
protected

◆ stack

std::vector<exprt> parsert::stack

Definition at line 30 of file parser.h.

Referenced by _newstack(), clear(), and cpp_token_buffert::read_token().

◆ this_line

std::string parsert::this_line

Definition at line 28 of file parser.h.

Referenced by read().


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