Miscellany
public text v1 · immutableimport java.io.*;
import java.lang.*;
class Token
{
String token = null;
boolean isLabel(){
return (this.startsWith("<") && (this.indexOf(">")!=-1)))?true:false;
}
String readLabel(){
return (this.isLabel())?this.substring(this.indexOf("<")+1,this.indexOf(">")-1):null;
}
boolean isEndLabel(){
if (!this.readLabel()){
System.out.println("einai null");
System.exit(0);
}
return this.substring(1).startsWith("/");
}