home *** CD-ROM | disk | FTP | other *** search
-
- This is an EDIF 2.0.0 parser, well more like a recognizer. If
- you build the test case and run it with a valid EDIF file on the
- standard input the program will just terminate normally. Sounds
- real useful, huh. The nifty part is that the core of the parser
- is YACC-able, almost. The problem is that the EDIF grammer is
- so large that standard YACC just can't swallow it. So you need
- to either super charge your YACC or use a YACC clone like BISON.
- I used BISON, which is GNU-ware and so is freely available besides
- being a terrific program. I think BISON is available from the
- Free Software Foundation or on systems near you; even I am happy
- to pass it on to whoever wants it.
- Enough BISON praise. The reason I made the parser YACC-able is
- because past experience indicates this one of the easiest forms
- to add actions too, as well as put in updates or fixes. EDIF is
- hardly context free though, and so I had to fold all sorts of
- ugliness into the lexical analyzer to keep the YACC part clean.
- This version is raw, it doesn't build symbol tables, do
- semantic checking or create a database. The parser itself won't
- even run though a wrapper has been included for testing. I wanted
- to get out one version before I started adding such junk to it.
- Again experience indicates that it is no fun lobotimizing parsers
- so that you can do the low level stuff your way. Besides somebody
- might even find a bug in the code ... naw, that's a silly
- justification.
- The 'makefile' I've included is not the one I use (and probably
- will get me in lots of trouble). I invoke gobs of debugging and
- profiling switches which are specific to our compilers, the
- 'makefile' is intended to be generic and may require some diddling.
- I developed the code on a BSD 4.3 system and haven't added the
- changes for SYS V, though they should be minor. The parser was too
- large to post in one piece, so it got split and the 'makefile'
- should know how to patch it together. There is one definition of
- possible interest. Compiling with a '-DDEBUG' will cause the 8 most
- recently consumed tokens to be displayed in the event of a parse
- error. Profiling indicates a pretty costly item though.
- Three test cases are included:
-
- hptest - by Fabio Angelillis of Hewlett-Packard
-
- batest.1
- batest.2 - by Bill Ames of Silicon Compilers
-
- Many thanks to them and the files are provide as is, no warrenty
- implied and brush after every meal ...
- I find the parser code to be easily immediately obvious and so
- no documentation is included in the release. Humm ... don't buy that.
- Actually documentation is in the works but it would delay this
- posting too long if I waited for it to be completed. If you find
- the parser totally incomprehensible, E-mail me a request and I'll
- send you whatever I have written by the time I get your mail.
- Lastly, as far as I'm concerned this parser is now in the public
- domain and you can do anything you want with it. My next task is
- to make it build a database and when that's through I'll probably
- post it again ... you have been warned! Enjoy, and I'd be happy to
- get bug reports or stories of how many ways you found to delete
- the source ...
- --
- -your friendly neighborhood Rogue Monster roger@mips.com
- UUCP: {decvax,ucbvax,ihnp4,hplabs,sun,ames,prls}!decwrl!mips!roger
- USPS: MIPS Computer Systems, 930 Arques, Sunnyvale, CA 94086, (408) 991-0220
-