GH_ExpressionParser
Provides a run-time evaluator for Grasshopper expressions.
Inheritance Hierarchy
System.Object
Grasshopper.Kernel.Expressions.GH_ExpressionParser
Namespace: Grasshopper.Kernel.Expressions
Assembly: Grasshopper (in Grasshopper.dll)
Syntax
public class GH_ExpressionParser
The GH_ExpressionParser type exposes the following members.
Constructors
Name
Description
Public Method
GH_ExpressionParser.
Initializes a new instance of the GH_ExpressionParser class
Public Method
GH_ExpressionParser(Boolean)
Initializes a new instance of the GH_ExpressionParser class
Properties
Name
Description
Public Property
ThrowExceptions
Public Property
Variables
Methods
Name
Description
Public Method
AddVariable(String, Complex)
Public Method
AddVariable(String, Plane)
Public Method
AddVariable(String, Point3d)
Public Method
AddVariable(String, Vector3d)
Public Method
AddVariable(String, Boolean)
Public Method
AddVariable(String, Double)
Public Method
AddVariable(String, Int32)
Public Method
AddVariable(String, String)
Public Method
AddVariableEx(String, GH_Variant)
Public Method
AddVariableEx(String, IGH_Goo)
Public Method
Static Member
BalancedCharTest
Test a string for balanced open and close chars. You can use this function to see if brackets or parenthesis have been properly used.
Public Method
CachedSymbols
Retrieve a copy of the Queue of cached symbols. You can use the cached symbols as an uber-optimization to speed up successive calls to Evaluate() with an identical expression string
Public Method
CacheSymbols
Create a Symbols array from the expression. Use this method if you intend to evaluate the same expression multiple times. At this point, the expression has to be in correct syntax format. Use the GH_ExpressionSyntaxWriter.RewriteAll() method to make sure.
Public Method
ClearSymbols
Destroy the Symbols cache.
Public Method
ClearVariables
Destroy the variable cache.
Public Method
DisplayFunctionList
Public Method
Evaluate.
Evaluate the expression currently loaded in the Symbols cache using the currently loaded variables.
Public Method
Evaluate(Queue.GH_ParserSymbol.)
Evaluate the expression queue without overriding any local caches. You can obtain an expression queue by calling CachedSymbols()
Public Method
Evaluate(String)
Store a new expression in the Symbols cache and evaluate it using the current variables
Public Method
Static Member
IsValidVariableName
Tests whether a string is a valid variable name for expressions. Valid names must contain at least one character, must start with an alphabetic character, and only contain alphanumeric chars and underscores.
Protected method
Op_BinaryAddition
Protected method
Op_BinaryAmpersand
Protected method
Op_BinaryAND
Protected method
Op_BinaryAngle
Protected method
Op_BinaryCircumflex
Protected method
Op_BinaryCrossProduct
Protected method
Op_BinaryDistance
Protected method
Op_BinaryDivision
Protected method
Op_BinaryEquality
Protected method
Op_BinaryIntegerDivision
Protected method
Op_BinaryLargerThan
Protected method
Op_BinaryLargerThanOrEqual
Protected method
Op_BinaryModulus
Protected method
Op_BinaryMultiplication
Protected method
Op_BinaryNearEquality
Protected method
Op_BinaryOR
Protected method
Op_BinaryPull
Protected method
Op_BinaryPush
Protected method
Op_BinarySmallerThan
Protected method
Op_BinarySmallerThanOrEqual
Protected method
Op_BinarySubtraction
Protected method
Op_BinaryXOR
Protected method
Op_UnaryBang
Protected method
Op_UnaryCube
Protected method
Op_UnaryDeg2Rad
Protected method
Op_UnaryImaginary
Protected method
Op_UnaryMinus
Protected method
Op_UnaryNOT
Protected method
Op_UnaryOComponent
Protected method
Op_UnaryPlus
Protected method
Op_UnarySquare
Protected method
Op_UnaryXComponent
Protected method
Op_UnaryYComponent
Protected method
Op_UnaryZComponent