Class Lexer
A lexer that will tokenize expressions.
Inheritance
System.Object
Lexer
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: SpiceSharpParser.Lexers.Expressions
Assembly: SpiceSharpParser.dll
Syntax
public class Lexer
Constructors
| Improve this Doc View SourceLexer(String)
Initializes a new instance of the Lexer class.
Declaration
public Lexer(string expression)
Parameters
Type | Name | Description |
---|---|---|
System.String | expression | The expression. |
Properties
| Improve this Doc View SourceBuilderLength
Gets the builder length.
Declaration
public int BuilderLength { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Content
Gets the content.
Declaration
public string Content { get; }
Property Value
Type | Description |
---|---|
System.String | The content. |
Current
Gets the current character.
Declaration
public char Current { get; }
Property Value
Type | Description |
---|---|
System.Char | The current character. |
Index
Gets or sets the index.
Declaration
public int Index { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
LastToken
Gets the last token.
Declaration
public TokenType LastToken { get; }
Property Value
Type | Description |
---|---|
TokenType | The last token. |
Token
Gets the token.
Declaration
public TokenType Token { get; }
Property Value
Type | Description |
---|---|
TokenType | The type. |
Methods
| Improve this Doc View SourceReadNode()
Reads the next node.
Declaration
public void ReadNode()
ReadToken()
Reads the next token.
Declaration
public void ReadToken()
Reset()
Resets the lexer to the start of the input.
Declaration
public void Reset()