// Path: src/io/Preface.java
// public class Preface {
// 	public static void readPreface(BufferedReader in) throws IOException {
// 		String line = in.readLine();
// 
// 		if (line == null || line.charAt(0) != '#') {
// 			throw new IllegalArgumentException("File does not start with the mandatory preface.");
// 		}
// 
// 		while ((line = in.readLine()) != null) {
// 			if (line.isEmpty()) {
// 				break;
// 			}
// 			if (line.charAt(0) != '#') {
// 				throw new IllegalArgumentException("Uncommented line within preface.");
// 			}
// 		}
// 	}
// 
// 	public static void printPreface(PrintWriter out) {
// 		out.println("# mandatory preface");
// 		out.println("# mandatory preface");
// 		out.println();
// 	}
// }
// 
// Path: src/utils/ByteWrapper.java
// public class ByteWrapper {
// 	public byte value;
// 
// 	public ByteWrapper(byte value) {
// 		this.value = value;
// 	}
// }
// 
// Path: src/utils/ShortWrapper.java
// public class ShortWrapper {
// 	public short value;
// 
// 	public ShortWrapper(short value) {
// 		this.value = value;
// 	}
// }


import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import io.Preface;
import utils.ByteWrapper;
import utils.ShortWrapper;
						if ( tokens.length != 1 ) {
							throw new Error("error parsing plain cat line in markedup");
						}
						plainCatString = tokens[0];
						state = States.MARKEDUP;
						break;
					case MARKEDUP:
						tokens = (line.trim()).split("\\s+");

						if ( tokens.length != 2 ) {
							throw new Error("error parsing markedup cat line in markedup");
						}

						markedupCatString = tokens[1];
						cat = parse(markedupCatString);

						/*
						 * call reorder since C&C does, although this Java class
						 * does now check the variable ordering in the
						 * consumeSlot method
						 * 
						 * ensures categories have vars ordered according to the
						 * ordering in the VarID class:
						 */
						byte[] seenVariables = new byte[VarID.NUM_VARS];
						Arrays.fill(seenVariables, VarID.NONE); // not necessary
						// since VarID.NONE
						// is 0, but let's
						// be explicit

// Path: src/io/Preface.java
// public class Preface {
// 	public static void readPreface(BufferedReader in) throws IOException {
// 		String line = in.readLine();
// 
// 		if (line == null || line.charAt(0) != '#') {
// 			throw new IllegalArgumentException("File does not start with the mandatory preface.");
// 		}
// 
// 		while ((line = in.readLine()) != null) {
// 			if (line.isEmpty()) {
// 				break;
// 			}
// 			if (line.charAt(0) != '#') {
// 				throw new IllegalArgumentException("Uncommented line within preface.");
// 			}
// 		}
// 	}
// 
// 	public static void printPreface(PrintWriter out) {
// 		out.println("# mandatory preface");
// 		out.println("# mandatory preface");
// 		out.println();
// 	}
// }
// 
// Path: src/utils/ByteWrapper.java
// public class ByteWrapper {
// 	public byte value;
// 
// 	public ByteWrapper(byte value) {
// 		this.value = value;
// 	}
// }
// 
// Path: src/utils/ShortWrapper.java
// public class ShortWrapper {
// 	public short value;
// 
// 	public ShortWrapper(short value) {
// 		this.value = value;
// 	}
// }


// Path: src/lexicon/Categories.java
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import io.Preface;
import utils.ByteWrapper;
import utils.ShortWrapper;

						if ( tokens.length != 1 ) {
							throw new Error("error parsing plain cat line in markedup");
						}
						plainCatString = tokens[0];
						state = States.MARKEDUP;
						break;
					case MARKEDUP:
						tokens = (line.trim()).split("\\s+");

						if ( tokens.length != 2 ) {
							throw new Error("error parsing markedup cat line in markedup");
						}

						markedupCatString = tokens[1];
						cat = parse(markedupCatString);

						/*
						 * call reorder since C&C does, although this Java class
						 * does now check the variable ordering in the
						 * consumeSlot method
						 * 
						 * ensures categories have vars ordered according to the
						 * ordering in the VarID class:
						 */
						byte[] seenVariables = new byte[VarID.NUM_VARS];
						Arrays.fill(seenVariables, VarID.NONE); // not necessary
						// since VarID.NONE
						// is 0, but let's
						// be explicit

						cat.reorderVariables(seenVariables, new ByteWrapper((byte) (0)));