|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.sri.oaa2.icl.IclUtils
| Field Summary | |
static IclTerm |
iclTrue
Deprecated. use getTrueAtom() |
| Constructor Summary | |
IclUtils()
|
|
| Method Summary | |
static void |
debugP(java.lang.String s)
|
static void |
debugPrint(java.lang.String s)
debugPrint |
static void |
debugPrint(java.lang.String s,
IclTerm t)
debugPrint |
static java.lang.String |
doubleQuotes(java.lang.String s)
Doubles any "'" in the string, to prepare the string to be surrounded by "'". |
static java.lang.String |
fixQuotes(java.lang.String s)
Converts any '' marks inside a string to just ', and removes any external quote marks around the string. |
static IclTerm |
fromString(boolean failFast,
java.lang.String t)
Generate an IclTerm from a string, throwing RuntimeException on errors, or displaying the errors. |
static IclTerm |
fromString(java.lang.String t)
Generate an IclTerm from a string. |
static IclTerm |
getMember(IclTerm elt,
IclTerm list)
Get an element in the list which unifies with the given elt.. |
static IclTerm |
getParamValue(java.lang.String functor,
IclTerm defaultVal,
IclList params)
Get a parameter value from a parameter list, using the default if the parameter if the given functor isn't in the list. |
static IclTerm |
getTrueAtom()
Get the atom representing "true" |
static IclTerm |
icl(java.lang.String t)
Deprecated. use IclTerm.fromString(String) (which throws exceptions). You can also use fromString(bolean, String) if you want a runtime exception. |
static boolean |
iclIsEmptyList(IclTerm in)
Deprecated. use IclTerm.isEmptyList |
static boolean |
iclIsFloat(IclTerm in)
Deprecated. use IclTerm.isFloat |
static boolean |
iclIsGroup(IclTerm in)
Deprecated. use IclTerm.isGroup |
static boolean |
iclIsInt(IclTerm in)
Deprecated. use IclTerm.isInt |
static boolean |
iclIsList(IclTerm in)
Deprecated. use IclTerm.isList |
static boolean |
iclIsStr(IclTerm in)
Deprecated. use IclTerm.isStr |
static boolean |
iclIsStruct(IclTerm in)
Deprecated. use IclTerm.isStruct |
static boolean |
iclIsValid(IclTerm in)
Deprecated. silly--will always return true |
static boolean |
iclIsVar(IclTerm in)
Deprecated. use IclTerm.isVar |
static IclTerm |
iclMember(IclTerm elt,
IclTerm list)
Deprecated. use getMember |
static IclTerm |
iclNewTermFromString(java.lang.String t)
Deprecated. use IclTerm.fromString() |
static IclTerm |
iclParamValue(java.lang.String function,
IclTerm paramList)
Deprecated. use termParamValue().getTerm(0) or getParamValue() |
static IclTerm |
iclParamValue(java.lang.String function,
IclTerm match,
IclTerm paramList)
Deprecated. use termParamValue |
static int |
iclParamValueAsInt(java.lang.String func,
IclTerm paramList)
Deprecated. use intParamValue() |
static int |
intParamValue(java.lang.String func,
IclTerm paramList)
As termParamValue, but uses null for the expectedValue, and attempts to convert the IclTerm to an int. |
static int |
intParamValue(java.lang.String func,
int defaultValue,
IclTerm paramList)
As termParamValue, but uses null for the expectedValue, and attempts to convert the IclTerm to an int. |
static boolean |
removeParamValue(java.lang.String functor,
IclList params)
Removes all occurences of a functor from a parameter list. |
static java.lang.String |
removeQuotes(java.lang.String s)
Remove the quotes from a string. |
static IclTerm |
termParamValue(java.lang.String key,
IclTerm expectedValue,
IclTerm paramList)
Get a parameter value from a list. |
static java.lang.String |
undoubleQuotes(java.lang.String s)
Converts any '' marks inside a string to just '. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final IclTerm iclTrue
| Constructor Detail |
public IclUtils()
| Method Detail |
public static IclTerm getTrueAtom()
public static IclTerm icl(java.lang.String t)
public static IclTerm fromString(boolean failFast,
java.lang.String t)
public static IclTerm fromString(java.lang.String t)
throws antlr_oaa.RecognitionException,
antlr_oaa.TokenStreamException
antlr_oaa.RecognitionException - if the string could not be parsed
antlr_oaa.TokenStreamException - if the string could not be tokenized
public static boolean removeParamValue(java.lang.String functor,
IclList params)
functor - the functor to removeparams - the parameter list
true if one or more functors were removed from the
parameter list, and false if the input functor was not
found in the parameter list.
public static IclTerm getParamValue(java.lang.String functor,
IclTerm defaultVal,
IclList params)
public static IclTerm termParamValue(java.lang.String key,
IclTerm expectedValue,
IclTerm paramList)
public static int intParamValue(java.lang.String func,
int defaultValue,
IclTerm paramList)
RuntimeException: - if the returned parameter cannot be converted.
public static int intParamValue(java.lang.String func,
IclTerm paramList)
RuntimeException: - if the returned parameter cannot be converted.
public static IclTerm getMember(IclTerm elt,
IclTerm list)
public static java.lang.String undoubleQuotes(java.lang.String s)
s - the string to undouble quotes
removeQuotes(java.lang.String),
fixQuotes(java.lang.String)public static java.lang.String doubleQuotes(java.lang.String s)
s - the string to convert to double quotes
undoubleQuotes(java.lang.String),
fixQuotes(java.lang.String)public static java.lang.String removeQuotes(java.lang.String s)
s - the string ro remove quotes from
public static java.lang.String fixQuotes(java.lang.String s)
s - the string to fix quotes
removeQuotes(java.lang.String),
undoubleQuotes(java.lang.String)
public static int iclParamValueAsInt(java.lang.String func,
IclTerm paramList)
public static IclTerm iclParamValue(java.lang.String function,
IclTerm match,
IclTerm paramList)
public static IclTerm iclParamValue(java.lang.String function,
IclTerm paramList)
public static IclTerm iclMember(IclTerm elt,
IclTerm list)
public static IclTerm iclNewTermFromString(java.lang.String t)
public static boolean iclIsList(IclTerm in)
public static boolean iclIsInt(IclTerm in)
public static boolean iclIsFloat(IclTerm in)
public static boolean iclIsStruct(IclTerm in)
public static boolean iclIsVar(IclTerm in)
public static boolean iclIsGroup(IclTerm in)
public static boolean iclIsStr(IclTerm in)
public static boolean iclIsEmptyList(IclTerm in)
public static boolean iclIsValid(IclTerm in)
public static void debugP(java.lang.String s)
public static void debugPrint(java.lang.String s,
IclTerm t)
public static void debugPrint(java.lang.String s)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||