Fix for pr1833776.
[iverilog.git] / parse_misc.h
blob9f3274689661d684bd764c0c153f9ec507aef83d
1 #ifndef __parse_misc_H
2 #define __parse_misc_H
3 /*
4 * Copyright (c) 1998-2000 Stephen Williams (steve@icarus.com)
6 * This source code is free software; you can redistribute it
7 * and/or modify it in source code form under the terms of the GNU
8 * General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
10 * any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
21 #ifdef HAVE_CVS_IDENT
22 #ident "$Id: parse_misc.h,v 1.7 2003/03/08 20:58:18 steve Exp $"
23 #endif
25 # include <list>
26 # include "pform.h"
29 * The vlltype supports the passing of detailed source file location
30 * information between the lexical analyzer and the parser. Defining
31 * YYLTYPE compels the lexor to use this type and not something other.
33 struct vlltype {
34 unsigned first_line;
35 unsigned first_column;
36 unsigned last_line;
37 unsigned last_column;
38 const char*text;
40 # define YYLTYPE struct vlltype
42 /* This for compatibility with new and older bison versions. */
43 #ifndef yylloc
44 # define yylloc VLlloc
45 #endif
46 extern YYLTYPE yylloc;
49 * Interface into the lexical analyzer. ...
51 extern int VLlex();
52 extern void VLerror(const char*msg);
53 extern void VLerror(const YYLTYPE&loc, const char*msg);
54 #define yywarn VLwarn
55 extern void VLwarn(const YYLTYPE&loc, const char*msg);
57 extern unsigned error_count, warn_count;
58 extern unsigned long based_size;
60 #endif