Terms in this set (107)
abstract syntax tree (AST) a tree model of an entire program or a certain "program structure"
Statement component family allows you to manipulate values that are ASTs for BL statements
enum special java construct that easily allows you to use meaningful symbolic names
where you might otherwise be inclined to declare int variables
program component family allows you to manipulate values that are models of complete BL programs
context set of instructions for a BL program
refactoring restructuring code (presumably to improve its readability, etc.) without
changing its behavior
grammar a set of formation rules for strings in a language
context-free a grammar is ___________ if it satisfies certain technical conditions described herein
rewrite rule describes how strings in a language may be formed
non-terminal symbol name on the left of a rewrite rule
terminal symbol a symbol from the alphabet on the right-hand side of a rewrite rule (what you
end up with when generating strings)
derivation a sequence of specific rewrite-rule applications that begin with the start
symbol and continue until only terminal symbols remain
tokenizer transforms a string of characters into a string of tokens
, OSU CSE 2221 FINAL REVIEW EXAM
recursive-descent parser an algorithm to parse a BL program and construct the corresponding Program
object
code generation translating a Program to a linear structure, a string of low-level instructions or
"byte codes" of a BL virtual machine
Three main features of the virtual machine for 1. Memory
BugsWorld 2. Instruction set
3. Program counter
unconditional jump causes the program counter to be set to the value in the memory location
following JUMP
conditional jump causes the program counter to be set to the value in the memory location
following the instruction iff it is not the case that satisfies the condition
interface contains a description of what the software does
class contains a description of how the software does it
interfaces hold the contracts for method bodies
-NO constructors
-NO static methods
-NO instance variables
-CAN define instance methods and static final variables (constants)
classes provides the implementation/code for the interface
implements between an interface and a class
"C implements I" means C contains the code for the method contracts in I
extends between two interfaces or two classes:
- if B extends A, then B inherits all the methods implements in A, but not
constructors
- class extension: to add more method bodies or override methods already in
the class
== compares... reference values
.equals() compares... object values
in-order traversal left, root, right
pre-order traversal root, left, right