15 using System.Collections.Generic;
18 namespace ErrorManagement
30 private string description;
41 get {
return "Lexical Error"; }
49 get {
return this.description; }
66 aux.AppendFormat(
"An error occurred while the file {0} is parsing. [{1}:{2}]\r\n{3}", loc.FileName, loc.Line, loc.Column, description);
67 this.description = aux.ToString();
72 #region Equals&GetHashCode
73 public override bool Equals(
object obj) {
76 return ((LexicalError)obj).description.Equals(this.description);
79 return this.description.GetHashCode();
string ErrorType
Gets the error type
This class encapsulates a location in a specific file. Implements an Inmutable pattern. So it can be used in any context, that is his internal fields never change.
override int GetHashCode()
LexicalError(string description, Location loc)
Constructor of LexicalError.
System.Text.StringBuilder StringBuilder
Interfaz for the different error types.
override bool Equals(object obj)
string Description
Gets the error description
Represents the error occurred while the source code is lexing.