Skip to content

Commit

Permalink
Implemented MightyPirates#156 (#DEF and comments)
Browse files Browse the repository at this point in the history
  • Loading branch information
UQuark committed Apr 19, 2024
1 parent 354a583 commit b836a70
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ private static void parseInstruction(final Matcher matcher, final MachineState s
// --------------------------------------------------------------------- //

private static final Pattern PATTERN_COMMENT = Pattern.compile("#.*$");
private static final Pattern PATTERN_DEFINE = Pattern.compile("#DEFINE\\s+(?<key>\\S+)\\s*(?<value>\\S+)\\s*$");
private static final Pattern PATTERN_DEFINE = Pattern.compile("(#DEF|#DEFINE)\\s+(?<key>\\S+)\\s*(?<value>\\S+)\\s*(#.*)?$");
private static final Pattern PATTERN_UNDEFINE = Pattern.compile("#UNDEF\\s+(?<key>\\S+)\\s*$");
private static final Pattern PATTERN_LINE = Pattern.compile("^\\s*(?:(?<label>[^:\\s]+)\\s*:\\s*)?(?:(?<name>\\S+)\\s*(?<arg1>[^,\\s]+)?\\s*,?\\s*(?<arg2>[^,\\s]+)?\\s*(?<excess>.+)?)?\\s*$");
private static final String INSTRUCTION_NO_NAME = "NOP";
Expand Down

0 comments on commit b836a70

Please sign in to comment.