Table of Contents

Class Scanner

Namespace
MonoGame.Effect.TPGParser
Assembly
MonoGame.Framework.Content.Pipeline.dll
public class Scanner
Inheritance
Scanner
Inherited Members

Constructors

Scanner()

public Scanner()

Fields

CurrentColumn

public int CurrentColumn

Field Value

int

CurrentFile

public string CurrentFile

Field Value

string

CurrentLine

public int CurrentLine

Field Value

int

CurrentPosition

public int CurrentPosition

Field Value

int

EndPos

public int EndPos

Field Value

int

Input

public string Input

Field Value

string

Patterns

public Dictionary<TokenType, Regex> Patterns

Field Value

Dictionary<TokenType, Regex>

Skipped

public List<Token> Skipped

Field Value

List<Token>

StartPos

public int StartPos

Field Value

int

Methods

GetToken(TokenType)

public Token GetToken(TokenType type)

Parameters

type TokenType

Returns

Token

Init(string)

public void Init(string input)

Parameters

input string

Init(string, string)

public void Init(string input, string fileName)

Parameters

input string
fileName string

LookAhead(params TokenType[])

returns token with longest best match

public Token LookAhead(params TokenType[] expectedtokens)

Parameters

expectedtokens TokenType[]

Returns

Token

Scan(params TokenType[])

executes a lookahead of the next token and will advance the scan on the input string

public Token Scan(params TokenType[] expectedtokens)

Parameters

expectedtokens TokenType[]

Returns

Token