Mercury library 1.0 Translation of CFG grammars into an object model (Bachelor's thesis).

- Main Page
- Packages
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties
Public Member Functions | Static Public Member Functions | Properties | List of all members
Mercury.Syntax.BasicScannerMap Class Reference

Contains mapping between TokenType and Mercury.Syntax.Mapping of Mercury.Syntax.BasicScanner. More...

## Public Member Functions
| BasicScannerMap (IDictionary< TokenType, Mapping > map)
| Creates a new instance of Mercury.Syntax.BasicScannerMap. More...
Mapping | GetMapping (TokenType ttype)
| Returns the mapping for a given TokenType. More...

## Static Public Member Functions
static BasicScannerMap | SingleMap (Mapping custom)
| Creates a mapping for all TokenTypes to custom Mapping More...

## Properties
static BasicScannerMap | Identity`[get]`
| The Identity map (Symbol to Symbol, Number as Number etc.) More...
static BasicScannerMap | NumberOrString`[get]`
| Maps Number to Number and other TokenTypes to String More...
static BasicScannerMap | All`[get]`
| Maps any token type to everything More...
Mapping | this[TokenType ttype]`[get]`

## Detailed Description

Contains mapping between TokenType and Mercury.Syntax.Mapping of Mercury.Syntax.BasicScanner.

Definition at line 132 of file Scanner.cs.

## Constructor & Destructor Documentation

Mercury.Syntax.BasicScannerMap.BasicScannerMap | ( | IDictionary< TokenType, Mapping > | map | ) |

Creates a new instance of Mercury.Syntax.BasicScannerMap.

Parameters

  map | The map between TokenType and Mapping

Exceptions

  System.ArgumentNullException | When map is null

Definition at line 145 of file Scanner.cs.

## Member Function Documentation

Mapping Mercury.Syntax.BasicScannerMap.GetMapping | ( | TokenType | ttype | ) |

Returns the mapping for a given TokenType.

Parameters

  ttype | The token type

Returns
  Mapping

Definition at line 209 of file Scanner.cs.

static BasicScannerMap Mercury.Syntax.BasicScannerMap.SingleMap | ( | Mapping | custom | ) |
| static

Creates a mapping for all TokenTypes to custom Mapping

Parameters

  custom | The custom mapping

Returns
  Scanner map

Definition at line 188 of file Scanner.cs.

## Property Documentation

BasicScannerMap Mercury.Syntax.BasicScannerMap.All
| static get

Maps any token type to everything

Definition at line 176 of file Scanner.cs.

BasicScannerMap Mercury.Syntax.BasicScannerMap.Identity
| static get

The Identity map (Symbol to Symbol, Number as Number etc.)

Definition at line 158 of file Scanner.cs.

BasicScannerMap Mercury.Syntax.BasicScannerMap.NumberOrString
| static get

Maps Number to Number and other TokenTypes to String

Definition at line 167 of file Scanner.cs.

Mapping Mercury.Syntax.BasicScannerMap.this[TokenType ttype]
| get

Definition at line 200 of file Scanner.cs.

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

- Mercury/Mercury/Syntax/Scanner.cs