class Attributes
{
	names[] = {
		"File_extension",
		//"Custom_code",
		"Default_wordClass_folder",
		"Default_word_folder",
		"Header_Protocol",
		"Header_Words"
	};
};
minChars = 128;
class Compile
{
	clearNewLines = 0;
	rewriteFile = 1;
	class PassProtocolOpen
	{
		noDecompile = 1;
		print_fake = "\n\n#define ____FAKE____	Dummy\n\n";

		print_variable_comment1 = "//--- Ignore numbered variables\n";
		print_variable_1 = "#define DEF__1\n";
		print_variable_1_1 = "#define DEF__1_1\n";
		print_variable_2 = "#define DEF__2\n";
		print_variable_3 = "#define DEF__3\n";
		print_variable_4 = "#define DEF__4\n";
		print_variable_5 = "#define DEF__5\n";
		print_variable_6 = "#define DEF__6\n";
		print_variable_7 = "#define DEF__7\n";
		print_variable_8 = "#define DEF__8\n";
		print_variable_9 = "#define DEF__9\n";
		print_variable_10 = "#define DEF__10\n";
		print_variable_11 = "#define DEF__11\n";
		print_variable_12 = "#define DEF__12\n";
		print_variable_13 = "#define DEF__13\n";
		print_variable_14 = "#define DEF__14\n";
		print_variable_15 = "#define DEF__15\n";
		print_variable_16 = "#define DEF__16\n";

		print_variable_gComment = "\n//--- Define mode variables\n";
		print_variable_ABS = "#define ABS 101\n";
		print_variable_CMPS = "#define CMPS 101\n";
		print_variable_CLCK = "#define CLCK 201\n";
		print_variable_eComment = "\n//--- Define custom variables for SelectEnemyDetectedSentence\n";
		print_variable_eUNIT =		"#define _eUNIT %%1\n#define DEF__eUNIT\n";
		print_variable_eTARGETS =	"#define _eTARGETS %%2\n#define DEF__eTARGETS\n";
		print_variable_eGRID =		"#define _eGRID %%3\n#define DEF__eGRID\n";
		print_variable_eSIDE =		"#define _eSIDE %%4\n#define DEF__eSIDE\n";
		print_variable_eGRPDIS =	"#define _eGRPDIS %%5\n#define DEF__eGRPDIS\n";
			print_variable_eGRPDIS_REL =	"#define DEF__eGRPDIS_1\n#define DEF__eGRPDIS_2\n#define DEF__eGRPDIS_3\n#define DEF__eGRPDIS_4\n";
			print_variable_eGRPDIS_ABS =	"#define DEF__eGRPDIS_ABS\n";
		print_variable_eGRPDIR =	"#define _eGRPDIR %%6\n#define DEF__eGRPDIR\n";
			print_variable_eGRPDIR_REL =	"#define DEF__eGRPDIR_1\n#define DEF__eGRPDIR_2\n#define DEF__eGRPDIR_3\n#define DEF__eGRPDIR_4\n";
			print_variable_eGRPDIR_CMPS =	"#define DEF__eGRPDIR_CMPS\n";
			print_variable_eGRPDIR_CLCK =	"#define DEF__eGRPDIR_CLCK\n";
		print_variable_eSENDERDIS =	"#define _eSENDERDIS %%7\n#define DEF__eSENDERDIS\n";
			print_variable_eSENDERDIS_REL =	"#define DEF__eSENDERDIS_1\n#define DEF__eSENDERDIS_2\n#define DEF__eSENDERDIS_3\n#define DEF__eSENDERDIS_4\n";
			print_variable_eSENDERDIS_ABS =	"#define DEF__eSENDERDIS_ABS\n";
		print_variable_eSENDERDIR =	"#define _eSENDERDIR %%8\n#define DEF__eSENDERDIR\n";
			print_variable_eSENDERDIR_REL =	"#define DEF__eSENDERDIR_1\n#define DEF__eSENDERDIR_2\n#define DEF__eSENDERDIR_3\n#define DEF__eSENDERDIR_4\n";
			print_variable_eSENDERDIR_CMPS =	"#define DEF__eSENDERDIR_CMPS\n";
			print_variable_eSENDERDIR_CLCK =	"#define DEF__eSENDERDIR_CLCK\n";
		print_variable_eUNITDIS =	"#define _eUNITDIS %%9\n#define DEF__eUNITDIS\n";
			print_variable_eUNITDIS_REL =	"#define DEF__eUNITDIS_1\n#define DEF__eUNITDIS_2\n#define DEF__eUNITDIS_3\n#define DEF__eUNITDIS_4\n";
			print_variable_eUNITDIS_ABS =	"#define DEF__eUNITDIS_ABS\n";
		print_variable_eUNITDIR =	"#define _eUNITDIR %%10\n#define DEF__eUNITDIR\n";
			print_variable_eUNITDIR_REL =	"#define DEF__eUNITDIR_1\n#define DEF__eUNITDIR_2\n#define DEF__eUNITDIR_3\n#define DEF__eUNITDIR_4\n";
			print_variable_eUNITDIR_CMPS =	"#define DEF__eUNITDIR_CMPS\n";
			print_variable_eUNITDIR_CLCK =	"#define DEF__eUNITDIR_CLCK\n";
		print_variable_eLOCDIS =	"#define _eLOCDIS %%11\n#define DEF__eLOCDIS\n";
			print_variable_eLOCDIS_REL =	"#define DEF__eLOCDIS_1\n#define DEF__eLOCDIS_2\n#define DEF__eLOCDIS_3\n#define DEF__eLOCDIS_4\n";
			print_variable_eLOCDIS_ABS =	"#define DEF__eLOCDIS_ABS\n";
		print_variable_eLOCDIR =	"#define _eLOCDIR %%12\n#define DEF__eLOCDIR\n";
			print_variable_eLOCDIR_REL =	"#define DEF__eLOCDIR_1\n#define DEF__eLOCDIR_2\n#define DEF__eLOCDIR_3\n#define DEF__eLOCDIR_4\n";
			print_variable_eLOCDIR_CMPS =	"#define DEF__eLOCDIR_CMPS\n";
			print_variable_eLOCDIR_CLCK =	"#define DEF__eLOCDIR_CLCK\n";
		print_variable_eRECIPIENT =	"#define _eRECIPIENT %%13\n#define DEF__eRECIPIENT\n";
		print_variable_eLOC =		"#define _eLOC %%14\n#define DEF__eLOC\n";
		print_variable_eLEADERDIS =	"#define _eLEADERDIS %%15\n#define DEF__eLEADERDIS\n";
			print_variable_eLEADERDIS_REL =	"#define DEF__eLEADERDIS_1\n#define DEF__eLEADERDIS_2\n#define DEF__eLEADERDIS_3\n#define DEF__eLEADERDIS_4\n";
			print_variable_eLEADERDIS_ABS =	"#define DEF__eLEADERDIS_ABS\n";
		print_variable_eLEADERDIR =	"#define _eLEADERDIR %%16\n#define DEF__eLEADERDIR\n";
			print_variable_eLEADERDIR_REL =	"#define DEF__eLEADERDIR_1\n#define DEF__eLEADERDIR_2\n#define DEF__eLEADERDIR_3\n#define DEF__eLEADERDIR_4\n";
			print_variable_eLEADERDIR_CMPS =	"#define DEF__eLEADERDIR_CMPS\n";
			print_variable_eLEADERDIR_CLCK =	"#define DEF__eLEADERDIR_CLCK\n";

		print_variable_mComment = "\n//--- Define custom variables for SelectCmdMoveSentence\n";
		print_variable_mUNIT =		"#define _mUNIT %%1\n#define DEF__mUNIT\n";
		print_variable_mGRID =		"#define _mGRID %%2\n#define DEF__mGRID\n";
		print_variable_mGRPDIS =	"#define _mGRPDIS %%3\n#define DEF__mGRPDIS\n";
			print_variable_mGRPDIS_REL =	"#define DEF__mGRPDIS_1\n#define DEF__mGRPDIS_2\n#define DEF__mGRPDIS_3\n#define DEF__mGRPDIS_4\n";
			print_variable_mGRPDIS_ABS =	"#define DEF__mGRPDIS_ABS\n";
		print_variable_mGRPDIR =	"#define _mGRPDIR %%4\n#define DEF__mGRPDIR\n";
			print_variable_mGRPDIR_REL =	"#define DEF__mGRPDIR_1\n#define DEF__mGRPDIR_2\n#define DEF__mGRPDIR_3\n#define DEF__mGRPDIR_4\n";
			print_variable_mGRPDIR_CMPS =	"#define DEF__mGRPDIR_CMPS\n";
			print_variable_mGRPDIR_CLCK =	"#define DEF__mGRPDIR_CLCK\n";
		print_variable_mLOCDIS =	"#define _mLOCDIS %%5\n#define DEF__mLOCDIS\n";
			print_variable_mLOCDIS_REL =	"#define DEF__mLOCDIS_1\n#define DEF__mLOCDIS_2\n#define DEF__mLOCDIS_3\n#define DEF__mLOCDIS_4\n";
			print_variable_mLOCDIS_ABS =	"#define DEF__mLOCDIS_ABS\n";
		print_variable_mLOCDIR =	"#define _mLOCDIR %%6\n#define DEF__mLOCDIR\n";
			print_variable_mLOCDIR_REL =	"#define DEF__mLOCDIR_1\n#define DEF__mLOCDIR_2\n#define DEF__mLOCDIR_3\n#define DEF__mLOCDIR_4\n";
			print_variable_mLOCDIR_CMPS =	"#define DEF__mLOCDIR_CMPS\n";
			print_variable_mLOCDIR_CLCK =	"#define DEF__mLOCDIR_CLCK\n";
		print_variable_mLOC =		"#define _mLOC %%7\n#define DEF__mLOC\n";
		print_variable_mOBJ =		"#define _mOBJ %%8\n#define DEF__mOBJ\n";
		print_variable_mOBJDIR =	"#define _mOBJDIR %%9\n#define DEF__mOBJDIR\n";
			print_variable_mOBJDIR_REL =	"#define DEF__mOBJDIR_1\n#define DEF__mOBJDIR_2\n#define DEF__mOBJDIR_3\n#define DEF__mOBJDIR_4\n";
			print_variable_mOBJDIR_CMPS =	"#define DEF__mOBJDIR_CMPS\n";
			print_variable_mOBJDIR_CLCK =	"#define DEF__mOBJDIR_CLCK\n";
		print_variable_mRECIPIENTDIS =	"#define _mRECIPIENTDIS %%10\n#define DEF__mRECIPIENTDIS\n";
			print_variable_mRECIPIENTDIS_REL =	"#define DEF__mRECIPIENTDIS_1\n#define DEF__mRECIPIENTDIS_2\n#define DEF__mRECIPIENTDIS_3\n#define DEF__mRECIPIENTDIS_4\n";
			print_variable_mRECIPIENTDIS_ABS =	"#define DEF__mRECIPIENTDIS_ABS\n";
		print_variable_mRECIPIENTDIR =	"#define _mRECIPIENTDIR %%11\n#define DEF__mRECIPIENTDIR\n";
			print_variable_mRECIPIENTDIR_REL =	"#define DEF__mRECIPIENTDIR_1\n#define DEF__mRECIPIENTDIR_2\n#define DEF__mRECIPIENTDIR_3\n#define DEF__mRECIPIENTDIR_4\n";
			print_variable_mRECIPIENTDIR_CMPS =	"#define DEF__mRECIPIENTDIR_CMPS\n";
			print_variable_mRECIPIENTDIR_CLCK =	"#define DEF__mRECIPIENTDIR_CLCK\n";
		print_variable_mLEADERDIS =	"#define _mLEADERDIS %%12\n#define DEF__mLEADERDIS\n";
			print_variable_mLEADERDIS_REL =	"#define DEF__mLEADERDIS_1\n#define DEF__mLEADERDIS_2\n#define DEF__mLEADERDIS_3\n#define DEF__mLEADERDIS_4\n";
			print_variable_mLEADERDIS_ABS =	"#define DEF__mLEADERDIS_ABS\n";
		print_variable_mLEADERDIR =	"#define _mLEADERDIR %%13\n#define DEF__mLEADERDIR\n";
			print_variable_mLEADERDIR_REL =	"#define DEF__mLEADERDIR_1\n#define DEF__mLEADERDIR_2\n#define DEF__mLEADERDIR_3\n#define DEF__mLEADERDIR_4\n";
			print_variable_mLEADERDIR_CMPS =	"#define DEF__mLEADERDIR_CMPS\n";
			print_variable_mLEADERDIR_CLCK =	"#define DEF__mLEADERDIR_CLCK\n";

		print_variable_vComment = "\n//--- Define custom variables for SelectVehicleMoveSentence\n";
		print_variable_vGRID =		"#define _vGRID %%1\n#define DEF__vGRID\n";
		print_variable_vGRPDIS =	"#define _vGRPDIS %%2\n#define DEF__vGRPDIS\n";
			print_variable_vGRPDIS_REL =	"#define DEF__vGRPDIS_1\n#define DEF__vGRPDIS_2\n#define DEF__vGRPDIS_3\n#define DEF__vGRPDIS_4\n";
			print_variable_vGRPDIS_ABS =	"#define DEF__vGRPDIS_ABS\n";
		print_variable_vGRPDIR =	"#define _vGRPDIR %%3\n#define DEF__vGRPDIR\n";
			print_variable_vGRPDIR_REL =	"#define DEF__vGRPDIR_1\n#define DEF__vGRPDIR_2\n#define DEF__vGRPDIR_3\n#define DEF__vGRPDIR_4\n";
			print_variable_vGRPDIR_CMPS =	"#define DEF__vGRPDIR_CMPS\n";
			print_variable_vGRPDIR_CLCK =	"#define DEF__vGRPDIR_CLCK\n";
		print_variable_vLOCDIS =	"#define _vLOCDIS %%4\n#define DEF__vLOCDIS\n";
			print_variable_vLOCDIS_REL =	"#define DEF__vLOCDIS_1\n#define DEF__vLOCDIS_2\n#define DEF__vLOCDIS_3\n#define DEF__vLOCDIS_4\n";
			print_variable_vLOCDIS_ABS =	"#define DEF__vLOCDIS_ABS\n";
		print_variable_vLOCDIR =	"#define _vLOCDIR %%5\n#define DEF__vLOCDIR\n";
			print_variable_vLOCDIR_REL =	"#define DEF__vLOCDIR_1\n#define DEF__vLOCDIR_2\n#define DEF__vLOCDIR_3\n#define DEF__vLOCDIR_4\n";
			print_variable_vLOCDIR_CMPS =	"#define DEF__vLOCDIR_CMPS\n";
			print_variable_vLOCDIR_CLCK =	"#define DEF__vLOCDIR_CLCK\n";
		print_variable_vLOC =		"#define _vLOC %%6\n#define DEF__vLOC\n";
		print_variable_vOBJ =		"#define _vOBJ %%7\n#define DEF__vOBJ\n";
		print_variable_vOBJDIR =	"#define _vOBJDIR %%8\n#define DEF__vOBJDIR\n";
			print_variable_vOBJDIR_REL =	"#define DEF__vOBJDIR_1\n#define DEF__vOBJDIR_2\n#define DEF__vOBJDIR_3\n#define DEF__vOBJDIR_4\n";
			print_variable_vOBJDIR_CMPS =	"#define DEF__vOBJDIR_CMPS\n";
			print_variable_vOBJDIR_CLCK =	"#define DEF__vOBJDIR_CLCK\n";
		print_variable_vRECIPIENTSDIS =	"#define _vRECIPIENTSDIS %%9\n#define DEF__vRECIPIENTDIS\n";
			print_variable_vRECIPIENTDIS_REL =	"#define DEF__vRECIPIENTDIS_1\n#define DEF__vRECIPIENTDIS_2\n#define DEF__vRECIPIENTDIS_3\n#define DEF__vRECIPIENTDIS_4\n";
			print_variable_vRECIPIENTDIS_ABS =	"#define DEF__vRECIPIENTDIS_ABS\n";
		print_variable_vRECIPIENTSDIR =	"#define _vRECIPIENTSDIR %%10\n#define DEF__vRECIPIENTSDIR\n";
			print_variable_vRECIPIENTDIR_REL =	"#define DEF__vRECIPIENTDIR_1\n#define DEF__vRECIPIENTDIR_2\n#define DEF__vRECIPIENTDIR_3\n#define DEF__vRECIPIENTDIR_4\n";
			print_variable_vRECIPIENTDIR_CMPS =	"#define DEF__vRECIPIENTDIR_CMPS\n";
			print_variable_vRECIPIENTDIR_CLCK =	"#define DEF__vRECIPIENTDIR_CLCK\n";

/*
		print_variable_tComment = "\n//--- Define variable types\n";
		print_variable_vDISREL =	"#define _tDISREL 1\n#define DEF__tDISREL\n";
		print_variable_vDISABS =	"#define _tDISABS 101\n#define DEF__tDISABS\n";

		print_variable_vDIRREL =	"#define _tDIRREL 1\n#define DEF__tDIRREL\n";
		print_variable_vDIRCARD =	"#define _tDIRCARD 101\n#define DEF__tDIRCARD\n";
		print_variable_vDIRCLOCK =	"#define _tDIRCLOCK 201\n#define DEF__tDIRCLOCK\n";
*/

		printParentHeader = "\n//--- Define parent classes\n";
		class StateParent
		{
			iffinal_off = -1;
			printDef = "#define DEF_PARENT_%(stateinit)	:%(stateinit)\n";
			iffinal_def = 0;
		};
		printNoParent = "#define DEF_PARENT_\n";

		printWordsClassHeader = "\n//--- Words classes\n";
		class StateWordsClass
		{
			iffinal_on = 1;
			printDef = "#define DEF_WORDCLASS_%(stateinit) %(stateinit)\n";
			printDefSet = "#define DEF_WORDCLASS_SET_%(stateinit) %(stateinit): %(Default_wordClass_folder)\n";
			iffinal_def = 0;
		};
		printWordsClass = "\n#define DEF_WORDCLASS_ %(Default_wordClass_folder)\n";
		printWordsClassSet = "\n#define DEF_WORDCLASS_SET_ %(Default_wordClass_folder)\n";

		printFolderHeader = "\n//--- Word folders\n";
		class StateFolder
		{
			iffinal_on = 1;
			class Links
			{
				printDef = "#define DEF_FOLDER_%(condition) %(condition)\n";
			};
			iffinal_def = 0;
		};
		printFolder = "#define DEF_FOLDER_ %(Default_word_folder)\n\n";

		printWordVariants = "#define DEF_WORDVARIANTS_(WORD)	##WORD##%(File_extension)\n";
		printWordVariants1 = "#define DEF_WORDVARIANTS_1(WORD)	##WORD##%(File_extension)\n";
		printWordVariants2 = "#define DEF_WORDVARIANTS_2(WORD)	##WORD##_1%(File_extension),##WORD##_2%(File_extension)\n";
		printWordVariants3 = "#define DEF_WORDVARIANTS_3(WORD)	##WORD##_1%(File_extension),##WORD##_2%(File_extension),##WORD##_3%(File_extension)\n";
		printWordVariants4 = "#define DEF_WORDVARIANTS_4(WORD)	##WORD##_1%(File_extension),##WORD##_2%(File_extension),##WORD##_3%(File_extension),##WORD##_4%(File_extension)\n";
		printWordVariants5 = "#define DEF_WORDVARIANTS_5(WORD)	##WORD##_1%(File_extension),##WORD##_2%(File_extension),##WORD##_3%(File_extension),##WORD##_4%(File_extension),##WORD##_5%(File_extension)\n";
		printWordVariants6 = "#define DEF_WORDVARIANTS_6(WORD)	##WORD##_1%(File_extension),##WORD##_2%(File_extension),##WORD##_3%(File_extension),##WORD##_4%(File_extension),##WORD##_5%(File_extension),##WORD##_6%(File_extension)\n";
		printWordVariants7 = "#define DEF_WORDVARIANTS_7(WORD)	##WORD##_1%(File_extension),##WORD##_2%(File_extension),##WORD##_3%(File_extension),##WORD##_4%(File_extension),##WORD##_5%(File_extension),##WORD##_6%(File_extension),##WORD##_7%(File_extension)\n";
		printWordVariants8 = "#define DEF_WORDVARIANTS_8(WORD)	##WORD##_1%(File_extension),##WORD##_2%(File_extension),##WORD##_3%(File_extension),##WORD##_4%(File_extension),##WORD##_5%(File_extension),##WORD##_6%(File_extension),##WORD##_7%(File_extension),##WORD##_8%(File_extension)\n";
		printWordVariants9 = "#define DEF_WORDVARIANTS_9(WORD)	##WORD##_1%(File_extension),##WORD##_2%(File_extension),##WORD##_3%(File_extension),##WORD##_4%(File_extension),##WORD##_5%(File_extension),##WORD##_6%(File_extension),##WORD##_7%(File_extension),##WORD##_8%(File_extension),##WORD##_9%(File_extension)\n";
		printWordVariants10 = "#define DEF_WORDVARIANTS_10(WORD)	##WORD##_1%(File_extension),##WORD##_2%(File_extension),##WORD##_3%(File_extension),##WORD##_4%(File_extension),##WORD##_5%(File_extension),##WORD##_6%(File_extension),##WORD##_7%(File_extension),##WORD##_8%(File_extension),##WORD##_9%(File_extension),##WORD##_10%(File_extension)\n";


		print_protocolOpen = "\nclass %(fsmName): RadioProtocolBase\n{\n";
	};
	class PassHeader
	{
		//indent_protocolOpen = 8;
		print_commentHeader = "//--- Custom protocol header\n";
		noDecompile = 0;
		print_customHeader = "%(Header_Protocol)\n\n";
	};
	class PassWords1
	{
		noDecompile = 1;
		indent_protocolOpen = 8;
		print_comment1 = "//////////////////////////////////////////////////////////////\n";
		print_comment2 = "// Words\n";
		print_comment3 = "//////////////////////////////////////////////////////////////\n";
		print_wordsOpen = "class Words: Words\n{\n";
		indent_wordsOpen = 16;
		print_commentDefineWords = "//--- Define word sound files\n";
		class StateDefineWords
		{
			iffinal_on = 1;
			class LinksDefine
			{
				print_word = "#define WORD_%(linkname) %(linkname)\n";
			};
			iffinal_def = 0;
		};
	};
	class PassWordsHeader
	{
		noDecompile = 0;
		indent_headerOpen = 0;
		print_commentHeader = "\n//--- Manual overwrite of sound file definitions\n";
		print_customHeader = "%(Header_Words)\n\n";
		indent_headerClose = 16;
	};
	class PassWords2
	{
		noDecompile = 1;
		print_commentDefineParams = "//--- Define word params\n";
		class StateDefineParams
		{
			iffinal_on = 1;
			class LinksDefine
			{
				print_ifndefOpen = "#define DEF_%(statename)_%(linkname)\n#ifndef DEF_%(linkname)\n";
				indent_ifndefOpen = 24;
				print_wordFinal = "#define DEF_%(statename)_%(linkname)		%(linkname)[] = {DEF_WORDVARIANTS_%(condprecondition)(%(fsmName)\\DEF_WORDSCLASS\\DEF_FOLDER_%(condition)\\WORD_%(linkname))};\n";
				print_wordId = "#define DEF_%(linkname)\n";
				indent_ifndefClose = 16;
				print_ifndefClose = "#endif\n";
			};
			iffinal_def = 0;
		};
		print_commentbaseOpen = "\n//--- Define macro with all words\n";
		print_baseOpen = "#define DEF_WORDS\\\n";
		indent_baseOpen = 24;
		class StateBase
		{
			iffinal_on = 1;
			class LinksApply
			{
				print_word = "DEF_%(statename)_%(linkname)\\\n";
				//print_wordDel = "#define DEF_%(linkname)\n";
			};
			iffinal_def = 0;
		};
		indent_baseClose = 16;
		print_baseClose = "\n";

		print_rootWordsComment = "//--- Root words\n";
		print_rootFolder = "#define DEF_WORDSCLASS DEF_WORDCLASS_\n";
		print_rootWords = "DEF_WORDS\n";
		print_br4 = "\n";

		print_commentDefineClasses = "//--- Define wordsClass subclasses\n";
		class StateDefineClasses
		{
			iffinal_on = 1;
			print_def = "#define DEF_WORDS_%(stateinit)Words	class DEF_WORDCLASS_SET_%(stateinit) {DEF_WORDS};\n";
			iffinal_def = 0;
		};
		print_br5 = "\n";

		print_ifdefOpen = "#ifdef DEF_WORDS_Words\n";
		indent_ifdefOpen = 24;
		print_defFolder = "#define DEF_WORDSCLASS DEF_WORDCLASS_\n";
		print_apply = "DEF_WORDS_Words\n";
		print_undef = "#undef DEF_WORDS_Words\n";
		indent_ifdefClose = 16;
		print_ifdefClose = "#endif\n";

		class StateApplyClasses
		{
			iffinal_on = 1;
			print_ifdefOpen = "#ifdef DEF_WORDS_%(stateinit)Words\n";
			indent_ifdefOpen = 24;
			print_defFolder = "#define DEF_WORDSCLASS DEF_WORDCLASS_%(stateinit)\n";
			print_apply = "DEF_WORDS_%(stateinit)Words\n";
			print_undef = "#undef DEF_WORDS_%(stateinit)Words\n";
			indent_ifdefClose = 16;
			print_ifdefClose = "#endif\n";
			iffinal_def = 0;
		};

		indent_wordsClose = 8;
		print_wordsClose = "};\n\n";
	};
	class PassSentences
	{
		noDecompile = 1;
		print_comment1 = "//////////////////////////////////////////////////////////////\n";
		print_comment2 = "// Sentences\n";
		print_comment3 = "//////////////////////////////////////////////////////////////\n";
		class State
		{
			ifstart_on = 1;
			print_1 = "class %(statename) DEF_PARENT_%(stateinit)\n{\n";//+++++++++
			indent_2 = 16;
			print_2 = "sentences[] = {\n";
			indent_3 = 24;
			class LinksSentences
			{
				print_1 = "%(totext), %(linktext),\n";
			};
			indent_4 = 16;
			print_3 = "};\n";
			indent_5 = 8;
			print_4 = "};\n";
			ifstart_def = 0;
		};
	};
	class PassVersionsDefine
	{
		noDecompile = 1;
		print_comment1 = "\n//////////////////////////////////////////////////////////////\n";
		print_comment2 = "// Versions define\n";
		print_comment3 = "//////////////////////////////////////////////////////////////\n";

		print_commentLoc = "//--- Define macros to avoid text duplicity\n";
		class StateLoc
		{
			iffinal_on = 1;
			print_defOpen = "#ifndef DEF_LOC_%(statename)\n";
			indent_defOpen = 16;
			print_textLocalized = "#define DEF_LOC_%(statename)	""$STR_A3_%(statename)""\n";
			indent_defClose = 8;
			print_defClose = "#endif\n";
			print_text1 = "#define DEF_LOC_%(statename)_1	DEF_LOC_%(statename)\n";
			print_text2 = "#define DEF_LOC_%(statename)_2	DEF_LOC_%(statename)\n";
			print_text3 = "#define DEF_LOC_%(statename)_3	DEF_LOC_%(statename)\n";
			print_text4 = "#define DEF_LOC_%(statename)_4	DEF_LOC_%(statename)\n";
			print_text5 = "#define DEF_LOC_%(statename)_5	DEF_LOC_%(statename)\n";
			print_text6 = "#define DEF_LOC_%(statename)_6	DEF_LOC_%(statename)\n";
			print_text7 = "#define DEF_LOC_%(statename)_7	DEF_LOC_%(statename)\n";
			print_text8 = "#define DEF_LOC_%(statename)_8	DEF_LOC_%(statename)\n";
			print_text9 = "#define DEF_LOC_%(statename)_9	DEF_LOC_%(statename)\n";
			print_text10 = "#define DEF_LOC_%(statename)_10	DEF_LOC_%(statename)\n";
			print_text11 = "#define DEF_LOC_%(statename)_11	DEF_LOC_%(statename)\n";
			print_text12 = "#define DEF_LOC_%(statename)_12	DEF_LOC_%(statename)\n";
			print_text13 = "#define DEF_LOC_%(statename)_13	DEF_LOC_%(statename)\n";
			print_text14 = "#define DEF_LOC_%(statename)_14	DEF_LOC_%(statename)\n";
			print_text15 = "#define DEF_LOC_%(statename)_15	DEF_LOC_%(statename)\n";
			print_text16 = "#define DEF_LOC_%(statename)_16	DEF_LOC_%(statename)\n";
			print_text17 = "#define DEF_LOC_%(statename)_17	DEF_LOC_%(statename)\n";
			print_text18 = "#define DEF_LOC_%(statename)_18	DEF_LOC_%(statename)\n";
			print_text19 = "#define DEF_LOC_%(statename)_19	DEF_LOC_%(statename)\n";
			print_text20 = "#define DEF_LOC_%(statename)_20	DEF_LOC_%(statename)\n\n";
			iffinal_def = 0;
		};

		//--- Rewrite empty strings
		print_def_loc_0 = "#define DEF_LOC__	""""\n";
		print_def_loc_1 = "#define DEF_LOC___1	""""\n";
		print_def_loc_2 = "#define DEF_LOC___2	""""\n";
		print_def_loc_3 = "#define DEF_LOC___3	""""\n";
		print_def_loc_4 = "#define DEF_LOC___4	""""\n";
		print_def_loc_5 = "#define DEF_LOC___5	""""\n";
		print_def_loc_6 = "#define DEF_LOC___6	""""\n";
		print_def_loc_7 = "#define DEF_LOC___7	""""\n";
		print_def_loc_8 = "#define DEF_LOC___8	""""\n";
		print_def_loc_9 = "#define DEF_LOC___9	""""\n";
		print_def_loc_10 = "#define DEF_LOC___10	""""\n";
		print_def_loc_11 = "#define DEF_LOC___11	""""\n";
		print_def_loc_12 = "#define DEF_LOC___12	""""\n";
		print_def_loc_13 = "#define DEF_LOC___13	""""\n";
		print_def_loc_14 = "#define DEF_LOC___14	""""\n";
		print_def_loc_15 = "#define DEF_LOC___15	""""\n";
		print_def_loc_16 = "#define DEF_LOC___16	""""\n";
		print_def_loc_17 = "#define DEF_LOC___17	""""\n";
		print_def_loc_18 = "#define DEF_LOC___18	""""\n";
		print_def_loc_19 = "#define DEF_LOC___19	""""\n";
		print_def_loc_20 = "#define DEF_LOC___20	""""\n";
		print_def_loc_21 = "#define DEF_LOC___21	""""\n";
		print_def_loc_22 = "#define DEF_LOC___22	""""\n";
		print_def_loc_23 = "#define DEF_LOC___23	""""\n";
		print_def_loc_24 = "#define DEF_LOC___24	""""\n";
		print_def_loc_25 = "#define DEF_LOC___25	""""\n";
		print_def_loc_26 = "#define DEF_LOC___26	""""\n";
		print_def_loc_27 = "#define DEF_LOC___27	""""\n";
		print_def_loc_28 = "#define DEF_LOC___28	""""\n";
		print_def_loc_29 = "#define DEF_LOC___29	""""\n";
		print_def_loc_30 = "#define DEF_LOC___30	""""\n";
		print_def_loc_31 = "#define DEF_LOC___31	""""\n";
		print_def_loc_32 = "#define DEF_LOC___32	""""\n";
		print_def_loc_33 = "#define DEF_LOC___33	""""\n";
		print_def_loc_34 = "#define DEF_LOC___34	""""\n";
		print_def_loc_35 = "#define DEF_LOC___35	""""\n";
		print_def_loc_36 = "#define DEF_LOC___36	""""\n";
		print_def_loc_37 = "#define DEF_LOC___37	""""\n";
		print_def_loc_38 = "#define DEF_LOC___38	""""\n";
		print_def_loc_39 = "#define DEF_LOC___39	""""\n";
		print_def_loc_40 = "#define DEF_LOC___40	""""\n";
		print_def_loc_41 = "#define DEF_LOC___41	""""\n";
		print_def_loc_42 = "#define DEF_LOC___42	""""\n";
		print_def_loc_43 = "#define DEF_LOC___43	""""\n";
		print_def_loc_44 = "#define DEF_LOC___44	""""\n";
		print_def_loc_45 = "#define DEF_LOC___45	""""\n";
		print_def_loc_46 = "#define DEF_LOC___46	""""\n";
		print_def_loc_47 = "#define DEF_LOC___47	""""\n";
		print_def_loc_48 = "#define DEF_LOC___48	""""\n";
		print_def_loc_49 = "#define DEF_LOC___49	""""\n";
		print_def_loc_50 = "#define DEF_LOC___50	""""\n";
		print_def_loc_51 = "#define DEF_LOC___51	""""\n";
		print_def_loc_52 = "#define DEF_LOC___52	""""\n";
		print_def_loc_53 = "#define DEF_LOC___53	""""\n";
		print_def_loc_54 = "#define DEF_LOC___54	""""\n";
		print_def_loc_55 = "#define DEF_LOC___55	""""\n";
		print_def_loc_56 = "#define DEF_LOC___56	""""\n";
		print_def_loc_57 = "#define DEF_LOC___57	""""\n";
		print_def_loc_58 = "#define DEF_LOC___58	""""\n";
		print_def_loc_59 = "#define DEF_LOC___59	""""\n";
		print_def_loc_60 = "#define DEF_LOC___60	""""\n";
		print_def_loc_61 = "#define DEF_LOC___61	""""\n";
		print_def_loc_62 = "#define DEF_LOC___62	""""\n";
		print_def_loc_63 = "#define DEF_LOC___63	""""\n";
		print_def_loc_64 = "#define DEF_LOC___64	""""\n";
		print_def_loc_65 = "#define DEF_LOC___65	""""\n";
		print_def_loc_66 = "#define DEF_LOC___66	""""\n";
		print_def_loc_67 = "#define DEF_LOC___67	""""\n";
		print_def_loc_68 = "#define DEF_LOC___68	""""\n";
		print_def_loc_69 = "#define DEF_LOC___69	""""\n";
		print_def_loc_70 = "#define DEF_LOC___70	""""\n";

		print_commentDefine = "\n//--- Define variant macros\n";
		class StateDefine
		{
			iffinal_on = 1;

			print_classOpen = "#define DEF_%(statename)\\\n";
			indent_classOpen = 16;
			print_versionsOpen = "class %(statename)\\\n{\\\n";
			indent_versionsOpen = 24;
			print_text = "textOrig = %(statetext);\\\n";
			print_textLocalized = "text = DEF_LOC_%(statename);\\\n";
			print_wordsClass = "wordsClass = DEF_WORDCLASS_%(stateinit);\\\n";
			print_speechOpen = "speech[] = {";
			indent_speechOpen = 0;
			print_XMIT = "XMIT";
			class LinksSpeech
			{
				//print_1 = ",%(linkname)";
				print_1 = ",%(linktext)";
			};
			print_speechClose = "};\\\n";
			indent_speechClose = 24;
			print_gesture = "gesture = %qt(stateprecondition);\\\n";
			indent_versionsClose = 16;
			print_versionsClose = "};\n";
			indent_classClose = 8;

			iffinal_def = 0;
		};
	};
	class PassVersionsApply
	{
		noDecompile = 1;
		print_comment1 = "\n//////////////////////////////////////////////////////////////\n";
		print_comment2 = "// Versions\n";
		print_comment3 = "//////////////////////////////////////////////////////////////\n";
		class State
		{
			ifstart_off = -1;
			iffinal_off = -1;

			print_classOpen = "class %(statename) DEF_PARENT_%(stateinit)\n{\n"; //++++++++
			indent_classOpen = 16;
			print_versionsOpen = "versions[] = {\n";
			indent_versionsOpen = 24;
			class LinksVersionsArray
			{
				iftofinal_on = 1;
				print_version = "%(to), %(linktext),\n";
				iftofinal_def = 0;
			};
			indent_versionsClose = 16;
			print_versionsClose = "};\n";
			class LinksVersions
			{
				iftofinal_on = 1;
				print_version = "DEF_%(to)\n";
				iftofinal_def = 0;
			};
			indent_classClose = 8;
			print_classClose = "};\n";

			ifstart_def = 0;
			iffinal_def = 0;
		};
	};
	class PassProtocolClose
	{
		noDecompile = 1;
		//print_custom = "%(Custom_code)\n";
		indent_protocolClose = 0;
		print_protocolClose = "};\n\n";
	};
	class PassUndef
	{
		noDecompile = 1;
		print_words = "#undef DEF_WORDS_Words\n";
		class StateDefineClasses
		{
			iffinal_on = 1;
			print_def = "#undef DEF_WORDS_%(stateinit)Words\n";
			class LinksDefine
			{
				print_wordFinal = "#undef DEF_%(statename)_%(linkname)\n";
				print_wordId = "#undef DEF_%(linkname)\n";
			};

			print_textLocalized = "#undef DEF_LOC_%(statename)\n";
			print_text1 = "#undef DEF_LOC_%(statename)_1\n";
			print_text2 = "#undef DEF_LOC_%(statename)_2\n";
			print_text3 = "#undef DEF_LOC_%(statename)_3\n";
			print_text4 = "#undef DEF_LOC_%(statename)_4\n";
			print_text5 = "#undef DEF_LOC_%(statename)_5\n";
			print_text6 = "#undef DEF_LOC_%(statename)_6\n";
			print_text7 = "#undef DEF_LOC_%(statename)_7\n";
			print_text8 = "#undef DEF_LOC_%(statename)_8\n";
			print_text9 = "#undef DEF_LOC_%(statename)_9\n";
			print_text10 = "#undef DEF_LOC_%(statename)_10\n";
			print_text11 = "#undef DEF_LOC_%(statename)_11\n";
			print_text12 = "#undef DEF_LOC_%(statename)_12\n";
			print_text13 = "#undef DEF_LOC_%(statename)_13\n";
			print_text14 = "#undef DEF_LOC_%(statename)_14\n";
			print_text15 = "#undef DEF_LOC_%(statename)_15\n";
			print_text16 = "#undef DEF_LOC_%(statename)_16\n";
			print_text17 = "#undef DEF_LOC_%(statename)_17\n";
			print_text18 = "#undef DEF_LOC_%(statename)_18\n";
			print_text19 = "#undef DEF_LOC_%(statename)_19\n";
			print_text20 = "#undef DEF_LOC_%(statename)_20\n";
			iffinal_def = 0;
		};
	};
	class PassSystem
	{
		noDecompile = 0;
		print_comment1 = "//////////////////////////////////////////////////////////////\n";
		print_comment2 = "// FSM System\n";
		print_comment3 = "//////////////////////////////////////////////////////////////\n";
		print_arguments0 = "//--- Arguments:\n";
		print_arguments1 = "//--- %(File_extension)\n";
		print_arguments2 = "//--- %(Custom_code)\n";
		print_arguments3 = "//--- %(Default_wordClass_folder)\n";
		print_arguments4 = "//--- %(Default_word_folder)\n";
		class State
		{
			print_init = "//--- State: %(stateinit) %(stateprecondition)\n";
			class Links
			{
				print_condition = "//--- Link: %(condition) %(action) %(condPrecondition)\n";
			};
		};
	};
};


class Decompile
{
	process = 1;	 //0 for not processing Decompile info
	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 = "";
	};
};
