1 /* do not edit automatically generated by mc from mcflex. */
2 /* mcflex.def provides a Modula-2 definition module for the C lexical.
4 Copyright (C) 2015-2024 Free Software Foundation, Inc.
5 Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
7 This file is part of GNU Modula-2.
9 GNU Modula-2 is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3, or (at your option)
14 GNU Modula-2 is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with GNU Modula-2; see the file COPYING3. If not see
21 <http://www.gnu.org/licenses/>. */
24 #if !defined (_mcflex_H)
33 # if !defined (PROC_D)
35 typedef void (*PROC_t
) (void);
36 typedef struct { PROC_t proc
; } PROC
;
41 # if defined (_mcflex_C)
44 # define EXTERN extern
49 closeSource - provided for semantic sugar
52 EXTERN
void mcflex_closeSource (void);
53 EXTERN
bool mcflex_openSource (void * s
);
56 getToken - returns the ADDRESS of the next token.
59 EXTERN
void * mcflex_getToken (void);
62 getLineNo - returns the current line number.
65 EXTERN
unsigned int mcflex_getLineNo (void);
68 getColumnNo - returns the column where the current token starts.
71 EXTERN
unsigned int mcflex_getColumnNo (void);
74 mcError - displays the error message, s, after the code line and pointer
75 to the erroneous token.
78 EXTERN
void mcflex_mcError (void * s
);
81 getTotalLines - returns the total number of lines parsed.
84 EXTERN
unsigned int mcflex_getTotalLines (void);