+ dict_clear_documents (dataset_dict (ds));
+
+ return lex_end_of_command (lexer);
+}
+
+
+/* Performs the ADD DOCUMENTS command. */
+int
+cmd_add_documents (struct lexer *lexer, struct dataset *ds)
+{
+ struct dictionary *dict = dataset_dict (ds);
+
+ if ( ! lex_force_string (lexer) )
+ return CMD_FAILURE;
+
+ while ( lex_is_string (lexer))
+ {
+ dict_add_document_line (dict, lex_tokcstr (lexer));
+ lex_get (lexer);
+ }
+
+ add_document_trailer (dict);