C# Class Castle.NVelocity.Scanner

Show file Open project: jonorossi/cvsi Class Usage Examples

Public Methods

Method Description
GetToken ( ) : Token

Returns the next token from the current position.

PeekToken ( int lookAhead ) : Token

Returns the token at the specificed lookahead count.

RestoreState ( Stack restoredState ) : void

Sets the stack of state information to the scanner. The scanner copies the data from the stack and does not use the passed instance of a stack.

RetrieveState ( ) : Stack

Returns the stack of state information from the scanner. The returned stack is a new stack object created from the data in the state stack.

Scanner ( ErrorHandler errors ) : System

Creates a new Scanner.

SetSource ( string source ) : void

Initialises the scanner with an input ready for scanner.

Private Methods

Method Description
AddError ( string description ) : void
ConsumeSingleLineWhiteSpace ( ) : void
ConsumeWhiteSpace ( ) : void
GetCh ( ) : void

Moves the current position to the next character in the input.

GetCh ( int count ) : void

Moves the current position the specified number of characters ahead.

GetNextToken ( ) : Token

Returns the next token from the scanner beginning from the current internal position, which ignores the preread tokens.

LookAhead ( int lookAhead ) : char

Returns the character at the specified number of characters ahead from the current position.

NVDirectiveFollows ( ) : bool
NVReferenceFollows ( ) : bool
NextCharAfterSingleLineWhiteSpace ( ) : char
ReadNVelocityIdentifier ( ) : Token
ReadNVelocityMultiLineComment ( ) : Token
ReadNVelocityReference ( ) : Token
ReadNVelocityToken ( ) : Token
ReadText ( TokenType tokenType, StopScanningDelegate stopScanningDelegate ) : Token
ReadXmlComment ( ) : void
ScanTokenDefault ( ) : Token

Scans the input and returns XML text tokens.

ScanTokenNVBrack ( ) : Token
ScanTokenNVDictionary ( ) : Token
ScanTokenNVDictionaryInner ( ) : Token
ScanTokenNVDirective ( ) : Token
ScanTokenNVDirectiveParams ( ) : Token
ScanTokenNVMultilineComment ( ) : Token
ScanTokenNVParens ( ) : Token
ScanTokenNVPreDirective ( ) : Token
ScanTokenNVReference ( ) : Token
ScanTokenNVReferenceSelectors ( ) : Token
ScanTokenNVStringLiteralDouble ( ) : Token
ScanTokenNVStringLiteralSingle ( ) : Token
ScanTokenXmlCData ( ) : Token
ScanTokenXmlComment ( ) : Token
ScanTokenXmlScriptElementContent ( ) : Token
ScanTokenXmlTag ( ) : Token
ScanTokenXmlTagAttributeValue ( ) : Token
ScannerStateToString ( ScannerState state ) : string
SetUpReservedWords ( ) : void

Method Details

GetToken() public method

Returns the next token from the current position.
public GetToken ( ) : Token
return Token

PeekToken() public method

Returns the token at the specificed lookahead count.
public PeekToken ( int lookAhead ) : Token
lookAhead int The number of tokens to lookahead.
return Token

RestoreState() public method

Sets the stack of state information to the scanner. The scanner copies the data from the stack and does not use the passed instance of a stack.
public RestoreState ( Stack restoredState ) : void
restoredState Stack
return void

RetrieveState() public method

Returns the stack of state information from the scanner. The returned stack is a new stack object created from the data in the state stack.
public RetrieveState ( ) : Stack
return Stack

Scanner() public method

Creates a new Scanner.
public Scanner ( ErrorHandler errors ) : System
errors ErrorHandler
return System

SetSource() public method

Initialises the scanner with an input ready for scanner.
public SetSource ( string source ) : void
source string The input template source.
return void