Mercury library  1.0
Translation of CFG grammars into an object model (Bachelor's thesis).
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties
Public Member Functions | Properties | List of all members
Mercury.Scanning.Token Class Reference

Token, a part of an input text recognized by tokenizer More...

Inheritance diagram for Mercury.Scanning.Token:

Public Member Functions

 Token (string value, TokenType type, int position, bool quoted=false)
 Creates a new Token. More...
 
override bool Equals (object obj)
 
override int GetHashCode ()
 
override string ToString ()
 
bool Equals (Token other)
 

Properties

string Value [get, set]
 The token value. More...
 
TokenType Type [get, set]
 Token type. More...
 
int Position [get, set]
 Position in the input text. More...
 
bool Quoted [get, set]
 Indicates whether the token was quoted in the input. More...
 

Detailed Description

Token, a part of an input text recognized by tokenizer

Definition at line 29 of file Token.cs.

Constructor & Destructor Documentation

Mercury.Scanning.Token.Token ( string  value,
TokenType  type,
int  position,
bool  quoted = false 
)

Creates a new Token.

Parameters
valueToken value.
typeToken type.
positionPosition in the input text.
quotedIndicates whether the token value was quoted in the input.

Definition at line 38 of file Token.cs.

Member Function Documentation

override bool Mercury.Scanning.Token.Equals ( object  obj)

Definition at line 66 of file Token.cs.

bool Mercury.Scanning.Token.Equals ( Token  other)

Definition at line 84 of file Token.cs.

override int Mercury.Scanning.Token.GetHashCode ( )

Definition at line 72 of file Token.cs.

override string Mercury.Scanning.Token.ToString ( )

Definition at line 75 of file Token.cs.

Property Documentation

int Mercury.Scanning.Token.Position
getset

Position in the input text.

Definition at line 57 of file Token.cs.

bool Mercury.Scanning.Token.Quoted
getset

Indicates whether the token was quoted in the input.

Definition at line 60 of file Token.cs.

TokenType Mercury.Scanning.Token.Type
getset

Token type.

Definition at line 54 of file Token.cs.

string Mercury.Scanning.Token.Value
getset

The token value.

Definition at line 51 of file Token.cs.


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