ESCAPED_STRING doesn't parse \n
See original GitHub issueDescribe the bug
ESCAPED_STRING doesn’t parse “\n”. I expected to get Tree('start', [Token('ESCAPED_STRING', '"\n"')])
To Reproduce
With lark.__version__ == '0.11.1'
Lark(
r"""
start: ESCAPED_STRING
%import common.ESCAPED_STRING
"""
).parse('"\n"')
Will result in error:
UnexpectedCharacters: No terminal defined for '"' at line 1 col 1
"
^
Expecting: {'ESCAPED_STRING'}
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to escape a JSON string containing newline characters ...
I tried escaping the new line character \n to \\n. It is working fine. But i am looking for any JS library which...
Read more >TMPro will not parse "\n" when string is changed via UI event ...
1. I have txt and btn. 2. btn will use the UI's OnClick event to change txt.text's string: "Hello\nWorld" 3. Ensure "parse escape...
Read more >Multiple problems parsing JSON, escaping, encoding ... - GitHub
This would allow all fields to be decoded after being parsed, but will break in cases (such as when parsing nested JSON) where...
Read more >Escaping new line character in JSON to avoid data loading ...
Presence of a new-line character (\n) in JSON document can cause errors while loading data in Snowflake. This article details how to escape...
Read more >JavaScript Strings - W3Schools
JavaScript strings are for storing and manipulating text. ... The backslash ( \ ) escape character turns special characters into string characters: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah good catch! Lark is impressive, you are a genius @erezsh . I started using it yesterday
Thanks! I hope you’ll keep having a good experience with it.