Interface IParser
- Namespace
- Albatross.Expression
- Assembly
- Albatross.Expression.dll
Defines the core expression parsing functionality for tokenizing, converting, and building expression trees.
public interface IParser
- Extension Methods
Properties
CaseSensitive
Indicates whether this parser performs case-sensitive matching for keywords and identifiers.
bool CaseSensitive { get; }
Property Value
Methods
BuildPostfixStack(Queue<IToken>)
Converts a token queue from infix notation to postfix (reverse Polish) notation using the shunting-yard algorithm.
Stack<IToken> BuildPostfixStack(Queue<IToken> queue)
Parameters
Returns
CreateTree(Stack<IToken>)
Constructs an abstract syntax tree from a postfix token stack.
IExpression CreateTree(Stack<IToken> postfix)
Parameters
Returns
- IExpression
The root expression node of the constructed syntax tree.
Tokenize(string)
Parses an expression string from left to right and produces a queue of tokens in infix notation.
Queue<IToken> Tokenize(string expression)
Parameters
expressionstringThe expression string to tokenize.