SCI: Changed vocab_tokenize_string to not 'return' the list it generates, but rather pass a reference to an existing list to it (this is a bit more efficient, and allows us to return an error value)

svn-id: r39670
This commit is contained in:
Max Horn 2009-03-24 17:41:46 +00:00
parent d38590e6d4
commit 65b96f6a1b
4 changed files with 14 additions and 14 deletions

View file

@ -1032,9 +1032,9 @@ int c_parse(EngineState *s) {
string = cmd_params[0].str;
sciprintf("Parsing '%s'\n", string);
words = vocab_tokenize_string(string, s->parser_words, s->parser_words_nr,
s->_parserSuffixes, &error);
if (!words.empty()) {
int res = vocab_tokenize_string(words, string, s->parser_words, s->parser_words_nr,
s->_parserSuffixes, &error);
if (res == 0&& !words.empty()) {
int syntax_fail = 0;
vocab_synonymize_tokens(words, s->_synonyms);