# ILOG XML Serializer for the RIF BLD

`Version 0.1`

Hassan Aït-Kaci
ILOG, Inc.

IMPORTANT DISCLAIMER
This software bundle, including Jacc and RIF serialization examples using Jacc, is made available graciously by ILOG, Inc. to the W3C RIF Working Group to ease experimenting with various schemes of XML serializations for a RIF-compliant rule language from its formal grammar. It is provided as is: ILOG or this author take no responsibility for anyone's using it. All material contained in this distribution are under copyright © 2008 by ILOG, Inc.. All Rights Reserved.

The directory containing this HTML `START_HERE.html` file (i.e., this) comprises a distribution of Jacc (Just Another Compiler Compiler, a tool written in Java by Hassan Aït-Kaci, together with an example application thereof for the purpose of automating the XML serialization of formal languages expressed as context-free grammar rules (BNF).

[NB: Jacc requires Java 1.5 (a.k.a JDK 5.0) to run - it will not run under Java 1.4 or earlier.]

These are intructions documenting the contents of this distribution.

The subdirectories are:

`docs`:
  documentation files (on the BLD grammar, as well as Jacc and Jacc's XML annotation documentation)
`examples`:
  examples of programs to serialize
`sources`:
  source files (`*.grm, *.java`)
`classes`:
  repository for jar files and generated classes

[NB: This is only a preliminary version of the XML serializer tool. ]

Running `ant` in this root directory will generate a parser and XML serializer from the grammar specified in the file `BLD.grm`. This grammar is expressed modularly, consisting of the full language obtained using subgrammars (using Jacc's `%include` directive).

To run the example, you will need Apache's Ant Builder, a Java freeware tool (therefore platform-independent) implementing an XML-based version of the popular UNIX command `make`. If you don't have Ant, you must first download it from the Apache web site and install it. This root directory contains a `Build.xml` file specifying an Ant project for running the examples. Here are the most useful ant targets it defines:

`ant`:
  prints out a usage listing of known targets
`ant bld`:
  generates the parser/serializer and compiles it
`ant doc`:
  generates the HTML documentation for the BLD grammar
`ant test`:
  runs the BLD parser on a test file (`Test1.bld` whose XML output is `Test1.xml`).

Running the example parses the file and prompts the user asking whether or not to show the XML serialization of the parsed example.

[NB: For some reason, the prompt is not displayed - simply enter a carriage return. This must be due to a bug in Ant that does not flush it output buffer despite our Java application's doing so. The correct behavior can be seen running java directly on the examples (e.g., issuing the command line:

        bld Test1.bld

using the UNIX shell script `bld` provided in the `examples` directory).]

Please send comments and/or questions to Hassan Aït-Kaci.

Thank you very much.

Enjoy!

-hak

`[last modified on Tue Oct 07 10:56:11 2008 by hak]`