Class LexerGrammarBuilder<TLexerState>
Builder for LexerGrammar object from lexer rules either of type LexerTokenRole or LexerInternalRule.
Inheritance
System.Object
LexerGrammarBuilder<TLexerState>
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
Assembly: SpiceSharpParser.dll
Syntax
public class LexerGrammarBuilder<TLexerState>
where TLexerState : LexerState
Type Parameters
Name | Description |
---|---|
TLexerState | A type of lexer state. |
Methods
| Improve this Doc View SourceAddDynamicRule(LexerDynamicRule)
Adds a rule to builder.
Declaration
public void AddDynamicRule(LexerDynamicRule rule)
Parameters
Type | Name | Description |
---|---|---|
LexerDynamicRule | rule | A lexer rule. |
AddRegexRule(LexerRegexRule)
Adds a rule to builder.
Declaration
public void AddRegexRule(LexerRegexRule rule)
Parameters
Type | Name | Description |
---|---|---|
LexerRegexRule | rule | A lexer rule. |
Clear()
Clears the builder.
Declaration
public void Clear()
GetGrammar()
Gets the generated grammar.
Declaration
public LexerGrammar<TLexerState> GetGrammar()
Returns
Type | Description |
---|---|
LexerGrammar<TLexerState> | A new grammar that contains rules that were added. |