OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SDDS::parser::SimpleParser Class Reference

#include <simple_parser.hpp>

Public Member Functions

 SimpleParser (std::string_view input)
 
file parse ()
 
std::size_t dataStartPos () const
 

Private Member Functions

void skipWSAndComments ()
 
bool match (std::string_view str, bool ignoreCase=false)
 
bool match (char c)
 
void expect (std::string_view str)
 
void expect (char c)
 
std::string parseQuotedString ()
 
std::string parseIdentifier ()
 
std::string parseString ()
 
version parseVersion ()
 
description parseDescription ()
 
parameter parseParameter ()
 
column parseColumn ()
 
associate parseAssociate ()
 
array parseArray ()
 
include parseInclude ()
 
data parseData ()
 

Private Attributes

std::string_view input_
 
std::size_t pos_
 
std::size_t dataStartPos_
 

Detailed Description

Definition at line 42 of file simple_parser.hpp.

Constructor & Destructor Documentation

◆ SimpleParser()

SDDS::parser::SimpleParser::SimpleParser ( std::string_view  input)
inline

Definition at line 44 of file simple_parser.hpp.

Member Function Documentation

◆ dataStartPos()

std::size_t SDDS::parser::SimpleParser::dataStartPos ( ) const
inline

Definition at line 82 of file simple_parser.hpp.

References dataStartPos_.

Referenced by SDDS::SDDSParser::run().

◆ expect() [1/2]

void SDDS::parser::SimpleParser::expect ( char  c)
inlineprivate

Definition at line 136 of file simple_parser.hpp.

References match().

Here is the call graph for this function:

◆ expect() [2/2]

void SDDS::parser::SimpleParser::expect ( std::string_view  str)
inlineprivate

Definition at line 130 of file simple_parser.hpp.

References match().

Referenced by parseColumn(), parseData(), parseDescription(), parseParameter(), and parseVersion().

Here is the call graph for this function:

◆ match() [1/2]

bool SDDS::parser::SimpleParser::match ( char  c)
inlineprivate

Definition at line 121 of file simple_parser.hpp.

References input_, pos_, and skipWSAndComments().

Here is the call graph for this function:

◆ match() [2/2]

bool SDDS::parser::SimpleParser::match ( std::string_view  str,
bool  ignoreCase = false 
)
inlineprivate

Definition at line 95 of file simple_parser.hpp.

References input_, pos_, and skipWSAndComments().

Referenced by expect(), expect(), parse(), parseArray(), parseAssociate(), parseColumn(), parseData(), parseDescription(), parseInclude(), and parseParameter().

Here is the call graph for this function:

◆ parse()

file SDDS::parser::SimpleParser::parse ( )
inline

◆ parseArray()

array SDDS::parser::SimpleParser::parseArray ( )
inlineprivate

Definition at line 323 of file simple_parser.hpp.

References match(), and parseString().

Referenced by parse().

Here is the call graph for this function:

◆ parseAssociate()

associate SDDS::parser::SimpleParser::parseAssociate ( )
inlineprivate

Definition at line 311 of file simple_parser.hpp.

References match(), and parseString().

Referenced by parse().

Here is the call graph for this function:

◆ parseColumn()

column SDDS::parser::SimpleParser::parseColumn ( )
inlineprivate

◆ parseData()

data SDDS::parser::SimpleParser::parseData ( )
inlineprivate

Definition at line 347 of file simple_parser.hpp.

References SDDS::ast::ASCII, SDDS::ast::BINARY, dataStartPos_, SDDS::ast::equalsIgnoreCase(), expect(), input_, match(), SDDS::data::mode_m, parseIdentifier(), parseString(), and pos_.

Referenced by parse().

Here is the call graph for this function:

◆ parseDescription()

description SDDS::parser::SimpleParser::parseDescription ( )
inlineprivate

Definition at line 205 of file simple_parser.hpp.

References SDDS::description::content_m, expect(), input_, match(), parseString(), pos_, and SDDS::description::text_m.

Referenced by parse().

Here is the call graph for this function:

◆ parseIdentifier()

std::string SDDS::parser::SimpleParser::parseIdentifier ( )
inlineprivate

Definition at line 163 of file simple_parser.hpp.

References input_, pos_, and skipWSAndComments().

Referenced by parseData(), and parseString().

Here is the call graph for this function:

◆ parseInclude()

include SDDS::parser::SimpleParser::parseInclude ( )
inlineprivate

Definition at line 335 of file simple_parser.hpp.

References match(), and parseString().

Referenced by parse().

Here is the call graph for this function:

◆ parseParameter()

parameter SDDS::parser::SimpleParser::parseParameter ( )
inlineprivate

◆ parseQuotedString()

std::string SDDS::parser::SimpleParser::parseQuotedString ( )
inlineprivate

Definition at line 142 of file simple_parser.hpp.

References input_, and pos_.

Referenced by parseString().

◆ parseString()

std::string SDDS::parser::SimpleParser::parseString ( )
inlineprivate

Definition at line 180 of file simple_parser.hpp.

References input_, parseIdentifier(), parseQuotedString(), pos_, and skipWSAndComments().

Referenced by parseArray(), parseAssociate(), parseColumn(), parseData(), parseDescription(), parseInclude(), and parseParameter().

Here is the call graph for this function:

◆ parseVersion()

version SDDS::parser::SimpleParser::parseVersion ( )
inlineprivate

Definition at line 188 of file simple_parser.hpp.

References expect(), input_, SDDS::version::layoutVersion_m, pos_, and skipWSAndComments().

Referenced by parse().

Here is the call graph for this function:

◆ skipWSAndComments()

void SDDS::parser::SimpleParser::skipWSAndComments ( )
inlineprivate

Definition at line 91 of file simple_parser.hpp.

References input_, pos_, and SDDS::parser::skipper::skipWhitespaceAndComments().

Referenced by match(), match(), parseIdentifier(), parseString(), and parseVersion().

Here is the call graph for this function:

Member Data Documentation

◆ dataStartPos_

std::size_t SDDS::parser::SimpleParser::dataStartPos_
private

Definition at line 89 of file simple_parser.hpp.

Referenced by dataStartPos(), parse(), and parseData().

◆ input_

std::string_view SDDS::parser::SimpleParser::input_
private

◆ pos_

std::size_t SDDS::parser::SimpleParser::pos_
private

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