]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/m2/mc-boot/Gmcflex.h
Merge modula-2 front end onto gcc.
[thirdparty/gcc.git] / gcc / m2 / mc-boot / Gmcflex.h
CommitLineData
1eee94d3
GM
1/* do not edit automatically generated by mc from mcflex. */
2/* mcflex.def provides a Modula-2 definition module for the C lexical.
3
4Copyright (C) 2015-2022 Free Software Foundation, Inc.
5Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
6
7This file is part of GNU Modula-2.
8
9GNU Modula-2 is free software; you can redistribute it and/or modify
10it under the terms of the GNU General Public License as published by
11the Free Software Foundation; either version 3, or (at your option)
12any later version.
13
14GNU Modula-2 is distributed in the hope that it will be useful, but
15WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17General Public License for more details.
18
19You should have received a copy of the GNU General Public License
20along with GNU Modula-2; see the file COPYING3. If not see
21<http://www.gnu.org/licenses/>. */
22
23
24#if !defined (_mcflex_H)
25# define _mcflex_H
26
27#include "config.h"
28#include "system.h"
29# ifdef __cplusplus
30extern "C" {
31# endif
32# if !defined (PROC_D)
33# define PROC_D
34 typedef void (*PROC_t) (void);
35 typedef struct { PROC_t proc; } PROC;
36# endif
37
38# include "GSYSTEM.h"
39
40# if defined (_mcflex_C)
41# define EXTERN
42# else
43# define EXTERN extern
44# endif
45
46
47/*
48 closeSource - provided for semantic sugar
49*/
50
51EXTERN void mcflex_closeSource (void);
52EXTERN unsigned int mcflex_openSource (void * s);
53
54/*
55 getToken - returns the ADDRESS of the next token.
56*/
57
58EXTERN void * mcflex_getToken (void);
59
60/*
61 getLineNo - returns the current line number.
62*/
63
64EXTERN unsigned int mcflex_getLineNo (void);
65
66/*
67 getColumnNo - returns the column where the current token starts.
68*/
69
70EXTERN unsigned int mcflex_getColumnNo (void);
71
72/*
73 mcError - displays the error message, s, after the code line and pointer
74 to the erroneous token.
75*/
76
77EXTERN void mcflex_mcError (void * s);
78
79/*
80 getTotalLines - returns the total number of lines parsed.
81*/
82
83EXTERN unsigned int mcflex_getTotalLines (void);
84# ifdef __cplusplus
85}
86# endif
87
88# undef EXTERN
89#endif