private void endCurrentLineOfTLA(){
  if (tlacodeNextLine.length() != 0) {
    tlacode.addElement(tlacodeNextLine);
    mappingVector.addElement(mappingVectorNextLine);
    tlacodeNextLine="";
    mappingVectorNextLine=new Vector();
  }
 else {
    if (mappingVectorNextLine.size() != 0) {
      Vector lastLine=(Vector)mappingVector.elementAt(mappingVector.size() - 1);
      for (int i=0; i < mappingVectorNextLine.size(); i++) {
        MappingObject obj=(MappingObject)mappingVectorNextLine.elementAt(i);
        if (obj.getType() == MappingObject.RIGHT_PAREN || obj.getType() == MappingObject.LEFT_PAREN || obj.getType() == MappingObject.BREAK) {
          lastLine.add(obj);
        }
 else {
          PcalDebug.ReportBug("PcalTLAGen.endCurrentLineOfTLA found problem.");
        }
        mappingVectorNextLine=new Vector();
      }
    }
  }
}

private void endCurrentLineOfTLA ( ) { if ( tlacodeNextLine . length ( ) != 0 ) { tlacode . addElement ( tlacodeNextLine ) ; mappingVector . addElement ( mappingVectorNextLine ) ; tlacodeNextLine = "" ; mappingVectorNextLine = new Vector ( ) ; } else { if ( mappingVectorNextLine . size ( ) != 0 ) { Vector lastLine = ( Vector ) mappingVector . elementAt ( mappingVector . size ( ) - 1 ) ; for ( int i = 0 ; i < mappingVectorNextLine . size ( ) ; i ++ ) { MappingObject obj = ( MappingObject ) mappingVectorNextLine . elementAt ( i ) ; if ( obj . getType ( ) == MappingObject . RIGHT_PAREN || obj . getType ( ) == MappingObject . LEFT_PAREN || obj . getType ( ) == MappingObject . BREAK ) { lastLine . add ( obj ) ; } else { PcalDebug . ReportBug ( "PcalTLAGen.endCurrentLineOfTLA found problem." ) ; } mappingVectorNextLine = new Vector ( ) ; } } } }
if tlacodenextline does not equal " " , then add it to tlacode and add mappingvectornextline to mappingvector . if it does equal " " , don ' t add any lines , but add any potentially legal leftovers in mappingvectornextline to the previous line .
