VCDFileParser Class Reference

Class for parsing files containing CSP notation. More...

#include <VCDFileParser.hpp>

Collaboration diagram for VCDFileParser:

Public Member Functions

 VCDFileParser ()
 Create a new parser/. More...
 
virtual ~VCDFileParser ()
 
VCDFileparse_file (const std::string &filepath)
 Parse the suppled file. More...
 
void error (const VCDParser::location &l, const std::string &m)
 Reports errors to stderr. More...
 
void error (const std::string &m)
 Reports errors to stderr. More...
 

Data Fields

std::string filepath
 The current file being parsed. More...
 
bool trace_scanning
 Should we debug tokenising? More...
 
bool trace_parsing
 Should we debug parsing of tokens? More...
 
VCDTime start_time
 Ignore anything before this timepoint. More...
 
VCDTime end_time
 Ignore anything after this timepoint. More...
 
VCDFilefh
 Current file being parsed and constructed. More...
 
std::stack< VCDScope * > scopes
 Current stack of scopes being parsed. More...
 

Protected Member Functions

void scan_begin ()
 Utility function for starting parsing. More...
 
void scan_end ()
 Utility function for stopping parsing. More...
 

Detailed Description

Class for parsing files containing CSP notation.

Definition at line 28 of file VCDFileParser.hpp.

Constructor & Destructor Documentation

◆ VCDFileParser()

VCDFileParser::VCDFileParser ( )

Create a new parser/.

Definition at line 9 of file VCDFileParser.cpp.

◆ ~VCDFileParser()

VCDFileParser::~VCDFileParser ( )
virtual

Definition at line 19 of file VCDFileParser.cpp.

Member Function Documentation

◆ error() [1/2]

void VCDFileParser::error ( const VCDParser::location &  l,
const std::string &  m 
)

Reports errors to stderr.

Definition at line 70 of file VCDFileParser.cpp.

◆ error() [2/2]

void VCDFileParser::error ( const std::string &  m)

Reports errors to stderr.

Definition at line 77 of file VCDFileParser.cpp.

Here is the call graph for this function:

◆ parse_file()

VCDFile * VCDFileParser::parse_file ( const std::string &  filepath)

Parse the suppled file.

Returns
A handle to the parsed VCDFile object or nullptr if parsing fails.

Definition at line 23 of file VCDFileParser.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scan_begin()

void VCDFileParser::scan_begin ( )
protected

Utility function for starting parsing.

Here is the caller graph for this function:

◆ scan_end()

void VCDFileParser::scan_end ( )
protected

Utility function for stopping parsing.

Here is the caller graph for this function:

Field Documentation

◆ end_time

VCDTime VCDFileParser::end_time

Ignore anything after this timepoint.

Definition at line 56 of file VCDFileParser.hpp.

◆ fh

VCDFile* VCDFileParser::fh

Current file being parsed and constructed.

Definition at line 65 of file VCDFileParser.hpp.

◆ filepath

std::string VCDFileParser::filepath

The current file being parsed.

Definition at line 44 of file VCDFileParser.hpp.

◆ scopes

std::stack<VCDScope*> VCDFileParser::scopes

Current stack of scopes being parsed.

Definition at line 68 of file VCDFileParser.hpp.

◆ start_time

VCDTime VCDFileParser::start_time

Ignore anything before this timepoint.

Definition at line 53 of file VCDFileParser.hpp.

◆ trace_parsing

bool VCDFileParser::trace_parsing

Should we debug parsing of tokens?

Definition at line 50 of file VCDFileParser.hpp.

◆ trace_scanning

bool VCDFileParser::trace_scanning

Should we debug tokenising?

Definition at line 47 of file VCDFileParser.hpp.


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