/[cvs]/Parser/RunParser.java
ViewVC logotype

Contents of /Parser/RunParser.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (vendor branch)
Thu Nov 17 09:23:43 2005 UTC (18 years, 5 months ago) by bmildh
Branch: MAIN, bmildh
CVS Tags: start, HEAD
Changes since 1.1: +0 -0 lines
First import

1 /*
2 * RunParser.java
3 *
4 * Teoretisk Datalogi,
5 * Malmö Högskola
6 */
7 import java.io.*;
8
9 public class RunParser
10 {
11
12 public static void main(String args[])
13
14 {
15 System.out.println("");
16 System.out.println("RunParser, 1.0");
17 System.out.println("Written and maintained by Benny C. Mildh, <benny@mildh.net>");
18
19 String input = inputParser();
20 }
21
22 private static String inputParser()
23 {
24 boolean keepRunning = true;
25
26 System.out.println("");
27 System.out.print("Evaluate: ");
28 InputStreamReader inputStreamReader = new InputStreamReader(System.in);
29 BufferedReader inputBuffer = new BufferedReader(inputStreamReader);
30 System.out.println("");
31
32 String parserData = null;
33 try
34 {
35 parserData = inputBuffer.readLine();
36 parserData.trim();
37 }
38 catch(IOException ex)
39 {
40 System.err.println(ex);
41 System.exit(1); // abnormal termination
42 }
43 finally
44 {
45 try
46 {
47 inputBuffer.close();
48 }
49 catch(IOException ex)
50 {
51 System.err.println(ex);
52 }
53 }
54
55 return parserData;
56 }
57 }
58
59

root@recompile.se
ViewVC Help
Powered by ViewVC 1.1.26