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:
parent
d38590e6d4
commit
65b96f6a1b
4 changed files with 14 additions and 14 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue