CBMC
parsert Class Referenceabstract

#include <parser.h>

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

Public Member Functions

 parsert ()
 
 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
 
messaget log
 

Protected Attributes

source_locationt source_location
 
unsigned line_no
 
unsigned previous_line_no
 
unsigned column
 

Detailed Description

Definition at line 24 of file parser.h.

Constructor & Destructor Documentation

◆ parsert() [1/2]

parsert::parsert ( )
inline
Deprecated:
"deprecated since " "2023" "-" "12" "-" "20" "; " "use parsert(message_handler) instead"

Definition at line 34 of file parser.h.

◆ parsert() [2/2]

parsert::parsert ( message_handlert message_handler)
inlineexplicit

Definition at line 38 of file parser.h.

◆ ~parsert()

virtual parsert::~parsert ( )
inlinevirtual

Definition at line 47 of file parser.h.

Member Function Documentation

◆ advance_column()

void parsert::advance_column ( unsigned  token_width)
inline

Definition at line 133 of file parser.h.

◆ eof()

bool parsert::eof ( )
inline

Definition at line 69 of file parser.h.

◆ get_column()

unsigned parsert::get_column ( ) const
inline

Definition at line 106 of file parser.h.

◆ get_file()

irep_idt parsert::get_file ( ) const
inline

Definition at line 96 of file parser.h.

◆ get_line_no()

unsigned parsert::get_line_no ( ) const
inline

Definition at line 101 of file parser.h.

◆ inc_line_no()

void parsert::inc_line_no ( )
inline

Definition at line 78 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 51 of file parser.h.

◆ set_column()

void parsert::set_column ( unsigned  _column)
inline

Definition at line 111 of file parser.h.

◆ set_file()

void parsert::set_file ( const irep_idt file)
inline

Definition at line 89 of file parser.h.

◆ set_function()

void parsert::set_function ( const irep_idt function)
inline

Definition at line 128 of file parser.h.

◆ set_line_no()

void parsert::set_line_no ( unsigned  _line_no)
inline

Definition at line 84 of file parser.h.

◆ set_source_location()

void parsert::set_source_location ( exprt e)
inline

Definition at line 116 of file parser.h.

Member Data Documentation

◆ column

unsigned parsert::column
protected

Definition at line 145 of file parser.h.

◆ in

std::istream* parsert::in

Definition at line 27 of file parser.h.

◆ last_line

std::string parsert::last_line

Definition at line 29 of file parser.h.

◆ line_no

unsigned parsert::line_no
protected

Definition at line 144 of file parser.h.

◆ log

messaget parsert::log

Definition at line 140 of file parser.h.

◆ previous_line_no

unsigned parsert::previous_line_no
protected

Definition at line 144 of file parser.h.

◆ source_location

source_locationt parsert::source_location
protected

Definition at line 143 of file parser.h.

◆ stack

std::vector<exprt> parsert::stack

Definition at line 31 of file parser.h.

◆ this_line

std::string parsert::this_line

Definition at line 29 of file parser.h.


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