CCIMXDesktop
 
Loading...
Searching...
No Matches
Parser Class Reference

The Parser class is responsible for parsing a mathematical expression string and converting it into an abstract syntax tree (AST) of TreeNodeBase nodes. More...

#include <Parser.h>

Public Member Functions

 Parser ()=default
 Default constructor.
 
 ~Parser ()=default
 Default destructor.
 
void setParserString (const QString &p)
 Sets the string to be parsed.
 
QString parserString () const
 Returns the current parser string.
 
TreeNodeBaseparse ()
 Parses the input string and returns the root of the resulting AST.
 

Detailed Description

The Parser class is responsible for parsing a mathematical expression string and converting it into an abstract syntax tree (AST) of TreeNodeBase nodes.

Member Function Documentation

◆ parse()

TreeNodeBase * Parser::parse ( )

Parses the input string and returns the root of the resulting AST.

Returns
A pointer to the root node of the parsed expression tree.

◆ parserString()

QString Parser::parserString ( ) const

Returns the current parser string.

Returns
The expression string currently set.

◆ setParserString()

void Parser::setParserString ( const QString &  p)

Sets the string to be parsed.

Parameters
pThe input expression string.

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