Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
Irony.Parsing.Scanner Class Referenceabstract

Scanner base class. The Scanner's function is to transform a stream of characters into aggregates/words or lexemes, like identifier, number, literal, etc. More...

Inheritance diagram for Irony.Parsing.Scanner:
Irony.Parsing.DefaultScanner

Public Member Functions

 Scanner ()
 Initializes a new instance of the Scanner class. More...
 
virtual void BeginPreview ()
 Begins the preview. More...
 
virtual void EndPreview (bool keepPreviewTokens)
 Ends the preview. More...
 
Token GetToken ()
 Gets the next token. More...
 
void Initialize (Parser parser)
 Initializes this instance. More...
 
virtual void Reset ()
 Resets this instance. More...
 
abstract void SetSourceText (string sourceText, string sourceFileName)
 Sets the source text for this scanner. More...
 

Protected Member Functions

IEnumerable< TokenGetUnfilteredTokens ()
 Gets the unfiltered tokens. More...
 
abstract void NextToken ()
 Retrieves the next token. More...
 
abstract void PrepareInput ()
 Prepares the input. More...
 

Properties

abstract SourceLocation Location [get, set]
 Gets or sets the location. More...
 
Parser Parser [get, set]
 Gets the parser. More...
 
ParsingContext Context [get]
 Gets the context. More...
 
Grammar Grammar [get, set]
 Gets or sets the grammar. More...
 

Detailed Description

Scanner base class. The Scanner's function is to transform a stream of characters into aggregates/words or lexemes, like identifier, number, literal, etc.

Definition at line 22 of file Scanner.cs.

Constructor & Destructor Documentation

Irony.Parsing.Scanner.Scanner ( )

Initializes a new instance of the Scanner class.

Definition at line 41 of file Scanner.cs.

Member Function Documentation

virtual void Irony.Parsing.Scanner.BeginPreview ( )
virtual

Begins the preview.

Reimplemented in Irony.Parsing.DefaultScanner.

Definition at line 92 of file Scanner.cs.

virtual void Irony.Parsing.Scanner.EndPreview ( bool  keepPreviewTokens)
virtual

Ends the preview.

Parameters
keepPreviewTokensif set to true [keep preview tokens].

Reimplemented in Irony.Parsing.DefaultScanner.

Definition at line 107 of file Scanner.cs.

Token Irony.Parsing.Scanner.GetToken ( )

Gets the next token.

Returns
A Token

Definition at line 132 of file Scanner.cs.

IEnumerable<Token> Irony.Parsing.Scanner.GetUnfilteredTokens ( )
protected

Gets the unfiltered tokens.

Returns
An enumeration on the token

Definition at line 203 of file Scanner.cs.

void Irony.Parsing.Scanner.Initialize ( Parser  parser)

Initializes this instance.

Parameters
parserThe Parser.

Definition at line 159 of file Scanner.cs.

abstract void Irony.Parsing.Scanner.NextToken ( )
protectedpure virtual

Retrieves the next token.

Implemented in Irony.Parsing.DefaultScanner.

abstract void Irony.Parsing.Scanner.PrepareInput ( )
protectedpure virtual

Prepares the input.

Implemented in Irony.Parsing.DefaultScanner.

virtual void Irony.Parsing.Scanner.Reset ( )
virtual

Resets this instance.

Definition at line 183 of file Scanner.cs.

abstract void Irony.Parsing.Scanner.SetSourceText ( string  sourceText,
string  sourceFileName 
)
pure virtual

Sets the source text for this scanner.

Parameters
sourceTextThe source text.

Property Documentation

ParsingContext Irony.Parsing.Scanner.Context
getprotected

Gets the context.

Definition at line 70 of file Scanner.cs.

Grammar Irony.Parsing.Scanner.Grammar
getsetprotected

Gets or sets the grammar.

The grammar.

Definition at line 83 of file Scanner.cs.

abstract SourceLocation Irony.Parsing.Scanner.Location
getset

Gets or sets the location.

The location.

Definition at line 55 of file Scanner.cs.

Parser Irony.Parsing.Scanner.Parser
getset

Gets the parser.

Definition at line 60 of file Scanner.cs.


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