Brigham Young University Configurable Computing

Edif Parser Download Page

NOTE: This page is no longer actively maintained. For more current information on BYU's Java-based EDIF project, please see http://reliability.ee.byu.edu/edif/.

EDIF (Electronic Design Interchange Format) has become the "the world's most widely used electronic design interchange format." Combined with the platform-independence and ease of Java , EDIF becomes even more powerful and useful. Because of this, the BYU Configurable Computing Laboratory has developed a Java-based edif parser using JTB (Java Tree Builder) and JavaCC (Java Compiler Compiler).

The BYU Configurable Computing Laboratory is making its edif parser source code publicly available. To download a copy of the BYUCC edif parser, just click on the links below.

To use edif.jj, you must have JTB (Java Tree Builder) , from the Department of Computer Sciences at UCLA, and JavaCC (Java Compiler Compiler, a parser builder) , from Sun. Just run JTB on edif.jj. That will create an output file called jtb.out.jj as well as Java source files placed in the new directories syntaxtree and visitor, which form packages of the same name. Then run JavaCC on jtb.out.jj. That will create Java source code for the class EdifParserCore. After compiling these files, the generated classes may then be used to parse EDIF files by either inheriting from them or instantiating them from other classes.

For an example of using the EdifParserCore class, you may download EdifParser.java and EdifVisitor.java. The EdifParser class makes an instance of EdifParserCore. (It could also easily extend EdifParserCore and instantiate itself.)
The main method of the EdifParser class takes one or two arguments. The first argument is the name of an EDIF file. The second, optional argument is the name of a file to be created by EdifParser.
EdifParser parses the EDIF file and then sends the root node of the EDIF file (which should simply be "edif") to an instance of EdifVisitor.
EdifVisitor extends DepthFirstVisitor, which was generated by JTB. EdifVisitor simply traverses the tree that was defined by the EDIF file and prints out information about some of the nodes that it visits. If EdifParser was given an output file name, EdifVisitor will place its output there, otherwise it will print its output to Standard Out.


DOWNLOADS:
edif.jj A description of the EDIF syntax written in a form that is understood by JTB and JavaCC.

EdifParser.java

EdifParser.class

Can be used as a wrapper to EdifParserCore (generated from edif.jj).

EdifVisitor.java

EdifVisitor.class

Used by EdifParser to visit and print information about nodes in an EDIF file.

edifparsercore.jar

Java Archive file that contains all of the .class files compiled from the output of JTB and JavaCC on edif.jj; includes the syntaxtreee and visitor packages.

NOTE: BYU's Configurable Computing Laboratory cannot provide any support for Java, JavaCC, or JTB. If you have questions about our EDIF Parser, please send email.


To contribute to the improvement of this page <EMAIL FEEDBACK>

Last modified: Mon Dec 04 13:47:54 MDT 2006