All pastes #61859 Raw Edit

Miscellany

public text v1 · immutable
#61859 ·published 2006-06-04 21:08 UTC
rendered paste body
import 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("/");
	
}