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

$ff00 + csymbol is lexed incorrectly #881

Closed
Rangi42 opened this issue May 4, 2021 · 0 comments · Fixed by #882
Closed

$ff00 + csymbol is lexed incorrectly #881

Rangi42 opened this issue May 4, 2021 · 0 comments · Fixed by #882
Labels
bug Unexpected behavior / crashes; to be fixed ASAP! rgbasm This affects RGBASM
Milestone

Comments

@Rangi42
Copy link
Contributor

Rangi42 commented May 4, 2021

$ff00 + csymbol lexes as T_MODE_HW_C and the T_ID "symbol", not as the T_NUMBER "$ff00", T_OP_ADD, and the T_ID "csymbol". This affects instructions like jp $ff00 + compression_jr (from https://github.com/LIJI32/GBVideoPlayer2).

@Rangi42 Rangi42 added bug Unexpected behavior / crashes; to be fixed ASAP! rgbasm This affects RGBASM labels May 4, 2021
@Rangi42 Rangi42 added this to the v0.5.1 milestone May 4, 2021
ISSOtm added a commit to ISSOtm/rgbds that referenced this issue May 4, 2021
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.
Rangi42 added a commit to Rangi42/rgbds that referenced this issue May 4, 2021
ISSOtm added a commit that referenced this issue May 5, 2021
Fixes #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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected behavior / crashes; to be fixed ASAP! rgbasm This affects RGBASM
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant