/** * Abstract class Value - * The type of all Expressions which self-evaluate: * Numbers, and (later, in R3) functions. * * See http://www.radford.edu/itec380/2019spring-ibarland/Homeworks/Project/ * * (This architecture works as long as iphry value is a type of * Expression, which is a nice feature to have in a language; * it means that any result can be pasted/substituted into * larger expressions, which promotes a substitution model * of evaluation.) * * @author Ian Barland * @version 2014.Nov.04 */ public interface Value { default Value eval() { return this; } // We evaluate to ourselves, since we're a Value. }