Skip to content

Commit 08e224d

Browse files
rockymmatera
andauthored
Add name-pattern token used in prefix operators ? and ?? (#158)
* Add Names Pattern tokenization * Start regexp testing. * Uppercase _letter{,likes} s * Information -> QuestionQuestion * Make change_token_scanning_mode public --------- Co-authored-by: Juan Mauricio Matera <matera@fisica.unlp.edu.ar>
1 parent 8a01d7b commit 08e224d

6 files changed

Lines changed: 221 additions & 45 deletions

File tree

.github/workflows/mathics3-doctest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Build Mathics3
3737
run: |
3838
# Until next Mathics3/mathics-core release is out...
39-
git clone --depth 1 https://github.com/Mathics3/mathics-core.git
39+
git clone --depth 1 -b add-Name-pattern-token https://github.com/Mathics3/mathics-core.git
4040
cd mathics-core/
4141
python -m pip install -e .[dev]
4242
cp -v ../mathics_scanner/data/boxing-characters.json mathics/data/boxing-characters.json

mathics_scanner/characters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def replace_box_unicode_with_ascii(input_string):
123123

124124

125125
# Character ranges of letters
126-
_letters: Final[str] = (
126+
LETTERS: Final[str] = (
127127
"a-zA-Z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u0103\u0106\u0107\
128128
\u010c-\u010f\u0112-\u0115\u011a-\u012d\u0131\u0141\u0142\u0147\u0148\
129129
\u0150-\u0153\u0158-\u0161\u0164\u0165\u016e-\u0171\u017d\u017e\
@@ -136,7 +136,7 @@ def replace_box_unicode_with_ascii(input_string):
136136
)
137137

138138
# Character ranges of letterlikes
139-
_letterlikes: Final[Dict[str, str]] = NAMED_CHARACTERS_COLLECTION.get("letterlikes", {})
139+
LETTERLIKES: Final[Dict[str, str]] = NAMED_CHARACTERS_COLLECTION.get("letterlikes", {})
140140

141141
# Conversion from WL to the fully qualified names
142142
_wl_to_ascii: Final[Dict[str, str]] = NAMED_CHARACTERS_COLLECTION.get(

0 commit comments

Comments
 (0)