XLParser  1.2.0
XLParser.FormulaAnalyzer Class Reference

This class can do some simple analysis on the trees produced by the parser. More...

Public Member Functions

 FormulaAnalyzer (ParseTreeNode root)
 Provide formula analysis functions on a tree More...
 
 FormulaAnalyzer (string formula)
 Provide formula analysis functions More...
 
IEnumerable< ParseTreeNode > References ()
 Get all references that aren't part of another reference expression More...
 
IEnumerable< string > Functions ()
 
IEnumerable< string > Constants ()
 
IEnumerable< double > Numbers ()
 
int Depth ()
 Return the depth of the parse tree, the number of nested Formulas More...
 
int OperatorDepth (ISet< string > operators=null)
 Get function/operator depth More...
 
int ConditionalComplexity ()
 Get the conditional complexity of the formula More...
 

Properties

ParseTreeNode Root [get]
 
List< ParseTreeNode > AllNodes [get]
 Lazy cached version of all nodes More...
 

Detailed Description

This class can do some simple analysis on the trees produced by the parser.

To prevent bloating this class, please make a new (sub)class and file when you want to add a coherent set of other analyses.

Constructor & Destructor Documentation

XLParser.FormulaAnalyzer.FormulaAnalyzer ( ParseTreeNode  root)

Provide formula analysis functions on a tree

XLParser.FormulaAnalyzer.FormulaAnalyzer ( string  formula)

Provide formula analysis functions

Member Function Documentation

int XLParser.FormulaAnalyzer.ConditionalComplexity ( )

Get the conditional complexity of the formula

IEnumerable<string> XLParser.FormulaAnalyzer.Constants ( )

summary> Return all constant numbers used in this formula /summary>

int XLParser.FormulaAnalyzer.Depth ( )

Return the depth of the parse tree, the number of nested Formulas

int XLParser.FormulaAnalyzer.OperatorDepth ( ISet< string >  operators = null)

Get function/operator depth

Parameters
operatorsIf not null, count only specific functions/operators
IEnumerable<ParseTreeNode> XLParser.FormulaAnalyzer.References ( )

Get all references that aren't part of another reference expression

Property Documentation

List<ParseTreeNode> XLParser.FormulaAnalyzer.AllNodes
get

Lazy cached version of all nodes


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