Can't have close square brackets escaped inside ranges
See original GitHub issueTesting a bash grammar I found that rr
doesn’t accept close square bracket escaped inside ranges (open square brackets it’s OK):
nonsquarebra ::= [^\[\]]
Output:
lexical analysis failed
while expecting [Whitespace, NCName, StringLiteral, CharCode, '/*ws:explicit*/', '/*ws:definition*/', DocComment, EOF, EquivalenceLookAhead, '$', '&', '(', ')', '*', '+', '-', '.', '/', '<?', '<?ENCORE?>', '<?TOKENS?>', '?', '[', '[^', '|']
at line 1, column 25:
...]...
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
Does a dot have to be escaped in a character class (square ...
In order for regex to match a dot, the dot has to be escaped: \. It has been pointed out to me that...
Read more >Escaping square brackets in LIKE clause in SQL Server
According to Microsoft Docs, square brackets can be used in LIKE clause to match any single character within the specified range ([b-h]) or...
Read more >sed: escaped square closing bracket does not match
part that I can't get to work. As a simple example, I want to match the input a [test] b . This is...
Read more >How to Escape Square Brackets in a LIKE Clause in SQL ...
It is used to match any single character within the specified range like ([b-h]) or set ([ghijk]). We can escape square brackets using...
Read more >regular expression pattern difference between [\.\-]
No; there is no escape character inside square brackets. Inside square brackets, '.' and'\' have no special meaning, so there is no need...
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 Free
Top 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
RR use ebnf defined by w3c, so i think it is a bad idea.
Also I did converted (naively) several (64) grammars from tree-sitter to the EBNF supported by this project here https://github.com/mingodad/plgh, would be nice to have a link to then in https://www.bottlecaps.de/rr/ui