aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/parser
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/parser')
-rw-r--r--engines/sci/parser/grammar.cpp22
-rw-r--r--engines/sci/parser/vocabulary.cpp20
2 files changed, 21 insertions, 21 deletions
diff --git a/engines/sci/parser/grammar.cpp b/engines/sci/parser/grammar.cpp
index ee0125b7c9..05764ba0a8 100644
--- a/engines/sci/parser/grammar.cpp
+++ b/engines/sci/parser/grammar.cpp
@@ -397,7 +397,7 @@ ParseRuleList *Vocabulary::buildGNF(bool verbose) {
ntrules_nr = _vocab_rule_list_length(ntlist);
if (verbose)
- con->DebugPrintf("Starting with %d rules\n", ntrules_nr);
+ con->debugPrintf("Starting with %d rules\n", ntrules_nr);
new_tlist = tlist;
tlist = NULL;
@@ -425,17 +425,17 @@ ParseRuleList *Vocabulary::buildGNF(bool verbose) {
termrules = _vocab_rule_list_length(new_new_tlist);
if (verbose)
- con->DebugPrintf("After iteration #%d: %d new term rules\n", ++iterations, termrules);
+ con->debugPrintf("After iteration #%d: %d new term rules\n", ++iterations, termrules);
} while (termrules && (iterations < 30));
freeRuleList(ntlist);
if (verbose) {
- con->DebugPrintf("\nGNF rules:\n");
+ con->debugPrintf("\nGNF rules:\n");
tlist->print();
- con->DebugPrintf("%d allocd rules\n", _allocd_rules);
- con->DebugPrintf("Freeing rule list...\n");
+ con->debugPrintf("%d allocd rules\n", _allocd_rules);
+ con->debugPrintf("Freeing rule list...\n");
freeRuleList(tlist);
return NULL;
}
@@ -548,7 +548,7 @@ int Vocabulary::parseGNF(const ResultWordListList &words, bool verbose) {
ParseRuleList *seeker, *subseeker;
if (verbose)
- con->DebugPrintf("Adding word %d...\n", word);
+ con->debugPrintf("Adding word %d...\n", word);
seeker = work;
while (seeker) {
@@ -562,7 +562,7 @@ int Vocabulary::parseGNF(const ResultWordListList &words, bool verbose) {
if (reduced_rules == NULL) {
freeRuleList(work);
if (verbose)
- con->DebugPrintf("No results.\n");
+ con->debugPrintf("No results.\n");
return 1;
}
@@ -592,10 +592,10 @@ int Vocabulary::parseGNF(const ResultWordListList &words, bool verbose) {
work = new_work;
if (verbose)
- con->DebugPrintf("Now at %d candidates\n", _vocab_rule_list_length(work));
+ con->debugPrintf("Now at %d candidates\n", _vocab_rule_list_length(work));
if (work == NULL) {
if (verbose)
- con->DebugPrintf("No results.\n");
+ con->debugPrintf("No results.\n");
return 1;
}
}
@@ -603,9 +603,9 @@ int Vocabulary::parseGNF(const ResultWordListList &words, bool verbose) {
results = work;
if (verbose) {
- con->DebugPrintf("All results (excluding the surrounding '(141 %03x' and ')'):\n", _parserBranches[0].id);
+ con->debugPrintf("All results (excluding the surrounding '(141 %03x' and ')'):\n", _parserBranches[0].id);
results->print();
- con->DebugPrintf("\n");
+ con->debugPrintf("\n");
}
// now use the first result
diff --git a/engines/sci/parser/vocabulary.cpp b/engines/sci/parser/vocabulary.cpp
index 7c560dfaef..b4a223dcff 100644
--- a/engines/sci/parser/vocabulary.cpp
+++ b/engines/sci/parser/vocabulary.cpp
@@ -577,7 +577,7 @@ void Vocabulary::printSuffixes() const {
strncpy(alt_buf, suf->alt_suffix, suf->alt_suffix_length);
alt_buf[suf->alt_suffix_length] = 0;
- con->DebugPrintf("%4d: (%03x) -%12s => -%12s (%03x)\n", i, suf->class_mask, word_buf, alt_buf, suf->result_class);
+ con->debugPrintf("%4d: (%03x) -%12s => -%12s (%03x)\n", i, suf->class_mask, word_buf, alt_buf, suf->result_class);
++i;
}
}
@@ -588,14 +588,14 @@ void Vocabulary::printParserWords() const {
int n = 0;
for (WordMap::iterator i = _parserWords.begin(); i != _parserWords.end(); ++i) {
for (ResultWordList::iterator j = i->_value.begin(); j != i->_value.end(); ++j) {
- con->DebugPrintf("%4d: %03x [%03x] %20s |", n, j->_class, j->_group, i->_key.c_str());
+ con->debugPrintf("%4d: %03x [%03x] %20s |", n, j->_class, j->_group, i->_key.c_str());
if (n % 3 == 0)
- con->DebugPrintf("\n");
+ con->debugPrintf("\n");
n++;
}
}
- con->DebugPrintf("\n");
+ con->debugPrintf("\n");
}
void _vocab_recursive_ptree_dump(ParseTreeNode *tree, int blanks) {
@@ -665,15 +665,15 @@ void Vocabulary::printParserNodes(int num) {
Console *con = g_sci->getSciDebugger();
for (int i = 0; i < num; i++) {
- con->DebugPrintf(" Node %03x: ", i);
+ con->debugPrintf(" Node %03x: ", i);
if (_parserNodes[i].type == kParseTreeLeafNode)
- con->DebugPrintf("Leaf: %04x\n", _parserNodes[i].value);
+ con->debugPrintf("Leaf: %04x\n", _parserNodes[i].value);
else {
// FIXME: Do we really want to print the *addresses*
// of the left & right child?
// Note that one or both may be zero pointers, so we can't just
// print their values.
- con->DebugPrintf("Branch: ->%p, ->%p\n",
+ con->debugPrintf("Branch: ->%p, ->%p\n",
(const void *)_parserNodes[i].left,
(const void *)_parserNodes[i].right);
}
@@ -694,11 +694,11 @@ int Vocabulary::parseNodes(int *i, int *pos, int type, int nr, int argc, const c
return *pos;
}
if (type == kParseEndOfInput) {
- con->DebugPrintf("Unbalanced parentheses\n");
+ con->debugPrintf("Unbalanced parentheses\n");
return -1;
}
if (type == kParseClosingParenthesis) {
- con->DebugPrintf("Syntax error at token %d\n", *i);
+ con->debugPrintf("Syntax error at token %d\n", *i);
return -1;
}
@@ -735,7 +735,7 @@ int Vocabulary::parseNodes(int *i, int *pos, int type, int nr, int argc, const c
const char *token = argv[(*i)++];
if (strcmp(token, ")"))
- con->DebugPrintf("Expected ')' at token %d\n", *i);
+ con->debugPrintf("Expected ')' at token %d\n", *i);
return oldPos;
}