logoAnerty's Lair - Oracle2BNF << Misc. << Software << News << Home
fren
^

Oracle2BNF v1.0

Oracle2BNF Oracle2BNF is a Java application which converts GIF syntax diagrams found in Oracle 8 documentation into BNF grammars.

This program is the result of my personal project for the BSc of Computing for Industry at the University of Northumbria at Newcastle upon Tyne. The SQL documentation for the Oracle database provides the grammar of the SQL commands in either textual form or diagrams. Some students found these diagrams harder to read than the pure BNF form, so I was asked to provide a way of converting the former to the latter.

Given the poor quality of the diagrams, the analysis is rather slow, and can fail in some cases (see the doc). The analysis is based on shape recognition using patterns and shape properties. No text recognition is provided, for it would have required more time to implement than what i was allowed. If you are only interested in the syntaxical tree of the diagram, it won't matter. However, if you need a complete grammar with terminals, a component renamer is included, with a magnifying window to help the reader when the text quality is really bad.

To use this software you must have Java 2 installed. Unpack the binaries somewhere and either run the supplied shRun.bat script, or use the following command in the unpacked directory : java -cp . anerty.bsc.oracle2bnf.Oracle2BnfFrame

Some test images and their BNF grammars are provided in a separate archive if you want to see the results.

Screenshots: Component Renamer  Multipart diagram reassembler 

Downloads: [ Java2 binaries, ZIP ] [ Java2 binaries, tar.bz2 ] [ Word doc, ZIP ] [ Word doc, bz2 ] [ Test suite, ZIP ] [ Test suite, bz2 ]