Commit 1e761b7
authored
[Fix]Fix the grammar_compiler. (#395)
This PR fixes a minor bug in Grammar Compiler, which is reported by
#382. The bug is led by a small optimization, which is used to reduce
the time to fill the `tmp_rejected_indices`. In the implementation, jf
`tmp_rejected_indices == false`, then it shouldn't be set to `true`
again, since some infomation will miss. Regretfully, when
`tmp_rejected_indices` is initialized with `false`, and the
`tmp_rejected_indices` is set to `true` until the end of the function,
then the incorrect `tmp_rejected_indices` will be passed.
Signed-off-by: Yuchuan <[email protected]>
---------
Signed-off-by: Yuchuan <[email protected]>1 parent 2b4775c commit 1e761b7
File tree
2 files changed
+36
-3
lines changed- cpp
- tests/python
2 files changed
+36
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
291 | | - | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
292 | 294 | | |
293 | 295 | | |
294 | 296 | | |
| |||
387 | 389 | | |
388 | 390 | | |
389 | 391 | | |
390 | | - | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
391 | 395 | | |
392 | 396 | | |
393 | 397 | | |
| |||
396 | 400 | | |
397 | 401 | | |
398 | 402 | | |
399 | | - | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
400 | 406 | | |
401 | 407 | | |
402 | 408 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
511 | 511 | | |
512 | 512 | | |
513 | 513 | | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
514 | 541 | | |
515 | 542 | | |
0 commit comments