Table of Contents

Interface IParser

Namespace
Alternet.Syntax
Assembly
Alternet.Syntax.v9.dll

Represents properties and methods for perform lexical analysis of the text.

public interface IParser : ILexer, INotify, IUpdate

Properties

CurrentPosition

When implemented by a class, represents position of current character within the current line.

Eof

When implemented by a class, indicates whether current position is out of the text, signaling that whole text is parsed.

Lines

When implemented by a class, gets or sets a list of string to parse represented as string array.

State

When implemented by a class, represents current IParser state.

Strings

When implemented by a class, gets or sets a list of strings to parse.

Token

When implemented by a class, represents token (index of style in the class style collection) related to the current position in the parsed text.

TokenPosition

When implemented by a class, represents start position of the current token.

TokenString

When implemented by a class, represents text of the current syntax token.

Methods

NextToken()

When implemented by a class, parses text from current position to the next token and updates TokenPos, CurrentPos and TokenString properties.

NextToken(out string)

When implemented by a class, parses text from current position to the next token and updates TokenPos, CurrentPos and TokenString properties.

NextValidToken()

When implemented by a class, parses text from current position to the next valid (non-whitespace, non-comment) token and updates TokenPos, CurrentPos and TokenString properties.

NextValidToken(out string)

When implemented by a class, parses text from current position to the next valid (non-whitespace, non-comment) token and updates TokenPos, CurrentPos and TokenString properties.

PeekToken()

When implemented by a class, parses next portion of the text, remaining current position unchanged.

PeekToken(out string)

When implemented by a class, parses next portion of the text, remaining current position unchanged.

PeekValidToken()

When implemented by a class, parses to the next valid (non-whitespace, non-comment) portion of the text, remaining current position unchanged.

PeekValidToken(out string)

When implemented by a class, parses to the next valid (non-whitespace, non-comment) portion of the text, remaining current position unchanged.

Reset()

When implemented by a class, resets IParser to the start position.

Reset(int, int, int)

When implemented by a class, resets IParser to the specified position.

RestoreState()

When implemented by a class, restores IParser state and position stored by SaveState method.

RestoreState(bool)

When implemented by a class, restores IParser state and position stored by SaveState method.

SaveState()

When implemented by a class, saves current IParser state and position.