OpenXLSX 1.12.1
Modern C++ Excel Library (Fork of OpenXLSX by Kenneth Troldal Balslev)
Loading...
Searching...
No Matches
OpenXLSX::XLFormulaParser Class Reference

Recursive-descent (Pratt) parser that converts a token stream into an AST. More...

#include <XLFormulaEngine.hpp>

Static Public Member Functions

static std::unique_ptr< XLASTNode > parse (gsl::span< const XLToken > tokens, XLFormulaDiagnosticReporter *reporter=nullptr)
 Parse the token list produced by XLFormulaLexer::tokenize().

Detailed Description

Recursive-descent (Pratt) parser that converts a token stream into an AST.

Member Function Documentation

◆ parse()

std::unique_ptr< XLASTNode > OpenXLSX::XLFormulaParser::parse ( gsl::span< const XLToken > tokens,
XLFormulaDiagnosticReporter * reporter = nullptr )
static

Parse the token list produced by XLFormulaLexer::tokenize().

Parameters
tokensSpan over the token vector (including sentinel End token).
reporterOptional diagnostic reporter to collect syntax errors.
Returns
Root AST node.
Exceptions
XLFormulaErroron syntax error if reporter is nullptr.

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