btool
A parser/converter/transpiler for .bib files
IdentifierParserState Class Reference

Identifier Parser State. More...

#include <IdentifierParserState.hpp>

+ Inheritance diagram for IdentifierParserState:
+ Collaboration diagram for IdentifierParserState:

Public Member Functions

 IdentifierParserState (ParserContext &context, std::vector< BibElement > &result) noexcept
 
auto handleCharacter (char c) -> ParserState *override
 
- Public Member Functions inherited from AbstractParserState
 AbstractParserState (ParserContext &context, std::vector< BibElement > &result) noexcept
 
- Public Member Functions inherited from ParserState
virtual ~ParserState ()=default
 

Private Attributes

std::string identifier
 a accumulator for identifier-characters while parsing it More...
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractParserState
auto fail (const std::string &message) -> void
 
- Protected Attributes inherited from AbstractParserState
ParserContextcontext
 Context of the State. More...
 
std::vector< BibElement > & result
 Container for accumulating Parsing-Results. More...
 

Detailed Description

Identifier Parser State.

Identifier State of the Parser, parsing the identifier of the Bib-Element

Examples
/github/workspace/test/ParserStateFixtureTest.cpp.

Definition at line 14 of file IdentifierParserState.hpp.

Constructor & Destructor Documentation

◆ IdentifierParserState()

IdentifierParserState::IdentifierParserState ( ParserContext context,
std::vector< BibElement > &  result 
)
noexcept

Constructor.

Parameters
contextof the parser
resultaccumulator of parsing-results

Definition at line 14 of file IdentifierParserState.cpp.

Member Function Documentation

◆ handleCharacter()

auto IdentifierParserState::handleCharacter ( char  c) -> ParserState *
overridevirtual

Handles the next character in identifier-state

Parameters
cthe next character to parse
Returns
a new parser-state
Exceptions
ParserExceptionon parsing-error (invalid input)

Reimplemented from AbstractParserState.

Definition at line 23 of file IdentifierParserState.cpp.

Member Data Documentation

◆ identifier

std::string IdentifierParserState::identifier
private

a accumulator for identifier-characters while parsing it

Definition at line 15 of file IdentifierParserState.hpp.


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