public override void Execute(EpsInterpreter interpreter) { var file = new FileOperand { Reader = interpreter.FileReader }; interpreter.OperandStack.Push(file); }
public override void Execute(EpsInterpreter interpreter) { var operandStack = interpreter.OperandStack; var filterName = operandStack.PopName(); switch (filterName.Value) { case "SubFileDecode": { var str = operandStack.Pop(); switch (str) { case StringOperand stringOperand: { var count = operandStack.PopInteger(); var src = operandStack.Pop(); switch (src) { case FileOperand fileOperand: var file = new FileOperand(); operandStack.Push(file); break; default: throw new Exception($"filter source not implemented \"{filterName.Value}\""); } break; } default: throw new Exception($"filter type not implemented \"{filterName.Value}\""); } break; } case "ASCII85Decode": case "RunLengthDecode": { var src = operandStack.Pop(); var file = new FileOperand(); operandStack.Push(file); break; } default: throw new Exception($"filter not implemented \"{filterName.Value}\""); } }