- while (token != '/' && token != '.');
-
- return n;
-}
-
-/* Stores VALUE into *REPL. */
-static inline void
-store_numeric (char **repl, long value)
-{
- *repl = xmalloc (INT_STRLEN_BOUND (value) + 1);
- sprintf (*repl, "%ld", value);
-}
+ if (ds_is_empty (&input))
+ ds_put_byte (&input, '\n');
+ ds_put_byte (&input, '\0');
+
+ n_values = count_values (dummies);
+ outputs = xmalloc (n_values * sizeof *outputs);
+ for (i = 0; i < n_values; i++)
+ ds_init_empty (&outputs[i]);
+
+ syntax_mode = lex_get_syntax_mode (lexer);
+ if (syntax_mode == LEX_SYNTAX_AUTO)
+ mode = SEG_MODE_AUTO;
+ else if (syntax_mode == LEX_SYNTAX_INTERACTIVE)
+ mode = SEG_MODE_INTERACTIVE;
+ else if (syntax_mode == LEX_SYNTAX_BATCH)
+ mode = SEG_MODE_BATCH;
+ else
+ NOT_REACHED ();
+ do_parse_commands (ds_ss (&input), mode, dummies, outputs, n_values);