Skip to content

Revise escape sequence scanning #126

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

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from
Draft

Conversation

rocky
Copy link
Member

@rocky rocky commented Apr 14, 2025

Refactor the scanner. Remove prescanner. Handling escape sequences is not a separate phase, but instead is integrated into the scanning phase.

@rocky rocky marked this pull request as draft April 14, 2025 15:28
@rocky rocky requested a review from mmatera April 14, 2025 15:31
@rocky
Copy link
Member Author

rocky commented Apr 14, 2025

@mmatera There is still a lot to do regarding writing tests and ensuring we handle errors and everything correctly.

But since this is getting large, this is a heads-up as to what's on the horizon.

rocky added 13 commits May 15, 2025 19:09
Escape sequences other than named characters have been removed from the
prescanner and put in the scanner.
handle syntax errors in mathics3-tokens.
Tokenizer.code -> Tokenizer.source_text
Tokenizer.incomplete -> Tokenizer.get_more_input
Start to show syntax errors.
In particular errors with octal digits and incomplete named errors.
Go over docstrings in escape_sequences.py
and add more tests.
named-characters.yml: \[Mu] is letterlike
tokeniser.py: Correct identifier or pattern for those having letterlike escape sequences
@rocky rocky force-pushed the revise-escape-sequence-scanning branch from feeb068 to d1d409f Compare May 15, 2025 23:11
@rocky rocky force-pushed the revise-escape-sequence-scanning branch from 5a0ec02 to a5b13d0 Compare May 15, 2025 23:28
@rocky rocky force-pushed the revise-escape-sequence-scanning branch from a5b13d0 to 1ab77fa Compare May 15, 2025 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant