Skip to content
This is a clone of an SVN repository at It had been cloned by , but the service was since closed. Please read a closing note on my blog post: . If you want to continue synchronizing this repo, look at…
Yacc C Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples 2008-Apr-28 fwb Apr 30, 2008
pcb123net2kicad Add pcb123 netlist to KiCad netlist utility Nov 2, 2007
test See change_log.txt Jan 8, 2013
README 2012-May-24 fwb May 26, 2012
change_log.txt See change_log.txt Jan 8, 2013
e2lib.c 2012-May-24 fwb May 26, 2012
e2net.c 2012-May-24 fwb May 26, 2012
e2sch.c See change_log.txt Jan 8, 2013
ed.h Improve netlist Mar 3, 2008
edif.y See change_log.txt Jan 8, 2013
eelibsl.h See change_log.txt Jan 8, 2013
fctsys.h 2012-Apr-27 fwb Apr 27, 2012
makefile 2012-May-24 fwb May 26, 2012
ppedif.c add test/panda edif schematic Feb 4, 2012
run_tests Schematic is useable, not perfect Oct 18, 2007
savelib.c See change_log.txt Jan 8, 2013


	edif.y, e2net, e2sch - Frank Bennett 

	see change_log.txt for status

	Tools with EDIF out writer:
	   o OrCad
	   o DataXpress
	   o Viewlogic
	   o IntuSoft ICAP
	   o Protel nVisage
   	   o PADS ?
           o P-CAD ?
 	   o EDIF viewer (
	   o EDIF translator (

	Modified to output a KiCad Netlist
	1) find/store InstanceNameDef. ViewRef - i.e. CMP31.cap
        2) find/store Nets: NetNameDef, InstRef, PortRef
	3) sort Nets by InstRef

	makefile	- Unix style makefile, runs Bison & runs gcc
	ppedif.c	- pretty print EDIF
	edif.y  	- edif BNF Grammer, yylex, & main.c
	savlib.c	- output format
	e2net.c		- EDIF to netlist main
	e2sch.c		- EDIF to libs, schematic main
	e2lib.c		- EDIF to libs (obsolete)
	eyespy		- ORCad schematic (ATX PS)
	PS10      	- OrCad schematic in EDIF format(reformated)
	PS10.EDF  	- Original PS10
	PS10.pdf  	- PS10 schematic  	- KiCad netlist output see below
	batest.1  	- edif test file
	batest.2  	- edif test file
	hptest      	- edif test file	- KiCad netlist output see below

	Tested under Linux and cygwin (

		cd test
		../e2sch openrd.edf 
		../e2sch panda.edf
		cd examples
		../ppedif < PS10.EDF > PS10
		../e2net < PS10 > or
		../e2net PS10 or 
		../e2net hptest or
		../e2sch examples/eyespy
		../e2sch examples/PS10
		../e2sch examples/BCD

		e2lib is now obsolute

	Edif Notes:
	o hptest is more readable for parser debugging. This begs for
 	  EdifBeautifier for the OrCad output (use ppedif)
	o EDIF schematic file contain
		- symbol ports names, Direction, Designator
		- symbol graphics, justification, orientation, origin
		- sheet  ports, instances, instance location, symbol reference
		- sheet  Netlist, wire paths 
	  Doesn't seem to include footprint references

	  o find/output schematic drawing, symbol graphics


	roger's previous comments:

	  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
	  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.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           
UUCP: {decvax,ucbvax,ihnp4,hplabs,sun,ames,prls}!decwrl!mips!roger
USPS: MIPS Computer Systems, 930 Arques, Sunnyvale, CA 94086, (408) 991-0220
You can’t perform that action at this time.