uk.ac.umist.co.brailletrans.utils
Class MakeLegacy

java.lang.Object
  extended byuk.ac.umist.co.brailletrans.utils.Maker
      extended byuk.ac.umist.co.brailletrans.utils.MakeLegacy

public class MakeLegacy
extends Maker

Constructs a legacy language rules table file in machine format from a text format file. The format of the text file is very important. It must be encoded in ASCII or 256-character extended-ANSI.

Structure of the textfile to process

WhatHow many (lines)
commentsas many as wanted
version number, integer1
commentsas many as wanted
character rules256
commentsas many as wanted
number of wildcards1
wildcard definitionsas many as number of wildcards
commentsas many as wanted
number of states1
commentsas many as wanted
number of input classes1
commentsas many as wanted
decision tableas many rows as states
commentsas many as wanted
translation rulesas many as needed at one per line
# character to endon separate line, indicates end of translation rules

There are a number of further constraints: a maximum of 9 input classes, a maximum of 9 states, characters indicating true flags must be ASCII upper case, comment lines must begin with the ':' character, the asterisk '*' character must not be used as a wildcard.

Escape characters are supported: '\\xdd' where dd = decimal value of the character. Use '\\\\' for backslash.

See a text-format file for more details.

Copyright 1999, 2004 Alasdair King. This program is free software under the terms of the GNU General Public License.


Field Summary
 
Fields inherited from class uk.ac.umist.co.brailletrans.utils.Maker
DISK_ERROR, ESCAPE_CHARACTER_1, ESCAPE_CHARACTER_2, LANGUAGE_ERROR, SUCCESS
 
Method Summary
static void main(java.lang.String[] args)
          Command-line access to conversion process.
static void make(java.lang.String inputFilename, java.lang.String outputFilename)
          Performs actual conversion of CON files to DAT files.
 
Methods inherited from class uk.ac.umist.co.brailletrans.utils.Maker
getEscapedCharacter, skipComments, skipComments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(java.lang.String[] args)
Command-line access to conversion process.

Parameters:
args - The array of Strings passed as command-line arguments. The arguments are:
  • input filename - full path and name of .con file to convert.
  • output filename - full path and name of .dat file produced.

make

public static void make(java.lang.String inputFilename,
                        java.lang.String outputFilename)
Performs actual conversion of CON files to DAT files.

Parameters:
inputFilename - Full path and name of CON file to process.
outputFilename - Full path and name of DAT file to produce.