Show / Hide Table of Contents

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 Source

AddDynamicRule(LexerDynamicRule)

Adds a rule to builder.

Declaration
public void AddDynamicRule(LexerDynamicRule rule)
Parameters
Type Name Description
LexerDynamicRule rule

A lexer rule.

| Improve this Doc View Source

AddRegexRule(LexerRegexRule)

Adds a rule to builder.

Declaration
public void AddRegexRule(LexerRegexRule rule)
Parameters
Type Name Description
LexerRegexRule rule

A lexer rule.

| Improve this Doc View Source

Clear()

Clears the builder.

Declaration
public void Clear()
| Improve this Doc View Source

GetGrammar()

Gets the generated grammar.

Declaration
public LexerGrammar<TLexerState> GetGrammar()
Returns
Type Description
LexerGrammar<TLexerState>

A new grammar that contains rules that were added.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX