import java.util.*;
import java.io.*;

public class Util
{
    public static final char RULE_NAME_DELIMITER = ':';
    public static final char OR_DELIMITER = '|';
    public static final String RULE_DELIMITER = " ";

    public static final Vector<Rule> loadRules (String inputFile, boolean debug)
    {
        /*
         * Open the data file and read it in.
         */

        BufferedReader reader = null;
        Vector<Rule> values = new Vector<Rule>();

        try
        {
            String line = null;

            reader = new BufferedReader(new FileReader(inputFile));
         
            while (((line = reader.readLine()) != null) && (line.length() > 0))
            {
                int nameDelim = line.indexOf(RULE_NAME_DELIMITER);
                String name = line.substring(0, nameDelim);

                int orDelim = line.indexOf(OR_DELIMITER);  // there's only ever a maximum of one of these in a rule
                String dataOne = line.substring(RULE_NAME_DELIMITER +1, ((orDelim == -1) ? line.length() : orDelim));
                String dataTwo = ((orDelim == -1) ? null : line.substring(OR_DELIMITER +1));

                String[] dataOneList = dataOne.split(RULE_DELIMITER);
                String[] dataTwoList = (dataTwo == null ? null : dataTwo.split(RULE_DELIMITER));

                values.add(new Rule(name, dataOneList, dataTwoList));
            }
        }
        catch (Throwable ex)
        {
            ex.printStackTrace();
        }
        finally
        {
            try
            {
                reader.close();
            }
            catch (Throwable ex)
            {
            }
        }

        return values;
    }

    public static final Vector<Message> loadMessages (String inputFile, boolean debug)
    {
        /*
         * Open the data file and read it in.
         */

        BufferedReader reader = null;
        Vector<Message> values = new Vector<Message>();

        try
        {
            String line = null;

            reader = new BufferedReader(new FileReader(inputFile));
            
            while (((line = reader.readLine()) != null) && (line.length() > 0))
            {
                // loop until blank line.
            }

            while ((line = reader.readLine()) != null)
            {
                values.add(new Message(line));
            }
        }
        catch (Throwable ex)
        {
            ex.printStackTrace();
        }
        finally
        {
            try
            {
                reader.close();
            }
            catch (Throwable ex)
            {
            }
        }

        return values;
    }

    private Util ()
    {
    }
}
@@ -808,24 +808,81 @@
 ameDelim);%0A%0A
+                System.out.println(%22Rule name: %22+name);%0A%0A
             
@@ -985,16 +985,74 @@
  a rule%0A
+%0A                System.out.println(%22orDelim %22+orDelim);%0A%0A
         
@@ -1091,35 +1091,25 @@
 bstring(
-RULE_NAME_DELIMITER
+nameDelim
  +1, ((o
@@ -1229,28 +1229,23 @@
 ing(
-OR_DELIMITER
+orDelim
  +1));%0A%0A
     
@@ -1236,24 +1236,141 @@
 elim +1));%0A%0A
+                System.out.println(%22Rule one: %22+dataOne);%0A                System.out.println(%22Rule two: %22+dataTwo);%0A%0A
             
@@ -1404,16 +1404,23 @@
 dataOne.
+trim().
 split(RU
@@ -1507,16 +1507,23 @@
 dataTwo.
+trim().
 split(RU
@@ -1535,24 +1535,466 @@
 LIMITER));%0A%0A
+                if (dataOneList != null)%0A                %7B%0A                    for (int i = 0; i %3C dataOneList.length; i++)%0A                        System.out.println(%22Rule one list: %22+dataOneList%5Bi%5D);%0A                %7D%0A%0A                if (dataTwoList != null)%0A                %7B%0A                    for (int i = 0; i %3C dataTwoList.length; i++)%0A                        System.out.println(%22Rule two list: %22+dataTwoList%5Bi%5D);%0A                %7D%0A%0A
             

Update Util.java