| 1 |
(* M2Pass.def provides setting and testing of the current pass. |
| 2 |
|
| 3 |
Copyright (C) 2001-2025 Free Software Foundation, Inc. |
| 4 |
Contributed by Gaius Mulley <[email protected]>. |
| 5 |
|
| 6 |
This file is part of GNU Modula-2. |
| 7 |
|
| 8 |
GNU Modula-2 is free software; you can redistribute it and/or modify |
| 9 |
it under the terms of the GNU General Public License as published by |
| 10 |
the Free Software Foundation; either version 3, or (at your option) |
| 11 |
any later version. |
| 12 |
|
| 13 |
GNU Modula-2 is distributed in the hope that it will be useful, but |
| 14 |
WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 |
General Public License for more details. |
| 17 |
|
| 18 |
You should have received a copy of the GNU General Public License |
| 19 |
along with GNU Modula-2; see the file COPYING3. If not see |
| 20 |
<http://www.gnu.org/licenses/>. *) |
| 21 |
|
| 22 |
DEFINITION MODULE M2Pass ; |
| 23 |
|
| 24 |
(* |
| 25 |
Author : Gaius Mulley |
| 26 |
Title : M2Lexical |
| 27 |
Date : Thu Nov 2 12:58:18 GMT 1989 |
| 28 |
Description: Controls the setting and testing of the current pass. |
| 29 |
Last update: Thu Nov 2 12:58:27 GMT 1989 |
| 30 |
*) |
| 31 |
|
| 32 |
EXPORT QUALIFIED SetPassToNoPass, |
| 33 |
SetPassToPass0, |
| 34 |
SetPassToPass1, |
| 35 |
SetPassToPass2, |
| 36 |
SetPassToPassC, |
| 37 |
SetPassToPass3, |
| 38 |
SetPassToPassHidden, |
| 39 |
SetPassToCodeGeneration, |
| 40 |
SetPassToErrorPass, |
| 41 |
IsNoPass, |
| 42 |
IsPass0, |
| 43 |
IsPass1, |
| 44 |
IsPass2, |
| 45 |
IsPass3, |
| 46 |
IsPassC, |
| 47 |
IsPassHidden, |
| 48 |
IsPassCodeGeneration, |
| 49 |
IsErrorPass ; |
| 50 |
|
| 51 |
|
| 52 |
(* |
| 53 |
SetPassToNoPass - sets the pass state to no Pass. |
| 54 |
*) |
| 55 |
|
| 56 |
PROCEDURE SetPassToNoPass ; |
| 57 |
|
| 58 |
|
| 59 |
(* |
| 60 |
SetPassToPass0 - sets the pass state to Pass 0. |
| 61 |
*) |
| 62 |
|
| 63 |
PROCEDURE SetPassToPass0 ; |
| 64 |
|
| 65 |
|
| 66 |
(* |
| 67 |
SetPassToPass1 - sets the pass state to Pass 1. |
| 68 |
*) |
| 69 |
|
| 70 |
PROCEDURE SetPassToPass1 ; |
| 71 |
|
| 72 |
|
| 73 |
(* |
| 74 |
SetPassToPass2 - sets the pass state to Pass 2. |
| 75 |
*) |
| 76 |
|
| 77 |
PROCEDURE SetPassToPass2 ; |
| 78 |
|
| 79 |
|
| 80 |
(* |
| 81 |
SetPassToPassC - sets the pass state to Pass C. |
| 82 |
*) |
| 83 |
|
| 84 |
PROCEDURE SetPassToPassC ; |
| 85 |
|
| 86 |
|
| 87 |
(* |
| 88 |
SetPassToPass3 - sets the pass state to Pass 3. |
| 89 |
*) |
| 90 |
|
| 91 |
PROCEDURE SetPassToPass3 ; |
| 92 |
|
| 93 |
|
| 94 |
(* |
| 95 |
SetPassToPassHidden - sets the pass state to the hidden type pass. |
| 96 |
*) |
| 97 |
|
| 98 |
PROCEDURE SetPassToPassHidden ; |
| 99 |
|
| 100 |
|
| 101 |
(* |
| 102 |
SetPassToCodeGeneration - sets the pass state to CodeGeneration. |
| 103 |
*) |
| 104 |
|
| 105 |
PROCEDURE SetPassToCodeGeneration ; |
| 106 |
|
| 107 |
|
| 108 |
(* |
| 109 |
SetPassToErrorPass - sets the pass state to no Error Pass. |
| 110 |
*) |
| 111 |
|
| 112 |
PROCEDURE SetPassToErrorPass ; |
| 113 |
|
| 114 |
|
| 115 |
(* |
| 116 |
IsNoPass - returns true if currently in no Pass. |
| 117 |
*) |
| 118 |
|
| 119 |
PROCEDURE IsNoPass () : BOOLEAN ; |
| 120 |
|
| 121 |
|
| 122 |
(* |
| 123 |
IsPass0 - returns true if currently in Pass 0. |
| 124 |
*) |
| 125 |
|
| 126 |
PROCEDURE IsPass0 () : BOOLEAN ; |
| 127 |
|
| 128 |
|
| 129 |
(* |
| 130 |
IsPass1 - returns true if currently in Pass 1. |
| 131 |
*) |
| 132 |
|
| 133 |
PROCEDURE IsPass1 () : BOOLEAN ; |
| 134 |
|
| 135 |
|
| 136 |
(* |
| 137 |
IsPass2 - returns true if currently in Pass 2. |
| 138 |
*) |
| 139 |
|
| 140 |
PROCEDURE IsPass2 () : BOOLEAN ; |
| 141 |
|
| 142 |
|
| 143 |
(* |
| 144 |
IsPassC - returns true if currently in Pass C. |
| 145 |
*) |
| 146 |
|
| 147 |
PROCEDURE IsPassC () : BOOLEAN ; |
| 148 |
|
| 149 |
|
| 150 |
(* |
| 151 |
IsPass3 - returns true if currently in Pass 3. |
| 152 |
*) |
| 153 |
|
| 154 |
PROCEDURE IsPass3 () : BOOLEAN ; |
| 155 |
|
| 156 |
|
| 157 |
(* |
| 158 |
IsPassHidden - returns TRUE if currently parsing for hidden types. |
| 159 |
*) |
| 160 |
|
| 161 |
PROCEDURE IsPassHidden () : BOOLEAN ; |
| 162 |
|
| 163 |
|
| 164 |
(* |
| 165 |
IsPassCodeGeneration - returns true if currently in the CodeGeneration Pass. |
| 166 |
*) |
| 167 |
|
| 168 |
PROCEDURE IsPassCodeGeneration () : BOOLEAN ; |
| 169 |
|
| 170 |
|
| 171 |
(* |
| 172 |
IsErrorPass - returns true if currently in the Error Pass. |
| 173 |
*) |
| 174 |
|
| 175 |
PROCEDURE IsErrorPass () : BOOLEAN ; |
| 176 |
|
| 177 |
|
| 178 |
END M2Pass. |