|
||||||||||
PREV NEXT | FRAMES NO FRAMES |
Interp
.
Interp
.
addCommand
method adds a command to the current
output.
addCurrent
method adds a new element to the command
parsed.
addDollar
method adds a $var lookup to the current
output.
addError
adds a Thing as an error message.
addStanza
method adds a new command and its arguments.
AnonProc
class implements anonymous procedures,
created like so: set aproc [proc {x} { puts $x }]append
takes a character and appends it to the string.
append
appends a string to the string.
appendToCurrent
method adds a character to the group
object.
argvToString
method turns an argv array into a
string, suitable for printing in error messages.
argvToString
method turns an argv array into a
string, suitable for printing in error messages.
asNumber
attempts to transform Thing t into a
number of some sort.
auxdata
Hashtable
is a place to
store extra information about the state of the program.
backgroundError
method can be called to
dispatch a bgerror command.
buildCmdList
method takes a Thing, treats it as a
list, and adds arguments to it from the args array.
byteValue
returns the number as a byte.
checkArgCount
checks to see whether the command
actually has the required number of arguments.
ClassCommand
interface is the template for all commands
implemented in Java working on Hecl ObjectThing
.ClassCommandInfo
holds information about a class command
that may be attached to an interpreter.clearError
clears the error stack.
cmdCode
method takes an interpreter and an array of
Things, performs some calculations, and returns a Thing
representing the computed value, or null
.
cmdcode
- the int that corresponds to the command
to be executed.
cmdCode
method dispatches to the actual code
via the operate method and cmdcode argument.
cmdRename
method renames a command, or throws
an error if the original command didn't exist.
CodeThing
class implements a chunk of "compiled" code
including multiple "Stanzas", or individual commands.Command
interface is the template for all commands
implemented in Hecl.commandExists
method returns true if a command
exists, otherwise false.
commands
Hashtable
provides the
mapping from the strings containing command names to the code
implementing the commands.
Compare
class exists to compare things in different ways.compareProc
method takes two things to
compare, an interpreter, andthe name of a proc to compare the
two things with.
compareString
compares two Things as strings.
constructors
method returns a Hecl list of
types that would work as constructors for this object type.
create
method creates and returns a newly allocated
Thing with a DoubleThing internal representation.
create
method creates and returns a newly allocated
Thing with a DoubleThing internal representation.
create
method takes a Vector of Things and
creates a Thing containing a GroupThing.
create
allocates and returns a new HashThing typed
Thing.
create
method creates and returns a newly allocated
Thing with an IntThing internal representation.
create
method creates and returns a newly allocated
Thing with an IntThing internal representation.
create
allocates and returns a new ListThing typed Thing.
create
method creates and returns a newly allocated
Thing with an LongThing internal representation.
create
method creates and returns a newly allocated
Thing with an LongThing internal representation.
create
method creates and returns a newly
allocated Thing with an LongThing internal representation.
create
method creates a new Thing from
NumberThing n.
create
method creates and returns a newly allocated
Thing with an ObjectThing internal representation.
create
method creates and returns a newly allocated
Thing
with a StringThing
internal representation.
createJadForJar
method calls createJadForJar
with a url created from the application's name.
createJadForJar
method creates a new .jad file
that matches the .jar file passed to it.
createWrongNumArgsException
method creates a
HeclException for a command that has received the wrong number
of arguments.
datainputstream
is the stream that this channel
reads from.
dataoutputstream
is the stream this channel writes
to.
deepcopy
method makes a copy of all
the stanzas, which in turn copy all their objects.
deepcopy
makes a copy.
deepcopy
makes a copy of a GroupThing and all its
elements.
deepcopy
copies the hash table and all its elements.
deepcopy
makes a copy.
deepcopy
copies a list and all of its elements.
deepcopy
makes a copy.
deepcopy
makes a copy.
deepcopy
method must copy a RealThing and any values
it contains.
deepcopy
copies the string.
deepcopy
returns a copy of the SubstThing.
deepcopy
copies the thing, its value, and any elements the
value might contain.
delProp
removes a property from the property set.
doCodeSubst
takes a code Thing and runs it, returning the
result.
doGroupSubst
runs substitutions on 'groups' of things,
such as "foo $foo [foo]".
done
method returns true if either the
end-of-command or end-of-file condition is true.
doSubstSubst
runs substitutions on things of the
SubstThing type, which means $foo or &foo in Hecl.
DoubleThing
class represents a Thing that contains
a double value.DoubleThing
instance equal to 0.
DoubleThing
instance with value i.
DoubleThing
instance from boolean b where true
is 1 and false is 0.
DoubleThing
instance from string s.
doubleValue
returns the value as a double.
eol
is the end-of-line character or characters.
equals
method overrides the object equals
method, using either the two objects, in the case of two
ObjectThings, or the two string representations.
eval
method evaluates some Hecl code passed to
it.
eval
takes a 'level' argument that
tells Hecl what level to run the code at.
evaluate
method takes a target object to
operate on, a methodname, and some Hecl values, and attempts to
find and call a Java method with the supplied values.
existsProp
method is used to determine if a
property exists or not.
existsVar
returns true
if the given
variable exists in the current variable stack frame, false
if it does not.
existsVar
returns true
if the given
variable exists in the current variable stack frame, false
if it does not.
existsVar
returns true
if the given
variable exists in the variable stack frame given by level
,
false
if it does not.
FileCmds
class implements various file commands -
most importantly, open, but also various operations to check
whether a file exists, is readable, is a directory, and so on.fileseparator
is the file separator, such as "/".
floatValue
returns the value as a float.
FractionalThing
class is for floating point
values.get
returns a CodeThing object from any kind of Thing - or
returns an error.
get
attempts to fetch a double value from a Thing.
get
returns a Vector containing other Things, representing
a group, from a Thing.
get
attempts to return a Hashtable from a given Thing, in
the process transforming that Thing into a HashThing internally.
get
attempts to fetch an integer value from a Thing.
get
attempts to transform the given Thing into a List, and
return its Vector value.
get
attempts to fetch an integer value from a
Thing.
get
attempts to fetch an Object from the Thing.
get
returns a string representation of a given Thing,
transforming the thing into a string type at the same time.
get
returns the *value* of a SubstThing - in other words,
the Thing that its varName is pointing to.
getAndDelProp
method fetches and deletes the
value associated with 'name', or returns null if there is no
value associated with it.
getArray
attempts to transform the given Thing
into a List, and return it as an array of Things.
Interp
.
ClassCommand
to be called for methodes on
instances.
getConstField
fetches a constant field value.
getField
method returns the value of an
instance's field.
getProp
method fetches the value of a
property.
getProp
method with two arguments fetches the
value of the property given by 'name', or, if that does not
exist, returns a default value.
getProps
converts the properties back into an
array of Thing
s.
getStack
method returns the exception as a Thing.
getStringRep
method returns a String representation of
the commands it represents.
getStringRep
creates a string representation of the
DoubleThing.
getStringRep
returns a string representation of the group.
getStringRep
returns a string representation of a
HashThing, which is in reality a string representation of a ListThing,
only that there are guaranteed to be an even number of elements.
getStringRep
creates a string representation of the
IntThing.
getStringRep
returns a string representation of a
ListThing.
getStringRep
creates a string representation of the
LongThing.
getStringRep
creates a string representation of the
ObjectThing.
getStringRep
method returns the string representation
of a RealThing
.
getStringRep
returns its internal value.
getStringRep
returns a string representation of the
SubstThing.
getVal
fetches the internal value of the Thing.
getVar
returns the value of a variable given its name.
getVar
returns the value of a variable given its name.
getVar
returns the value of a variable given its name and
level.
GroupThing
class is for Hecl "groups".GroupThing
instance from a vector.
GroupThing
instance from a string.
hashCode
method overrides the object hashCode
method, using the hash of the string representation.
HashThing
class represents a hash table type in Hecl.HashThing
instance.
HashThing
instance from a Hashtable.
HashThing
instance from a Vector.
HeclBuilderGui
-- a gui for the creation of J2ME Hecl
apps.HeclBuilderGui
instance.
HeclChannel
class acts as a container for a data
input stream and/or data output stream.HeclChannel
instance.
HeclChannel
instance.
HeclChannel
instance for reading and
writing.
HeclEditor
-- This class provides a very, very crude
editor/viewer for Hecl scripts.HeclException
class implements exceptions for Hecl.HeclException
instance.
HeclException
instance.
HeclFileUtils
class provides several utility
functions that are used both by FileCmds, and elsewhere in Hecl.HeclJavaCmd
class implements the "java" command,
which can be used to access, instantiate and call methods of Java
classes.HeclModule
interface describes what modules
implement in order to be loaded into Hecl.HeclStreamCmds
class implements command handlers
for DataInputStream and DataOutputStream, which are handled as
"class commands".heclTypeToJavaType
method takes a Class and a
Hecl Thing, turns the Thing into an Object based on the Class
type, and returns the Object.
instantiate
method is called to create an
instance of a class (new, in other words).
IntegralThing
class represents integer values - in
practice, ints and longs.Interp
is the Hecl interpreter, the class responsible for
knowing what variables and commands are available.Interp
instance, initializing command and
variable hashtables, a stack, and an error stack.
IntThing
class represents an integer Thing.IntThing
instance equal to 0.
IntThing
instance with value i.
IntThing
instance from boolean b where true
is 1 and false is 0.
IntThing
instance from string s.
intValue
returns the number as an int.
isEmpty
test if property set is empty.
isFractional
returns true if Thing t is a
fractional (floating point) number, false if it isn't.
isIntegral
returns true if Thing t is a whole
number (an int or long), or false if it isn't.
isNumber
returns true if Thing t is represented as
a number internally.
isTrue
is a convenience function that lets us know if the
result of a calculation is true or false.
JarHack
-- this class provides several static methods
that can be used to create .jar and .jad files from a template
Hecl.jar and some user supplied information, such as the output
file, and the name of the new application.JavaCmd
class is utilized to implement Hecl
commands that can interact with Java classes.javaTypeToHeclType
method takes a Java type,
and a Java Object, and returns a Thing.
ListThing
class implements lists, storing them internally
as a Vector.ListThing
instance.
ListThing
instance from a vector.
ListThing
instance from a string.
literal
is used to indicate Things which come
directly from the parser and thus should not be changed.
load
method loads the commands in a class that
extends Operator.
loadModule
method usually takes care of
creating commands that are present in this module.
LongThing
class represents a 'long' Thing.LongThing
instance equal to 0.
LongThing
instance with value l.
LongThing
instance from boolean b
where true is 1 and false is 0.
LongThing
instance from string s.
longValue
returns the value as a long.
main
implements a command line version of JarHack
that takes five arguments: 1.
makeref
sets the 'this' Thing to be a reference to the
newval that was passed to it.
mapParams
method is where a series of Hecl
types/values are mapped onto Java types/values.
MathCmds
class implements a variety of math
commands, depending on which version of Java Hecl is compiled for.maxargs
- the maximum number of arguments this
command accepts.
method
method takes an interpreter, a class
information and an array of Things, performs some calculations, and
returns a Thing
which may be null
.
MethodProps
class is utilized during the
instantiation of classes, where it's possible to do things like:
foo -new $bar -text "blah" -color red, where the keys are
transformed into methods like setText and setColor, and run with
the provided values.methods
method returns a Hecl list of method
signatures in the form methodName type type type.
minargs
- the minimum number of arguments this
command accepts.
more
method returns a boolean value indicating whether
there is more text to be parsed or not.
newCurrent
method creates a new 'context' to
be added to.
nextchar
returns the next character, keeping track of
end-of-command and end-of-file conditions.
nextTask
extracts first element from given vector.
NullCmd
class implements the "null" command,
returning an ObjectThing containing 'null'.NumberThing
class is what all numeric Thing types
are derived from.ObjectThing
class provides a wrapper for objects
that are not directly representable as strings.ObjectThing
instance equal to 0.
ObjectThing
instance with value i.
operate
method dispatches to the actual code.
Operator
class implements a number of features
that are used in the creation of groups of commands, such as those
found in InterpCmds, ListCmds, and so on.Operator
instance.
Parse
class takes care of parsing Hecl scripts.Parse
instance.
Parse
instance.
parse
method runs the parser on the text added by
creating a new Parse instance.
parseBlock
parses a {} block.
parseBlockOrCommand
is what parseCommand and parseBlock
use internally.
parseCommand
parses a [] command.
parseEscape
method parses \n \t style escapes
- or just prints the next character.
parseLine
method is where parsing starts on a new
line.
parseLine
parses a line of Hecl code.
ParseList
parses up Hecl lists.ParseList
instance.
ParseState
class is the state of the current parse.ParseState
instance.
parseText
parses a "string in quotes".
parseText
parses some text, such as that enclosed in
quotes "".
parseToCode
parses up a [] section as code.
parseWord
parses a regular word not in quotes.
parseWord
parses a plain Hecl word.
PrintThing
class is a utility class used to print out
Things.printThing
prints out a Thing.
printThing
function.
readEvalPrint
loop.
readEvalPrint
loop.
Properties
class is used to parse command line
arguments.Properties
instance with no default
properties.
Properties
instance with default
properties and their values.
readable
returns true if the channel is open for
reading.
commandLine
method implements a
Read/Eval/Print Loop.
readFile
takes a filename and returns the file's
contents as a Thing.
readFileFromDis
, given a DataInputStream, reads
from the stream until no more can be read, and returns the
results as a Thing.
RealThing
interface is the actual value contained within a
Thing.Reflector
class maps between Java types and Hecl
types in order to make it possible to call Java methods from Hecl.Reflector
instance.
remaining
method is for debugging purposes, and
prints to standard output the remaining text.
Interp
.
Interp
.
Interp
.
rewind
method "rewinds" the input by one
character.
RMSCmd
class implements the record store related commands.RMSModule
class takes care of setup and tear-down
of the resources needed for dealing with record stores.run
method runs the CodeThing.
same
checks if two Things as the same.
set
sets the internal value of a DoubleThing to i.
set
sets the internal value of an IntThing to i.
set
sets the internal value of an LongThing to l.
Interp
.
setField
method takes an object, a field name,
and a new Thing value, and sets the object's field to the value
of Thing.
setLine
method sets the line number of an
error.
setLiteral
method sets the thing in question
to be a literal Thing, and returns it.
setProp
method sets a single property to some
value.
setProps
method sets properties with their
values from the command line argv.
setVal
sets the internal representation of the Thing.
setVar
sets a variable in the innermost variable stack
frame to a value.
setVar
sets a variable in the innermost variable stack
frame to a value.
setVar
sets a variable to a value in the variable stack
frame specified by level
.
shortValue
returns the number as a short.
sourceFile
method takes a file name.
stackDecr
pops the stack frame, returning it so that
commands like upeval can save it.
stackIncr
method creates a new stack frame.
stackDecr
pushes a new variable hashtable
(probably saved via upeval) onto the stack frame.
stringSplit
method takes a string and splits
it according to another string,
StringThing
class is the internal representation of string
types.StringThing
instance.
StringThing
instance from a string.
StringThing
instance from a stringbuffer.
substHecl
method takes the filenames of two
.jar's - one as input, the second as output, in addition to the
name of the application.
SubstThing
class represents things that must be
substituted - $foo or &foo for example.SubstThing
instance from a string,
which is the variable name to reference.
terminate
method terminates the Hecl
interpreter thread in a graceful manner.
Thing
class is what Hecl revolves around.Thing
instance from a string.
Thing
instance from a string buffer.
Thing
instance from an internal
representation.
toListString
transforms list elements into the
string form {foo bar} if the element contains a space.
toString
method turns the exception stack into a
string.
toString
returns the String value of a Thing.
unload
method unloads the commands in a class
that extends Operator.
unloadModule
method takes care of any clean up
that's necessary, such as unloading commands created by this
module.
unSetVar
unsets a variable in the current stack
frame.
where
method tells the exception what command it
occurred in.
writable
returns true if the channel is open for
writing.
|
||||||||||
PREV NEXT | FRAMES NO FRAMES |