mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 11:42:49 -06:00
bugfix in the parser's scanner
This commit is contained in:
@@ -1159,7 +1159,7 @@ pgf_parsing_scan(PgfParsing *ps)
|
|||||||
PgfParseState* state =
|
PgfParseState* state =
|
||||||
pgf_new_parse_state(ps, 0, BIND_SOFT);
|
pgf_new_parse_state(ps, 0, BIND_SOFT);
|
||||||
|
|
||||||
while (state != NULL) {
|
while (state->end_offset < len) {
|
||||||
if (state->needs_bind) {
|
if (state->needs_bind) {
|
||||||
// We have encountered two tokens without space in between.
|
// We have encountered two tokens without space in between.
|
||||||
// Those can be accepted only if there is a BIND token
|
// Those can be accepted only if there is a BIND token
|
||||||
@@ -1177,7 +1177,7 @@ pgf_parsing_scan(PgfParsing *ps)
|
|||||||
// skip one character and try again
|
// skip one character and try again
|
||||||
GuString s = ps->sentence+state->end_offset;
|
GuString s = ps->sentence+state->end_offset;
|
||||||
gu_utf8_decode((const uint8_t**) &s);
|
gu_utf8_decode((const uint8_t**) &s);
|
||||||
pgf_new_parse_state(ps, ps->sentence-s, BIND_NONE);
|
pgf_new_parse_state(ps, s-ps->sentence, BIND_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state == ps->before)
|
if (state == ps->before)
|
||||||
|
|||||||
Reference in New Issue
Block a user