Commit cb49d3f
Close comma-skipping and multi-line-string-with-blank-rows gaps
Two changes that take the real-world parse rate to 92% / 100%
(bsl-language-server / vsc-language-1c-bsl fixtures), with only four
remaining degraded files in the lsl set — all of them intentionally
malformed (*ParseError* tests, or genuine source typos like
'Неопределенно' / 'Функция Пример3' without parens).
1. Argument lists model empty slots as actual callArgs, mirroring ANTLR's
'callParamList : callParam (COMMA callParam)*' / 'callParam : expression?'
pair. Since Lezer doesn't accept literally empty productions, the
empty branch is expressed as a '~callArgEmpty' ambig-marked alternative
inside 'callArg'; the with-expression alternative carries
'@dynamicPrecedence=1' so the GLR engine prefers consuming the
expression whenever one is available (so 'f(g(x))' still parses as a
single nested call, not as 'f' applied to 'g' and '(x)' separately).
'()' / '(a)' / '(a, b)' / '(, a)' / '(a, )' / '(a, , b)' / '(, , )'
now all parse cleanly.
2. The multi-line String token allows blank rows between '|'-continued
segments. The previous regex required exactly one newline before each
continuation marker, so a query body broken across paragraphs (rather
common in real configs — and also the literal test input that
QueryComputerDateTimeTest reproduces, with its 20+ blank rows
triggering StringIndexOutOfBoundsException upstream) was an error
token. Changing '$[\n\r]' to '$[\n\r]+' tolerates an arbitrary run.
Sample-set numbers before → after:
bsl-language-server: 88% → 92% (+2 files clean)
vsc-language-1c-bsl: 88% → 100% (+2 files clean)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent e320878 commit cb49d3f
1 file changed
Lines changed: 25 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
307 | 315 | | |
308 | | - | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
309 | 322 | | |
310 | 323 | | |
311 | 324 | | |
| |||
427 | 440 | | |
428 | 441 | | |
429 | 442 | | |
430 | | - | |
431 | | - | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
432 | 448 | | |
433 | 449 | | |
434 | | - | |
| 450 | + | |
435 | 451 | | |
436 | 452 | | |
437 | 453 | | |
| |||
0 commit comments