Document the predefined __ICARUS__ macro
[iverilog.git] / parse_api.h
blobfc8d1cad9bd2a8cb8c0de9c78439b30d4715679b
1 #ifndef __parse_api_H
2 #define __parse_api_H
3 /*
4 * Copyright (c) 2001 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_api.h,v 1.3 2004/02/18 17:11:57 steve Exp $"
23 #endif
25 # include <stdio.h>
26 # include "StringHeap.h"
27 # include <string>
28 # include <map>
30 class Module;
31 class PUdp;
34 * These are maps of the modules and primitives parsed from the
35 * Verilog source into pform for elaboration. The parser adds modules
36 * to these maps as it compiles modules in the verilog source.
38 extern map<perm_string,Module*> pform_modules;
39 extern map<perm_string,PUdp*> pform_primitives;
42 * This code actually invokes the parser to make modules. The first
43 * parameter is the name of the file that is to be parsed. The
44 * optional second parameter is the opened descriptor for the file. If
45 * the descriptor is 0 (or skipped) then the function will attempt to
46 * open the file on its own.
48 extern int pform_parse(const char*path, FILE*file =0);
50 extern string vl_file;
53 * $Log: parse_api.h,v $
54 * Revision 1.3 2004/02/18 17:11:57 steve
55 * Use perm_strings for named langiage items.
57 * Revision 1.2 2002/08/12 01:35:00 steve
58 * conditional ident string using autoconfig.
60 * Revision 1.1 2001/10/21 20:18:56 steve
61 * clean up API for restarting parser.
64 #endif