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

Unquoted Unicode strings cause parsing errors #96

Closed
geographika opened this issue Jan 12, 2020 · 0 comments
Closed

Unquoted Unicode strings cause parsing errors #96

geographika opened this issue Jan 12, 2020 · 0 comments

Comments

@geographika
Copy link
Owner

geographika commented Jan 12, 2020

Currently the grammar includes the following for unquoted strings used in list expressions:

UNQUOTED_STRING: /[a-z0-9_\-:]+/i
UNQUOTED_STRING_SPACE: /[a-z0-9_\-: ]+/i

When accents are used these cannot parse as referred to in #92. For example:

EXPRESSION {Aérodrome,Aéroport,Héliport}

Note only allowing for accents within words within braces is an option. These will always be separated by commas, but the words can contain spaces.

A test (currently failing) test_unquoted_unicode_string has been created to test this.

Using the regex mentioned in lark-parser/lark#208 (WORD: /[^\W\d_]+/) works in Python3 but fails in Python27 with:

UnexpectedCharacters: No terminal defined for '\xe9' at line 3 col 20

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

No branches or pull requests

1 participant