renamed token private index member to id

an index member may be needed for the encoder, so the private member
used for detecting token leaks was renamed to m_id (the index member
did not have the 'm_' prefix anyway)
corrected issue with subscripts of array references

changed array reference subscript expression from number to integer
changed to not set reference flag of subscript tokens
changed to not attach subscript tokens to array reference tokens
updated expected results for corrections
renamed token sub-code access functions for readability

renamed setSubCodeMask() to addSubCode()
renamed clearSubCodeMask() to removeSubCode()
renamed isSubCode() to hasSubCode()
removed subCode() and setSubCode() since these were not being used
use numeric constants as data type needed (no convert codes)

when parsing numeric constants, if number will fit in an integer, then
data type is set to integer, and if number contains a decimal point or
exponent, the new double sub-code is set, however, if the number does
not fit in an integer, then data type is set to double

the union for the double and integer values in the token was removed so
that both values can be stored and be available as needed (however, a
double type constant can't be used as an integer, so a "new expected
valid integer constant" error was added for this case)

modified token data type access function to return double for an integer
constant when the double sub-code is set, but there is an optional flag
to return the actual data type

modified getExpression() to not add a convert code for constants, report
error if integer expected but constant is double (can't be converted),
or set data type of constant to data type needed and the double sub-code
is removed

modified getOperand() to set data type of integer constants if double or
integer data type operand requested and the double sub-code is removed

modified processInternalFunction() that if the function is not changed
to an associated code, then if the constant is an integer with the
double sub-code, the data type of the constant is changed to double and
the sub-code is removed

modified processDoneStackTop() to pass the token being processed (from
the top of the done stack) instead of its data type to findCode(), and
return new error ExpIntConst if findCode() returns an integer error
(invalid code returned and data type of token changed to no data type)

modified table findCode() to receive token to check instead of its data
type and set a constant token to the expected data type and remove the
double sub-code if set; for an integer expected data type, if the
constant is double (can't be converted to an integer) it is set to no
data type to indicate the error; no convert code is returned for
constant tokens

the table entries were updated for operators taking all combinations of
double and integer values where the integer/integer is the associated
code for an integer (making it the preferred operator when the first
operand is an integer); this was necessary so that integer constants
are used as integers and not unnecessarily used as a double

a new UseConstAsIs flag was added to the Power, Neg, and PrintDbl codes
to force findCode() not to set the constant data type to the expected
data type for these codes

modified token text output to add a "%" after constants that are
treated as an integer (data type was set to integer); added 'Double'
when sub-code set (should never be set on a token if translator sets
data type of constant to needed data type and removed the sub-code)

updated expected results of tests for "%" on integer constants and no
CvtDbl and CvtInt after constants; and translator added test #17
(constant test)
added index to rpn item for location within output list

this index will be needed by the encoder to determine the location of
attached items; access functions were added for the index including an
increment function needed to adjusting indexes when items are inserted
into the output list

updated outputAppend() to assign index when item appended to list
updated outputInsert() to adjust indexes of items after insert point

modified text output of RpnItem to include index of attached items;
updated expected results that were affected
renamed variables and access functions for consistency

renamed 'operand' with 'attached' in RpnItem
renamed all 'nXxx' and 'm_nXxx' to 'xxxCount' and 'm_xxxCount'
renamed all 'assoc' to 'associated' (changed '2' to 'second')
removed unused access functions
allow blank lines to be translated without error

translator was previously returning "expected command" error (test mode
never passes a blank line to the translator, but the GUI can)
removed token mode enumeration (leftover from old translator)
renamed token double value member and function

renamed valueDbl to value for consistency (generally since double is the
default data type, 'Dbl' is not included in the name)
initial encoder class implementation with code assignment step

encoder class takes RPN list from translator and assigned codes to
tokens without codes (for now just constants and variables)

constant, variable and variable reference codes added to table for each
data type with has operand flag to indicate these codes will have an
operand word after the instruction word in the program

new streamlined findCode() function added to table that sets the code of
the token, the type of the token to the type of the code, and calls the
full findCode() function

modified token text to output token string after code if code has an
operand (flag of code is set)

added encoder command line test modes, used 'c' for 'encoder' since 'e'
is already being used for 'expression'; modified test scripts to include
encoder testing; added simple initial encoder test for initial debugging
fixed associated array for variable reference codes

the variable reference code was incorrectly set to the constant
associated code array; updated expected encoder test #1 results
encoder: added position index assignment step

renamed assignCodes() to prepareTokens() since it was more efficient to
assign the position indexes in the same loop as for assigning codes
instead of a new function with the same loop and switch statements;
changed to return size of program line instead of boolean status

added index member to token to hold the program code position index;
added associated access functions

modified RPN list, item and token text functions to optionally add the
program word index to the text output; for token text output, made sure
second word was separate from first word (which may have sub-codes), and
also made REM string the operand word when outputting indexes

updated expected results for encoder test #1 for new index values and
added another multiple statement test statement
allow blank lines in encoder test input files

for file input mode, if encoder test option selected, blank lines are
passed to the encoder; updated encoder test #1 expected results, which
contains a blank line
updated files for version 0.5.0

also added some comments for future work in encoder source file
moved first two encoder steps to translator

encoder now just an empty class (which is not called)
added new translator test mode to replace expression mode flag
 - no: normal translator mode
 - expression: expression test mode
 - yes: translator test mode (don't do formal first two encoder steps)
formal encoder steps now in Translator::outputAssignCodes()
 - separate loops for assigning and counting program words
   (necessary since assigning may require codes to be inserted)
new code size added to rpn list with access functions
forced detection of identifiers with parentheses

for testing until the array and function dictionaries are implemented,
parentheses tokens are considered functions if the start with an 'f',
otherwise will be considered arrays

the expected results for many tests were updated since these tokens
are now considered arrays (with integer subscripts) so many CvtInt codes
are now inserted; plus a few new tests with 'F' parentheses tokens were
added to make sure these cases were also tested and not just arrays
changed how to determine if token code has table entry

token code now initialized to Invalid_Code
static token table array indexed by token type removed
token hasTableEntry() function replaced with hasValidCode()
table unaryCode() now takes token pointer instead of code argument
table isUnaryCode() taking code argument removed
separated associated code search from find code

created new table setTokenCode() function from parts of findCode() for
checking if the data type of the code matches the specified data type
and if not searches for an associated code with a data type that matches

added simplified setTokenCode() function for setting the code of a token
to the correct code for the data type of a base code
assign codes to constants tokens as soon as possible

findCode() assigns code for expected data type
getOperand() assigns code when specific data type is requested
processInternalFunction() assigns code when expected data type is number
getExpression() does not need to force constants to expected data type
outputAssignCodes() no longer assigns constant token codes
token type changed to Constant for constant codes
debugName() modified to catch invalid code
token text() modified to output code text (with index) or '?' in front
  of constants with invalid code (not with index)
separated cases when getting operands

in getOperand(), replaced the cases that fall through with the actual
code needed by the case (in some cases the fall through was doing checks
that had already been done or were not necessary)