Property | Type | Description | |
---|---|---|---|
NChars | int |
Method | Description | |
---|---|---|
Display ( ) : void |
Display the state of this object.
|
|
Display ( string prefix ) : void |
Display the state of this object, with a per-line prefix.
|
|
NextToken ( |
Get the next token. The last token will be an EofToken unless there's an unterminated quote or unterminated block comment and Settings.DoUntermCheck is true, in which case this throws an exception of type StreamTokenizerUntermException or sub-class.
|
|
SpeedTest ( ) : bool |
Speed test. This tests the speed of the parse.
|
|
StreamTokenizer ( ) : System |
Default constructor.
|
|
StreamTokenizer ( TextReader sr ) : System |
Construct and set this object's TextReader to the one specified.
|
|
StreamTokenizer ( string str ) : System |
Construct and set a string to tokenize.
|
|
TestSelf ( ) : bool |
Simple self test. See StreamTokenizerTestCase for full tests.
|
|
Tokenize ( List |
Parse the rest of the stream and put all the tokens in the input List. This resets the line number to 1.
|
|
TokenizeFile ( string fileName ) : RTools.Util.Token[] |
Tokenize a file completely and return the tokens in a Token[].
|
|
TokenizeFile ( string fileName, List |
Parse all tokens from the specified file, put them into the input List.
|
|
TokenizeReader ( TextReader tr, List |
Parse all tokens from the specified TextReader, put them into the input List.
|
|
TokenizeStream ( Stream s, List |
Parse all tokens from the specified Stream, put them into the input List.
|
|
TokenizeString ( string str, List |
Parse all tokens from the specified string, put them into the input List.
|
Method | Description | |
---|---|---|
SpeedTestParse ( |
Use the supplied tokenizer to tokenize the specified stream and time it.
|
Method | Description | |
---|---|---|
GetNextChar ( ) : int |
Read the next character from the stream, or from backString if we backed up.
|
|
GrabInt ( |
Starting from current stream location, scan forward over an int. Determine whether it's an integer or not. If so, push the integer characters to the specified CharBuffer. If not, put them in backString (essentially leave the stream as it was) and return false. If it was an int, the stream is left 1 character after the end of the int, and that character is output in the thisChar parameter. The formats for integers are: 1, +1, and -1 The + and - signs are included in the output buffer.
|
|
Initialize ( ) : void |
Utility function, things common to constructors.
|
|
InitializeStream ( ) : void |
Clear the stream settings.
|
|
PickNextState ( byte ctype, int c ) : NextTokenState |
Pick the next state given just a single character. This is used at the start of a new token.
|
|
PickNextState ( byte ctype, int c, NextTokenState excludeState ) : NextTokenState |
Pick the next state given just a single character. This is used at the start of a new token.
|
public Display ( string prefix ) : void | ||
prefix | string | The pre-line prefix. |
return | void |
public NextToken ( |
||
token | The output token. | |
return | bool |
protected static SpeedTestParse ( |
||
tokenizer | ||
stream | Stream | |
return | double |
public StreamTokenizer ( TextReader sr ) : System | ||
sr | TextReader | The TextReader to read from. |
return | System |
public StreamTokenizer ( string str ) : System | ||
str | string | The string to tokenize. |
return | System |
public Tokenize ( List |
||
tokens | List |
The List to append to. |
return | bool |
public TokenizeFile ( string fileName ) : RTools.Util.Token[] | ||
fileName | string | The file to tokenize. |
return | RTools.Util.Token[] |
public TokenizeFile ( string fileName, List |
||
fileName | string | The file to read. |
tokens | List |
The List to put tokens in. |
return | bool |
public TokenizeReader ( TextReader tr, List |
||
tr | TextReader | The TextReader to read from. |
tokens | List |
The List to append to. |
return | bool |
public TokenizeStream ( Stream s, List |
||
s | Stream | |
tokens | List |
The List to put tokens in. |
return | bool |
public TokenizeString ( string str, List |
||
str | string | |
tokens | List |
The List to put tokens in. |
return | bool |