PICS/DSig Standard Library

PICS Design Document

The w3c.pics.parser package can be used independantly of the rest of the code, if all that is desired is a PICS parser/evaluator (if DSig is not needed). In order to use the PICS code by itself, you need only to do the following:
  1. Create a new w3c/pics/parser directory tree.
  2. Copy all of the w3c.pics.parser source files except: Label.java, DSigDemo.java, DSigParser.*
  3. Change the name of NonDSigLabel.java to Label.java.
  4. Compile Label.java
Information about running the PICS portion of the library stand-alone is included on the documentation page. Below is a brief description of the main classes: In each of the three main classes (Label, Service, and Profile), calling the method toString() will produce a valid PICS 1.1 representation of the object. This output may be more verbose than the input which created the object. A few examples of this behavior:

PICS Parsers

There are three parsers in this package: LabelParser, ServiceParser, and ProfileParser. Each may be run from the command-line if supplied with an argument (the name of the file to parse). There is also PICSParser, which is a Java console application that provides an interface to the three parsers. The PICSParser also provides the means to evaluate profiles against label lists, and to generate canonicalized PICS labels. Note that there is another parser file: DSigParser. It cannot be run by itself. It is called during the normal operation of the DSig code.

Parser Design

The parsers were built by constructing modified BNF implementations of each data type and running them through Sun Microsystems' JavaCC, the Java Compiler Compiler. The ProfileParser also made use of JJTree, a companion tool to JavaCC, that is used to construct parse trees. The parse tree is used to perform evaluation of PICS labels against a profile. Neither JavaCC nor JJTree are necessary in order to use these parsers. They are required if you wish to modify the grammars however (the grammar files are included in the source distribution of the PICS/DSig Standard Library).
15 May 98