- CARET - Static variable in class slogo.CharConsts
-
- CharConsts - Class in slogo
-
Symbolic names for character constants
- CharConsts() - Constructor for class slogo.CharConsts
-
- CharToken - Class in slogo.parser.token
-
A token represented by a single character, e.g., '*', ';', '[' and
so on; the method equals compares a CharToken as equal to another CharToken
encapsulating the same character.
- CharToken(int) - Constructor for class slogo.parser.token.CharToken
-
package only constructor
- CharTokenFactory - Class in slogo.parser.token
-
Factory for generating CharToken objects ensuring that only one of any
specific CharToken object is created (enforcing CharToken singleton-ness per
char value)
- CharTokenFactory() - Constructor for class slogo.parser.token.CharTokenFactory
-
- chooseCommand() - Method in class slogo.turtle.TurtleField
-
Replaces the text in the workspace field with the chosen command in the
combo box
- chooseFile() - Method in class slogo.turtle.TurtleField
-
Allows the user to run a program from a slogo file
- Clean - Class in slogo.instruction
-
A Clean instruction has zero components: when called, it will clear the screen.
- Clean() - Constructor for class slogo.instruction.Clean
-
- CleanParser - Class in slogo.parser
-
Parse a CLEAN Statement, which simply looks like CLEAN
- CleanParser() - Constructor for class slogo.parser.CleanParser
-
- CleanToken - Class in slogo.parser.token
-
Represents a CLEAN instruction token
- CleanToken() - Constructor for class slogo.parser.token.CleanToken
-
- clearLine() - Method in class slogo.turtle.JTurtle
-
Clears all points within the trail so that the line can be erased.
- ClearScreen - Class in slogo.instruction
-
A CS instruction has zero components: when called, it will clear the screen
and return the turtle to its home coordinates.
- ClearScreen() - Constructor for class slogo.instruction.ClearScreen
-
- ClearScreenParser - Class in slogo.parser
-
Parse a CLEARSCREEN Statement, which can look like either
CLEARSCREEN
or
CS
- ClearScreenParser() - Constructor for class slogo.parser.ClearScreenParser
-
- ClearScreenToken - Class in slogo.parser.token
-
Represents a CLEARSCREEN instruction token
- ClearScreenToken() - Constructor for class slogo.parser.token.ClearScreenToken
-
- COMMA - Static variable in class slogo.CharConsts
-
- compareTo(Variable) - Method in class slogo.expression.Variable
-
Compare the variables by their names.
- Context - Interface in slogo
-
Context is a hook for implementing language features that require an
environment for evaluation.
- ContextImpl - Class in slogo
-
- ContextImpl() - Constructor for class slogo.ContextImpl
-
- EOFToken - Class in slogo.parser.token
-
This represents an end-of-file token Uses the singleton pattern since there's
no reason to have more than one such token.
- EOFToken() - Constructor for class slogo.parser.token.EOFToken
-
- EOLToken - Class in slogo.parser.token
-
This represents an end-of-line token.
- EOLToken() - Constructor for class slogo.parser.token.EOLToken
-
- EQUAL - Static variable in class slogo.CharConsts
-
- EqualBool - Class in slogo.instruction
-
A REMAINDER instruction has two components: two GrammarElements that represents the
two numbers to perform subtraction on.
- EqualBool(GrammarElement, GrammarElement) - Constructor for class slogo.instruction.EqualBool
-
Constructs an EQUALBOOL instruction that can be executed.
- EqualBoolParser - Class in slogo.parser
-
Parse a EQUAL? Statement, which looks like
EQUAL? thing1 thing2
- EqualBoolParser() - Constructor for class slogo.parser.EqualBoolParser
-
- EqualBoolToken - Class in slogo.parser.token
-
Represents an EQUAL? instruction token
- EqualBoolToken() - Constructor for class slogo.parser.token.EqualBoolToken
-
- equals(Object) - Method in class slogo.expression.Variable
-
Determines equality based on the Variable's name
- equals(Object) - Method in class slogo.parser.token.CharToken
-
- equals(CharToken) - Method in class slogo.parser.token.CharToken
-
- equals(Object) - Method in class slogo.parser.token.EOFToken
-
- equals(Object) - Method in class slogo.parser.token.EOLToken
-
- equals(Object) - Method in class slogo.parser.token.IdentifierToken
-
Determines if the other object is an IdentifierToken with the same id
- equals(IdentifierToken) - Method in class slogo.parser.token.IdentifierToken
-
- equals(Object) - Method in class slogo.parser.token.NumberToken
-
- equals(NumberToken) - Method in class slogo.parser.token.NumberToken
-
- equals(Object) - Method in class slogo.parser.token.ReservedToken
-
Determines equality by if these are both ReservedTokens with the same
value.
- equals(Object) - Method in class slogo.parser.token.VariableToken
-
- equals(VariableToken) - Method in class slogo.parser.token.VariableToken
-
- EqualToken - Class in slogo.parser.token
-
Represents = token
- EqualToken() - Constructor for class slogo.parser.token.EqualToken
-
- error(Token) - Method in class slogo.SLogoInterpreter
-
- evaluate(Context) - Method in class slogo.expression.ArithmeticBase
-
- evaluate(Context) - Method in class slogo.expression.Variable
-
uses the hook/template method value to return a Double
- evaluate(Context) - Method in class slogo.GrammarElement
-
Evaluate this language construct in some context.
- evaluate(Context) - Method in class slogo.instruction.ArithmeticInstruction
-
uses the hook/template method value to return a Double
- evaluate(Context) - Method in class slogo.instruction.Assignment
-
Evaluate the expression that's part of this instruction and update a
global map/store to record the assignment of the expression to the
variable.
- evaluate(Context) - Method in class slogo.instruction.Back
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.Clean
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.ClearScreen
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.Difference
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.EqualBool
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.Forward
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.Greater
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.Heading
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.HideTurtle
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.Home
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.If
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.Instruction
-
- evaluate(Context) - Method in class slogo.instruction.Left
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.Less
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.Minus
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.NotEqual
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.PenDown
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.PenDownP
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.PenUp
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.Print
-
Evaluate the expression and println it.
- evaluate(Context) - Method in class slogo.instruction.Product
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.Quotient
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.Remainder
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.Repeat
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.Right
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.SetX
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.SetXY
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.SetY
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.ShowTurtle
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.StrictInstructionList
-
Evaluate this instruction in a Context, return the result of the
evaluation (the result is the last instruction executed).
- evaluate(Context) - Method in class slogo.instruction.Sum
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.To
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.Towards
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.Xcor
-
Evaluate this instruction in a Context.
- evaluate(Context) - Method in class slogo.instruction.Ycor
-
Evaluate this instruction in a Context.
- expression - Variable in class slogo.instruction.Back
-
- expression - Variable in class slogo.instruction.Forward
-
- expression - Variable in class slogo.instruction.Left
-
- expression - Variable in class slogo.instruction.Minus
-
- expression - Variable in class slogo.instruction.Print
-
- expression - Variable in class slogo.instruction.Right
-
- expression - Variable in class slogo.instruction.SetX
-
- expression - Variable in class slogo.instruction.SetY
-
- expressionOne - Variable in class slogo.instruction.Difference
-
- expressionOne - Variable in class slogo.instruction.EqualBool
-
- expressionOne - Variable in class slogo.instruction.Greater
-
- expressionOne - Variable in class slogo.instruction.Less
-
- expressionOne - Variable in class slogo.instruction.NotEqual
-
- expressionOne - Variable in class slogo.instruction.Product
-
- expressionOne - Variable in class slogo.instruction.Quotient
-
- expressionOne - Variable in class slogo.instruction.Remainder
-
- expressionOne - Variable in class slogo.instruction.SetXY
-
- expressionOne - Variable in class slogo.instruction.Sum
-
- expressionTwo - Variable in class slogo.instruction.Difference
-
- expressionTwo - Variable in class slogo.instruction.EqualBool
-
- expressionTwo - Variable in class slogo.instruction.Greater
-
- expressionTwo - Variable in class slogo.instruction.Less
-
- expressionTwo - Variable in class slogo.instruction.NotEqual
-
- expressionTwo - Variable in class slogo.instruction.Product
-
- expressionTwo - Variable in class slogo.instruction.Quotient
-
- expressionTwo - Variable in class slogo.instruction.Remainder
-
- expressionTwo - Variable in class slogo.instruction.SetXY
-
- expressionTwo - Variable in class slogo.instruction.Sum
-
- g - Variable in class slogo.instruction.ShowTurtle
-
- gelementsToValue - Static variable in class slogo.GrammarElement
-
- getBounds(Rectangle) - Method in class slogo.turtle.JTurtle
-
Mirrors the functionality of JComponent/Component.
- getHeading() - Method in class slogo.turtle.JTurtle
-
Returns the naive view of heading, 0 degrees = north
- getInstance() - Static method in class slogo.expression.VariableFactory
-
There should only be one VariableFactory
- getInstance() - Static method in class slogo.parser.InstructionParser
-
- getInstance() - Static method in class slogo.parser.StrictInstructionListParser
-
- getInstance() - Static method in class slogo.parser.token.EOFToken
-
- getInstance() - Static method in class slogo.parser.token.EOLToken
-
- getMoveSize() - Method in class slogo.turtle.TurtleField
-
Returns step size as currently selected.
- getNames() - Static method in class slogo.parser.InstructionNames
-
- getPen() - Method in class slogo.turtle.JTurtle
-
- getPoint() - Method in class slogo.turtle.JTurtle
-
Returns the turtle's point (should be centroid)
- getProp() - Static method in class slogo.parser.InstructionNames
-
- getText() - Method in class slogo.turtle.UserOutput
-
- getToken(int) - Static method in class slogo.parser.token.CharTokenFactory
-
- getToken() - Method in class slogo.SLogoInterpreter
-
returns the current token, doesn't fetch a new one
- getTurtle() - Method in class slogo.turtle.TurtleField
-
- getVariable(IdentifierToken) - Static method in class slogo.expression.VariableFactory
-
Determines the variable represented by the given id
- getVariables() - Static method in class slogo.expression.VariableFactory
-
- GrammarElement - Class in slogo
-
All elements of the SLogo language (e.g., that make up an abstract syntax
tree) should extend GrammarElement.
- GrammarElement() - Constructor for class slogo.GrammarElement
-
- Greater - Class in slogo.instruction
-
A GREATER instruction has two components: a GrammarElement that represents the first double and a
GrammarElement that represents the second double
To evaluate a GREATER instruction the expressions are evaluated first, this
determines then double version of the numbers.
- Greater(GrammarElement, GrammarElement) - Constructor for class slogo.instruction.Greater
-
Constructs a GREATER instruction that can be executed.
- GREATER_THAN - Static variable in class slogo.CharConsts
-
- GreaterParser - Class in slogo.parser
-
Parse an GREATER? Statement, which looks like
GREATER? num1 num2
- GreaterParser() - Constructor for class slogo.parser.GreaterParser
-
- GreaterToken - Class in slogo.parser.token
-
Represents a GREATER instruction token
- GreaterToken() - Constructor for class slogo.parser.token.GreaterToken
-
- id - Variable in class slogo.parser.token.IdentifierToken
-
- IdentifierParser - Class in slogo.parser
-
Parse an assignment statement, which looks like
<id> <assignment_token, i.e., = > <expression>
- IdentifierParser() - Constructor for class slogo.parser.IdentifierParser
-
- IdentifierToken - Class in slogo.parser.token
-
Represents an identifier (a variable name)
- IdentifierToken() - Constructor for class slogo.parser.token.IdentifierToken
-
- IdentifierToken(String) - Constructor for class slogo.parser.token.IdentifierToken
-
- If - Class in slogo.instruction
-
An IF instruction has two components: (1) an expression representing the
varOrComman and (2) a strict instruction list that is the list
of instructions that will be executed.
- If(ArithmeticBase, StrictInstructionList) - Constructor for class slogo.instruction.If
-
Constructs a Repeat instruction that can be executed.
- IfParser - Class in slogo.parser
-
Parse an IF Statement, which looks like
IF varOrCommand [ instructionlist ]
- IfParser() - Constructor for class slogo.parser.IfParser
-
- IfToken - Class in slogo.parser.token
-
Represents an IF instruction token
- IfToken() - Constructor for class slogo.parser.token.IfToken
-
- ImageRenderer - Class in slogo.turtle
-
Displays the given image
- ImageRenderer(Image) - Constructor for class slogo.turtle.ImageRenderer
-
- infoPanel - Variable in class slogo.turtle.TurtleField
-
- init() - Method in class slogo.turtle.TurtleField
-
- initialize() - Static method in class slogo.ContextImpl
-
- initialize() - Static method in class slogo.parser.InstructionNames
-
- Instruction - Class in slogo.instruction
-
Represents an instruction in the SLogo language
- Instruction() - Constructor for class slogo.instruction.Instruction
-
- instructionList - Variable in class slogo.instruction.If
-
- instructionList - Variable in class slogo.instruction.Repeat
-
- instructionList - Variable in class slogo.instruction.To
-
- InstructionNames - Class in slogo.parser
-
Reads the file of instruction names.
- InstructionNames() - Constructor for class slogo.parser.InstructionNames
-
- InstructionParser - Class in slogo.parser
-
Instruction Parser - calls appropriate Parser for each Instruction
- InstructionParser() - Constructor for class slogo.parser.InstructionParser
-
Create the InstructionParser--generates a map of classes to parsers
- instructions - Static variable in class slogo.parser.InstructionNames
-
- interpret(Reader, Context) - Method in class slogo.SLogoInterpreter
-
interprets the contents of the Reader: parsing expression(s) and prints
the result of evaluating the expression(s).
- iterator() - Method in class slogo.instruction.StrictInstructionList
-
Return an iterator for accessing all the instructions.
- paint(Graphics2D) - Method in class slogo.turtle.ImageRenderer
-
- paint(Graphics2D) - Method in class slogo.turtle.PolyRenderer
-
- paint(Graphics2D) - Method in class slogo.turtle.Renderer
-
- parse(SLogoInterpreter) - Method in class slogo.parser.AssignmentParser
-
parses an assignment statement, which looks like
id = expression
- parse(SLogoInterpreter) - Method in class slogo.parser.BackParser
-
Parses a BK instruction
- parse(SLogoInterpreter) - Method in class slogo.parser.CleanParser
-
Parses a CLEAN instruction
- parse(SLogoInterpreter) - Method in class slogo.parser.ClearScreenParser
-
Parses a CLEARSCREEN instruction
- parse(SLogoInterpreter) - Method in class slogo.parser.DifferenceParser
-
Parses a DIFFERENCE instruction
- parse(SLogoInterpreter) - Method in class slogo.parser.EqualBoolParser
-
Parses a EQUAL? instruction
- parse(SLogoInterpreter) - Method in class slogo.parser.ForwardParser
-
Parses a FD instruction
- parse(SLogoInterpreter) - Method in class slogo.parser.GreaterParser
-
Parses an GREATER? instruction
- parse(SLogoInterpreter) - Method in class slogo.parser.HeadingParser
-
- parse(SLogoInterpreter) - Method in class slogo.parser.HideTurtleParser
-
Parses a HT instruction
- parse(SLogoInterpreter) - Method in class slogo.parser.HomeParser
-
- parse(SLogoInterpreter) - Method in class slogo.parser.IdentifierParser
-
parses an assignment statement, which looks like
id = expression
- parse(SLogoInterpreter) - Method in class slogo.parser.IfParser
-
Parses an IF instruction
- parse(SLogoInterpreter) - Method in class slogo.parser.InstructionParser
-
gets the appropriate parser to parse the token
- parse(SLogoInterpreter) - Method in class slogo.parser.LeftParser
-
Parses a LT instruction
- parse(SLogoInterpreter) - Method in class slogo.parser.LessParser
-
Parses a LESS? instruction
- parse(SLogoInterpreter) - Method in class slogo.parser.MinusParser
-
Parses a MINUS instruction
- parse(SLogoInterpreter) - Method in class slogo.parser.NotEqualParser
-
Parses a NOTEQUAL? instruction
- parse(SLogoInterpreter) - Method in interface slogo.parser.Parser
-
- parse(SLogoInterpreter) - Method in class slogo.parser.PenDownParser
-
Parses a PENDOWN instruction
- parse(SLogoInterpreter) - Method in class slogo.parser.PenDownPParser
-
Parses a PENDOWNP instruction
- parse(SLogoInterpreter) - Method in class slogo.parser.PenUpParser
-
Parses a PENUP instruction
- parse(SLogoInterpreter) - Method in class slogo.parser.PrintParser
-
parses a print instruction
- parse(SLogoInterpreter) - Method in class slogo.parser.ProductParser
-
Parses a PRODUCT instruction
- parse(SLogoInterpreter) - Method in class slogo.parser.QuotientParser
-
- parse(SLogoInterpreter) - Method in class slogo.parser.RemainderParser
-
Parses a REMAINDER instruction
- parse(SLogoInterpreter) - Method in class slogo.parser.RepeatParser
-
Parses a REPEAT instruction
- parse(SLogoInterpreter) - Method in class slogo.parser.RightParser
-
Parses an RT instruction
- parse(SLogoInterpreter) - Method in class slogo.parser.SetXParser
-
Parses a SETX instruction
- parse(SLogoInterpreter) - Method in class slogo.parser.SetXYParser
-
Parses a SETXY instruction
- parse(SLogoInterpreter) - Method in class slogo.parser.SetYParser
-
Parses a SETY instruction
- parse(SLogoInterpreter) - Method in class slogo.parser.ShowTurtleParser
-
Parses an ST instruction
- parse(SLogoInterpreter) - Method in class slogo.parser.StrictInstructionListParser
-
Parses the instructions list
- parse(SLogoInterpreter) - Method in class slogo.parser.SumParser
-
Parses a SUM instruction
- parse(StreamTokenizer) - Static method in class slogo.parser.token.TokenFactory
-
- parse(SLogoInterpreter) - Method in class slogo.parser.ToParser
-
Parses a TO instruction
- parse(SLogoInterpreter) - Method in class slogo.parser.TowardsParser
-
Parses a TOWARDS instruction
- parse(SLogoInterpreter) - Method in class slogo.parser.XcorParser
-
Parses an XCOR instruction
- parse(SLogoInterpreter) - Method in class slogo.parser.YcorParser
-
Parses a YCOR instruction
- ParseException - Exception in slogo.parser
-
A specialized exception class for parsing errors.
- ParseException(String) - Constructor for exception slogo.parser.ParseException
-
- Parser - Interface in slogo.parser
-
The interface that all parsers must implement
- pen - Variable in class slogo.turtle.JTurtle
-
- PenDown - Class in slogo.instruction
-
A PENDOWN instruction has no components: when called, it puts the pen down, which
gives the turtle drawing functionality.
- PenDown() - Constructor for class slogo.instruction.PenDown
-
- PenDownP - Class in slogo.instruction
-
A PENDOWNP instruction has no components: when called, it returns true or false,
depending on whether the pen is up or down
To evaluate a PENDOWNP instruction, the getPen method is called on the turtle.
- PenDownP() - Constructor for class slogo.instruction.PenDownP
-
- PenDownParser - Class in slogo.parser
-
Parse a PENDOWN? Statement, which can look either like
PENDOWN
or
PD
- PenDownParser() - Constructor for class slogo.parser.PenDownParser
-
- PenDownPParser - Class in slogo.parser
-
Parse a PENDOWNP Statement, which can look like either
PENDOWNP
or
PENDOWN?
- PenDownPParser() - Constructor for class slogo.parser.PenDownPParser
-
- PenDownPToken - Class in slogo.parser.token
-
Represents a PENDOWNP instruction token
- PenDownPToken() - Constructor for class slogo.parser.token.PenDownPToken
-
- PenDownToken - Class in slogo.parser.token
-
Represents a PENDOWN instruction token
- PenDownToken() - Constructor for class slogo.parser.token.PenDownToken
-
- PenUp - Class in slogo.instruction
-
A PENUP instruction has no components: when called, it puts the pen up, which
takes away the turtle's drawing functionality.
- PenUp() - Constructor for class slogo.instruction.PenUp
-
- PenUpParser - Class in slogo.parser
-
Parse a PENUP Statement, which can look either like
PENUP
or
PU
- PenUpParser() - Constructor for class slogo.parser.PenUpParser
-
- PenUpToken - Class in slogo.parser.token
-
Represents a PENUP instruction token
- PenUpToken() - Constructor for class slogo.parser.token.PenUpToken
-
- PERIOD - Static variable in class slogo.CharConsts
-
- playSound(String) - Static method in class slogo.turtle.SoundPlayer
-
- PLUS - Static variable in class slogo.CharConsts
-
- PolyRenderer - Class in slogo.turtle
-
Default renderer: draws as a triangle.
- PolyRenderer() - Constructor for class slogo.turtle.PolyRenderer
-
- previousCommands - Variable in class slogo.turtle.TurtleField
-
- Print - Class in slogo.instruction
-
The Print instruction prints an expression.
- Print(GrammarElement) - Constructor for class slogo.instruction.Print
-
Represents a Print expression
- PrintParser - Class in slogo.parser
-
The parser for the print instruction
- PrintParser() - Constructor for class slogo.parser.PrintParser
-
- PrintToken - Class in slogo.parser.token
-
Represents the PRINT instruction token
- PrintToken() - Constructor for class slogo.parser.token.PrintToken
-
- printVariables() - Method in class slogo.turtle.TurtleField
-
This method prints out the currently defined variables into the
TurtleOutput text are
- processTurtle(JTurtle) - Method in class slogo.turtle.TurtleField
-
Process a (changed) turtle, display properties and redraw.
- processTurtle(JTurtle) - Method in interface slogo.turtle.TurtleListener
-
- Product - Class in slogo.instruction
-
A PRODUCT instruction has two components: two GrammarElements that represents the
two numbers to perform multiplication on.
- Product(GrammarElement, GrammarElement) - Constructor for class slogo.instruction.Product
-
Constructs a PRODUCT instruction that can be executed.
- ProductParser - Class in slogo.parser
-
Parse a PRODUCT Statement, which looks like
PRODUCT num1 num2
- ProductParser() - Constructor for class slogo.parser.ProductParser
-
- ProductToken - Class in slogo.parser.token
-
Represents a PRODUCT instruction token
- ProductToken() - Constructor for class slogo.parser.token.ProductToken
-
- PROPFILE - Static variable in class slogo.parser.InstructionNames
-
- redirectSystemStreams() - Static method in class slogo.turtle.TurtleField
-
Redirects the system output stream from the console to the myTurtleOutput text area
- Remainder - Class in slogo.instruction
-
- Remainder(GrammarElement, GrammarElement) - Constructor for class slogo.instruction.Remainder
-
Constructs a REMAINDER instruction that can be executed.
- RemainderParser - Class in slogo.parser
-
Parses a REMAINDER statement, which looks like
REMAINDER num1 num2
- RemainderParser() - Constructor for class slogo.parser.RemainderParser
-
- RemainderToken - Class in slogo.parser.token
-
Represents a REMAINDER instruction token
- RemainderToken() - Constructor for class slogo.parser.token.RemainderToken
-
- Renderer - Class in slogo.turtle
-
Renders the graphical representation of the turtle
- Renderer() - Constructor for class slogo.turtle.Renderer
-
- Repeat - Class in slogo.instruction
-
An AST (abstract syntax tree) for a SLogo REPEAT instruction.
- Repeat(ArithmeticBase, StrictInstructionList) - Constructor for class slogo.instruction.Repeat
-
Constructs a Repeat instruction that can be executed.
- repeatExpression - Variable in class slogo.instruction.Repeat
-
- RepeatParser - Class in slogo.parser
-
Parse a REPEAT Statement, which looks like
REPEAT numOrVar [ instructionlist ]
- RepeatParser() - Constructor for class slogo.parser.RepeatParser
-
- RepeatToken - Class in slogo.parser.token
-
Represents a REPEAT instruction token
- RepeatToken() - Constructor for class slogo.parser.token.RepeatToken
-
- ReservedToken - Class in slogo.parser.token
-
Represents a reserved word
- ReservedToken(String) - Constructor for class slogo.parser.token.ReservedToken
-
- reset() - Method in class slogo.turtle.JTurtle
-
Reposition turtle at the origin, facing north.
- returnValue - Static variable in class slogo.ContextImpl
-
- Right - Class in slogo.instruction
-
A RIGHT instruction has one component: a GrammarElement that represents the
number of degrees to turn the turtle to the right.
- Right(GrammarElement) - Constructor for class slogo.instruction.Right
-
Constructs a RIGHT instruction that can be executed.
- RIGHT_BRACE - Static variable in class slogo.CharConsts
-
- RIGHT_BRACKET - Static variable in class slogo.CharConsts
-
- RIGHT_PAREN - Static variable in class slogo.CharConsts
-
- RightBracketToken - Class in slogo.parser.token
-
Represents a right bracket
- RightBracketToken() - Constructor for class slogo.parser.token.RightBracketToken
-
- RightParenToken - Class in slogo.parser.token
-
Represents a right parenthesis
- RightParenToken() - Constructor for class slogo.parser.token.RightParenToken
-
- RightParser - Class in slogo.parser
-
Parse a RT Statement, which can look like either
RIGHT degrees
or
RT degrres
- RightParser() - Constructor for class slogo.parser.RightParser
-
- RightToken - Class in slogo.parser.token
-
Represents a RT instruction token
- RightToken() - Constructor for class slogo.parser.token.RightToken
-
- rightValue(Context) - Method in class slogo.instruction.BinaryExpression
-
- saveFile() - Method in class slogo.turtle.TurtleField
-
Allows the user to save a program to a slogo file
https://www.mkyong.com/java/how-to-write-to-file-in-java-bufferedwriter-example/
- SEMI_COLON - Static variable in class slogo.CharConsts
-
- serialVersionUID - Static variable in class slogo.turtle.TurtleField.BufferedPanel
-
- serialVersionUID - Static variable in class slogo.turtle.TurtleField.DrawingPanel
-
- serialVersionUID - Static variable in class slogo.turtle.TurtleField
-
- setHeading(int) - Method in class slogo.turtle.JTurtle
-
Set heading in degrees, notify listeners.
- setHeading(double) - Method in class slogo.turtle.JTurtle
-
Set heading in radians, notify listeners.
- setOutputText(String) - Method in class slogo.turtle.TurtleField
-
Sets the output text to the desired output, clearing it before doing so
- setPenDown() - Method in class slogo.turtle.JTurtle
-
- setPenDownHome() - Method in class slogo.turtle.JTurtle
-
- setPenUp() - Method in class slogo.turtle.JTurtle
-
- setPoint(Point2D) - Method in class slogo.turtle.JTurtle
-
Sets the turtles point, notifies listeners.
- setText(String) - Method in class slogo.turtle.UserOutput
-
- setTurtle(JTurtle) - Method in class slogo.turtle.TurtleField
-
- SetX - Class in slogo.instruction
-
A SETX instruction has one component: a GrammarElement that represents the
x coordinate to set.
- SetX(GrammarElement) - Constructor for class slogo.instruction.SetX
-
Constructs a SETX instruction that can be executed.
- SetXParser - Class in slogo.parser
-
Parses a SETX command, which looks like
SETX xcor
- SetXParser() - Constructor for class slogo.parser.SetXParser
-
- SetXToken - Class in slogo.parser.token
-
Represents a SETX instruction token
- SetXToken() - Constructor for class slogo.parser.token.SetXToken
-
- SetXY - Class in slogo.instruction
-
A SETXY instruction has two components: two GrammarElements that represents the
x and y coordinates to set.
- SetXY(GrammarElement, GrammarElement) - Constructor for class slogo.instruction.SetXY
-
Constructs a SETXY instruction that can be executed.
- SetXYParser - Class in slogo.parser
-
Parses a SETY command, which looks like
SETXY xcor ycor
- SetXYParser() - Constructor for class slogo.parser.SetXYParser
-
- SetXYToken - Class in slogo.parser.token
-
Represents a SETXY instruction token
- SetXYToken() - Constructor for class slogo.parser.token.SetXYToken
-
- SetY - Class in slogo.instruction
-
A SETY instruction has one component: a GrammarElement that represents the
y coordinate to set.
- SetY(GrammarElement) - Constructor for class slogo.instruction.SetY
-
Constructs a SETY instruction that can be executed.
- SetYParser - Class in slogo.parser
-
Parses a SETY command, which looks like
SETY ycor
- SetYParser() - Constructor for class slogo.parser.SetYParser
-
- SetYToken - Class in slogo.parser.token
-
Represents a SETY instruction token
- SetYToken() - Constructor for class slogo.parser.token.SetYToken
-
- showAngle(int) - Method in class slogo.turtle.TurtleField
-
Display (Turtle's) angle
- showPoint(Point2D) - Method in class slogo.turtle.TurtleField
-
display Turtle's point information
- ShowTurtle - Class in slogo.instruction
-
A SHOWTURTLE instruction has no components: when called, it will show the turtle
from the GUI view.
- ShowTurtle() - Constructor for class slogo.instruction.ShowTurtle
-
- ShowTurtleParser - Class in slogo.parser
-
Parses an ST command, which can look like either
SHOWTURTLE
or
ST
- ShowTurtleParser() - Constructor for class slogo.parser.ShowTurtleParser
-
- ShowTurtleToken - Class in slogo.parser.token
-
Represents a ST instruction token
- ShowTurtleToken() - Constructor for class slogo.parser.token.ShowTurtleToken
-
- SLASH - Static variable in class slogo.CharConsts
-
- slogo - package slogo
-
- slogo.expression - package slogo.expression
-
- slogo.instruction - package slogo.instruction
-
- slogo.parser - package slogo.parser
-
This package is responsible for parsing the language SLogo.
- slogo.parser.token - package slogo.parser.token
-
- slogo.turtle - package slogo.turtle
-
- SLogoInterpreter - Class in slogo
-
Main driver for the SLogo interpreter.
- SLogoInterpreter() - Constructor for class slogo.SLogoInterpreter
-
- SoundPlayer - Class in slogo.turtle
-
- SoundPlayer() - Constructor for class slogo.turtle.SoundPlayer
-
- STAR - Static variable in class slogo.CharConsts
-
- START_X - Static variable in class slogo.turtle.JTurtle
-
- START_Y - Static variable in class slogo.turtle.JTurtle
-
- statements - Static variable in class slogo.parser.token.TokenFactory
-
- StrictInstructionList - Class in slogo.instruction
-
A list of instructions that doesn't include a function definition.
- StrictInstructionList() - Constructor for class slogo.instruction.StrictInstructionList
-
Construct an empty list of instructions.
- StrictInstructionListParser - Class in slogo.parser
-
The parser for lists of instructions.
- StrictInstructionListParser() - Constructor for class slogo.parser.StrictInstructionListParser
-
- sub_name - Variable in class slogo.instruction.To
-
- Subtraction - Class in slogo.instruction
-
Represents a subtraction (e.g., lhs - rhs)
- Subtraction(ArithmeticBase, ArithmeticBase) - Constructor for class slogo.instruction.Subtraction
-
Represents a subtraction
- Sum - Class in slogo.instruction
-
A SUM instruction has two components: two GrammarElements that represents the
two numbers to perform addition on.
- Sum(GrammarElement, GrammarElement) - Constructor for class slogo.instruction.Sum
-
Constructs a DIFFERENCE instruction that can be executed.
- SumParser - Class in slogo.parser
-
Parses a SUM parser, which looks like
SUM num1 num2
- SumParser() - Constructor for class slogo.parser.SumParser
-
- SumToken - Class in slogo.parser.token
-
Represents a SUM instruction token
- SumToken() - Constructor for class slogo.parser.token.SumToken
-
- targetX - Variable in class slogo.instruction.Towards
-
- targetY - Variable in class slogo.instruction.Towards
-
- TILDE - Static variable in class slogo.CharConsts
-
- To - Class in slogo.instruction
-
- To(Variable, StrictInstructionList) - Constructor for class slogo.instruction.To
-
- toggleInfoPanel() - Method in class slogo.turtle.TurtleField
-
- Token - Interface in slogo.parser.token
-
currently this is a flag interface
- TokenFactory - Class in slogo.parser.token
-
Parses a stream into tokens
- TokenFactory() - Constructor for class slogo.parser.token.TokenFactory
-
- tokenList - Static variable in class slogo.parser.token.CharTokenFactory
-
- tokenNameToToken - Static variable in class slogo.parser.token.TokenFactory
-
- ToParser - Class in slogo.parser
-
Parse a TO Statement, which looks like
TO sub_name [instructionlist]
- ToParser() - Constructor for class slogo.parser.ToParser
-
- toString() - Method in class slogo.expression.Number
-
- toString() - Method in class slogo.expression.Variable
-
- toString() - Method in class slogo.instruction.Assignment
-
Returns a String for this instruction.
- toString() - Method in class slogo.instruction.Back
-
- toString() - Method in class slogo.instruction.BinaryExpression
-
Combine left/right subexpressions, return result using symbol as the
combiner/juxtaposer for the subexpressions.
- toString() - Method in class slogo.instruction.Clean
-
- toString() - Method in class slogo.instruction.ClearScreen
-
- toString() - Method in class slogo.instruction.Difference
-
- toString() - Method in class slogo.instruction.EqualBool
-
- toString() - Method in class slogo.instruction.Forward
-
- toString() - Method in class slogo.instruction.Greater
-
- toString() - Method in class slogo.instruction.Heading
-
- toString() - Method in class slogo.instruction.HideTurtle
-
- toString() - Method in class slogo.instruction.Home
-
- toString() - Method in class slogo.instruction.If
-
- toString() - Method in class slogo.instruction.Left
-
- toString() - Method in class slogo.instruction.Less
-
- toString() - Method in class slogo.instruction.Minus
-
- toString() - Method in class slogo.instruction.Negation
-
Format -expression
- toString() - Method in class slogo.instruction.NotEqual
-
- toString() - Method in class slogo.instruction.PenDown
-
- toString() - Method in class slogo.instruction.PenDownP
-
- toString() - Method in class slogo.instruction.PenUp
-
- toString() - Method in class slogo.instruction.Print
-
- toString() - Method in class slogo.instruction.Product
-
- toString() - Method in class slogo.instruction.Quotient
-
- toString() - Method in class slogo.instruction.Remainder
-
- toString() - Method in class slogo.instruction.Repeat
-
- toString() - Method in class slogo.instruction.Right
-
- toString() - Method in class slogo.instruction.SetX
-
- toString() - Method in class slogo.instruction.SetXY
-
- toString() - Method in class slogo.instruction.SetY
-
- toString() - Method in class slogo.instruction.ShowTurtle
-
- toString() - Method in class slogo.instruction.StrictInstructionList
-
Return a string indicating the # of instructions in the list
- toString() - Method in class slogo.instruction.Sum
-
- toString() - Method in class slogo.instruction.Towards
-
- toString() - Method in class slogo.instruction.UnaryExpression
-
- toString() - Method in class slogo.instruction.Xcor
-
- toString() - Method in class slogo.instruction.Ycor
-
- toString() - Method in exception slogo.parser.ParseException
-
- toString() - Method in class slogo.parser.token.CharToken
-
- toString() - Method in class slogo.parser.token.EOFToken
-
- toString() - Method in class slogo.parser.token.EOLToken
-
- toString() - Method in class slogo.parser.token.IdentifierToken
-
- toString() - Method in class slogo.parser.token.NumberToken
-
- toString() - Method in class slogo.parser.token.ReservedToken
-
- toString() - Method in class slogo.parser.token.VariableToken
-
- toStringV() - Method in class slogo.expression.Variable
-
- total - Variable in class slogo.instruction.Product
-
- total - Variable in class slogo.instruction.Remainder
-
- total - Variable in class slogo.instruction.Sum
-
- ToToken - Class in slogo.parser.token
-
Represents a TO instruction token
- ToToken() - Constructor for class slogo.parser.token.ToToken
-
- Towards - Class in slogo.instruction
-
Calculates the direction turtle should be facing and returns this to
- Towards(GrammarElement, GrammarElement) - Constructor for class slogo.instruction.Towards
-
Constructs a TOWARDS instruction that can be executed.
- TowardsParser - Class in slogo.parser
-
Parses a TOWARDS statement, which looks like
TOWARDS xcor ycor
- TowardsParser() - Constructor for class slogo.parser.TowardsParser
-
- TowardsToken - Class in slogo.parser.token
-
Represents a TOWARDS instruction token
- TowardsToken() - Constructor for class slogo.parser.token.TowardsToken
-
- trail - Static variable in class slogo.turtle.JTurtle
-
- trueHeading() - Method in class slogo.turtle.JTurtle
-
Return the real/true heading of the turtle.
- TurtleField - Class in slogo.turtle
-
Rudimentary view showing turtles and MVC.
- TurtleField(String) - Constructor for class slogo.turtle.TurtleField
-
Creates a view of the turtle, given by the name of the turtle image
- TurtleField() - Constructor for class slogo.turtle.TurtleField
-
Creates a view of the turtle, using the default turtle representation
- TurtleField.BufferedPanel - Class in slogo.turtle
-
Overkill with double buffering on by default, but shows how to do it.
- TurtleField.DrawingPanel - Class in slogo.turtle
-
- TurtleListener - Interface in slogo.turtle
-
A simple listener interface that listens to changes to the turtle and
processes them, as appropriate.