Class Scanner
public class Scanner
- Inheritance
-
Scanner
- Inherited Members
Constructors
Scanner()
public Scanner()
Fields
CurrentColumn
public int CurrentColumn
Field Value
CurrentFile
public string CurrentFile
Field Value
CurrentLine
public int CurrentLine
Field Value
CurrentPosition
public int CurrentPosition
Field Value
EndPos
public int EndPos
Field Value
Input
public string Input
Field Value
Patterns
public Dictionary<TokenType, Regex> Patterns
Field Value
Skipped
public List<Token> Skipped
Field Value
StartPos
public int StartPos
Field Value
Methods
GetToken(TokenType)
public Token GetToken(TokenType type)
Parameters
typeTokenType
Returns
Init(string)
public void Init(string input)
Parameters
inputstring
Init(string, string)
public void Init(string input, string fileName)
Parameters
LookAhead(params TokenType[])
returns token with longest best match
public Token LookAhead(params TokenType[] expectedtokens)
Parameters
expectedtokensTokenType[]
Returns
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
expectedtokensTokenType[]