import java.io.*;

class ElencaToken {
  public static void main(String argv[]) throws IOException {
    AnalizzatoreLessicale yy;
    Token t;
    if (argv.length == 0) 
      yy = new AnalizzatoreLessicale(System.in);
    else
      yy = new AnalizzatoreLessicale(new FileReader(argv[0]));      
    while ((t = yy.getProssimo()) != null)
      System.out.println(t.toString());
  }
}
