Skip to main content

Class Lexer

Namespace: OceanApocalypse.RSML.Language.Lexing
Assembly: RSML.Language.Lexing.dll

The base class for implementations of RSML lexers and tokenizers.

public abstract class Lexer : ILexer, IToolchainComponent, IDisposable

Inheritance

ObjectLexer

Derived

BufferLexer, ScannerLexer

Implements

ILexer, IToolchainComponent, IDisposable

Inherited Members

Object.Equals(Object?), Object.Equals(Object?, Object?), Object.GetHashCode(), Object.GetType(), Object.MemberwiseClone(), Object.ReferenceEquals(Object?, Object?), Object.ToString()

Properties

Configuration

Configurations for the toolchain component.

public virtual ToolchainConfigurations Configuration { get; protected set; }

Property Value

ToolchainConfigurations

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Dispose(Boolean)

Disposes of both managed and unmanaged resources.

protected virtual void Dispose(Boolean disposing)

Parameters

disposing Boolean

When set to false, disposes of unmanaged resources only.

GetNextToken()

Returns the next token.

public abstract Result<Token> GetNextToken()

Returns

Result<Token>

The next token.

Inject(ToolchainConfigurations)

Injects a configuration into the toolchain component, modifying it.

public virtual void Inject(ToolchainConfigurations configuration)

Parameters

configuration ToolchainConfigurations

The configuration to inject.

Lex()

Tokenizes a source passed to the lexer.

public abstract IEnumerable<Token> Lex()

Returns

IEnumerable<Token>

The tokens.