def parseLineReplace(firstWordTable, line, output):
 firstWord = gcodec.getFirstWordFromLine(line)
 if (firstWord in firstWordTable):
  line = firstWordTable[firstWord]
 gcodec.addLineAndNewlineIfNecessary(line, output)

def parseLineReplace ( firstWordTable , line , output ) : firstWord = gcodec . getFirstWordFromLine ( line ) if ( firstWord in firstWordTable ) : line = firstWordTable [ firstWord ] gcodec . addLineAndNewlineIfNecessary ( line , output )
parse the line and replace it if the first word of the line is in the first word table .