import java.util.*; import java.io.*; public class Labeler { static class Com { String id,c; ArrayList toks; int idx; public Com (String ii, String cc, int iii) { c = cc; id = ii; idx = iii; } public String toString() { return "Ident: "+id+";\t\tIndex: "+idx+";\tCmd: "+c; } } static HashMap tbl = new HashMap(); static ArrayList lst = new ArrayList(); public static void main(String[] args) throws Exception { BufferedReader bf = new BufferedReader( new FileReader( args[0] )); String s; int i = 0; while ( (s = bf.readLine()) != null) { Com c = new Com( s.substring(0,s.indexOf(" ")).trim(), s.substring(s.indexOf(" ")).trim(), i ); if (c.c.indexOf(";") > -1) c.c = c.c.substring(0, c.c.indexOf(";")).trim(); lst.add(c); tbl.put(c.id,new Integer(i)); i++; //System.out.println(c); } for (i=0; i