*-----------------------------------------------------------
* COPYRIGHT  (c) 2002 
* THE REGENTS OF THE UNIVERSITY OF MICHIGAN
* ALL RIGHTS RESERVED
* 
* PERMISSION IS GRANTED TO USE, COPY, CREATE DERIVATIVE WORKS 
* AND REDISTRIBUTE THIS SOFTWARE AND SUCH DERIVATIVE WORKS FOR 
* ANY PURPOSE, SO LONG AS NO FEE IS CHARGED, AND SO LONG AS 
* THE COPYRIGHT NOTICE ABOVE, THIS GRANT OF PERMISSION, AND 
* THE DISCLAIMER BELOW APPEAR IN ALL COPIES MADE; AND SO LONG 
* AS THE NAME OF THE UNIVERSITY OF MICHIGAN IS NOT USED IN ANY 
* ADVERTISING OR PUBLICITY PERTAINING TO THE USE OR 
* DISTRIBUTION OF THIS SOFTWARE WITHOUT SPECIFIC, WRITTEN 
* PRIOR AUTHORIZATION.
* 
* THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION 
* FROM THE UNIVERSITY OF MICHIGAN AS TO ITS FITNESS 
* FOR ANY PURPOSE, AND WITHOUT WARRANTY BY THE 
* UNIVERSITY OF MICHIGAN OF ANY KIND, EITHER EXPRESS OR 
* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES 
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE 
* REGENTS OF THE UNIVERSITY OF MICHIGAN SHALL NOT BE LIABLE 
* FOR ANY DAMAGES, INCLUDING SPECIAL, INDIRECT, INCIDENTAL, OR 
* CONSEQUENTIAL DAMAGES, WITH RESPECT TO ANY CLAIM ARISING OUT 
* HAS BEEN OR IS HEREAFTER ADVISED OF THE POSSIBILITY OF SUCH 
* DAMAGES.
*-----------------------------------------------------------

Description
-----------

hparse: the shell of a C++ parser for hspice netlists

Requirements
------------

The following external applications and/or libraries are
required in order to build the application:

1) Gnu make, flex, bison and gcc version 2.7 or later 
   (author's note: it has been observed that the egcs 
   release of g++ seems to result in significantly faster 
   compile times, probably because the STL code is included
   in the standard library, not simply header files.  Its 
   use is encouraged.)

Instructions
------------

To configure the build environment, some editing of the
variables in the make.include file may be required.  Most 
likely the variables AR, PURIFY, INCLUDES, and CXX will
have to be changed.

To build, type 'make includes' followed by 'make'.  

Type 'hparse -h' for a list of options.

Note: you may see error messages of the form "<xxx>.d: No such file 
or directory" when you first build the system.  These are normal, 
and are a by-product of some weird behavior of gnu make that 
shouldn't really generate warnings.  If anyone knows how to fix 
this, let me know.

Run the parser shell with the command 'hparse <inputfile>'.
This will produce no output if the netlist is syntactically
correct, it will only parse the file and exit.  To produce a dump
of the parsed file to the output use the -D1 (debug) flag.

The best way to learn how to expand on this parser is to examine
the subCircuit::dump() routine in Netlist/circuit.cc.  This traverses
all of the data structures in the parse tree and can be used as
the basis for application-specific traversals.

Comments
--------

This system has been tested on the following platforms:

     SunOS 5.8
     RedHat Linux 7.1 & 7.2

If you find this parser useful let us know and we will place you
on an email list for updates.  And if you find/fix any bugs or
add any improvements, please send them to us so that we can fold
them into our distribution.

Authors
-------
Matthew R. Guthaus
Department of Electrical Engineering and Computer Science
The University of Michigan
Ann Arbor, MI. 48109-2122
(734) 764-8033
mguthaus@eecs.umich.edu
http://www.eecs.umich.edu/~mguthaus

Michael A. Riepe
(now at Magma Design Automation)

Prof. Karem A. Sakallah
Department of Electrical Engineering and Computer Science
The University of Michigan
Ann Arbor, MI. 48109-2122
(734) 936-1350
karem@eecs.umich.edu
http://www.eecs.umich.edu/~karem
