diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-04-08 21:25:58 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-04-08 21:25:58 -0700 |
commit | 60cd468d75eb0fef11a26238ddc3588b7c7b2f15 (patch) | |
tree | c08ecfbf6929101a4e077a8a39db4dff96d47616 /tests | |
parent | 9218460118760c2e4f3910b6c7ee73e0e644a401 (diff) | |
download | txr-60cd468d75eb0fef11a26238ddc3588b7c7b2f15.tar.gz txr-60cd468d75eb0fef11a26238ddc3588b7c7b2f15.tar.bz2 txr-60cd468d75eb0fef11a26238ddc3588b7c7b2f15.zip |
parser: allow non-UTF-8 bytes in literals and regexes.
* parser.l (grammar): Just like we do in SREGEX, allow an
arbitrary byte in REGEX, mapping it to the DCxx range.
Do the same inside string literals of all types.
* lex.yy.c.shipped: Updated.
* tests/012/parse.tl: New tests.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/012/parse.tl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/012/parse.tl b/tests/012/parse.tl index 8e3e7afc..d28f9057 100644 --- a/tests/012/parse.tl +++ b/tests/012/parse.tl @@ -3,5 +3,11 @@ (test (read `"@(str-buf #b'EDB081')"`) "\xDCED\xDCB0\xDC81") +(test (read `"@(str-buf #b'F3FF')"`) + "\xDCF3\xDCFF") + (test (regex-parse (str-buf #b'EDB081')) (compound "\xDCED\xDCB0\xDC81")) + +(test (regex-parse (str-buf #b'F3FF')) + (compound #\xDCF3 #\xDCFF)) |