All pastes #61757 Raw Edit

Someone

public text v1 · immutable
#61757 ·published 2006-06-04 18:04 UTC
rendered paste body
import java.io.*;
import java.lang.*;

class Token
{ 
	String token = "<example>";
	
 static boolean  isLabel()
	{
	 boolean x=false;
	 int[] theString={};   // *mi vazeis vasikous typous px String,int klp san onomata metavlitwn
// prin dhlwseis vres methodo pou na epistrefei to mhkos toy string kai dhlwse me toses theseis ton pinaka kai oxi 50
		int[] str=new int[theString.length]; //* afou to kaneis pinaka vale []
		int[] f=new int[theString.length];

		int temp; //(afto mporeis na to valeis san ena int temp = str.length-1 arxikopoiimeno kateytheian alla einai ok :)
// to string na ginetai se pinaka. dhladh to string token ston pinaka str
		temp = str.length-1;
		for (int i=0; i<str.length; i++)		// ALLAKSE TO
		{
			if( str[0]=="<" && str[temp]==">")
			{
				x=true;
			}
		}//end loop
		return x;
	} //end function
	
	
	static String readLabel()
	{
		String x = null; // to null den einai ena string alla mia stathera ara de thelei ""
		boolean b ;
		int i;
		b = Token.isLabel();
//    KAI EDW
		char str[] = new char[50];      // mporeis na xrisimopoieis tis toChar() kai toString()
		char temp[] = new char[50];     // gia na to kaneis pio aftomata k na glytwseis to for
			
// to string na ginetai se pinaka. dhladh to string token ston pinaka str
		if ( b== true )
		{
// to string na ginetai se pinaka. dhladh to string token ston pinaka str
			for (i=1; i<str.length-1; i++)
			{
				temp[i-1] = str [i];
			}
			temp[i-1] = '\0';
// o pinakas na ginetai string. dhladh to temp na ginetai string kai na ekxwreitai sto x
		} //end if
			return x;
	}  //end function
		
	static boolean isEndLabel()
	{
		String x;
		boolean b = false;
		int i;
//  KAI EDW
		String str[] = new String[50];
		x = Token.readLabel();
		if (x == null)
		{
			System.out.println("einai null");
			System.exit(0);
		}
// to string na ginetai se pinaka. dhladh to string x ston pinaka str
		
		if(str[0]=="/")
		{
			b=true;
		}
		return b;
	} //end function
	
}  //end class