public static void runwpfile(String filename)
 {
	 System.out.println(filename);
	 StringBuilder sb = new StringBuilder();
	 File file = new File(filename);
	 String res=null;
	 try {
		FileInputStream fis=new FileInputStream(file);
		int c;
		 while((c = fis.read())>=0)
		 { 
			
				sb.append((char)c);
		 }
		 res = run(sb.toString()).toString();
		 String ofString = filename.replaceAll("\\.txt$", ".rst");
		 FileOutputStream fos = new FileOutputStream(ofString);
		 fos.write(res.getBytes());
		 System.out.print("SimPL> ");
		 System.out.println(res);
		 fos.close();
		 fis.close();
	} catch (FileNotFoundException e1) {
		System.out.println("file not found!");
	}
	catch (IOException e) {
		// TODO Auto-generated catch block
		System.out.println("io error!");
	}
	 
 }