cprover
Loading...
Searching...
No Matches
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)
const source_locationtsource_location ()
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 24 of file parser.h.

Constructor & Destructor Documentation

◆ parsert()

parsert::parsert ( message_handlert & message_handler)
inlineexplicit

Definition at line 33 of file parser.h.

◆ ~parsert()

virtual parsert::~parsert ( )
inlinevirtual

Definition at line 42 of file parser.h.

Member Function Documentation

◆ advance_column()

void parsert::advance_column ( unsigned token_width)
inline

Definition at line 138 of file parser.h.

◆ eof()

bool parsert::eof ( )
inline

Definition at line 64 of file parser.h.

◆ get_column()

unsigned parsert::get_column ( ) const
inline

Definition at line 101 of file parser.h.

◆ get_file()

irep_idt parsert::get_file ( ) const
inline

Definition at line 91 of file parser.h.

◆ get_line_no()

unsigned parsert::get_line_no ( ) const
inline

Definition at line 96 of file parser.h.

◆ inc_line_no()

void parsert::inc_line_no ( )
inline

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

◆ set_column()

void parsert::set_column ( unsigned _column)
inline

Definition at line 106 of file parser.h.

◆ set_file()

void parsert::set_file ( const irep_idt & file)
inline

Definition at line 84 of file parser.h.

◆ set_function()

void parsert::set_function ( const irep_idt & function)
inline

Definition at line 133 of file parser.h.

◆ set_line_no()

void parsert::set_line_no ( unsigned _line_no)
inline

Definition at line 79 of file parser.h.

◆ set_source_location()

void parsert::set_source_location ( exprt & e)
inline

Definition at line 128 of file parser.h.

◆ source_location()

const source_locationt & parsert::source_location ( )
inline

Definition at line 111 of file parser.h.

Member Data Documentation

◆ _source_location

source_locationt parsert::_source_location
protected

Definition at line 145 of file parser.h.

◆ column

unsigned parsert::column
protected

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

◆ log

messaget parsert::log
protected

Definition at line 144 of file parser.h.

◆ previous_line_no

unsigned parsert::previous_line_no
protected

Definition at line 146 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: