Qucs-core  0.0.19
check_spice.h
Go to the documentation of this file.
00001 /*
00002  * check_spice.h - checker definitions for a Spice netlist
00003  *
00004  * Copyright (C) 2004, 2005 Stefan Jahn <stefan@lkcc.org>
00005  *
00006  * This is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2, or (at your option)
00009  * any later version.
00010  * 
00011  * This software is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  * 
00016  * You should have received a copy of the GNU General Public License
00017  * along with this package; see the file COPYING.  If not, write to
00018  * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
00019  * Boston, MA 02110-1301, USA.  
00020  *
00021  * $Id$
00022  *
00023  */
00024 
00025 #ifndef __CHECK_SPICE_H__
00026 #define __CHECK_SPICE_H__
00027 
00028 #include "netdefs.h"
00029 
00030 #define HINT_NODE         1
00031 #define HINT_NUMBER       2
00032 #define HINT_NAME         4
00033 #define HINT_PAIR         8
00034 #define HINT_DONE        16
00035 #define HINT_MSTART      32
00036 #define HINT_MSTOP       64
00037 
00038 /* Externalize variables used by the scanner and parser. */
00039 extern int spice_lineno;
00040 extern FILE * spice_in;
00041 
00042 __BEGIN_DECLS
00043 
00044 /* Externalize variables used by the scanner, parser, checker and producer. */
00045 extern struct definition_t * definition_root;
00046 extern struct definition_t * subcircuit_root;
00047 extern char * spice_title;
00048 extern struct node_t * spice_nodes;
00049 extern struct definition_t * device_root;
00050 
00051 /* Available functions of the checker. */
00052 int  spice_checker (void);
00053 int  spice_parse (void);
00054 int  spice_error (const char *);
00055 int  spice_lex (void);
00056 int  spice_lex_destroy (void);
00057 void spice_destroy (void);
00058 
00059 /* Local functionality. */
00060 void spice_add_last_hint (struct value_t *, int);
00061 void spice_set_last_hint (struct value_t *, int);
00062 struct value_t * netlist_append_values (struct value_t *, struct value_t *);
00063 struct definition_t * spice_checker_intern (struct definition_t *);
00064 extern int spice_errors;
00065 
00066 __END_DECLS
00067 
00068 #endif /* __CHECK_SPICE_H__ */