From 764ff58eaa6fbfbf3e3809e67c23fcccacfa68eb Mon Sep 17 00:00:00 2001 From: zaaarf Date: Tue, 7 Feb 2023 14:20:26 +0100 Subject: feat: implemented ASM pattern matcher --- .../lll/exception/InstructionMismatchException.java | 19 +++++++++++++++++++ .../ftbsc/lll/exception/PatternNotFoundException.java | 18 ++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 src/main/java/ftbsc/lll/exception/InstructionMismatchException.java create mode 100644 src/main/java/ftbsc/lll/exception/PatternNotFoundException.java (limited to 'src/main/java/ftbsc/lll/exception') diff --git a/src/main/java/ftbsc/lll/exception/InstructionMismatchException.java b/src/main/java/ftbsc/lll/exception/InstructionMismatchException.java new file mode 100644 index 0000000..7dda1e6 --- /dev/null +++ b/src/main/java/ftbsc/lll/exception/InstructionMismatchException.java @@ -0,0 +1,19 @@ +package ftbsc.lll.exception; + +/** + * Thrown when attempting to build an InstructionSequence between two + * unconnected nodes. + */ +public class InstructionMismatchException extends RuntimeException { + public InstructionMismatchException(String message) { + super(message); + } + + public InstructionMismatchException(String message, Throwable cause) { + super(message, cause); + } + + public InstructionMismatchException(Throwable cause) { + super(cause); + } +} diff --git a/src/main/java/ftbsc/lll/exception/PatternNotFoundException.java b/src/main/java/ftbsc/lll/exception/PatternNotFoundException.java new file mode 100644 index 0000000..e6d75b3 --- /dev/null +++ b/src/main/java/ftbsc/lll/exception/PatternNotFoundException.java @@ -0,0 +1,18 @@ +package ftbsc.lll.exception; + +/** + * Thrown when failing to find a pattern + */ +public class PatternNotFoundException extends RuntimeException { + public PatternNotFoundException(String message) { + super(message); + } + + public PatternNotFoundException(String message, Throwable cause) { + super(message, cause); + } + + public PatternNotFoundException(Throwable cause) { + super(cause); + } +} -- cgit v1.2.3-56-ga3b1