From: <bi...@us...> - 2007-10-19 23:21:40
|
Revision: 1029 http://oorexx.svn.sourceforge.net/oorexx/?rev=1029&view=rev Author: bigrixx Date: 2007-10-19 16:21:44 -0700 (Fri, 19 Oct 2007) Log Message: ----------- More warning removal. Modified Paths: -------------- sandbox/rick/warnings/kernel/expression/ExpressionOperator.hpp sandbox/rick/warnings/kernel/instructions/RexxInstruction.hpp sandbox/rick/warnings/kernel/parser/Clause.hpp sandbox/rick/warnings/kernel/parser/InstructionParser.cpp sandbox/rick/warnings/kernel/parser/KeywordConstants.cpp sandbox/rick/warnings/kernel/parser/SourceFile.cpp sandbox/rick/warnings/kernel/parser/SourceFile.hpp sandbox/rick/warnings/kernel/parser/Token.hpp sandbox/rick/warnings/kernel/runtime/RexxNativeActivation.hpp Modified: sandbox/rick/warnings/kernel/expression/ExpressionOperator.hpp =================================================================== --- sandbox/rick/warnings/kernel/expression/ExpressionOperator.hpp 2007-10-19 21:47:48 UTC (rev 1028) +++ sandbox/rick/warnings/kernel/expression/ExpressionOperator.hpp 2007-10-19 23:21:44 UTC (rev 1029) @@ -36,7 +36,7 @@ /* */ /*----------------------------------------------------------------------------*/ /******************************************************************************/ -/* REXX Kernel ExpressionOperator.hpp */ +/* REXX Kernel ExpressionOperator.hpp */ /* */ /* Primitive Expression Operator Class Definitions */ /* */ @@ -61,15 +61,15 @@ // table of operator names static const char *operatorNames[]; - INT oper; /* operator to perform */ + int oper; /* operator to perform */ RexxObject *right_term; /* right term of the operator */ RexxObject *left_term; /* left term of the operator */ }; class RexxBinaryOperator : public RexxExpressionOperator { public: - inline RexxBinaryOperator(INT oper, RexxObject *left, RexxObject *right) - : RexxExpressionOperator(oper, left, right) { ; } + inline RexxBinaryOperator(int op, RexxObject *left, RexxObject *right) + : RexxExpressionOperator(op, left, right) { ; } inline RexxBinaryOperator(RESTORETYPE restoreType) { ; }; void *operator new(size_t); inline void *operator new(size_t size, void *ptr) {return ptr;}; @@ -78,8 +78,8 @@ class RexxUnaryOperator : public RexxExpressionOperator { public: - inline RexxUnaryOperator(INT oper, RexxObject *left) - : RexxExpressionOperator(oper, left, OREF_NULL) { ; } + inline RexxUnaryOperator(int op, RexxObject *left) + : RexxExpressionOperator(op, left, OREF_NULL) { ; } inline RexxUnaryOperator(RESTORETYPE restoreType) { ; }; void *operator new(size_t); inline void *operator new(size_t size, void *ptr) {return ptr;}; Modified: sandbox/rick/warnings/kernel/instructions/RexxInstruction.hpp =================================================================== --- sandbox/rick/warnings/kernel/instructions/RexxInstruction.hpp 2007-10-19 21:47:48 UTC (rev 1028) +++ sandbox/rick/warnings/kernel/instructions/RexxInstruction.hpp 2007-10-19 23:21:44 UTC (rev 1029) @@ -67,17 +67,17 @@ virtual void execute(RexxActivation *, RexxExpressionStack *) { ; }; inline void setNext(RexxInstruction *next) { OrefSet(this, this->nextInstruction, next); }; - void setStart(LONG line, LONG offset) {this->lineNumber = line; - this->offset = offset; }; - void setEnd(LONG line, LONG offset) { this->endLine = line; - this->endOffset = offset; }; - inline void setType(UCHAR type) {this->instructionInfo.type = type; }; - inline UCHAR getType(void) {return this->instructionInfo.type; }; - inline LONG getLine() { return this->lineNumber; }; + void setStart(size_t line, size_t off) {this->lineNumber = line; + this->offset = off; }; + void setEnd(size_t line, size_t off) { this->endLine = line; + this->endOffset = off; }; + inline void setType(char type) {this->instructionInfo.type = type; }; + inline char getType(void) {return this->instructionInfo.type; }; + inline size_t getLine() { return this->lineNumber; }; - LONG offset; /* offset of instruction start */ - LONG endLine; /* end line of the instruction */ - LONG endOffset; /* end offset of the instruction */ + size_t offset; /* offset of instruction start */ + size_t endLine; /* end line of the instruction */ + size_t endOffset; /* end offset of the instruction */ INSTRUCTIONINFO instructionInfo; /* instruction common information */ RexxInstruction *nextInstruction; /* next instruction object */ }; Modified: sandbox/rick/warnings/kernel/parser/Clause.hpp =================================================================== --- sandbox/rick/warnings/kernel/parser/Clause.hpp 2007-10-19 21:47:48 UTC (rev 1028) +++ sandbox/rick/warnings/kernel/parser/Clause.hpp 2007-10-19 23:21:44 UTC (rev 1029) @@ -63,8 +63,8 @@ RexxToken *newToken(int, int, RexxString *, PLOCATIONINFO); RexxToken *nextRealToken(); inline void firstToken() {this->current = this->first;}; - inline void getLocation(PLOCATIONINFO location) { *location = this->location; } - inline void setLocation(PLOCATIONINFO location) { this->location = *location; } + inline void getLocation(PLOCATIONINFO l) { *l = this->location; } + inline void setLocation(PLOCATIONINFO l) { this->location = *l; } inline void previous() { this->current--; } inline RexxToken *next() { return (RexxToken *)this->tokens->get(this->current++); } inline size_t mark() { return current; } Modified: sandbox/rick/warnings/kernel/parser/InstructionParser.cpp =================================================================== --- sandbox/rick/warnings/kernel/parser/InstructionParser.cpp 2007-10-19 21:47:48 UTC (rev 1028) +++ sandbox/rick/warnings/kernel/parser/InstructionParser.cpp 2007-10-19 23:21:44 UTC (rev 1029) @@ -121,17 +121,17 @@ environment = OREF_NULL; command = OREF_NULL; token = nextReal(); /* get the next token */ - if (token->classId != TOKEN_EOC) { /* something other than a toggle? */ + if (token->isEndOfClause()) { /* something other than a toggle? */ /* something other than a symbol or */ /* string?...implicit value form */ - if (token->classId != TOKEN_SYMBOL && token->classId != TOKEN_LITERAL) { + if (!token->isSymbolOrLiteral()) { previousToken(); /* back up one token */ /* process the expression */ expression = this->expression(TERM_EOC); } else { /* have a constant address target */ /* may be value keyword, however... */ - if (token->classId == TOKEN_SYMBOL && this->subKeyword(token) == SUBKEY_VALUE) { + if (this->subKeyword(token) == SUBKEY_VALUE) { /* process the expression */ expression = this->expression(TERM_EOC); if (expression == OREF_NULL) /* no expression? */ @@ -142,7 +142,7 @@ environment = token->value; /* get the actual name value */ token = nextReal(); /* get the next token */ /* have a command following name? */ - if (token->classId != TOKEN_EOC) { + if (!token->isEndOfClause()) { previousToken(); /* step back a token */ /* process the expression */ command = this->expression(TERM_EOC); @@ -230,18 +230,18 @@ argCount = 0; /* no arguments yet */ token = nextReal(); /* get the next token */ - if (token->classId == TOKEN_EOC) /* no target specified? */ + if (token->isEndOfClause()) /* no target specified? */ /* this is an error */ report_error(Error_Symbol_or_string_call); /* may have to process ON/OFF forms */ - else if (token->classId == TOKEN_SYMBOL) { + else if (token->isSymbol()) { keyword = this->subKeyword(token); /* check for the subkeywords */ if (keyword == SUBKEY_ON) { /* CALL ON instruction? */ flags |= call_on_off; /* this is a CALL ON */ token = nextReal(); /* get the next token */ /* no condition specified or not a */ /* symbol? */ - if (token->classId != TOKEN_SYMBOL) + if (!token->isSymbol()) /* this is an error */ report_error(Error_Symbol_expected_on); keyword = this->condition(token);/* get the condition involved */ @@ -260,7 +260,7 @@ token = nextReal(); /* get the next token */ /* no condition specified or not a */ /* symbol? */ - if (token->classId != TOKEN_SYMBOL) + if (!token->isSymbol()) /* this is an error */ report_error(Error_Symbol_expected_user); /* set the builtin index for later */ @@ -282,9 +282,9 @@ } token = nextReal(); /* get the next token */ /* anything real here? */ - if (token->classId != TOKEN_EOC) { + if (!token->isEndOfClause()) { /* not a symbol? */ - if (token->classId != TOKEN_SYMBOL) + if (!token->isSymbol()) /* this is an error */ report_error_token(Error_Invalid_subkeyword_callonname, token); /* not the name token? */ @@ -302,7 +302,7 @@ builtin_index = this->builtin(token); token = nextReal(); /* get the next token */ /* must have the clause end here */ - if (token->classId != TOKEN_EOC) + if (!token->isEndOfClause()) /* this is an error */ report_error_token(Error_Invalid_data_name, token); } @@ -311,7 +311,7 @@ token = nextReal(); /* get the next token */ /* no condition specified or not a */ /* symbol? */ - if (token->classId != TOKEN_SYMBOL) + if (!token->isSymbol()) /* this is an error */ report_error(Error_Symbol_expected_off); /* get the condition involved */ @@ -330,7 +330,7 @@ token = nextReal(); /* get the next token */ /* no condition specified or not a */ /* symbol? */ - if (token->classId != TOKEN_SYMBOL) + if (!token->isSymbol()) /* this is an error */ report_error(Error_Symbol_expected_user); condition = token->value; /* get the token string value */ @@ -342,7 +342,7 @@ else /* language defined condition */ condition = token->value; /* set the condition name */ token = nextReal(); /* get the next token */ - if (token->classId != TOKEN_EOC) /* must have the clause end here */ + if (!token->isEndOfClause()) /* must have the clause end here */ /* this is an error */ report_error_token(Error_Invalid_data_condition, token); } @@ -357,7 +357,7 @@ } } /* call with a string target */ - else if (token->classId == TOKEN_LITERAL) { + else if (token->isLiteral()) { name = token->value; /* set the default target */ /* set the builtin index for later */ /* resolution step */ @@ -455,14 +455,14 @@ // before doing anything, we need to test for a "LABEL name" before other options. We // need to make certain we check that the LABEL keyword is not being // used as control variable. - if (token->classId == TOKEN_SYMBOL) + if (token->isSymbol()) { // potentially a label. Check the keyword value if (this->subKeyword(token) == SUBKEY_LABEL) { // if the next token is a symbol, this is a label. RexxToken *name = nextReal(); - if (name->classId == TOKEN_SYMBOL) + if (name->isSymbol()) { OrefSet(newDo, newDo->label, name->value); // update the reset position before stepping to the next position @@ -486,7 +486,7 @@ // Just the single token means this is either a simple DO block or // a LOOP forever, depending on the type of instruction we're parsing. - if (token->classId == TOKEN_EOC) + if (token->isEndOfClause()) { if (isLoop) { @@ -500,7 +500,7 @@ } - if (token->classId == TOKEN_SYMBOL) + if (token->isSymbol()) { // this can be a control variable or keyword. We need to look ahead // to the next token. @@ -540,7 +540,7 @@ // the end-of-clause or DO/LOOP keyword, we know the next token will by // a symbol token = nextReal(); - while (token->classId != TOKEN_EOC) + while (!token->isEndOfClause()) { // this must be a keyword, so resolve it. switch (this->subKeyword(token) ) @@ -774,13 +774,13 @@ name = OREF_NULL; /* no name yet */ token = nextReal(); /* get the next token */ - if (token->classId != TOKEN_EOC) { /* have a name specified? */ - if (token->classId != TOKEN_SYMBOL)/* must have a symbol here */ + if (!token->isEndOfClause()) { /* have a name specified? */ + if (!token->isSymbol())/* must have a symbol here */ /* this is an error */ report_error(Error_Symbol_expected_end); name = token->value; /* get the name pointer */ token = nextReal(); /* get the next token */ - if (token->classId != TOKEN_EOC) /* end of the instruction? */ + if (!token->isEndOfClause()) /* end of the instruction? */ /* this is an error */ report_error_token(Error_Invalid_data_end, token); } @@ -853,8 +853,8 @@ returnContinue = FALSE; /* no return or continue yet */ token = nextReal(); /* get the next token */ - while (token->classId != TOKEN_EOC) {/* while still more to process */ - if (token->classId != TOKEN_SYMBOL)/* not a symbol token? */ + while (!token->isEndOfClause()) {/* while still more to process */ + if (!token->isSymbol())/* not a symbol token? */ /* this is an error */ report_error_token(Error_Invalid_subkeyword_forward_option, token); switch (this->subKeyword(token)) { /* get the keyword value */ @@ -974,7 +974,7 @@ variable_list = OREF_NULL; /* no variable either */ variable_count = 0; /* no variables yet */ token = nextReal(); /* get the next token */ - if (token->classId != TOKEN_SYMBOL) /* must have a symbol here */ + if (!token->isSymbol()) /* must have a symbol here */ /* raise the error */ report_error_token(Error_Symbol_expected_numeric, token); @@ -995,7 +995,7 @@ break; } token = nextReal(); /* get the next token */ - if (token->classId == TOKEN_SYMBOL) {/* have the keyword form? */ + if (token->isSymbol()) {/* have the keyword form? */ /* resolve the subkeyword */ switch (this->subKeyword(token)) { /* and process */ @@ -1018,7 +1018,7 @@ break; } } - else if (token->classId != TOKEN_EOC)/* not the end? */ + else if (!token->isEndOfClause())/* not the end? */ /* raise an error */ report_error_token(Error_Invalid_subkeyword_guard_on, token); @@ -1130,9 +1130,9 @@ name = OREF_NULL; /* no name yet */ token = nextReal(); /* get the next token */ - if (token->classId != TOKEN_EOC) { /* have a name specified? */ + if (!token->isEndOfClause()) { /* have a name specified? */ /* must have a symbol here */ - if (token->classId != TOKEN_SYMBOL) { + if (!token->isSymbol()) { if (type == KEYWORD_LEAVE) /* is it a LEAVE? */ /* this is an error */ report_error(Error_Symbol_expected_leave); @@ -1142,7 +1142,7 @@ } name = token->value; /* get the name pointer */ token = nextReal(); /* get the next token */ - if (token->classId != TOKEN_EOC) { /* end of the instruction? */ + if (!token->isEndOfClause()) { /* end of the instruction? */ if (type == KEYWORD_LEAVE) /* is it a LEAVE? */ /* this is an error */ report_error_token(Error_Invalid_data_leave, token); @@ -1232,7 +1232,7 @@ RexxToken *token; /* current working token */ token = nextReal(); /* get the next token */ - if (token->classId != TOKEN_EOC) /* not at the end-of-clause? */ + if (!token->isEndOfClause()) /* not at the end-of-clause? */ /* bad NOP instruction */ report_error_token(Error_Invalid_data_nop, token); /* create a new translator object */ @@ -1256,7 +1256,7 @@ expression = OREF_NULL; /* clear the expression */ flags = 0; /* and the flags */ token = nextReal(); /* get the next token */ - if (token->classId != TOKEN_SYMBOL) /* must have a symbol here */ + if (!token->isSymbol()) /* must have a symbol here */ /* raise the error */ report_error_token(Error_Symbol_expected_numeric, token); @@ -1269,10 +1269,10 @@ case SUBKEY_FORM: /* NUMERIC FORM instruction */ token = nextReal(); /* get the next token */ - if (token->classId == TOKEN_EOC) /* just NUMERIC FORM? */ + if (token->isEndOfClause()) /* just NUMERIC FORM? */ break; /* we're all finished */ /* have the keyword form? */ - else if (token->classId == TOKEN_SYMBOL) { + else if (token->isSymbol()) { /* resolve the subkeyword */ /* and process */ switch (this->subKeyword(token)) { @@ -1280,7 +1280,7 @@ case SUBKEY_SCIENTIFIC: /* NUMERIC FORM SCIENTIFIC */ token = nextReal(); /* get the next token */ /* end of the instruction? */ - if (token->classId != TOKEN_EOC) + if (!token->isEndOfClause()) /* this is an error */ report_error_token(Error_Invalid_data_form, token); break; @@ -1290,7 +1290,7 @@ flags |= numeric_engineering; token = nextReal(); /* get the next token */ /* end of the instruction? */ - if (token->classId != TOKEN_EOC) + if (!token->isEndOfClause()) /* this is an error */ report_error_token(Error_Invalid_data_form, token); break; @@ -1354,9 +1354,9 @@ nextToken(); /* step past the first token */ first = nextReal(); /* get the first token */ /* first token a string? */ - if (first->classId == TOKEN_LITERAL) { + if (first->isLiteral()) { second = nextReal(); /* get the next token */ - if (second->classId == TOKEN_EOC) {/* literal the only token? */ + if (second->isEndOfClause()) { /* literal the only token? */ /* could have "options 'ETMODE'" or */ /* "options 'NOETMODE'" */ value = first->value; /* get the literal value */ @@ -1420,7 +1420,7 @@ for (;;) { /* loop through for multiple keywords*/ token = nextReal(); /* get a token */ /* not a symbol here? */ - if (token->classId != TOKEN_SYMBOL) + if (!token->isSymbol()) /* this is an error */ report_error(Error_Symbol_expected_parse); /* resolve the keyword */ @@ -1464,7 +1464,7 @@ case SUBKEY_VAR: /* PARSE VAR name instruction */ token = nextReal(); /* get the next token */ /* not a symbol token */ - if (token->classId != TOKEN_SYMBOL) + if (!token->isSymbol()) /* this is an error */ report_error(Error_Symbol_expected_var); /* get the variable retriever */ @@ -1480,7 +1480,7 @@ this->saveObject(expression); /* protecting in the saveTable is better for large PARSE statements */ token = nextToken(); /* get the terminator */ - if (token->classId != TOKEN_SYMBOL || this->subKeyword(token) != SUBKEY_WITH) + if (!token->isSymbol() || this->subKeyword(token) != SUBKEY_WITH) /* got another error */ report_error(Error_Invalid_template_with); break; @@ -1500,7 +1500,7 @@ for (;;) { /* while still in the template */ /* found the end? */ - if (token->classId == TOKEN_EOC) { + if (token->isEndOfClause()) { /* string trigger, null target */ trigger = new (variableCount) RexxTrigger(TRIGGER_END, (RexxObject *)OREF_NULL, variableCount, variables); variableCount = 0; /* have a new set of variables */ @@ -1561,7 +1561,7 @@ templateCount++; /* add this one in */ } /* have a symbol? */ - else if (token->classId == TOKEN_SYMBOL) { + else if (token->isSymbol()) { /* non-variable symbol? */ if (token->subclass != SYMBOL_CONSTANT) /* this is invalid */ @@ -1575,7 +1575,7 @@ templateCount++; /* step the counter */ } /* at the end? */ - else if (token->classId == TOKEN_EOC) + else if (token->isEndOfClause()) /* report the missing piece */ report_error(Error_Invalid_template_missing); else @@ -1657,8 +1657,8 @@ token = nextReal(); /* get the next token */ variableCount = 0; /* no variables allocated yet */ - if (token->classId != TOKEN_EOC) { /* potentially PROCEDURE EXPOSE? */ - if (token->classId != TOKEN_SYMBOL)/* not a symbol? */ + if (!token->isEndOfClause()) { /* potentially PROCEDURE EXPOSE? */ + if (!token->isSymbol())/* not a symbol? */ /* must be a symbol here */ report_error_token(Error_Invalid_subkeyword_procedure, token); /* not the EXPOSE keyword? */ @@ -1720,7 +1720,7 @@ this->saveObject(saveQueue); /* protect it */ token = nextReal(); /* get the next token */ /* no target specified or have a */ - if (token->classId != TOKEN_SYMBOL) /* bad token type? */ + if (!token->isSymbol()) /* bad token type? */ /* this is an error */ report_error(Error_Symbol_expected_raise); condition = token->value; /* use the condition string value */ @@ -1744,7 +1744,7 @@ case CONDITION_USER: /* CONDITION USER usercondition */ token = nextReal(); /* get the next token */ /* bad token type? */ - if (token->classId != TOKEN_SYMBOL) + if (!token->isSymbol()) /* this is an error */ report_error(Error_Symbol_expected_user); condition = token->value; /* get the token string value */ @@ -1770,8 +1770,8 @@ break; } token = nextReal(); /* get the next token */ - while (token->classId != TOKEN_EOC) {/* while still more to process */ - if (token->classId != TOKEN_SYMBOL)/* not a symbol token? */ + while (!token->isEndOfClause()) {/* while still more to process */ + if (!token->isSymbol())/* not a symbol token? */ /* this is an error */ report_error_token(Error_Invalid_subkeyword_raiseoption, token); keyword = this->subKeyword(token); /* get the keyword value */ @@ -1917,14 +1917,14 @@ // depending on the form used. RexxToken *token = nextReal(); // easy version, no LABEL. - if (token->classId == TOKEN_EOC) + if (token->isEndOfClause()) { // just a simple SELECT type RexxObject *newObject = new_instruction(SELECT, Select); new ((void *)newObject) RexxInstructionSelect(); return (RexxInstruction *)newObject; } - else if (token->classId != TOKEN_SYMBOL) + else if (!token->isSymbol()) { // not a LABEL keyword, this is bad report_error_token(Error_Invalid_data_select, token); @@ -1939,7 +1939,7 @@ // ok, get the label now token = nextReal(); // this is required, and must be a symbol - if (token->classId != TOKEN_SYMBOL) + if (!token->isSymbol()) { report_error(Error_Symbol_expected_LABEL); } @@ -1947,7 +1947,7 @@ RexxString *label = token->value; token = nextReal(); // this must be the end of the clause - if (token->classId != TOKEN_EOC) + if (!token->isEndOfClause()) { report_error_token(Error_Invalid_data_select, token); } @@ -1979,18 +1979,18 @@ condition = OREF_NULL; /* and no condition */ flags = 0; /* no flags */ token = nextReal(); /* get the next token */ - if (token->classId == TOKEN_EOC) /* no target specified? */ + if (token->isEndOfClause()) /* no target specified? */ /* this is an error */ report_error(Error_Symbol_or_string_signal); /* implicit value form? */ - else if (token->classId != TOKEN_SYMBOL && token->classId != TOKEN_LITERAL) { + else if (!token->isSymbolOrLiteral()) { previousToken(); /* step back a token */ /* go process the expression */ expression = (RexxObject *)this->expression(TERM_EOC); } else { /* have a real target */ /* may have to process ON/OFF forms */ - if (token->classId == TOKEN_SYMBOL) { + if (token->isSymbol()) { /* check for the subkeywords */ keyword = this->subKeyword(token); if (keyword == SUBKEY_ON) { /* SIGNAL ON instruction? */ @@ -1998,7 +1998,7 @@ token = nextReal(); /* get the next token */ /* no condition specified or not a */ /* symbol? */ - if (token->classId != TOKEN_SYMBOL) + if (!token->isSymbol()) /* this is an error */ report_error(Error_Symbol_expected_on); /* get the condition involved */ @@ -2012,7 +2012,7 @@ token = nextReal(); /* get the next token */ /* no condition specified or not a */ /* symbol? */ - if (token->classId != TOKEN_SYMBOL) + if (!token->isSymbol()) /* this is an error */ report_error(Error_Symbol_expected_user); name = token->value; /* set the default target */ @@ -2027,9 +2027,9 @@ } token = nextReal(); /* get the next token */ /* anything real here? */ - if (token->classId != TOKEN_EOC) { + if (!token->isEndOfClause()) { /* not a symbol? */ - if (token->classId != TOKEN_SYMBOL) + if (!token->isSymbol()) /* this is an error */ report_error_token(Error_Invalid_subkeyword_signalonname, token); /* not the name token? */ @@ -2038,13 +2038,13 @@ report_error_token(Error_Invalid_subkeyword_signalonname, token); token = nextReal(); /* get the next token */ /* not got a symbol here? */ - if (token->classId != TOKEN_SYMBOL && token->classId != TOKEN_LITERAL) + if (!token->isSymbolOrLiteral()) /* this is an error */ report_error(Error_Symbol_or_string_name); name = token->value; /* set the new target location */ token = nextReal(); /* get the next token */ /* must have the clause end here */ - if (token->classId != TOKEN_EOC) + if (!token->isEndOfClause()) /* this is an error */ report_error_token(Error_Invalid_data_name, token); } @@ -2054,7 +2054,7 @@ token = nextReal(); /* get the next token */ /* no condition specified or not a */ /* symbol? */ - if (token->classId != TOKEN_SYMBOL) + if (!token->isSymbol()) /* this is an error */ report_error(Error_Symbol_expected_off); /* get the condition involved */ @@ -2068,7 +2068,7 @@ token = nextReal(); /* get the next token */ /* no condition specified or not a */ /* symbol? */ - if (token->classId != TOKEN_SYMBOL) + if (!token->isSymbol()) /* this is an error */ report_error(Error_Symbol_expected_user); condition = token->value; /* get the token string value */ @@ -2081,7 +2081,7 @@ condition = token->value; /* set the condition name */ token = nextReal(); /* get the next token */ /* must have the clause end here */ - if (token->classId != TOKEN_EOC) + if (!token->isEndOfClause()) /* this is an error */ report_error_token(Error_Invalid_data_condition, token); } @@ -2097,7 +2097,7 @@ name = token->value; /* set the signal target */ token = nextReal(); /* step to the next token */ /* not the end? */ - if (token->classId != TOKEN_EOC) + if (!token->isEndOfClause()) /* have an error */ report_error_token(Error_Invalid_data_signal, token); } @@ -2105,7 +2105,7 @@ else { /* signal with a string target */ name = token->value; /* set the signal target */ token = nextReal(); /* step to the next token */ - if (token->classId != TOKEN_EOC) /* not the end? */ + if (!token->isEndOfClause()) /* not the end? */ /* have an error */ report_error_token(Error_Invalid_data_signal, token); } @@ -2154,9 +2154,9 @@ debug_flags = 0; /* no debug flags */ expression = OREF_NULL; /* not expression form */ token = nextReal(); /* get the next token */ - if (token->classId != TOKEN_EOC) { /* more than just TRACE? */ + if (!token->isEndOfClause()) { /* more than just TRACE? */ /* is this a symbol? */ - if (token->classId == TOKEN_SYMBOL) { + if (token->isSymbol()) { /* TRACE VALUE expr? */ if (this->subKeyword(token) == SUBKEY_VALUE) { /* process the expression */ @@ -2169,7 +2169,7 @@ value = token->value; /* get the string value */ token = nextReal(); /* get the next token */ /* end of the instruction? */ - if (token->classId != TOKEN_EOC) + if (!token->isEndOfClause()) /* this is an error */ report_error_token(Error_Invalid_data_trace, token); /* convert the value */ @@ -2188,7 +2188,7 @@ else if (token->isLiteral()) { /* is this a string? */ value = token->value; /* get the string value */ token = nextReal(); /* get the next token */ - if (token->classId != TOKEN_EOC) /* end of the instruction? */ + if (!token->isEndOfClause()) /* end of the instruction? */ /* this is an error */ report_error_token(Error_Invalid_data_trace, token); /* convert the value */ @@ -2209,12 +2209,12 @@ debug_flags |= trace_notrace; /* turn on the notrace flag */ setting = 0; /* indicate a debug version */ token = nextReal(); /* get the next token */ - if (token->classId == TOKEN_EOC) /* end of the instruction? */ + if (token->isEndOfClause()) /* end of the instruction? */ /* this is an error */ report_error_token(Error_Invalid_expression_general, token); value = token->value; /* get the string value */ token = nextReal(); /* get the next token */ - if (token->classId != TOKEN_EOC) /* end of the instruction? */ + if (!token->isEndOfClause()) /* end of the instruction? */ /* this is an error */ report_error(Error_Invalid_data_trace); /* convert the value */ @@ -2278,7 +2278,7 @@ bool allowOptionals = false; // we don't allow trailing optionals unless the list ends with "..." // keep processing tokens to the end - while (token->classId != TOKEN_EOC) + while (!token->isEndOfClause()) { // this could be a token to skip a variable if (token->classId == TOKEN_COMMA) @@ -2295,7 +2295,7 @@ else // something real. This could be a single symbol or a message term { // we might have an ellipsis (...) on the end of the list meaning stop argument checking at that point - if (token->classId == TOKEN_SYMBOL) + if (token->isSymbol()) { // is this an ellipsis symbol? if (token->value->strCompare(CHAR_ELLIPSIS)) @@ -2304,7 +2304,7 @@ allowOptionals = true; // but we still need to make sure it's at the end token = nextReal(); - if (token->classId != TOKEN_EOC) + if (!token->isEndOfClause()) { report_error(Error_Translation_use_strict_ellipsis); } @@ -2324,7 +2324,7 @@ variableCount++; token = nextReal(); // a terminator takes us out. We need to keep all 3 lists in sync with dummy entries. - if (token->classId == TOKEN_EOC) + if (token->isEndOfClause()) { defaults_list->push(OREF_NULL); break; @@ -2357,7 +2357,7 @@ // step to the next token token = nextReal(); // a terminator takes us out. We need to keep all 3 lists in sync with dummy entries. - if (token->classId == TOKEN_EOC) + if (token->isEndOfClause()) { break; } Modified: sandbox/rick/warnings/kernel/parser/KeywordConstants.cpp =================================================================== --- sandbox/rick/warnings/kernel/parser/KeywordConstants.cpp 2007-10-19 21:47:48 UTC (rev 1028) +++ sandbox/rick/warnings/kernel/parser/KeywordConstants.cpp 2007-10-19 23:21:44 UTC (rev 1029) @@ -376,7 +376,7 @@ /******************************************************************************/ { // not a symbol? not a keyword - if (token->classId != TOKEN_SYMBOL) + if (!token->isSymbol()) { return 0; } @@ -390,7 +390,7 @@ /****************************************************************************/ { // not a symbol? not a keyword - if (token->classId != TOKEN_SYMBOL) + if (!token->isSymbol()) { return 0; } @@ -404,7 +404,7 @@ /****************************************************************************/ { // not a symbol? not a keyword - if (token->classId != TOKEN_SYMBOL) + if (!token->isSymbol()) { return 0; } @@ -429,7 +429,7 @@ /****************************************************************************/ { // not a symbol? not a keyword - if (token->classId != TOKEN_SYMBOL) + if (!token->isSymbol()) { return 0; } @@ -443,7 +443,7 @@ /****************************************************************************/ { // not a symbol? not a keyword - if (token->classId != TOKEN_SYMBOL) + if (!token->isSymbol()) { return 0; } @@ -457,7 +457,7 @@ /****************************************************************************/ { // not a symbol? not a keyword - if (token->classId != TOKEN_SYMBOL) + if (!token->isSymbol()) { return 0; } @@ -471,7 +471,7 @@ /****************************************************************************/ { // not a symbol? not a keyword - if (token->classId != TOKEN_SYMBOL) + if (!token->isSymbol()) { return 0; } Modified: sandbox/rick/warnings/kernel/parser/SourceFile.cpp =================================================================== --- sandbox/rick/warnings/kernel/parser/SourceFile.cpp 2007-10-19 21:47:48 UTC (rev 1028) +++ sandbox/rick/warnings/kernel/parser/SourceFile.cpp 2007-10-19 23:21:44 UTC (rev 1029) @@ -692,7 +692,7 @@ return; /* we're finished */ } /* is this the end of the clause? */ - if (token->classId != TOKEN_EOC) + if (!token->isEndOfClause()) break; /* we've got what we need */ this->clause->newClause(); /* reset the clause object */ } @@ -707,7 +707,7 @@ token = this->sourceNextToken(token); /* get this tokens location */ token->getLocation(&token_location); - if (token->classId == TOKEN_EOC) /* end of the clause now? */ + if (token->isEndOfClause()) /* end of the clause now? */ break; /* hit the physical end of clause */ } /* copy over the ending information */ @@ -1591,7 +1591,7 @@ this->flags &= ~requires_allowed;/* ::REQUIRES no longer valid */ token = nextReal(); /* get the next token */ /* not a symbol or a string */ - if (token->classId != TOKEN_SYMBOL && token->classId != TOKEN_LITERAL) + if (!token->isSymbolOrLiteral()) { /* report an error */ report_error(Error_Symbol_or_string_class); @@ -1630,10 +1630,10 @@ { /* now loop on the option keywords */ token = nextReal(); /* get the next token */ /* reached the end? */ - if (token->classId == TOKEN_EOC) + if (token->isEndOfClause()) break; /* get out of here */ /* not a symbol token? */ - else if (token->classId != TOKEN_SYMBOL) + else if (!token->isSymbol()) /* report an error */ report_error_token(Error_Invalid_subkeyword_class, token); else @@ -1649,7 +1649,7 @@ report_error_token(Error_Invalid_subkeyword_class, token); token = nextReal(); /* get the next token */ /* not a symbol or a string */ - if (token->classId != TOKEN_SYMBOL && token->classId != TOKEN_LITERAL) + if (!token->isSymbolOrLiteral()) /* report an error */ report_error_token(Error_Symbol_or_string_metaclass, token); metaclass = token->value;/* external name is token value */ @@ -1685,7 +1685,7 @@ subclass = true; /* turn on the seen flag */ token = nextReal(); /* get the next token */ /* not a symbol or a string */ - if (token->classId != TOKEN_SYMBOL && token->classId != TOKEN_LITERAL) + if (!token->isSymbolOrLiteral()) /* report an error */ report_error(Error_Symbol_or_string_subclass); /* set the subclass information */ @@ -1699,7 +1699,7 @@ subclass = true; /* turn on the seen flag */ token = nextReal(); /* get the next token */ /* not a symbol or a string */ - if (token->classId != TOKEN_SYMBOL && token->classId != TOKEN_LITERAL) + if (!token->isSymbolOrLiteral()) /* report an error */ report_error(Error_Symbol_or_string_mixinclass); /* set the subclass information */ @@ -1713,15 +1713,15 @@ case SUBDIRECTIVE_INHERIT: token = nextReal(); /* get the next token */ /* nothing after the keyword? */ - if (token->classId == TOKEN_EOC) + if (token->isEndOfClause()) /* report an error */ report_error_token(Error_Symbol_or_string_inherit, token); /* add an inherits list */ this->active_class->put(new_list(), CLASS_INHERIT); - while (token->classId != TOKEN_EOC) + while (!token->isEndOfClause()) { /* not a symbol or a string */ - if (token->classId != TOKEN_SYMBOL && token->classId != TOKEN_LITERAL) + if (!token->isSymbolOrLiteral()) /* report an error */ report_error_token(Error_Symbol_or_string_inherit, token); /* add to the inherit list */ @@ -1757,7 +1757,7 @@ RexxString *externalname = OREF_NULL; /* not an external method yet */ /* not a symbol or a string */ - if (token->classId != TOKEN_SYMBOL && token->classId != TOKEN_LITERAL) + if (!token->isSymbolOrLiteral()) { /* report an error */ report_error_token(Error_Symbol_or_string_method, token); @@ -1769,12 +1769,12 @@ { /* now loop on the option keywords */ token = nextReal(); /* get the next token */ /* reached the end? */ - if (token->classId == TOKEN_EOC) + if (token->isEndOfClause()) { break; /* get out of here */ } /* not a symbol token? */ - else if (token->classId != TOKEN_SYMBOL) + else if (!token->isSymbol()) { /* report an error */ report_error_token(Error_Invalid_subkeyword_method, token); @@ -1809,7 +1809,7 @@ } token = nextReal(); /* get the next token */ /* not a string? */ - if (token->classId != TOKEN_SYMBOL && token->classId != TOKEN_LITERAL) + if (!token->isSymbolOrLiteral()) { /* report an error */ report_error_token(Error_Symbol_or_string_requires, token); @@ -2075,7 +2075,7 @@ RexxToken *token = nextReal(); /* get the next token */ /* not a symbol or a string */ - if (token->classId != TOKEN_SYMBOL && token->classId != TOKEN_LITERAL) + if (!token->isSymbolOrLiteral()) { /* report an error */ report_error_token(Error_Symbol_or_string_method, token); @@ -2087,12 +2087,12 @@ { /* now loop on the option keywords */ token = nextReal(); /* get the next token */ /* reached the end? */ - if (token->classId == TOKEN_EOC) + if (token->isEndOfClause()) { break; /* get out of here */ } /* not a symbol token? */ - else if (token->classId != TOKEN_SYMBOL) + else if (!token->isSymbol()) { /* report an error */ report_error_token(Error_Invalid_subkeyword_method, token); @@ -2427,7 +2427,7 @@ this->flags &= ~requires_allowed;/* ::REQUIRES no longer valid */ RexxToken *token = nextReal(); /* get the next token */ /* not a symbol or a string */ - if (token->classId != TOKEN_SYMBOL && token->classId != TOKEN_LITERAL) + if (!token->isSymbolOrLiteral()) /* report an error */ report_error_token(Error_Symbol_or_string_routine, token); RexxString *name = token->value; /* get the routine name */ @@ -2441,10 +2441,10 @@ for (;;) { /* now loop on the option keywords */ token = nextReal(); /* get the next token */ /* reached the end? */ - if (token->classId == TOKEN_EOC) + if (token->isEndOfClause()) break; /* get out of here */ /* not a symbol token? */ - else if (token->classId != TOKEN_SYMBOL) + else if (!token->isSymbol()) /* report an error */ report_error_token(Error_Invalid_subkeyword_routine, token); /* process each sub keyword */ @@ -2458,7 +2458,7 @@ report_error_token(Error_Invalid_subkeyword_class, token); token = nextReal(); /* get the next token */ /* not a string? */ - if (token->classId != TOKEN_SYMBOL && token->classId != TOKEN_LITERAL) + if (!token->isSymbolOrLiteral()) { /* report an error */ report_error_token(Error_Symbol_or_string_requires, token); @@ -2572,7 +2572,7 @@ } RexxToken *token = nextReal(); /* get the next token */ /* not a symbol or a string */ - if (token->classId != TOKEN_SYMBOL && token->classId != TOKEN_LITERAL) + if (!token->isSymbolOrLiteral()) { /* report an error */ report_error_token(Error_Symbol_or_string_requires, token); @@ -2581,7 +2581,7 @@ RexxString *name = token->value; /* get the requires name */ RexxString *internalname = name; /* get the name form */ token = nextReal(); /* get the next token */ - if (token->classId != TOKEN_EOC) /* something appear after this? */ + if (!token->isEndOfClause()) /* something appear after this? */ { /* this is a syntax error */ report_error_token(Error_Invalid_subkeyword_requires, token); @@ -2608,7 +2608,7 @@ /* have an error here */ report_error(Error_Translation_bad_directive); token = nextReal(); /* get the keyword token */ - if (token->classId != TOKEN_SYMBOL) /* not a symbol? */ + if (!token->isSymbol()) /* not a symbol? */ /* have an error here */ report_error(Error_Symbol_expected_directive); @@ -2803,21 +2803,21 @@ case KEYWORD_IF: /* start of an IF instruction */ token = nextReal(); /* get the terminator token */ /* have a terminator before the THEN?*/ - if (token->classId == TOKEN_EOC) { + if (token->isEndOfClause()) { this->nextClause(); /* get the next physical clause */ if (this->flags&no_clause) /* get an end-of-file? */ /* raise an error */ report_error_line(Error_Then_expected_if, instruction); token = nextReal(); /* get the first token */ /* not a THEN keyword? */ - if (token->classId != TOKEN_SYMBOL || this->keyword(token) != KEYWORD_THEN) + if (!token->isSymbol() || this->keyword(token) != KEYWORD_THEN) /* have an error */ report_error_line(Error_Then_expected_if, instruction); /* create a new then clause */ second = this->thenNew(token, (RexxInstructionIf *)instruction); token = nextReal(); /* get token after THEN keyword */ /* terminator here? */ - if (token->classId == TOKEN_EOC) { + if (token->isEndOfClause()) { this->nextClause(); /* get the next physical clause */ if (this->flags&no_clause) /* get an end-of-file? */ /* raise an error */ @@ -2833,7 +2833,7 @@ second = this->thenNew(token, (RexxInstructionIf *)instruction); token = nextReal(); /* get token after THEN keyword */ /* terminator here? */ - if (token->classId == TOKEN_EOC) { + if (token->isEndOfClause()) { this->nextClause(); /* get the next physical clause */ if (this->flags&no_clause) /* get an end-of-file? */ /* raise an error */ @@ -2861,7 +2861,7 @@ ((RexxInstructionEndIf *)second)->setEndInstruction((RexxInstructionEndIf *)instruction); token = nextReal(); /* get the next token */ /* have an ELSE keyword alone? */ - if (token->classId == TOKEN_EOC) { + if (token->isEndOfClause()) { this->nextClause(); /* get the next physical clause */ if (this->flags&no_clause) /* get an end-of-file? */ /* raise an error */ @@ -2884,7 +2884,7 @@ this->pushDo(instruction); /* add this to the control queue */ token = nextReal(); /* get the next token */ /* OTHERWISE instr form? */ - if (token->classId != TOKEN_EOC) { + if (!token->isEndOfClause()) { previousToken(); /* step back a token */ trimClause(); /* make this start of the clause */ continue; /* straight around to process clause */ @@ -3002,7 +3002,7 @@ instruction = this->labelNew(); /* create a label instruction */ second = nextToken(); /* get the next token */ /* not the end of the clause? */ - if (second->classId != TOKEN_EOC) + if (!second->isEndOfClause()) { previousToken(); /* give this token back */ trimClause(); /* make this start of the clause */ @@ -3012,7 +3012,7 @@ } // this is potentially an assignment of the form "symbol = expr" - if (first->classId == TOKEN_SYMBOL) + if (first->isSymbol()) { // "symbol == expr" is considered an error if (second->subclass == OPERATOR_STRICT_EQUAL) @@ -3049,7 +3049,7 @@ if (term != OREF_NULL) { // if parsing the message term consumed everything, this is a message instruction - if (second... [truncated message content] |