+ if (!ext->saw_begin_data)
+ {
+ char *s;
+
+ ext->saw_begin_data = 1;
+
+ /* FIXME: WTF can't this just be done with tokens?
+ Is this really a special case? */
+ do
+ {
+ char *cp;
+
+ if (!getl_read_line ())
+ {
+ msg (SE, _("BEGIN DATA expected."));
+ err_failure ();
+ }
+
+ /* Skip leading whitespace, separate out first word, so that
+ S points to a single word reduced to lowercase. */
+ s = ds_value (&getl_buf);
+ while (isspace ((unsigned char) *s))
+ s++;
+ for (cp = s; isalpha ((unsigned char) *cp); cp++)
+ *cp = tolower ((unsigned char) (*cp));
+ ds_truncate (&getl_buf, cp - s);
+ }
+ while (*s == '\0');
+
+ if (!lex_id_match_len ("begin", 5, s, strcspn (s, " \t\r\v\n")))
+ {
+ msg (SE, _("BEGIN DATA expected."));
+ lex_preprocess_line ();
+ goto eof;
+ }
+ getl_prompt = GETL_PRPT_DATA;
+ }
+