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

Global Parser State. More...

#include <GlobalParserState.hpp>

+ Inheritance diagram for GlobalParserState:
+ Collaboration diagram for GlobalParserState:

Public Member Functions

 GlobalParserState (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
 

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

Global Parser State.

Global State of the Parser, looking for the next Element to parse (beginning with an '@')

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

Definition at line 14 of file GlobalParserState.hpp.

Constructor & Destructor Documentation

◆ GlobalParserState()

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

Constructor.

Parameters
contextof the parser
resultaccumulator of parsing-results

Definition at line 9 of file GlobalParserState.cpp.

Member Function Documentation

◆ handleCharacter()

ParserState * GlobalParserState::handleCharacter ( char  c) -> ParserState *
overridevirtual

Handles the next character in global-state

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

Reimplemented from AbstractParserState.

Definition at line 18 of file GlobalParserState.cpp.

References AbstractParserState::context, and AbstractParserState::result.


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