1 /********************************************************************/
2 /*                                                                  */
3 /*  s7   Seed7 interpreter                                          */
4 /*  Copyright (C) 1990 - 2000, 2014  Thomas Mertes                  */
5 /*                                                                  */
6 /*  This program is free software; you can redistribute it and/or   */
7 /*  modify it under the terms of the GNU General Public License as  */
8 /*  published by the Free Software Foundation; either version 2 of  */
9 /*  the License, or (at your option) any later version.             */
10 /*                                                                  */
11 /*  This program is distributed in the hope that it will be useful, */
12 /*  but WITHOUT ANY WARRANTY; without even the implied warranty of  */
13 /*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   */
14 /*  GNU General Public License for more details.                    */
15 /*                                                                  */
16 /*  You should have received a copy of the GNU General Public       */
17 /*  License along with this program; if not, write to the           */
18 /*  Free Software Foundation, Inc., 51 Franklin Street,             */
19 /*  Fifth Floor, Boston, MA  02110-1301, USA.                       */
20 /*                                                                  */
21 /*  Module: Analyzer - Error                                        */
22 /*  File: seed7/src/error.h                                         */
23 /*  Changes: 1990, 1991, 1992, 1993, 1994  Thomas Mertes            */
24 /*  Content: Submit normal compile time error messages.             */
25 /*                                                                  */
26 /********************************************************************/
27 
28 typedef enum {
29     OUT_OF_HEAP_SPACE,
30     NO_SOURCEFILE,
31     FILENOTFOUND,
32     EOF_ENCOUNTERED,
33     CHAR_ILLEGAL,
34     COMMENTOPEN,
35     ILLEGALPRAGMA,
36     WRONGACTION,
37     WRONGSYSTEM,
38     CARD_DECIMAL_TOO_BIG,
39     NEGATIVEEXPONENT,
40     DIGITEXPECTED,
41     CARD_WITH_EXPONENT_TOO_BIG,
42     BASE2TO36ALLOWED,
43     EXTDIGITEXPECTED,
44     ILLEGALBASEDDIGIT,
45     CARD_BASED_TOO_BIG,
46     APOSTROPHEXPECTED,
47     CHAREXCEEDS,
48     WRONG_QUOTATION_REPRESENTATION,
49     STRINGESCAPE,
50     WRONGNUMERICALESCAPE,
51     NUMERICAL_ESCAPE_TOO_BIG,
52     BACKSLASHEXPECTED,
53     STRINGEXCEEDS,
54     NAMEEXPECTED,
55     CARD_EXPECTED,
56     STRI_EXPECTED,
57     IDENT_EXPECTED,
58     EXPR_EXPECTED,
59     PARAM_DECL_FAILED,
60     DECL_FAILED,
61     EXCEPTION_RAISED,
62     OBJTWICEDECLARED,
63     OBJUNDECLARED,
64     ILLEGAL_ASSOCIATIVITY,
65     ILLEGAL_PRIORITY,
66     TWO_PARAMETER_SYNTAX,
67     EMPTY_SYNTAX,
68     SYNTAX_DECLARED_TWICE,
69     DOT_EXPR_REQUESTED,
70     FALSE_INFIX_PRIORITY,
71     FALSE_PREFIX_PRIORITY,
72     WRONG_EXPR_PARAM_PRIORITY,
73     WRONG_PREFIX_PRIORITY,
74     DOT_EXPR_ILLEGAL,
75     EXPECTED_SYMBOL,
76     LITERAL_TYPE_UNDEFINED,
77     KIND_OF_IN_PARAM_UNDEFINED,
78     DOLLAR_VALUE_WRONG,
79     DOLLAR_TYPE_WRONG,
80     NO_MATCH,
81     WRONGACCESSRIGHT,
82     TYPE_EXPECTED,
83     PROC_EXPECTED,
84     PARAM_SPECIFIER_EXPECTED,
85     EVAL_TYPE_FAILED,
86     OVERLONG_UTF8_ENCODING,
87     UTF16_SURROGATE_CHAR_FOUND,
88     CHAR_NOT_UNICODE,
89     UTF8_CONTINUATION_BYTE_EXPECTED,
90     UNEXPECTED_UTF8_CONTINUATION_BYTE,
91     SOLITARY_UTF8_START_BYTE,
92     UTF16_BYTE_ORDER_MARK_FOUND,
93     WRONG_PATH_DELIMITER
94   } errorType;
95 
96 
97 void place_of_error (errorType err);
98 void err_warning (errorType err);
99 void err_num_stri (errorType err, int num_found, int num_expected,
100                    const_ustriType stri);
101 void err_ident (errorType err, const_identType ident);
102 void err_object (errorType err, const_objectType obj_found);
103 void err_type (errorType err, const_typeType type_found);
104 void err_expr_obj (errorType err, const_objectType expr_object,
105                    objectType obj_found);
106 void err_match (errorType err, objectType obj_found);
107 void err_string (errorType err, const_ustriType stri);
108 void err_stri (errorType err, const_striType stri);
109 void err_integer (errorType err, intType number);
110 void err_cchar (errorType err, int character);
111 void err_char (errorType err, charType character);
112 void err_at_line (errorType err, lineNumType line);
113 void err_undeclared (errorType err, fileNumType file_num,
114                      lineNumType line, const_ustriType stri);
115 void err_message (errorType err, const_striType stri);
116