public void toCMatchCode(){
		boolean debugC = false;
		int numOfTabs = 0;

			Set<State> states = this.getStates();
			Set<State> acceptStates = this.getAcceptStates();
			printCodeLine(numOfTabs, "int stranger_match(char str[]){");
			numOfTabs++;
			printCodeLine(numOfTabs, "int i = 0; int state = "+this.initial.id+";");
			printCodeLine(numOfTabs, "while (i < strlen(str)){");
			numOfTabs++;
			if (debugC)
				printCodeLine(numOfTabs, "printf(\"in state  =  %d,   char =  %c\" , state, str[i]) ;");
			printCodeLine(numOfTabs, "k = str[i];");
			printCodeLine(numOfTabs, "switch (state){");
			numOfTabs++;
			for (State state : states){
				if (state.accept)
					acceptStates.add(state);
				printCodeLine(numOfTabs, "case "+state.id +":");
				numOfTabs++;
				boolean first = true;
				String ifStmt;
				for (Transition tr: state.transitions){
					if (first){
						first = false;
						ifStmt =  "if ";
					}else{
						ifStmt =  "} else if ";
					}
					printCodeLine(numOfTabs, ifStmt + "(k <= "+ ((int)tr.max) +" && k >= " + ((int)tr.min) + " ){ ");
					numOfTabs++;
					printCodeLine(numOfTabs, "state = " + tr.to.id +";");
					numOfTabs--;
				}
				printCodeLine(numOfTabs, "}");
				printCodeLine(numOfTabs, "i++;");
				printCodeLine(numOfTabs, "break;");
				numOfTabs--;
			}
			// end of switch
			numOfTabs--;
			printCodeLine(numOfTabs, "}");
			if (debugC)
				printCodeLine(numOfTabs, "printf(\"out state  =  %d\", state) ;");
			// end of while
			numOfTabs--;
			printCodeLine(numOfTabs, "}");
			// building accept states array
			String temp = "int accept[" +acceptStates.size()+"] = {";
			boolean first = true;
			for (State s: acceptStates){
				if(first)
					first = false;
				else
					temp += ", ";
				temp += s.id;
			}
			printCodeLine(numOfTabs, temp + "};");
			printCodeLine(numOfTabs, "for (i = 0; i< "+acceptStates.size()+"; i++)");
			numOfTabs++;
			printCodeLine(numOfTabs, "if (state == accept[i])");
			numOfTabs++;
			printCodeLine(numOfTabs, "return 1;");
			numOfTabs--;
			numOfTabs--;
			printCodeLine(numOfTabs, "return 0;");
			numOfTabs--;
			// end of function
			printCodeLine(numOfTabs, "}");		
	}