X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Flexer%2Fsegment.c;h=05a9f57236f8b30fc0e26931ab93beaba3b4c715;hb=831d3d4ca420713ba8fdffd56b3aec25d8b2ea03;hp=e5d0af235213443ada5b2df9994e78eeaae97373;hpb=f20d313de2b85419c3e2e22a78cdcdce499af43d;p=pspp diff --git a/src/language/lexer/segment.c b/src/language/lexer/segment.c index e5d0af2352..05a9f57236 100644 --- a/src/language/lexer/segment.c +++ b/src/language/lexer/segment.c @@ -1893,6 +1893,9 @@ segmenter_get_mode (const struct segmenter *s) bytes as part of INPUT, because they have (figuratively) been consumed by the segmenter. + Segments can have zero length, including segment types SEG_END, + SEG_SEPARATE_COMMANDS, SEG_START_DOCUMENT, SEG_INLINE_DATA, and SEG_SPACES. + Failure occurs only if the segment type of the N bytes in INPUT cannot yet be determined. In this case segmenter_push() returns -1. If more input is available, the caller should obtain some more, then call again with a larger