Mercury library  1.0
Translation of CFG grammars into an object model (Bachelor's thesis).
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties
Classes | Enumerations
Package Mercury.Syntax

Classes

class  BasicScanner
 Generates four Nonterminals @Symbol, @Keyword, @Number and @String based on the given map and types of input tokens. More...
 
class  BasicScannerMap
 Contains mapping between TokenType and Mercury.Syntax.Mapping of Mercury.Syntax.BasicScanner. More...
 
class  ChartParser
 Thread-safe wrapper for ChartParserInternal class. More...
 
class  ChartParserInternal
 The Bottom-Up Chart Parser implementation.
 
class  CompositeScanner
 Mercury.Syntax.IScanner implementation that behaves like container of scanners using the Composite Design Pattern. More...
 
class  Edge
 Represents an edge in the chart created by the ChartParser. This is an immutable class.
The Edge contains four values:
More...
 
class  EdgeDerivation
 Edge Derivation
 
class  ExtendedGrammar
 Represents a Context-Free Grammar with convenience structures for ChartParser.
 
class  ExtendedGrammarBuilder
 
class  Grammar
 Represents a Context-Free Grammar. This is an immutable class, to create a grammar use Mercury.Syntax.GrammarBuilder. More...
 
class  GrammarBuilder
 Class that creates grammars. More...
 
interface  IParser
 Creates a derivation tree from the list of input tokens More...
 
interface  IScanner
 Scanner scans input tokens and creates additional rules for parsing. More...
 
class  ParserResult
 Represents the result returned by the parser. More...
 
class  Rule
 Represents a Context-Free Grammar rule. This is an immutable class. More...
 
class  Symbol
 Represents a single symbol of the grammar. This is an immutable class.

For a symbol name to be valid it must NOT contain control or separator characters, must not be empty and must meet these conditions:
More...
 

Enumerations

enum  Mapping {
  Mapping.None = 0, Mapping.AsSymbol = 1, Mapping.AsKeyword = 2, Mapping.AsNumber = 4,
  Mapping.AsString = 8, Mapping.All = 15
}
 
enum  SymbolType {
  SymbolType.None = 0, SymbolType.Epsilon = 1, SymbolType.Terminal = 2, SymbolType.Nonterminal = 4,
  SymbolType.Any = Epsilon | Terminal | Nonterminal
}
 Represents a type of symbol. Implemented as Flags since Symbol type inference is ambiguous. More...
 

Enumeration Type Documentation

Enumerator
None 

Does not map to anything

AsSymbol 

Maps token to symbol (@Symbol -> token)

AsKeyword 

Maps token to keyword (@Keyword -> token)

AsNumber 

Maps token to number (@Number -> token)

AsString 

Maps token to string (@String -> token)

All 

Maps token to symbol, keyword, number and string

Definition at line 113 of file Scanner.cs.

Represents a type of symbol. Implemented as Flags since Symbol type inference is ambiguous.

Enumerator
None 

An invalid symbol (cannot be used in a grammar).

Epsilon 

The epsilon symbol.

Terminal 

A nonterminal symbol.

Nonterminal 

A terminal symbol.

Any 

Any symbol.

Definition at line 16 of file Symbol.cs.