Skip to content

Commit

Permalink
Fix bug caused by certain characters in symbol names, make allowed la…
Browse files Browse the repository at this point in the history
…bel names match allowed symbol names
  • Loading branch information
danielperano committed Feb 25, 2025
1 parent f414a0d commit 4ce7624
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/myworld/hummingbird/assembler/Assembler.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ public Assembler(){
whitespace = Pattern.compile("\\h+");
newline = Pattern.compile("\n|\r\n|\r");
sectionName = Pattern.compile("\\.\\w+");
labelDef = Pattern.compile("\\w+:");
labelUse = Pattern.compile("\\$(\\$)?\\w+");
symbolName = Pattern.compile("\\S+");
symbolUse = Pattern.compile("%\\S+");
labelDef = Pattern.compile("[\\S&&[^:,#]]+:");
labelUse = Pattern.compile("\\$(\\$)?[\\S&&[^:,#]]+");
symbolName = Pattern.compile("[\\S&&[^:,#]]+");
symbolUse = Pattern.compile("%[\\S&&[^:,#]]+");
register = Pattern.compile("[rp]\\d+");
instruction = Pattern.compile("\\w+");
intLiteral = Pattern.compile("[IiLl]?(0x|0b|0o)?-?\\d+");
Expand Down

0 comments on commit 4ce7624

Please sign in to comment.