YABNF grammar fails to parse UTF-8 chars in %s literals and escaped quotes in @pattern #2
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The tree-sitter YABNF grammar cannot parse valid YABNF output from
tree-sitter2abnf. The entire goluca grammar YABNF output parses as a single ERROR node.Two specific issues:
1. UTF-8 characters in
%s"..."literalsThe multi-byte
→(U+2192) inside%s"→"breaks parsing. Highlighting stops at this point.2. Escaped double quotes inside
@pattern()argumentsThe
\"escape sequences inside pattern strings are not handled correctly — the grammar treats them as string terminators.Reproduction
Expected
The grammar should correctly parse both cases, enabling full syntax highlighting of YABNF files.
Migrated from Codeberg: originally #2, opened 2026-03-24.