Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented #156 (#DEF and comments) #200

Open
wants to merge 1 commit into
base: 1.20.1
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading