mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-24 02:12:50 -06:00
bugfix in the C runtime which had made the parser up to 200 times slower for some sentences
This commit is contained in:
@@ -1247,9 +1247,9 @@ pgf_new_parse_state(PgfParsing* ps, size_t start_offset, BIND_TYPE bind_type)
|
|||||||
pstate = &ps->after;
|
pstate = &ps->after;
|
||||||
while (*pstate != NULL) {
|
while (*pstate != NULL) {
|
||||||
if (bind_type != BIND_NONE) {
|
if (bind_type != BIND_NONE) {
|
||||||
if (ps->before->start_offset == start_offset &&
|
if ((*pstate)->start_offset == start_offset &&
|
||||||
ps->before->end_offset == start_offset &&
|
(*pstate)->end_offset == start_offset &&
|
||||||
!ps->before->needs_bind)
|
!(*pstate)->needs_bind)
|
||||||
return ps->before;
|
return ps->before;
|
||||||
} else {
|
} else {
|
||||||
if ((*pstate)->start_offset == start_offset)
|
if ((*pstate)->start_offset == start_offset)
|
||||||
|
|||||||
Reference in New Issue
Block a user