OsfV0Main.html

`OsfV0Main.java`

    // FILE. . . . . /home/hak/hlt/src/hlt/osf/apps/v0/sources/OsfV0Main.java
    // EDIT BY . . . Hassan Ait-Kaci
    // ON MACHINE. . Hp-Dv7
    // STARTED ON. . Fri Nov 02 18:15:16 2012

This is the main entry file for running "OSF Version 0", which defines a primitive OSF constraint language. (See OsfV0.grm for details.)
Author: |  | Hassan Aït-Kaci
Copyright: |  | © by the author
Version: |  | Last modified on Mon Nov 26 18:18:36 2012 by hak

    package hlt.osf.v0;

    import java.io.File;
    import java.io.IOException;

    import hlt.language.util.Error;

    import hlt.osf.util.BitCode;

    public class OsfV0Main
    {
      final static void welcome ()
        {
          System.out.println();
          System.out.println("********************************************************");
          System.out.println("***                                                  ***");
          System.out.println("*** This is HLT's OSF Prototype Version 0 - Welcome! ***");
          System.out.println("***                                                  ***");
          System.out.println("********************************************************");
          System.out.println();
          System.out.println("*** Interactive mode: type '%help.' for known pragmas.");
          System.out.println();
        }

      final static void exit ()
        {
          System.out.println();
          System.out.println();
          System.out.println("********************************************************");
          System.out.println("*** Exiting HLT's OSF Version 0 - Good Bye!          ***");
          System.out.println("********************************************************");
          System.out.println();
          System.exit(0);
        }

      final public static void main (String args[])
        {
          OsfV0Tokenizer tokenizer = new OsfV0Tokenizer();
          OsfV0Parser parser = new OsfV0Parser(tokenizer);

          welcome();

          BitCode.setOnChar('+');
          BitCode.setOffChar('-');

          try
            {
              for (int i=0; i<args.length; i++)
                {
                  parser.displayLine("*** Loading file: "+args[i]);
                  parser.parse(args[i]);
                }
              tokenizer.setInteractive();
              parser.parse();
            }
          catch (IOException e)
            {
              parser.errorManager().reportError(new Error().setLabel("IO Error: ")
    					    .setMsg(e.getMessage()+" aborting")
    					    .setSee("..."));
            }
          catch (Throwable e)
            {
              parser.errorManager().reportError(new Error().setLabel("Fatal Error: ")
                                                .setMsg("aborting")
                                                .setSee("..."));
              e.printStackTrace();
            }
          finally
            {
              exit();
            }
        }
    }

This file was generated on Mon Jan 21 11:06:44 CET 2013 from file `OsfV0Main.java`
by the `hlt.language.tools.Hilite` Java tool written by Hassan Aït-Kaci