retdec
Private Attributes | List of all members
retdec::fileformat::IntelHexTokenizer Class Reference

The Tokenizer class - Intel HEX lexical analysis. More...

#include <intel_hex_tokenizer.h>

Collaboration diagram for retdec::fileformat::IntelHexTokenizer:
Collaboration graph
[legend]

Public Member Functions

Getters
IntelHexToken getToken ()
 
Initialization functions
bool openFile (const std::string &pathToFile)
 
bool setInputStream (std::istream &inputStream)
 

Private Member Functions

Helper methods
std::string readN (unsigned n)
 
IntelHexToken makeErrorToken (const std::string &errorMessage)
 

Private Attributes

std::ifstream fstr
 
std::istream * source = nullptr
 

Detailed Description

The Tokenizer class - Intel HEX lexical analysis.

Member Function Documentation

◆ getToken()

IntelHexToken retdec::fileformat::IntelHexTokenizer::getToken ( )

Get next token

Returns
Next token

◆ makeErrorToken()

IntelHexToken retdec::fileformat::IntelHexTokenizer::makeErrorToken ( const std::string &  errorMessage)
private

Creates and formats error token

Parameters
errorMessageError message to send
Returns
Formatted error token

◆ openFile()

bool retdec::fileformat::IntelHexTokenizer::openFile ( const std::string &  pathToFile)

Opens the file to analyze

Parameters
pathToFilePath to input file
Returns
true on success, false otherwise

◆ readN()

std::string retdec::fileformat::IntelHexTokenizer::readN ( unsigned  n)
private

Reads n characters from source

Parameters
nNumber of characters to read
Returns
String that was read

◆ setInputStream()

bool retdec::fileformat::IntelHexTokenizer::setInputStream ( std::istream &  inputStream)

Sets input stream to find tokens in

Parameters
inputStreamReference to std::istream
Returns
True on success, false otherwise

Member Data Documentation

◆ fstr

std::ifstream retdec::fileformat::IntelHexTokenizer::fstr
private

◆ source

std::istream* retdec::fileformat::IntelHexTokenizer::source = nullptr
private

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