i386: Use offsetable address constraint for double-word memory operands
[official-gcc.git] / gcc / m2 / gm2-libs / PushBackInput.def
blob1bc8aad4d75d2ee6d6072c7974726061756e75b6
1 (* PushBackInput.def provides a method for pushing back and consuming input.
3 Copyright (C) 2001-2024 Free Software Foundation, Inc.
4 Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
6 This file is part of GNU Modula-2.
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.
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.
18 Under Section 7 of GPL version 3, you are granted additional
19 permissions described in the GCC Runtime Library Exception, version
20 3.1, as published by the Free Software Foundation.
22 You should have received a copy of the GNU General Public License and
23 a copy of the GCC Runtime Library Exception along with this program;
24 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
25 <http://www.gnu.org/licenses/>. *)
27 DEFINITION MODULE PushBackInput ;
29 FROM FIO IMPORT File ;
30 FROM DynamicStrings IMPORT String ;
32 EXPORT QUALIFIED Open, PutCh, GetCh, Error, WarnError, WarnString,
33 Close, SetDebug, GetExitStatus, PutStr,
34 PutString, GetColumnPosition, GetCurrentLine ;
38 Open - opens a file for reading.
41 PROCEDURE Open (a: ARRAY OF CHAR) : File ;
45 GetCh - gets a character from either the push back stack or
46 from file, f.
49 PROCEDURE GetCh (f: File) : CHAR ;
53 PutCh - pushes a character onto the push back stack, it also
54 returns the character which has been pushed.
57 PROCEDURE PutCh (ch: CHAR) : CHAR ;
61 PutString - pushes a string onto the push back stack.
64 PROCEDURE PutString (a: ARRAY OF CHAR) ;
68 PutStr - pushes a dynamic string onto the push back stack.
69 The string, s, is not deallocated.
72 PROCEDURE PutStr (s: String) ;
76 Error - emits an error message with the appropriate file, line combination.
79 PROCEDURE Error (a: ARRAY OF CHAR) ;
83 WarnError - emits an error message with the appropriate file, line combination.
84 It does not terminate but when the program finishes an exit status of
85 1 will be issued.
88 PROCEDURE WarnError (a: ARRAY OF CHAR) ;
92 WarnString - emits an error message with the appropriate file, line combination.
93 It does not terminate but when the program finishes an exit status of
94 1 will be issued.
97 PROCEDURE WarnString (s: String) ;
101 Close - closes the opened file.
104 PROCEDURE Close (f: File) ;
108 GetExitStatus - returns the exit status which will be 1 if any warnings were issued.
111 PROCEDURE GetExitStatus () : CARDINAL ;
115 SetDebug - sets the debug flag on or off.
118 PROCEDURE SetDebug (d: BOOLEAN) ;
122 GetColumnPosition - returns the column position of the current character.
125 PROCEDURE GetColumnPosition () : CARDINAL ;
129 GetCurrentLine - returns the current line number.
132 PROCEDURE GetCurrentLine () : CARDINAL ;
135 END PushBackInput.