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

- Main Page
- Packages
- Classes
- Files

- File List

All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties
SyntaxExceptions.cs
Go to the documentation of this file.
1 using Mercury.Syntax;
2 using System;
3 using System.Runtime.Serialization;
4
5 namespace Mercury.Exceptions
6 {
7
8 //==<< SyntaxException >>====================================================
9
13 [Serializable]
14 public class SyntaxException : MercuryException
15 {
16
20 public SyntaxException()
21 { }
22
28 public SyntaxException(string message)
29 : base(message)
30 { }
31
37 public SyntaxException(string message, Exception inner)
38 : base(message, inner)
39 { }
40
51 protected SyntaxException(SerializationInfo info, StreamingContext context)
52 : base(info, context)
53 { }
54 }
55
56 //==<< InvalidSymbolException >>=============================================
57
62 [Serializable]
63 public class InvalidSymbolException : SyntaxException
64 {
65
70 public InvalidSymbolException(Symbol symbol)
71 : base("Invalid symbol '" + symbol.ToString() + "'")
72 { }
73
74 }
75
76 //==<< InvalidRuleException >>===============================================
77
82 [Serializable]
83 public class InvalidRuleException : SyntaxException
84 {
85
91 public InvalidRuleException(Rule rule, string reason = null)
92 : base("Invalid rule '" + rule.ToString() + "'"
93 + (reason != null ? ": " + reason : ""))
94 { }
95
96 }
97
98 //==<< InvalidEdgeExcetion >>================================================
99
104 [Serializable]
105 public class InvalidEdgeException : SyntaxException
106 {
107
112 public InvalidEdgeException(Edge edge)
113 : base("Invalid edge '" + edge.ToString() + "'")
114 { }
115
116 }
117
118 }
Mercury.Exceptions.InvalidRuleException.InvalidRuleException
InvalidRuleException(Rule rule, string reason=null)
Initializes a new instance of the InvalidRuleException class.
Definition: SyntaxExceptions.cs:91
Mercury.Exceptions.InvalidEdgeException.InvalidEdgeException
InvalidEdgeException(Edge edge)
Initializes a new instance of the InvalidEdgeException class.
Definition: SyntaxExceptions.cs:112
Mercury.Exceptions.SyntaxException.SyntaxException
SyntaxException(string message)
Initializes a new instance of the SyntaxException class with a message that describes the error...
Definition: SyntaxExceptions.cs:28
Mercury.Exceptions.InvalidSymbolException.InvalidSymbolException
InvalidSymbolException(Symbol symbol)
Initializes a new instance of the InvalidSymbolException class.
Definition: SyntaxExceptions.cs:70
Mercury.Syntax.Edge
Represents an edge in the chart created by the ChartParser. This is an immutable class. The Edge contains four values:
Definition: Edge.cs:37
Mercury.Exceptions.SyntaxException.SyntaxException
SyntaxException(SerializationInfo info, StreamingContext context)
Initializes a new instance of the SyntaxException class.
Definition: SyntaxExceptions.cs:51
Mercury.Exceptions.MercuryException
An exception thrown by the Mercury library.
Definition: MercuryException.cs:10
Mercury.Exception
An exception has been thrown
Mercury.Exceptions.InvalidRuleException
An exception thrown when attempting to create an invalid Mercury.Syntax.Rule instance.
Definition: SyntaxExceptions.cs:83
Mercury.Exceptions.InvalidSymbolException
An exception thrown when attempting to create an invalid Mercury.Syntax.Symbol instance.
Definition: SyntaxExceptions.cs:63
Mercury.Exceptions.InvalidEdgeException
An exception thrown when attempting to create an invalid Mercury.Parser.Edge instance.
Definition: SyntaxExceptions.cs:105
Mercury.Syntax.Rule
Represents a Context-Free Grammar rule. This is an immutable class.
Definition: Rule.cs:23
Mercury.Exceptions.SyntaxException.SyntaxException
SyntaxException(string message, Exception inner)
Initializes a new instance of the SyntaxException class.
Definition: SyntaxExceptions.cs:37
Mercury.Exceptions.SyntaxException.SyntaxException
SyntaxException()
Initializes a new instance of the SyntaxException class.
Definition: SyntaxExceptions.cs:20
Mercury.Syntax.Symbol
Represents a single symbol of the grammar. This is an immutable class. For a symbol name to be val...
Definition: Symbol.cs:51
Mercury.Exceptions.SyntaxException
An exception thrown when something wrong happens in the Mercury.Syntax
Definition: SyntaxExceptions.cs:14