CBMC
parsert Class Referenceabstract

#include <parser.h>

+ Inheritance diagram for parsert:
+ Collaboration diagram for parsert:

Public Member Functions

 parsert (message_handlert &message_handler)
 
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 Attributes

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

Protected Attributes

messaget log
 
source_locationt source_location
 
unsigned line_no
 
unsigned previous_line_no
 
unsigned column
 

Detailed Description

Definition at line 23 of file parser.h.

Constructor & Destructor Documentation

◆ parsert()

parsert::parsert ( message_handlert message_handler)
inlineexplicit

Definition at line 32 of file parser.h.

◆ ~parsert()

virtual parsert::~parsert ( )
inlinevirtual

Definition at line 41 of file parser.h.

Member Function Documentation

◆ advance_column()

void parsert::advance_column ( unsigned  token_width)
inline

Definition at line 127 of file parser.h.

◆ eof()

bool parsert::eof ( )
inline

Definition at line 63 of file parser.h.

◆ get_column()

unsigned parsert::get_column ( ) const
inline

Definition at line 100 of file parser.h.

◆ get_file()

irep_idt parsert::get_file ( ) const
inline

Definition at line 90 of file parser.h.

◆ get_line_no()

unsigned parsert::get_line_no ( ) const
inline

Definition at line 95 of file parser.h.

◆ inc_line_no()

void parsert::inc_line_no ( )
inline

Definition at line 72 of file parser.h.

◆ parse()

virtual bool parsert::parse ( )
pure virtual

◆ parse_error()

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

Definition at line 30 of file parser.cpp.

◆ read()

bool parsert::read ( char &  ch)
inline

Definition at line 45 of file parser.h.

◆ set_column()

void parsert::set_column ( unsigned  _column)
inline

Definition at line 105 of file parser.h.

◆ set_file()

void parsert::set_file ( const irep_idt file)
inline

Definition at line 83 of file parser.h.

◆ set_function()

void parsert::set_function ( const irep_idt function)
inline

Definition at line 122 of file parser.h.

◆ set_line_no()

void parsert::set_line_no ( unsigned  _line_no)
inline

Definition at line 78 of file parser.h.

◆ set_source_location()

void parsert::set_source_location ( exprt e)
inline

Definition at line 110 of file parser.h.

Member Data Documentation

◆ column

unsigned parsert::column
protected

Definition at line 136 of file parser.h.

◆ in

std::istream* parsert::in

Definition at line 26 of file parser.h.

◆ last_line

std::string parsert::last_line

Definition at line 28 of file parser.h.

◆ line_no

unsigned parsert::line_no
protected

Definition at line 135 of file parser.h.

◆ log

messaget parsert::log
protected

Definition at line 133 of file parser.h.

◆ previous_line_no

unsigned parsert::previous_line_no
protected

Definition at line 135 of file parser.h.

◆ source_location

source_locationt parsert::source_location
protected

Definition at line 134 of file parser.h.

◆ stack

std::vector<exprt> parsert::stack

Definition at line 30 of file parser.h.

◆ this_line

std::string parsert::this_line

Definition at line 28 of file parser.h.


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