In This Article

ILexicalState Interface

Provides the base requirements for a lexical state.

public interface ILexicalState : IKeyedObject

Properties

ChildLexicalStates

Gets the collection of child lexical states.

ILexicalStateCollection ChildLexicalStates { get; }

Property Value

ILexicalStateCollection:

A ILexicalStateCollection containing the child lexical states.

DefaultTokenId

Gets or sets the ID of the default token that this state assigns.

int DefaultTokenId { get; set; }

Property Value

Int32:

The ID of the default token that this state assigns.

Id

Gets the ID value that identifies the lexical state.

int Id { get; }

Property Value

Int32:

The ID value that identifies the lexical state.

Lexer

Gets the ILexer that contains the state.

ILexer Lexer { get; }

Property Value

ILexer:

The ILexer that contains the state.

LexicalScopes

Gets the collection of lexical scopes.

ILexicalScopeCollection LexicalScopes { get; }

Property Value

ILexicalScopeCollection:

A ILexicalScopeCollection containing the lexical scopes.

Tag

Gets or sets the object that contains user-defined data about the object.

object Tag { get; set; }

Property Value

Object:

An Object that contains user-defined data about the object. The default is null.

Remarks

Any type derived from the Object class can be assigned to this property.

Transition

Gets or sets the ILexicalStateTransition that is performed immediately after a start scope match.

ILexicalStateTransition Transition { get; set; }

Property Value

ILexicalStateTransition:

The ILexicalStateTransition that is performed immediately after a start scope match.

Remarks

This provides a mechanism to automatically transition to another language when this state's start scope is matched. This state's end scope may be used to exit the child language.

ASP-style tags are an example of when to use this transition.

Inherited Members