Cthulhu  0.2.10
Cthulhu compiler collection
oberon.inc
Go to the documentation of this file.
1 // SPDX-License-Identifier: GPL-3.0-only
2 
3 #ifndef NEW_EVENT
4 # define NEW_EVENT(id, ...)
5 #endif
6 
7 NEW_EVENT(BlockMismatchEnds, {
8  .severity = eSeverityWarn,
9  .id = "OBR0001",
10  .brief = "Mismatching BEGIN and END names",
11  .description = "The names of BEGIN and END blocks should match.\n"
12  "Specified in Section [10: Procedure declarations].",
13 })
14 
15 NEW_EVENT(ArrayLengthOverflow, {
16  .severity = eSeverityFatal,
17  .id = "OBR0002",
18  .brief = "Array size too large",
19  .description = "The size of an array must be less than 2^32.\n"
20  "This is not defined in the Oberon-2 standard, but is a limitation of this implementation.",
21 })
22 
23 NEW_EVENT(ArrayLengthNotConstant, {
24  .severity = eSeverityFatal,
25  .id = "OBR0003",
26  .brief = "Array length must be a constant",
27  .description = "The length of an array must be a constant.\n"
28  "This is not defined in the Oberon-2 standard, but is a limitation of this implementation.",
29 })
30 
31 // deprecated, we now support public read-only
32 NEW_EVENT(PublicReadOnlyNotSupported, {
33  .severity = eSeverityWarn,
34  .id = "OBR0004",
35  .brief = "Public read-only unimplemented",
36  .description = "Public read-only symbols are not yet supported",
37 })
38 
39 NEW_EVENT(ArrayLengthZero, {
40  .severity = eSeverityFatal,
41  .id = "OBR0005",
42  .brief = "Array size must be greater than zero",
43  .description = "The size of an array must be greater than zero.\n"
44  "This is not defined in the Oberon-2 standard, but is a limitation of this implementation.",
45 })
46 
47 NEW_EVENT(ArrayLengthNegative, {
48  .severity = eSeverityFatal,
49  .id = "OBR0006",
50  .brief = "Array size must be greater than zero",
51  .description = "The size of an array must be greater than zero.\n"
52  "This is not defined in the Oberon-2 standard, but is a limitation of this implementation.",
53 })
54 
55 #undef NEW_EVENT
56 
57 #ifndef DECL_TAG
58 # define DECL_TAG(id, val, name)
59 #endif
60 
61 DECL_TAG(eObrTagValues, = eSemaValues, "values")
62 DECL_TAG(eObrTagTypes, = eSemaTypes, "types")
63 DECL_TAG(eObrTagProcs, = eSemaProcs, "procs")
64 DECL_TAG(eObrTagModules, = eSemaModules, "modules")
65 DECL_TAG(eObrTagImports, /* empty */ , "imports")
66 
67 #undef DECL_TAG
68 
69 #ifndef OBR_VIS
70 # define OBR_VIS(ID, NAME, STR)
71 #endif
72 
73 OBR_VIS(eObrVisPrivate, "private", "")
74 OBR_VIS(eObrVisPublic, "public", "*")
75 OBR_VIS(eObrVisReadOnly, "read_only", "-")
76 
77 #undef OBR_VIS
@ eSemaValues
Definition: tree.h:36
@ eSemaProcs
Definition: tree.h:42
@ eSemaModules
Definition: tree.h:45
@ eSemaTypes
Definition: tree.h:39
#define DECL_TAG(id, val, name)
Definition: oberon.inc:58
#define OBR_VIS(ID, NAME, STR)
Definition: oberon.inc:70
#define NEW_EVENT(id,...)
Definition: oberon.inc:4