-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherrors.h
48 lines (44 loc) · 1.32 KB
/
errors.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*-------------------------------------------------*
* Defines some basic error reporting routines via *
* a class. *
*-------------------------------------------------*/
#ifndef ERRORS_H_
#define ERRORS_H_
#include <string>
#include "location.h"
/**
* A custom class for handling different kinds of errors in the RTL code.
*/
class ReportError{
public:
/**
* Unterminated string error.
* @param loc location of error
* @param ident the string itself
*/
static void UntermString(yyltype *loc, const char *ident);
/**
* Unrecognized character error.
* @param loc location of error
* @param the character itself
*/
static void UnrecogChar(yyltype *loc, char ch);
/**
* Name of function too long.
* @param loc location of error
* @param ident the name of the function
*/
static void LongIdentifier(yyltype *loc, const char *ident);
/**
* Unterms square brackets
*/
static void UntermBrack();
/**
* calculates the total number of errors.
* @return number of errors
*/
static int findNumErrors();
private:
static int numErrors; /**< the number of errors */
};
#endif