]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/m2/gm2-compiler/M2CaseList.def
Update copyright years.
[thirdparty/gcc.git] / gcc / m2 / gm2-compiler / M2CaseList.def
CommitLineData
1eee94d3
GM
1(* M2CaseList.def implement ISO case label lists.
2
83ffe9cd 3Copyright (C) 2009-2023 Free Software Foundation, Inc.
1eee94d3
GM
4Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
5
6This file is part of GNU Modula-2.
7
8GNU Modula-2 is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation; either version 3, or (at your option)
11any later version.
12
13GNU Modula-2 is distributed in the hope that it will be useful, but
14WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with GNU Modula-2; see the file COPYING3. If not see
20<http://www.gnu.org/licenses/>. *)
21
22DEFINITION MODULE M2CaseList ;
23
24(*
25 Title : M2CaseList
26 Author : Gaius Mulley
27 System : GNU Modula-2
28 Date : Fri Jul 24 09:53:48 2009
29 Revision : $Version$
30 Description:
31*)
32
33FROM DynamicStrings IMPORT String ;
34FROM Lists IMPORT List ;
35
36
37(*
38 PushCase - create a case entity and push it to an internal stack.
39 Return the case id.
40*)
41
42PROCEDURE PushCase (r: CARDINAL; v: CARDINAL) : CARDINAL ;
43
44
45(*
46 PopCase - pop the top element of the case entity from the internal
47 stack.
48*)
49
50PROCEDURE PopCase ;
51
52
53(*
54 ElseCase - indicates that this case varient does have an else clause.
55*)
56
57PROCEDURE ElseCase (f: CARDINAL) ;
58
59
60(*
61 BeginCaseList - create a new label list.
62*)
63
64PROCEDURE BeginCaseList (v: CARDINAL) ;
65
66
67(*
68 EndCaseList - terminate the current label list.
69*)
70
71PROCEDURE EndCaseList ;
72
73
74(*
75 AddRange - add a range to the current label list.
76*)
77
78PROCEDURE AddRange (r1, r2: CARDINAL; tok: CARDINAL) ;
79
80
81(*
82 CaseBoundsResolved - returns TRUE if all constants in the case list, c,
83 are known to GCC.
84*)
85
86PROCEDURE CaseBoundsResolved (tokenno: CARDINAL; c: CARDINAL) : BOOLEAN ;
87
88
89(*
90 TypeCaseBounds - returns TRUE if all bounds in case list, c, are
91 compatible with the tagged type.
92*)
93
94PROCEDURE TypeCaseBounds (c: CARDINAL) : BOOLEAN ;
95
96
97(*
98 OverlappingCaseBounds - returns TRUE if there were any overlapping bounds
99 in the case list, c. It will generate an error
100 messages for each overlapping bound found.
101*)
102
103PROCEDURE OverlappingCaseBounds (c: CARDINAL) : BOOLEAN ;
104
105
106(*
107 MissingCaseBounds - returns TRUE if there were any missing bounds
108 in the varient record case list, c. It will
109 generate an error message for each missing
110 bounds found.
111*)
112
113PROCEDURE MissingCaseBounds (tokenno: CARDINAL; c: CARDINAL) : BOOLEAN ;
114
115
116(*
117 WriteCase - displays the case list.
118*)
119
120PROCEDURE WriteCase (c: CARDINAL) ;
121
122
123END M2CaseList.