def addQuoteWord(evaluatorWords, word):
 if (len(word) < 2):
  evaluatorWords.append(word)
  return
 firstCharacter = word[0]
 if (firstCharacter == '$'):
  dotIndex = word.find('.', 1)
  if (dotIndex > (-1)):
   evaluatorWords.append(word[:dotIndex])
   evaluatorWords.append(word[dotIndex:])
   return
 if ((firstCharacter != '"') and (firstCharacter != "'")):
  evaluatorWords.append(word)
  return
 nextQuoteIndex = word.find(firstCharacter, 1)
 if ((nextQuoteIndex < 0) or (nextQuoteIndex == (len(word) - 1))):
  evaluatorWords.append(word)
  return
 nextQuoteIndex += 1
 evaluatorWords.append(word[:nextQuoteIndex])
 evaluatorWords.append(word[nextQuoteIndex:])

def addQuoteWord ( evaluatorWords , word ) : if ( len ( word ) < 2 ) : evaluatorWords . append ( word ) return firstCharacter = word [ 0 ] if ( firstCharacter == '$' ) : dotIndex = word . find ( '.' , 1 ) if ( dotIndex > ( - 1 ) ) : evaluatorWords . append ( word [ : dotIndex ] ) evaluatorWords . append ( word [ dotIndex : ] ) return if ( ( firstCharacter != '"' ) and ( firstCharacter != "'" ) ) : evaluatorWords . append ( word ) return nextQuoteIndex = word . find ( firstCharacter , 1 ) if ( ( nextQuoteIndex < 0 ) or ( nextQuoteIndex == ( len ( word ) - 1 ) ) ) : evaluatorWords . append ( word ) return nextQuoteIndex += 1 evaluatorWords . append ( word [ : nextQuoteIndex ] ) evaluatorWords . append ( word [ nextQuoteIndex : ] )
add quote word and remainder if the word starts with a quote character or dollar sign .