private int nextChar() throws RsParsingException {
      int value;
      if(lineFeedTrigger){
         lineCount++;
         lineFeedTrigger=false;
      }
      if(pushBackValue>0){
         value=pushBackValue;
         pushBackValue=0;
      }else{
         try {
            value=reader.read();
         }catch(IOException e){
            throw gripe(e.toString());
         }
      }
      if(value=='\r'){
         // if it's a CR-LF, eat the LF
         try{
            value=reader.read();
         }catch(IOException e){
            throw gripe(e.toString());
         }
         if(value!='\n')
            pushBackValue=value;
         lineFeedTrigger=true;
         value='\n';
      }else if(value=='\n'){
         lineFeedTrigger=true;
      }
      return value;
   }