Elementa v8.0.0
Minimalistic library for any C++ application (C++11 and up)
Loading...
Searching...
No Matches
elementa::parsing::StepInfo::Info Struct Reference

Information depending on the kind. More...

Description

Information depending on the kind.

Not coded as a union for two reasons: i) In that case one of the two members would not be initialized (the constructors in the struct only initialize one if the struct is a union), even with its default constructor, and further attempts to copy that member from another Info into this (for example, in the StepInfo copy constructor and in the case that the other member to copy is RIT, which involves the copy of a map iterator) may produce severe problems due to its previous lack of initialization. ii) Some parsers may need to annotate a terminal (VT) with the rule in course (RIT).

Definition at line 169 of file parsing.h.

#include "parsing.h"

Collaboration diagram for elementa::parsing::StepInfo::Info:

Public Attributes

Token::Ptr vt
 kMatch: code of the terminal plus its value. More...
 
CFGrammar::RuleIterator rit
 kRule: rule that is to be emitted. More...
 

Public Member Functions

 Info (const Token::Ptr &v)
 Constructor from a valued terminal. More...
 
 Info (const CFGrammar::RuleIterator &ri)
 Constructor from a rule iterator. More...
 
 Info (const Info &oth)=default
 
 Info (Info &&oth)=default
 
Infooperator= (const Info &oth)=default
 
Infooperator= (Info &&oth)=default
 

Constructor & Destructor Documentation

◆ Info() [1/2]

elementa::parsing::StepInfo::Info::Info ( const Token::Ptr v)
inline

Constructor from a valued terminal.

Definition at line 178 of file parsing.h.

◆ Info() [2/2]

elementa::parsing::StepInfo::Info::Info ( const CFGrammar::RuleIterator ri)
inline

Constructor from a rule iterator.

Definition at line 181 of file parsing.h.

Member Data Documentation

◆ vt

Token::Ptr elementa::parsing::StepInfo::Info::vt

kMatch: code of the terminal plus its value.

Definition at line 172 of file parsing.h.

Referenced by elementa::parsing::StepInfo::operator==().

◆ rit

CFGrammar::RuleIterator elementa::parsing::StepInfo::Info::rit

kRule: rule that is to be emitted.

Definition at line 175 of file parsing.h.

Referenced by elementa::parsing::StepInfo::operator==().


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