class ExpressionConsumer inherits IHigherOrderConsumer { integerc: IStringConsumer <- (new IntegerConsumer).init(); binaryopc: IStringConsumer <- (new BinaryOperatorConsumer).init(); consume(s: String) : Int {{ consumed_length <- 0; if did(integerc.consume(s)) then token <- integerc.token() else if did(binaryopc.consume(s)) then token <- binaryopc.token() else void fi fi; consumed_length; }}; };