|
||||||||||
PREV NEXT | FRAMES NO FRAMES |
Packages that use GrammarElement | |
---|---|
slogo.expression | |
slogo.instruction | |
slogo.instruction.arithmetic | |
slogo.instruction.conditional | |
slogo.instruction.drawing | |
slogo.language | |
slogo.parser | This package is responsible for parsing the language SLogo. |
Uses of GrammarElement in slogo.expression |
---|
Subclasses of GrammarElement in slogo.expression | |
---|---|
class |
Expression
The base class of all arithmetic expressions, the evaluate
method uses the hook/template method value to return a Double
value, the template method returns a double. |
class |
Number
|
class |
Variable
A variable stores a value and can be used in an expression. |
Uses of GrammarElement in slogo.instruction |
---|
Subclasses of GrammarElement in slogo.instruction | |
---|---|
class |
Assignment
An assignment instruction assigns an expression to a variable, updating the global state to reflect the assignment. |
class |
If
|
class |
Instruction
Represents an instruction in the SLogo language |
class |
Repeat
An AST (abstract syntax tree) for a MoboLogo/Slogo REPEAT instruction. |
class |
StrictInstructionList
A list of instructions that doesn't include a function definition. |
class |
Subroutine
Represents a subroutine object that has a name and a list of instructions. |
class |
To
Defines a turtle subroutine by placing it in the subroutine factory map. |
Fields in slogo.instruction declared as GrammarElement | |
---|---|
protected GrammarElement |
If.cond
|
protected GrammarElement |
Assignment.myExpression
|
protected GrammarElement |
Repeat.repeatExp
|
Methods in slogo.instruction with parameters of type GrammarElement | |
---|---|
static int |
Instruction.evaluateNumericExpression(GrammarElement elem,
Context c)
|
Constructors in slogo.instruction with parameters of type GrammarElement | |
---|---|
Assignment(Variable v,
GrammarElement e)
Construct an Assignment instruction from a variable and an expression, e.g., X = expression. |
|
If(GrammarElement cond,
StrictInstructionList sil)
Constructs an If instruction that can be executed. |
|
Repeat(GrammarElement e,
StrictInstructionList sil)
Constructs a Repeat instruction that can be executed. |
Uses of GrammarElement in slogo.instruction.arithmetic |
---|
Subclasses of GrammarElement in slogo.instruction.arithmetic | |
---|---|
class |
Addition
Represents a + b, the addition of two expressions |
class |
ArithmeticInstruction
The base class of any binary expression, e.g., a + b, a - b, or, in future use, a < b and so on. |
class |
Division
Represents a / b, the division of two expressions |
class |
Multiplication
Represents a x b, the multiplication of two expressions |
class |
Negation
Represents unary minus, e.g., -expression |
class |
NumericInstruction
|
class |
Remainder
Represents the remainder when two numbers are divided |
class |
Subtraction
Represents a - b, the subtraction of two expressions |
class |
UnaryExpression
|
Fields in slogo.instruction.arithmetic declared as GrammarElement | |
---|---|
protected GrammarElement |
UnaryExpression.myElement
|
protected GrammarElement |
ArithmeticInstruction.myLeft
|
protected GrammarElement |
ArithmeticInstruction.myRight
|
Constructors in slogo.instruction.arithmetic with parameters of type GrammarElement | |
---|---|
Addition(GrammarElement lhs,
GrammarElement rhs)
|
|
ArithmeticInstruction(GrammarElement lhs,
GrammarElement rhs)
construct a binary expression from two subexpressions |
|
Division(GrammarElement e1,
GrammarElement e2)
|
|
Multiplication(GrammarElement first,
GrammarElement second)
|
|
Negation(GrammarElement e)
|
|
Remainder(GrammarElement first,
GrammarElement second)
|
|
Subtraction(GrammarElement firstElem,
GrammarElement secondElem)
|
|
UnaryExpression(GrammarElement el)
|
Uses of GrammarElement in slogo.instruction.conditional |
---|
Subclasses of GrammarElement in slogo.instruction.conditional | |
---|---|
class |
ConditionalInstruction
|
class |
Equal
|
class |
Greater
|
class |
Less
|
class |
NotEqual
|
Fields in slogo.instruction.conditional declared as GrammarElement | |
---|---|
protected GrammarElement |
ConditionalInstruction.e1
|
protected GrammarElement |
ConditionalInstruction.e2
|
Constructors in slogo.instruction.conditional with parameters of type GrammarElement | |
---|---|
ConditionalInstruction(GrammarElement e1,
GrammarElement e2)
|
|
Equal(GrammarElement e1,
GrammarElement e2)
|
|
Greater(GrammarElement e1,
GrammarElement e2)
|
|
Less(GrammarElement e1,
GrammarElement e2)
|
|
NotEqual(GrammarElement e1,
GrammarElement e2)
|
Uses of GrammarElement in slogo.instruction.drawing |
---|
Subclasses of GrammarElement in slogo.instruction.drawing | |
---|---|
class |
Back
moves the turtle backwards by the amount specified |
class |
Clean
clears the drawing area (the turtles statistics do not reset) |
class |
ClearScreen
erases the drawing area and sends the turtle to the home position (Like CLEAN and HOME) |
class |
Forward
moves the turtle forward by dist pixels |
class |
Heading
|
class |
HideTurtle
|
class |
Home
moves the turtle to the center of the screen (0 0) |
class |
IsPenDown
returns 1 (:TRUE) if the pen is down, 0 (:FALSE) if it's up. |
class |
Left
turns the turtle counterclockwise by the specified angle |
class |
OneParameterInstruction
|
class |
PenDown
sets the pen's position to DOWN |
class |
PenUp
sets the pen's position to UP |
class |
Right
turns the turtle clockwise by the specified angle |
class |
SetPenColor
Sets the turtle's pen color. |
class |
SetX
moves the turtle horizontally to a new absolute horizontal coordinate |
class |
SetXY
moves the turtle to an absolute screen position. |
class |
SetY
moves the turtle vertically to a new absolute vertical coordinate. |
class |
ShowTurtle
makes the turtle visible |
class |
Towards
returns a heading the turtle should be facing to point from its current position to the given position |
class |
XCor
returns the turtle's X coordinate |
class |
YCor
returns the turtle's Y coordinate |
Fields in slogo.instruction.drawing declared as GrammarElement | |
---|---|
(package private) GrammarElement |
SetXY.myX
|
(package private) GrammarElement |
Towards.myX
|
(package private) GrammarElement |
SetXY.myY
|
(package private) GrammarElement |
Towards.myY
|
protected GrammarElement |
OneParameterInstruction.param
|
Constructors in slogo.instruction.drawing with parameters of type GrammarElement | |
---|---|
Back(GrammarElement e)
|
|
Forward(GrammarElement distanceExp)
|
|
Left(GrammarElement e)
|
|
OneParameterInstruction(GrammarElement param)
|
|
Right(GrammarElement e)
|
|
SetPenColor(GrammarElement e)
|
|
SetX(GrammarElement e)
|
|
SetXY(GrammarElement e1,
GrammarElement e2)
|
|
SetY(GrammarElement e)
|
|
Towards(GrammarElement x,
GrammarElement y)
|
Uses of GrammarElement in slogo.language |
---|
Fields in slogo.language with type parameters of type GrammarElement | |
---|---|
protected static java.util.Map<GrammarElement,java.lang.Object> |
GrammarElement.gelementsToValue
|
Uses of GrammarElement in slogo.parser |
---|
Methods in slogo.parser that return types with arguments of type GrammarElement | |
---|---|
protected java.util.List<GrammarElement> |
SLogoParser.parseInstructionParameters(int numParameters)
|
|
||||||||||
PREV NEXT | FRAMES NO FRAMES |