Index

A B C D E F H I L M N O P R S T U V X 
All Classes and Interfaces|All Packages|Constant Field Values

A

allTests - Variable in class ExprTest
 
assertEquals(double, double, double) - Static method in class UtilIanTest
assert that `actual` is within `tol`erance of `expected`.
assertEquals(Object, Object) - Static method in class ExprTest
assert that `actual.equals(expected)`.
assertEquals(Object, Object) - Static method in class UtilIanTest
assert that `actual.equals(expected)`.
assertFalse(boolean) - Static method in class UtilIanTest
 
assertTrue(boolean) - Static method in class UtilIanTest
 

B

BinOp - Record Class in Unnamed Package
 
BinOp(String, Expr, Expr) - Constructor for record class BinOp
Creates an instance of a BinOp record class.

C

ceil(double) - Static method in class UtilIan
The smallest int ≥ to x (same as Math.ceil, but returns int.)
charToString(Character) - Static method in class UtilIan
Convert a char to a String.
CONT_TOKEN1 - Static variable in record class IfZero
 
CONT_TOKEN3 - Static variable in record class IfZero
 

D

dbg(String, Object...) - Static method in record class BinOp
 
dbg(String, Object...) - Method in class ExprTest
Just like `System.err.printf` but for debugging-output; comment out its body to disable.
dbg(String, Object...) - Static method in class UtilIan
Just like `System.err.printf` but for debugging-output; comment out its body to disable.
Digits - Static variable in class UtilIan
 
DOUBLE_PATTERN - Static variable in class UtilIan
 
doubleToInt(Double) - Static method in class UtilIan
Convert a Double to an int.
doubleValue() - Method in record class Num
Return the Java double this Value represents (for use by other primitives in our language.)

E

e() - Method in record class Paren
Returns the value of the e record component.
e0 - Variable in class ExprTest
 
e1 - Variable in class ExprTest
 
e2 - Variable in class ExprTest
 
e3 - Variable in class ExprTest
 
e4 - Variable in class ExprTest
 
elseAns() - Method in record class IfZero
Returns the value of the elseAns record component.
END_TOKEN - Static variable in record class BinOp
 
EPSILON - Static variable in record class IfZero
 
equals(Object) - Method in record class BinOp
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class IfZero
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class Num
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class Pair
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class Paren
Indicates whether some other object is "equal to" this one.
equalsApprox(double, double) - Static method in class UtilIan
Return whether two doubles are equal (approximately).
equalsApprox(double, double, double) - Static method in class UtilIan
 
equalsApproxTest() - Method in class UtilIanTest
 
equalsIgnoreWhitespace(String, String) - Static method in class UtilIan
Return whether two Strings are equal, ignoring differences in whitespace.
equalsIgnoreWhitespace(String, String, String) - Static method in class UtilIan
Return whether two Strings are equal, ignoring differences in whitespace.
equalsIgnoreWhitespaceTest() - Method in class UtilIanTest
 
eval() - Method in record class BinOp
 
eval() - Method in interface Expr
Evaluate a given Expr.
eval() - Method in record class IfZero
 
eval() - Method in record class Num
 
eval() - Method in record class Paren
 
eval() - Method in interface Value
 
evalBinOp(String, double, double) - Static method in record class BinOp
Evaluate E's `op` w/ `l` and `r`
Exp - Static variable in class UtilIan
 
Expr - Interface in Unnamed Package
An `Expr` represents (the parse tree of) an OG0 expression.
ExprTest - Class in Unnamed Package
 
ExprTest() - Constructor for class ExprTest
 

F

first() - Method in record class Pair
Returns the value of the first record component.
floor(double) - Static method in class UtilIan
The largest int ≤ to x (same as Math.floor, but returns int.)

H

hashCode() - Method in record class BinOp
Returns a hash code value for this object.
hashCode() - Method in record class IfZero
Returns a hash code value for this object.
hashCode() - Method in record class Num
Returns a hash code value for this object.
hashCode() - Method in record class Pair
Returns a hash code value for this object.
hashCode() - Method in record class Paren
Returns a hash code value for this object.
hasNextChar(Scanner) - Static method in class UtilIan
Is there a next (non-white) character to read from a scanner? Same as hasNext(); provided for completeness.
hasNextChar(Scanner, char) - Static method in class UtilIan
Is a certain character next, in a scanner's input (skipping whitespace)? This method may advance the scanner over any whitespace.
hasNextDoubleSplittingBy(Scanner, String) - Static method in class UtilIan
 
hasNextSplittingBy(Scanner, String, String) - Static method in class UtilIan
Does the scanner's next token start with a given word, optionally followed by: any of delimiterChars (and.iph other chars).

I

IfZero - Record Class in Unnamed Package
Our internal representation of a IfZero expr in the OG0 language.
IfZero(Expr, Expr, Expr) - Constructor for record class IfZero
Creates an instance of a IfZero record class.
intToDouble(Integer) - Static method in class UtilIan
Convert an Integer into to a double.

L

left() - Method in record class BinOp
Returns the value of the left record component.
logPassedTest() - Method in class ExprTest
 

M

