]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/m2/gm2-libs/Scan.def
Update copyright years.
[thirdparty/gcc.git] / gcc / m2 / gm2-libs / Scan.def
CommitLineData
1eee94d3
GM
1(* Scan.def Provides a primitive symbol fetching from input.
2
a945c346 3Copyright (C) 2001-2024 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
18Under Section 7 of GPL version 3, you are granted additional
19permissions described in the GCC Runtime Library Exception, version
203.1, as published by the Free Software Foundation.
21
22You should have received a copy of the GNU General Public License and
23a copy of the GCC Runtime Library Exception along with this program;
24see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
25<http://www.gnu.org/licenses/>. *)
26
27DEFINITION MODULE Scan ;
28
29(* Provides a primitive symbol fetching from input.
30 Symbols are delimited by spaces and tabs.
31 Limitation only allows one source file at
32 a time to deliver symbols. *)
33
34
35EXPORT QUALIFIED GetNextSymbol, WriteError,
36 OpenSource, CloseSource,
37 TerminateOnError, DefineComments ;
38
39
40(* OpenSource - opens a source file for reading. *)
41
42PROCEDURE OpenSource (a: ARRAY OF CHAR) : BOOLEAN ;
43
44
45(* CloseSource - closes the current source file from reading. *)
46
47PROCEDURE CloseSource ;
48
49
50(* GetNextSymbol gets the next source symbol and returns it in a. *)
51
52PROCEDURE GetNextSymbol (VAR a: ARRAY OF CHAR) ;
53
54
55(* WriteError writes a message, a, under the source line, which *)
56(* attempts to pinpoint the Symbol at fault. *)
57
58PROCEDURE WriteError (a: ARRAY OF CHAR) ;
59
60
61(*
62 TerminateOnError - exits with status 1 if we call WriteError.
63*)
64
65PROCEDURE TerminateOnError ;
66
67
68(*
69 DefineComments - defines the start of comments within the source
70 file.
71
72 The characters in Start define the comment start
73 and characters in End define the end.
74 The BOOLEAN eoln determine whether the comment
75 is terminated by end of line. If eoln is TRUE
76 then End is ignored.
77
78 If this procedure is never called then no comments
79 are allowed.
80*)
81
82PROCEDURE DefineComments (Start, End: ARRAY OF CHAR; eoln: BOOLEAN) ;
83
84
85END Scan.