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