Midnight Blue Game and Engine
Public Member Functions | Properties | List of all members
MB2D.MBConsoleLexer Class Reference

Breaks a string into a series of tokens to use for parsing the debug consoles command language More...

Collaboration diagram for MB2D.MBConsoleLexer:
Collaboration graph

Public Member Functions

 MBConsoleLexer ()
 Initializes a new instance of the T:MidnightBlue.MBConsoleLexer class. More...
 
void Lex (string command)
 Lexes the command string breaking it up into token representation and a second raw string array for retrieving values. More...
 
string RawToken (int index)
 Gets an untokenized representation of a string at a specific index More...
 
Token NextToken ()
 Gets the next token in the tokenized representation of the command More...
 

Properties

int NextPos [get]
 Gets the next token index in the lexer More...
 
int CurrentPos [get]
 Gets the current token index in the lexer More...
 
int NumTokens [get]
 Gets the number of tokens scanned. More...
 

Detailed Description

Breaks a string into a series of tokens to use for parsing the debug consoles command language

Constructor & Destructor Documentation

§ MBConsoleLexer()

MB2D.MBConsoleLexer.MBConsoleLexer ( )
inline

Initializes a new instance of the T:MidnightBlue.MBConsoleLexer class.

Member Function Documentation

§ Lex()

void MB2D.MBConsoleLexer.Lex ( string  command)
inline

Lexes the command string breaking it up into token representation and a second raw string array for retrieving values.

Parameters
commandCommand string to scan.
Here is the caller graph for this function:

§ NextToken()

Token MB2D.MBConsoleLexer.NextToken ( )
inline

Gets the next token in the tokenized representation of the command

The next token.

Here is the caller graph for this function:

§ RawToken()

string MB2D.MBConsoleLexer.RawToken ( int  index)
inline

Gets an untokenized representation of a string at a specific index

Returns
The string representation.
Parameters
indexIndex.
Here is the caller graph for this function:

Property Documentation

§ CurrentPos

int MB2D.MBConsoleLexer.CurrentPos
get

Gets the current token index in the lexer

The current position.

§ NextPos

int MB2D.MBConsoleLexer.NextPos
get

Gets the next token index in the lexer

The next position.

§ NumTokens

int MB2D.MBConsoleLexer.NumTokens
get

Gets the number of tokens scanned.

The number of tokens.


The documentation for this class was generated from the following file: