class Attributes
{
	names[] = {
		"File_extension",
		"Protocol_custom_code",
		"Default_wordClass_folder",
		"Default_word_folder"
	};
};
minChars = 128;
class Compile
{
	clearNewLines = 0;
	rewriteFile = 1;

	class Pass
	{
		noDecompile = 1;
		//print_fsm = "%(fsmname)\n";
		print_header = "File name	Word	Class	Target folder	sort.lst	System Name A	System Name B	System ID	System Duplicate\n";
		class StateDefine
		{
			iffinal_on = 1;
			class LinksDefine
			{
				print_filename = "=IF(INDIRECT(""I""&ROW())="""";"""";TEXT(ROW()-1;""0000"")&""_%(linkname)""&"".wav"")";
				print_tabB = "	";
				print_word = "=IF(INDIRECT(""I""&ROW())="""";"""";""""""""&INDIRECT(""I""&ROW())&"""""""")";
				print_tabC = "	";
				print_wordClass = "=IF(INDIRECT(""I""&ROW())="""";"""";IF(""%(stateinit)""="""";""%(Default_wordClass_folder)"";""%(stateinit)""))";
				print_tabD = "	";
				print_folder = "=IF(INDIRECT(""I""&ROW())="""";"""";""%(condition)"")";

				print_tabE = "	";
				print_make = "=IF(INDIRECT(""I""&ROW())="""";"""";IF(""%(condition)""="""";""%(Default_word_folder)"";""%(condition)"")&"",""&TEXT(ROW()-1;""0000"")&(""_%(linkname),%(linkname)""))";
				//print_make = "=IF(INDIRECT(""I""&ROW())="""";"""";""%(condition)""&"",""&TEXT(ROW()-1;""0000"")&(""_%(linkname),%(linkname)""))";
				print_tabF = "	";
				//print_systemWord = "=IF(COUNTIF($J$2;""*""&""%(linktext)""&""*"")=0;""%(linktext)"";"""")";
				print_systemWordSubstitute = "=\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
IF(""%(action)""="""";""%(linktext)"";""%(action)"");\
""_eUNIT"";"""");\
""_eTARGETS"";"""");\
""_eGRID"";"""");\
""_eSIDE"";"""");\
""_eGRPDIS"";"""");\
""_eGRPDIR"";"""");\
""_eSENDERDIS"";"""");\
""_eSENDERDIR"";"""");\
""_eUNITDIS"";"""");\
""_eUNITDIR"";"""");\
""_eLOCDIS"";"""");\
""_eLOCDIR"";"""");\
""_eRECIPIENT"";"""");\
""_eLOC"";"""");\
""_eLEADERDIS"";"""");\
""_eLEADERDIR"";"""");\
"".1"";"""");\
"".2"";"""");\
"".3"";"""");\
"".4"";"""")\
";
				print_tabG = "	";
				print_systemWord = "=\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
SUBSTITUTE(\
INDIRECT(""$F$""&ROW());\
""_mUNIT"";"""");\
""_mGRID"";"""");\
""_mGRPDIS"";"""");\
""_mGRPDIR"";"""");\
""_mLOCDIS"";"""");\
""_mLOCDIR"";"""");\
""_mLOC"";"""");\
""_mOBJ"";"""");\
""_mOBJDIR"";"""");\
""_mRECIPIENTDIS"";"""");\
""_mRECIPIENTDIR"";"""");\
""_mLEADERDIS"";"""");\
""_mLEADERDIR"";"""");\
""_vGRID"";"""");\
""_vGRPDIS"";"""");\
""_vGRPDIR"";"""");\
""_vLOCDIS"";"""");\
""_vLOCDIR"";"""");\
""_vLOC"";"""");\
""_vOBJ"";"""");\
""_vOBJDIR"";"""");\
""_vRECIPIENTDIS"";"""");\
""_vRECIPIENTDIR"";"""");\
""_REL1"";"""");\
"".ABS"";"""");\
"".CMPS"";"""");\
"".CLCK"";"""")\
";
				print_tabH = "	";
				print_systemWordUnique = "%(linktext)%(stateinit)";
				print_tabI = "	";
				print_systemDuplicate = "=IF(COUNTIF(INDIRECT(""H2:H""&ROW());INDIRECT(""H""&ROW()))=1;INDIRECT(""G""&ROW());"""")";
				print_br = "\n";

				print_2filename =	"=IF(0%(condprecondition)<2;"""";TEXT(ROW()-1;""0000"")&""_%(linkname)""&""_2.wav"")	";
				print_2word =		"=IF(0%(condprecondition)<2;"""";INDIRECT(""B""&ROW()-1))	";
				print_2wordClass =	"=IF(0%(condprecondition)<2;"""";INDIRECT(""C""&ROW()-1))	";
				print_2folder =		"=IF(0%(condprecondition)<2;"""";INDIRECT(""D""&ROW()-1))	";
				print_2make =		"=IF(0%(condprecondition)<2;"""";""%(condition)""&"",""&TEXT(ROW()-1;""0000"")&(""_%(linkname)_2,%(linkname)_2""))\n";

				print_3filename =	"=IF(0%(condprecondition)<3;"""";TEXT(ROW()-1;""0000"")&""_%(linkname)""&""_3.wav"")	";
				print_3word =		"=IF(0%(condprecondition)<3;"""";INDIRECT(""B""&ROW()-2))	";
				print_3wordClass =	"=IF(0%(condprecondition)<3;"""";INDIRECT(""C""&ROW()-2))	";
				print_3folder =		"=IF(0%(condprecondition)<3;"""";INDIRECT(""D""&ROW()-2))	";
				print_3make =		"=IF(0%(condprecondition)<3;"""";""%(condition)""&"",""&TEXT(ROW()-1;""0000"")&(""_%(linkname)_3,%(linkname)_3""))\n";

				print_4filename =	"=IF(0%(condprecondition)<4;"""";TEXT(ROW()-1;""0000"")&""_%(linkname)""&""_4.wav"")	";
				print_4word =		"=IF(0%(condprecondition)<4;"""";INDIRECT(""B""&ROW()-3))	";
				print_4wordClass =	"=IF(0%(condprecondition)<4;"""";INDIRECT(""C""&ROW()-3))	";
				print_4folder =		"=IF(0%(condprecondition)<4;"""";INDIRECT(""D""&ROW()-3))	";
				print_4make =		"=IF(0%(condprecondition)<4;"""";""%(condition)""&"",""&TEXT(ROW()-1;""0000"")&(""_%(linkname)_4,%(linkname)_4""))\n";

				print_5filename =	"=IF(0%(condprecondition)<5;"""";TEXT(ROW()-1;""0000"")&""_%(linkname)""&""_5.wav"")	";
				print_5word =		"=IF(0%(condprecondition)<5;"""";INDIRECT(""B""&ROW()-4))	";
				print_5wordClass =	"=IF(0%(condprecondition)<5;"""";INDIRECT(""C""&ROW()-4))	";
				print_5folder =		"=IF(0%(condprecondition)<5;"""";INDIRECT(""D""&ROW()-4))	";
				print_5make =		"=IF(0%(condprecondition)<5;"""";""%(condition)""&"",""&TEXT(ROW()-1;""0000"")&(""_%(linkname)_5,%(linkname)_5""))\n";

				print_6filename =	"=IF(0%(condprecondition)<6;"""";TEXT(ROW()-1;""0000"")&""_%(linkname)""&""_6.wav"")	";
				print_6word =		"=IF(0%(condprecondition)<6;"""";INDIRECT(""B""&ROW()-4))	";
				print_6wordClass =	"=IF(0%(condprecondition)<6;"""";INDIRECT(""C""&ROW()-4))	";
				print_6folder =		"=IF(0%(condprecondition)<6;"""";INDIRECT(""D""&ROW()-4))	";
				print_6make =		"=IF(0%(condprecondition)<6;"""";""%(condition)""&"",""&TEXT(ROW()-1;""0000"")&(""_%(linkname)_6,%(linkname)_6""))\n";

				print_7filename =	"=IF(0%(condprecondition)<7;"""";TEXT(ROW()-1;""0000"")&""_%(linkname)""&""_7.wav"")	";
				print_7word =		"=IF(0%(condprecondition)<7;"""";INDIRECT(""B""&ROW()-4))	";
				print_7wordClass =	"=IF(0%(condprecondition)<7;"""";INDIRECT(""C""&ROW()-4))	";
				print_7folder =		"=IF(0%(condprecondition)<7;"""";INDIRECT(""D""&ROW()-4))	";
				print_7make =		"=IF(0%(condprecondition)<7;"""";""%(condition)""&"",""&TEXT(ROW()-1;""0000"")&(""_%(linkname)_7,%(linkname)_7""))\n";

				print_8filename =	"=IF(0%(condprecondition)<8;"""";TEXT(ROW()-1;""0000"")&""_%(linkname)""&""_8.wav"")	";
				print_8word =		"=IF(0%(condprecondition)<8;"""";INDIRECT(""B""&ROW()-4))	";
				print_8wordClass =	"=IF(0%(condprecondition)<8;"""";INDIRECT(""C""&ROW()-4))	";
				print_8folder =		"=IF(0%(condprecondition)<8;"""";INDIRECT(""D""&ROW()-4))	";
				print_8make =		"=IF(0%(condprecondition)<8;"""";""%(condition)""&"",""&TEXT(ROW()-1;""0000"")&(""_%(linkname)_8,%(linkname)_8""))\n";

				print_9filename =	"=IF(0%(condprecondition)<9;"""";TEXT(ROW()-1;""0000"")&""_%(linkname)""&""_9.wav"")	";
				print_9word =		"=IF(0%(condprecondition)<9;"""";INDIRECT(""B""&ROW()-4))	";
				print_9wordClass =	"=IF(0%(condprecondition)<9;"""";INDIRECT(""C""&ROW()-4))	";
				print_9folder =		"=IF(0%(condprecondition)<9;"""";INDIRECT(""D""&ROW()-4))	";
				print_9make =		"=IF(0%(condprecondition)<9;"""";""%(condition)""&"",""&TEXT(ROW()-1;""0000"")&(""_%(linkname)_9,%(linkname)_9""))\n";

				print_10filename =	"=IF(0%(condprecondition)<10;"""";TEXT(ROW()-1;""0000"")&""_%(linkname)""&""_10.wav"")	";
				print_10word =		"=IF(0%(condprecondition)<10;"""";INDIRECT(""B""&ROW()-4))	";
				print_10wordClass =	"=IF(0%(condprecondition)<10;"""";INDIRECT(""C""&ROW()-4))	";
				print_10folder =		"=IF(0%(condprecondition)<10;"""";INDIRECT(""D""&ROW()-4))	";
				print_10make =		"=IF(0%(condprecondition)<10;"""";""%(condition)""&"",""&TEXT(ROW()-1;""0000"")&(""_%(linkname)_10,%(linkname)_10""))\n";

			};
			iffinal_def = 0;
		};

	};
};


class Decompile
{
	process = 0;
	FSMLeft	= "/*";
	FSMRight = "*/";
	class FSMPrefix
	{
		default = "";
		fsmFunctionDeclaration = "";
		fsmFunctionPrefix = "";
		fsmFunctionSufix = "";
		setFinal = "";
		stateprecondition = "";
		condprecondition = "";
		globalprefix = "";
		link = "";
	};
	class FSMPrefix2
	{
		default = "";
		head = "*/";
		condition = "";
		condprecondition = "";
		action = "";
		fsmFunctionDeclaration = "";
		fsmFunctionPrefix = "";
		fsmFunctionSufix = "";
		setFinal = "";
		stateinit = "";
		stateprecondition = "";
		globalprefix = "";
	};
	class FSMSufix
	{
		default = "";
		compile = "";
		state = "";
		head = "/*";
		link = "";
		condition = "";
		condprecondition = "";
		action = "";
		fsmFunctionDeclaration = "";
		fsmFunctionPrefix = "";
		fsmFunctionSufix = "";
		setFinal = "";
		stateinit = "";
		stateprecondition = "";
		globalprefix = "";
	};
	class FSMSufix2
	{
		default = "";
		compile = "";
		state = "";
		head = "";
		link = "";
		fsmFunctionDeclaration = "";
		fsmFunctionPrefix = "";
		fsmFunctionSufix = "";
		setFinal = "";
		condprecondition = "";
		stateprecondition = "";
		globalprefix = "";
	};
};
