forked from gbdev/rgbds
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix incorrect lexing of "$ff00+c" (gbdev#882)
Fixes gbdev#881 by moving the task from the lexer to the parser. This both alleviates the need for backtracking in the lexer, removing what is (was) arguably a hack, and causes tokenization boundaries to be properly respected, fixing the issue mentioned above. Co-authored-by: Rangi <remy.oukaour+rangi42@gmail.com>
- Loading branch information
Showing
13 changed files
with
31 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
SECTION "ff00+c or not to ff00+c", ROMX | ||
|
||
ld a, [$ff00 + c] | ||
ld [65280 + c], a | ||
|
||
; Not ok | ||
ld a, [$ff01 + c] | ||
ld [xyz + c], a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ERROR: ff00+c-bad.asm(8): | ||
Expected constant expression equal to $FF00 for "$ff00+c" | ||
ERROR: ff00+c-bad.asm(9): | ||
Expected constant expression equal to $FF00 for "$ff00+c" | ||
error: Assembly aborted (2 errors)! |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
CONSTANT equ 42 | ||
PRINTLN $ff00 + CONSTANT | ||
|
||
SECTION "Overreading much?", ROM0[0] | ||
|
||
jp $ff00 + CONSTANT | ||
jp $ff00 + carryOnPlease | ||
jp $ff00+CONSTANT | ||
jp $ff00+carryOnPlease | ||
|
||
carryOnPlease: |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
$FF2A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
�*����*��� |
File renamed without changes.
Empty file.
Empty file.
File renamed without changes.