main(String...) - Static method in class ExprTest
Manually call our test-functions (in case calling JUnit from your IDE isn't easy).
main(String...) - Static method in class UtilIanTest
 
mathTests() - Method in class UtilIanTest
 
max(Collection<T>) - Static method in class UtilIan
Return the maximum item in a Collection[Comparable].
max(T...) - Static method in class UtilIan
A var-args version of max(Collection).
maxMinTests() - Method in class UtilIanTest
 
min(Collection<T>) - Static method in class UtilIan
Return the minimum item in a Collection[Comparable].
min(T...) - Static method in class UtilIan
A var-args version of min(Collection).

N

nextChar(Scanner) - Static method in class UtilIan
Read the next char from a scanner's input (skipping whitespace).
nextChar(Scanner, char) - Static method in class UtilIan
Read the given character from a scanner's input (skipping whitespace).
nextDoubleSplittingBy(Scanner, String) - Static method in class UtilIan
 
nextDoubleSplittingByTest() - Method in class UtilIanTest
 
nextMatch(Scanner, String) - Static method in class UtilIan
Return the next match (skipping initial whitespace) of a pattern.
nextMatch(Scanner, Pattern) - Static method in class UtilIan
Return the next match (skipping initial whitespace) of a pattern.
nextMatchTest() - Method in class UtilIanTest
 
nextSplittingBy(Scanner, String) - Static method in class UtilIan
Read a token, but stopping (and not consuming) if we encounter one of delimiterChars.
nextSplittingByTest() - Method in class UtilIanTest
 
Num - Record Class in Unnamed Package
Our internal representation of a number in the OG0 language.
Num(double) - Constructor for record class Num
Creates an instance of a Num record class.

O

op() - Method in record class BinOp
Returns the value of the op record component.
OP_FUNCS - Static variable in record class BinOp
 
OPS - Static variable in record class BinOp
 

P

Pair<T,U> - Record Class in Unnamed Package
A class to represent two values.
Pair(T, U) - Constructor for record class Pair
Creates an instance of a Pair record class.
Paren - Record Class in Unnamed Package
Our internal representation of a Paren in the OG0 language.
Paren(Expr) - Constructor for record class Paren
Creates an instance of a Paren record class.
parse(String) - Static method in interface Expr
Return (our internal representation of) the first expression in s.
parse(Scanner) - Static method in interface Expr
Return (our internal representation of) the first expression in s.
parse(Scanner, String) - Static method in record class BinOp
parse(Scanner, String) - Static method in interface Expr
Return (our internal representation of) the first expression in s.
parse(Scanner, String) - Static method in record class IfZero
parse(Scanner, String) - Static method in record class Num
parse(Scanner, String) - Static method in record class Paren
PUNCTUATION - Static variable in interface Expr
 

R

right() - Method in record class BinOp
Returns the value of the right record component.
roundTo(double, int) - Static method in class UtilIan
Round a number to a certain number of decimal places.
roundToInt(double) - Static method in class UtilIan
Round a Double to the nearest int.

S

scannerTest() - Method in class UtilIanTest
 
second() - Method in record class Pair
Returns the value of the second record component.
setUp() - Method in class ExprTest
Sets up the test fixture.
skipWhitespace(Scanner) - Static method in class UtilIan
Skip over the whitespace in a Scanner.
START_TOKEN - Static variable in record class BinOp
 
START_TOKEN - Static variable in record class IfZero
 
START_TOKEN - Static variable in record class Paren
 
STOP_TOKEN - Static variable in record class Paren
 

T

tearDown() - Method in class ExprTest
Tears down the test fixture.
test() - Method in record class IfZero
Returns the value of the test record component.
testEval() - Method in class ExprTest
For every element in allTests, parse the string and eval the result, checking that we get back the second item in the pair.
testMyStuff() - Method in class ExprTest
 
testParseToString() - Method in class ExprTest
For every element in allTests, parse the string, and then call toString on the result, checking that we get back exactly the input string (up to whitespace).
testTowardsAutomating() - Method in class ExprTest
 
thenAns() - Method in record class IfZero
Returns the value of the thenAns record component.
TOLERANCE - Static variable in class ExprTest
 
toString() - Method in record class BinOp
Returns a string representation of this record class.
toString() - Method in interface Expr
Return a String representation of this Expr.
toString() - Method in record class IfZero
Returns a string representation of this record class.
toString() - Method in record class Num
Returns a string representation of this record class.
toString() - Method in record class Pair
Returns a string representation of this record class.
toString() - Method in record class Paren
Returns a string representation of this record class.

U

UtilIan - Class in Unnamed Package
 
UtilIanTest - Class in Unnamed Package
The test class UtilIanTest.
UtilIanTest() - Constructor for class UtilIanTest
 

V

Value - Interface in Unnamed Package
Abstract class Value - The type of all Expressions which self-evaluate: Numbers, and (later, in OG3) functions.
verifyToken(String, String) - Static method in class UtilIan
Verify that `actualToken` equals `actualToken`; throw an InputMismatchException if not.

X

x() - Method in record class Num
Returns the value of the x record component.
A B C D E F H I L M N O P R S T U V X 
All Classes and Interfaces|All Packages|Constant Field Values