From f5c6ec3252c3f6dced1152f0e9c34962ae880f35 Mon Sep 17 00:00:00 2001 From: Erez Sh Date: Sun, 19 Jan 2020 16:40:40 +0200 Subject: [PATCH] Added support for accented-latin in unquoted strings (Issue #96) --- mappyfile/mapfile.lalr.g | 4 ++-- tests/test_expressions.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/mappyfile/mapfile.lalr.g b/mappyfile/mapfile.lalr.g index 6c700af..4144a98 100644 --- a/mappyfile/mapfile.lalr.g +++ b/mappyfile/mapfile.lalr.g @@ -117,8 +117,8 @@ INT: /[0-9]+(?![_a-zA-Z])/ %import common.FLOAT // UNQUOTED_STRING: /[a-z_][a-z0-9_\-]*/i -UNQUOTED_STRING: /[a-z0-9_\-:]+/i -UNQUOTED_STRING_SPACE: /[a-z0-9_\-: ]+/i +UNQUOTED_STRING: /[a-z0-9_\xc0-\xff\-:]+/i +UNQUOTED_STRING_SPACE: /[a-z0-9\xc0-\xff_\-: ]+/i DOUBLE_QUOTED_STRING: "\"" ("\\\""|/[^"]/)* "\"" "i"? SINGLE_QUOTED_STRING: "'" ("\\'"|/[^']/)* "'" "i"? ESCAPED_STRING: /`.*?`i?/ diff --git a/tests/test_expressions.py b/tests/test_expressions.py index e7074f3..c391524 100644 --- a/tests/test_expressions.py +++ b/tests/test_expressions.py @@ -407,7 +407,6 @@ def test_class_not_expression_no_brackets(): assert(output(s) == exp) -@pytest.mark.xfail def test_unquoted_unicode_string(): """ See pull request #92 - French unquoted string