com.svincent.moksa
Class PrologUtil

java.lang.Object
  |
  +--com.svincent.util.BaseObject
        |
        +--com.svincent.moksa.PrologUtil

public class PrologUtil
extends BaseObject

Contains a bunch of static methods for doing useful tasks for compiling Prolog. In particular, contains routines to convert strings to and from quoted form.


Method Summary
static java.lang.String backQuotify(java.lang.String s)
           
static java.lang.String doubleQuotify(java.lang.String s)
           
static void main(java.lang.String[] args)
           
static boolean shouldQuote(java.lang.String s)
          Returns 'true' if the string 's' has enough wierd characters in it that it should be quoted for user consumption.
static java.lang.String singleQuotify(java.lang.String s)
           
static void testBackBeatAndBeat(int reps, char lo, char hi)
           
static void testDoubleBeatAndBeat(int reps, char lo, char hi)
           
static void testErrorCases()
           
static void testSimpleCases()
           
static void testSingleBeatAndBeat(int reps, char lo, char hi)
           
static java.lang.String unBackQuotify(java.lang.String s)
           
static java.lang.String unDoubleQuotify(java.lang.String s)
           
static java.lang.String unSingleQuotify(java.lang.String s)
           
 
Methods inherited from class com.svincent.util.BaseObject
dump, dump, dumpToString, tag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

shouldQuote

public static boolean shouldQuote(java.lang.String s)
Returns 'true' if the string 's' has enough wierd characters in it that it should be quoted for user consumption.

doubleQuotify

public static java.lang.String doubleQuotify(java.lang.String s)

unDoubleQuotify

public static java.lang.String unDoubleQuotify(java.lang.String s)
                                        throws PrologStringFormatException

singleQuotify

public static java.lang.String singleQuotify(java.lang.String s)

unSingleQuotify

public static java.lang.String unSingleQuotify(java.lang.String s)
                                        throws PrologStringFormatException

backQuotify

public static java.lang.String backQuotify(java.lang.String s)

unBackQuotify

public static java.lang.String unBackQuotify(java.lang.String s)
                                      throws PrologStringFormatException

main

public static void main(java.lang.String[] args)
                 throws PrologStringFormatException

testDoubleBeatAndBeat

public static void testDoubleBeatAndBeat(int reps,
                                         char lo,
                                         char hi)

testSingleBeatAndBeat

public static void testSingleBeatAndBeat(int reps,
                                         char lo,
                                         char hi)

testBackBeatAndBeat

public static void testBackBeatAndBeat(int reps,
                                       char lo,
                                       char hi)

testSimpleCases

public static void testSimpleCases()
                            throws PrologStringFormatException

testErrorCases

public static void testErrorCases()



This is documentation for Moksa Prolog, which can be found at http://www.svincent.com/moksa/

Copyright © 1999 Shawn P. Vincent.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.