qse/ase/test/awk/Awk.java

73 lines
1.1 KiB
Java
Raw Normal View History

2006-10-24 06:06:16 +00:00
/*
2006-11-25 15:51:57 +00:00
* $Id: Awk.java,v 1.10 2006-11-25 15:51:57 bacon Exp $
2006-10-24 06:06:16 +00:00
*/
package ase.test.awk;
2006-11-24 13:25:12 +00:00
public class Awk extends ase.awk.StdAwk
2006-10-24 06:06:16 +00:00
{
2006-11-22 15:12:04 +00:00
private String[] cin;
private int cin_no;
private String[] cout;
private int cout_no;
2006-10-24 06:06:16 +00:00
public Awk () throws ase.awk.Exception
{
super ();
2006-11-24 13:25:12 +00:00
}
2006-11-22 15:12:04 +00:00
2006-11-24 13:25:12 +00:00
protected String[] getInputConsoleNames ()
{
String[] cin = new String[3];
2006-11-22 15:12:04 +00:00
cin[0] = "c1.txt";
cin[1] = "c2.txt";
cin[2] = "c3.txt";
2006-11-24 13:25:12 +00:00
return cin;
}
2006-11-22 15:12:04 +00:00
2006-11-24 13:25:12 +00:00
protected String[] getOutputConsoleNames ()
{
String[] cout = new String[3];
2006-11-23 03:31:58 +00:00
cout[0] = "c4.txt";
cout[1] = "c5.txt";
cout[2] = "";
2006-11-24 13:25:12 +00:00
return cout;
2006-10-24 06:06:16 +00:00
}
2006-11-24 15:37:29 +00:00
protected String[] getSourceNames ()
2006-10-24 06:06:16 +00:00
{
2006-11-24 15:37:29 +00:00
String[] cout = new String[1];
cout[0] = "t.awk";
return cout;
2006-10-24 06:06:16 +00:00
}
2006-11-25 15:51:57 +00:00
/*
protected String getDeparsedSourceName ()
{
return "";
}
*/
2006-10-24 06:06:16 +00:00
public static void main (String[] args)
{
Awk awk = null;
try
{
awk = new Awk ();
awk.parse ();
awk.run ();
}
catch (ase.awk.Exception e)
{
System.out.println ("ase.awk.Exception - " + e.getMessage());
}
finally
{
if (awk != null) awk.close ();
}
}
}