constructor, used when run as applet.
file handler costumized for adalogo.
WrongIntegerExpressionException
nothing special here.
Used to convert raw characters to their escaped version
when these raw version cannot be used as part of an ASCII
string literal.
delegate method for external components to add caret listener.
adds a new child to this.children
Replaces unprintable characters by their espaced (or unicode escaped)
equivalents in the given string
delegate for external components to add file listener.
HLT
method to add SymTabChangedListener into EventListeners
Method to adjust line and column numbers for the start of a token.
put message in console without appended newline.
AssignmentStatementException
nothing special here.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
Constructor of SimpleNode.
This class hold the editor
this is the engine for the program.
this will create a frame,
an editor box,
a console,
a canvas,
a variable monitor
and a turtle.
The end of line string for this machine.
hardcoded list of examples.
static class to load examples.
ExitStatementException
nothing special here.
Each entry in this array is an array of integers.
overriden getActions to replace certain actions with
the analog indent actions (tab enter delete backspace home).
get the currently running applet.
editor will call this to insert break point handler
in line number panel.
Returns the child of node
at index i
.
Returns the number of children of node
.
Returns the type for column number column
.
Returns the type for column number column
.
Returns the type for column number column
.
Returns the number ofs availible column.
Returns the number ofs availible column.
Returns the name for column number column
.
Returns the name for column number column
.
returns the font for the console.
returns the stream for example number number
This is for getting the type of the node.
HLT temporary solution for the VarMonitor.
This method has the standard behavior when this object has been
created using the standard constructors.
You can also modify the body of this method to customize your error messages.
overriden method to control wrapping behaviour.
overriden method to control wrapping behaviour.
returns the template.adl stream.
Returns the tree that is being shared between the model.
return the turtle follow mode.
get the type of the variable name.
get the type of the variable name, returns String.
return the value of the node.
get the value of the variable name.
get the value of the variable name, returns String.
Returns the value to be displayed for node node
,
at column number column
.
Returns the value of the particular column for a treenode.
IdentifierException
nothing special here.
The string image of the token.
Override to apply syntax highlighting after the document has been updated
Updates to the Document as a result of Undo/Redo will cause the
Caret to be repositioned
override install to add shift tab action.
InterpreterVisitorException
nothing special here.
This is the heart of the interpreter in AdaLogo.
create and start an interpreter.
visitors should check this and suspend operation
when this returns true.
Overridden to return false, and if the event is a mouse event
it is forwarded to the tree.
By default, make the column with the Tree in it the only editable one.
Indicates whether the the value for node node
,
at column number column
is editable.
visitors should call this to check if debug run.
true when file access is allowed.
returns wether the programm was started as applet or application.
the running visitor should check this frequently and stop
as soon as possible if this is true.
Sublcassed to translate the graphics such that the last visible
row will be drawn at 0,0.
line numbers get painted here.
This exception is thrown when parse errors are encountered.
The following constructors are for use by you for whatever
purpose you can think of.
This constructor is used by the method "generateParseException"
in the generated parser.
Turtle will draw line when moving.
Turtle will not draw line when moving.
ProcedureCallStatementException
nothing special here.
interface for pc listener listeners
mainly implemented by varmonitor varnodes
add a value to the symbol table.
let user save document to file.
this method might never be called, but it is here anyway
this method might never be called, but it is here anyway
save the current loaded file.
silly hack to get caret in view when extreme rigth.
set the antialias property for turtle canvas.
This is overridden to set the height to match that of the JTable.
set beginColumn, where you can find the node.
set the font to be used by the console.
set the font size for the console.
set the font to be used by the editor.
set the font size for the editor.
Set the interpreter to execute the code or
only to check the semantic.
This is for setting the type of the node.
set beginLine, where you can find the node.
true to set wrap, false to set no wrap.
set the render quality property for turtle canvas.
Overridden to pass the new rowHeight to the tree.
Sets the row height of the tree, and forwards the row height to
the table.
set a new value for an alreay existing variable.
set the value for the node.
Sets the value for node node
,
at column number column
.
Sets the value for node node
,
at column number column
.
An implementation of interface CharStream, where the stream is assumed to
contain only ASCII characters (without unicode processing).
Constructor of SimpleNode.
Constructor of SimpleNode.
Exception class, uses by SimpleNode.getValue()
This variable determines which constructor was used to create
this object and thereby affects the semantics of the
"getMessage" method (see below).
This field is used to access special tokens that occur prior to this
token, but after the immediately preceding regular (non-special) token.
this will start the engine, which will open the main frame.
this will start a visitor.
make visitor continue if it is waiting.
this will be called by engine, if frame was closed,
to re-enable button.
make interpreter stop as soon as possible.
this will store the symbol tables
used during interpretation of adalogo code
hardcoded syntax highlighter.
a small testbench for the class.
Describes the input token stream.
This is a reference to the "tokenImage" array of the generated
parser within which the parse error occurred.
Get the name of the node, for exmaple SequenceOfStatement etc.
Get the name of the node with prefix, for exmaple xxSequenceOfStatement etc.
TreeTableCellEditor implementation.
A TreeCellRenderer that displays a JTree.
TreeTableModel is the model used by a JTreeTable.
This is a wrapper class takes a TreeTableModel and implements
the table model interface.
Turtle turns by degree relativ to current direction.
Tutle turns to given direction.
this is class to hold canvas to draw turtle
modifies "changed" value of the node to actual value of the programCounter
Search in the SymbolTable for name and return true if exists,
false otherwise.
Last table/tree row asked to renderer.
Take the 1st and the 2nd child and add
everything will be done by parent AssignmentStatement
Assignment of BooleanExpression or IntegerExpression to a
defining variable.
"DummyNode" - the parent nodes do the work....
The begin of every program.
Take the 1st child and reverse.
DeclarationPart of every Procedure
If the child is a ProcedureDeclaration,
so do it in the symtab and
do not execute ProcedureDeclaration.
Take the 1st and the 2nd child and div
Just do what ElsePart want to be done, without checking.
Just do what ElsifPart want to be done, without checking.
done by helpRelationalExpression
throws an ExitStatementException.
Will be done in ForStatement
Execute ForwardStatement from Turtle.
Turn back the x-position of the turtle
Turn back the y-position of the turtle
done by helpRelationalExpression
done by helpRelationalExpression
Look in the symtab and return.
check all the booleanPart of children (+ elsif) and at least do else.
"DummyNode" - the parent nodes do the work....
Look in the SimpleNode and return getValue()
Let Turtle jump to point (x,y);
done by helpRelationalExpression
done by helpRelationalExpression
This function becomes 2 IntegerExpression and turn the bigger one
back
This function becomes 2 IntegerExpression and turn the smaller one
back
Take the 1st and the 2nd child and mod
Take the 1st and the 2nd child and mult
new_line; put a new line to the console.
done by helpRelationalExpression
Look into the symtab and copy the procedure node out and excecute.
"DummyNode" - the parent nodes do the work....
Go down __without__ Identifier and Parameters.
"DummyNode" - the parent nodes do the work....
"Dummy-node", everything should be done by
parent node ProcedureDeclaration
This will put a line with result of BooleanExpression, IntegerExpression
or StringLiteral.
This will put the result of BooleanExpression, IntegerExpression
or StringLiteral.
RandomExpression get 2 IntegerExpression and return a
value between this to ranges, inclusive the smaller range,
exclusive the bigger range.
Take the 1st and the 2nd child and rem
Reset turtle to point(0,0); The direction of the turtle is -90
Visit every child and execute
return "String" (Object).
Take the 1st and the 2nd child and sub
This procedure let the turtle turn to the degree you want.
In the Declaration a boolean/integer can de declare with or without
an assigment of BooleanExpression.
"DummyNode" - the parent nodes do the work....
WhileStatement has 2 children.
this will manage the visitors in threads
TODO make visitors speak only to master
all actions to outside should be handled with invokeLater
the waiting visitor is now running again.
the running visitor just stopped.
visitor will wait until someone calls notify.