#ifdef OMC_BASE_FILE
#define OMC_FILE OMC_BASE_FILE
#else
#define OMC_FILE "CodegenUtil.c"
#endif
#include "omc_simulation_settings.h"
#include "CodegenUtil.h"
#define _OMC_LIT0_data "\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT0,1,_OMC_LIT0_data);
#define _OMC_LIT0 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT0)
#define _OMC_LIT1_data "#error \""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT1,8,_OMC_LIT1_data);
#define _OMC_LIT1 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT1)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT2,2,1) {_OMC_LIT1,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT2 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT2)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT3,2,1) {_OMC_LIT0,_OMC_LIT2}};
#define _OMC_LIT3 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT3)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT4,3,6) {&Tpl_StringToken_ST__STRING__LIST__desc,_OMC_LIT3,MMC_IMMEDIATE(MMC_TAGFIXNUM(0))}};
#define _OMC_LIT4 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT4)
#define _OMC_LIT5_data "\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT5,1,_OMC_LIT5_data);
#define _OMC_LIT5 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT5)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT6,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT5}};
#define _OMC_LIT6 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT6)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT7,1,3) {&Tpl_StringToken_ST__NEW__LINE__desc,}};
#define _OMC_LIT7 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT7)
#define _OMC_LIT8_data " "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT8,1,_OMC_LIT8_data);
#define _OMC_LIT8 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT8)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT9,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT8}};
#define _OMC_LIT9 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT9)
#define _OMC_LIT10_data "."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT10,1,_OMC_LIT10_data);
#define _OMC_LIT10 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT10)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT11,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT10}};
#define _OMC_LIT11 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT11)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT12,2,4) {&Tpl_BlockType_BT__INDENT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1))}};
#define _OMC_LIT12 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT12)
#define _OMC_LIT13_data "max=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT13,5,_OMC_LIT13_data);
#define _OMC_LIT13 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT13)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT14,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT13}};
#define _OMC_LIT14 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT14)
#define _OMC_LIT15_data "min=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT15,5,_OMC_LIT15_data);
#define _OMC_LIT15 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT15)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT16,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT15}};
#define _OMC_LIT16 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT16)
#define _OMC_LIT17_data "displayUnit=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT17,13,_OMC_LIT17_data);
#define _OMC_LIT17 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT17)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT18,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT17}};
#define _OMC_LIT18 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT18)
#define _OMC_LIT19_data ""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT19,0,_OMC_LIT19_data);
#define _OMC_LIT19 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT19)
#define _OMC_LIT20_data "unit=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT20,6,_OMC_LIT20_data);
#define _OMC_LIT20 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT20)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT21,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT20}};
#define _OMC_LIT21 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT21)
#define _OMC_LIT22_data "useNominal=\"true\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT22,17,_OMC_LIT22_data);
#define _OMC_LIT22 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT22)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT23,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT22}};
#define _OMC_LIT23 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT23)
#define _OMC_LIT24_data " useNominal=\"false\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT24,19,_OMC_LIT24_data);
#define _OMC_LIT24 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT24)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT25,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT24}};
#define _OMC_LIT25 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT25)
#define _OMC_LIT26_data "nominal=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT26,9,_OMC_LIT26_data);
#define _OMC_LIT26 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT26)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT27,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT26}};
#define _OMC_LIT27 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT27)
#define _OMC_LIT28_data "fixed=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT28,7,_OMC_LIT28_data);
#define _OMC_LIT28 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT28)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT29,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT28}};
#define _OMC_LIT29 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT29)
#define _OMC_LIT30_data "start=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT30,7,_OMC_LIT30_data);
#define _OMC_LIT30 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT30)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT31,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT30}};
#define _OMC_LIT31 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT31)
#define _OMC_LIT32_data "<Integer"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT32,8,_OMC_LIT32_data);
#define _OMC_LIT32 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT32)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT33,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT32}};
#define _OMC_LIT33 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT33)
#define _OMC_LIT34_data " />"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT34,3,_OMC_LIT34_data);
#define _OMC_LIT34 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT34)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT35,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT34}};
#define _OMC_LIT35 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT35)
#define _OMC_LIT36_data "<Real"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT36,5,_OMC_LIT36_data);
#define _OMC_LIT36 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT36)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT37,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT36}};
#define _OMC_LIT37 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT37)
#define _OMC_LIT38_data "<Boolean"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT38,8,_OMC_LIT38_data);
#define _OMC_LIT38 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT38)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT39,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT38}};
#define _OMC_LIT39 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT39)
#define _OMC_LIT40_data "<String"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT40,7,_OMC_LIT40_data);
#define _OMC_LIT40 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT40)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT41,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT40}};
#define _OMC_LIT41 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT41)
#define _OMC_LIT42_data "<ExternalObject path=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT42,22,_OMC_LIT42_data);
#define _OMC_LIT42 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT42)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT43,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT42}};
#define _OMC_LIT43 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT43)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT44,3,3) {&Tpl_Text_MEM__TEXT__desc,MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT44 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT44)
#define _OMC_LIT45_data "\" />"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT45,4,_OMC_LIT45_data);
#define _OMC_LIT45 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT45)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT46,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT45}};
#define _OMC_LIT46 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT46)
#define _OMC_LIT47_data "ScalarVariableType: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT47,20,_OMC_LIT47_data);
#define _OMC_LIT47 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT47)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT48,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT47}};
#define _OMC_LIT48 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT48)
#define _OMC_LIT49_data "CodegenUtil.tpl"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT49,15,_OMC_LIT49_data);
#define _OMC_LIT49 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT49)
#define _OMC_LIT50_data "\"noAlias\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT50,9,_OMC_LIT50_data);
#define _OMC_LIT50 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT50)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT51,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT50}};
#define _OMC_LIT51 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT51)
#define _OMC_LIT52_data "\"alias\" aliasVariable=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT52,23,_OMC_LIT52_data);
#define _OMC_LIT52 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT52)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT53,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT52}};
#define _OMC_LIT53 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT53)
#define _OMC_LIT54_data "\"negatedAlias\" aliasVariable=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT54,30,_OMC_LIT54_data);
#define _OMC_LIT54 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT54)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT55,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT54}};
#define _OMC_LIT55 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT55)
#define _OMC_LIT56_data "variable"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT56,8,_OMC_LIT56_data);
#define _OMC_LIT56 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT56)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT57,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT56}};
#define _OMC_LIT57 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT57)
#define _OMC_LIT58_data "STATE("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT58,6,_OMC_LIT58_data);
#define _OMC_LIT58 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT58)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT59,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT58}};
#define _OMC_LIT59 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT59)
#define _OMC_LIT60_data ")"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT60,1,_OMC_LIT60_data);
#define _OMC_LIT60 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT60)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT61,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT60}};
#define _OMC_LIT61 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT61)
#define _OMC_LIT62_data ","
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT62,1,_OMC_LIT62_data);
#define _OMC_LIT62 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT62)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT63,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT62}};
#define _OMC_LIT63 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT63)
#define _OMC_LIT64_data "STATE_DER"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT64,9,_OMC_LIT64_data);
#define _OMC_LIT64 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT64)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT65,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT64}};
#define _OMC_LIT65 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT65)
#define _OMC_LIT66_data "DUMMY_DER"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT66,9,_OMC_LIT66_data);
#define _OMC_LIT66 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT66)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT67,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT66}};
#define _OMC_LIT67 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT67)
#define _OMC_LIT68_data "DUMMY_STATE"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT68,11,_OMC_LIT68_data);
#define _OMC_LIT68 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT68)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT69,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT68}};
#define _OMC_LIT69 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT69)
#define _OMC_LIT70_data "CLOCKED_STATE"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT70,13,_OMC_LIT70_data);
#define _OMC_LIT70 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT70)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT71,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT70}};
#define _OMC_LIT71 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT71)
#define _OMC_LIT72_data "DISCRETE"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT72,8,_OMC_LIT72_data);
#define _OMC_LIT72 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT72)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT73,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT72}};
#define _OMC_LIT73 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT73)
#define _OMC_LIT74_data "PARAM"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT74,5,_OMC_LIT74_data);
#define _OMC_LIT74 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT74)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT75,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT74}};
#define _OMC_LIT75 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT75)
#define _OMC_LIT76_data "CONST"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT76,5,_OMC_LIT76_data);
#define _OMC_LIT76 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT76)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT77,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT76}};
#define _OMC_LIT77 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT77)
#define _OMC_LIT78_data "EXTOBJ: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT78,8,_OMC_LIT78_data);
#define _OMC_LIT78 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT78)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT79,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT78}};
#define _OMC_LIT79 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT79)
#define _OMC_LIT80_data "JACOBIAN_VAR"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT80,12,_OMC_LIT80_data);
#define _OMC_LIT80 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT80)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT81,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT80}};
#define _OMC_LIT81 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT81)
#define _OMC_LIT82_data "JACOBIAN_DIFF_VAR"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT82,17,_OMC_LIT82_data);
#define _OMC_LIT82 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT82)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT83,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT82}};
#define _OMC_LIT83 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT83)
#define _OMC_LIT84_data "SEED_VAR"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT84,8,_OMC_LIT84_data);
#define _OMC_LIT84 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT84)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT85,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT84}};
#define _OMC_LIT85 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT85)
#define _OMC_LIT86_data "OPT_CONSTR"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT86,10,_OMC_LIT86_data);
#define _OMC_LIT86 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT86)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT87,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT86}};
#define _OMC_LIT87 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT87)
#define _OMC_LIT88_data "OPT_FCONSTR"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT88,11,_OMC_LIT88_data);
#define _OMC_LIT88 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT88)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT89,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT88}};
#define _OMC_LIT89 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT89)
#define _OMC_LIT90_data "OPT_INPUT_WITH_DER"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT90,18,_OMC_LIT90_data);
#define _OMC_LIT90 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT90)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT91,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT90}};
#define _OMC_LIT91 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT91)
#define _OMC_LIT92_data "OPT_INPUT_DER"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT92,13,_OMC_LIT92_data);
#define _OMC_LIT92 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT92)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT93,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT92}};
#define _OMC_LIT93 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT93)
#define _OMC_LIT94_data "OPT_TGRID"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT94,9,_OMC_LIT94_data);
#define _OMC_LIT94 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT94)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT95,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT94}};
#define _OMC_LIT95 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT95)
#define _OMC_LIT96_data "OPT_LOOP_INPUT"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT96,14,_OMC_LIT96_data);
#define _OMC_LIT96 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT96)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT97,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT96}};
#define _OMC_LIT97 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT97)
#define _OMC_LIT98_data "ALG_STATE"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT98,9,_OMC_LIT98_data);
#define _OMC_LIT98 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT98)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT99,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT98}};
#define _OMC_LIT99 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT99)
#define _OMC_LIT100_data "DAE_RESIDUAL_VAR"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT100,16,_OMC_LIT100_data);
#define _OMC_LIT100 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT100)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT101,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT100}};
#define _OMC_LIT101 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT101)
#define _OMC_LIT102_data "DAE_AUX_VAR"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT102,11,_OMC_LIT102_data);
#define _OMC_LIT102 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT102)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT103,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT102}};
#define _OMC_LIT103 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT103)
#define _OMC_LIT104_data "LOOP_ITERATION"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT104,14,_OMC_LIT104_data);
#define _OMC_LIT104 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT104)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT105,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT104}};
#define _OMC_LIT105 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT105)
#define _OMC_LIT106_data "LOOP_SOLVED"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT106,11,_OMC_LIT106_data);
#define _OMC_LIT106 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT106)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT107,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT106}};
#define _OMC_LIT107 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT107)
#define _OMC_LIT108_data "#UNKNOWN_VARKIND"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT108,16,_OMC_LIT108_data);
#define _OMC_LIT108 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT108)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT109,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT108}};
#define _OMC_LIT109 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT109)
#define _OMC_LIT110_data "discrete"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT110,8,_OMC_LIT110_data);
#define _OMC_LIT110 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT110)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT111,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT110}};
#define _OMC_LIT111 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT111)
#define _OMC_LIT112_data "parameter"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT112,9,_OMC_LIT112_data);
#define _OMC_LIT112 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT112)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT113,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT112}};
#define _OMC_LIT113 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT113)
#define _OMC_LIT114_data "constant"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT114,8,_OMC_LIT114_data);
#define _OMC_LIT114 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT114)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT115,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT114}};
#define _OMC_LIT115 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT115)
#define _OMC_LIT116_data "continuous"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT116,10,_OMC_LIT116_data);
#define _OMC_LIT116 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT116)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT117,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT116}};
#define _OMC_LIT117 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT117)
#define _OMC_LIT118_data "initial value of unknown type: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT118,31,_OMC_LIT118_data);
#define _OMC_LIT118 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT118)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT119,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT118}};
#define _OMC_LIT119 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT119)
#define _OMC_LIT120_data "false"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT120,5,_OMC_LIT120_data);
#define _OMC_LIT120 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT120)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT121,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT120}};
#define _OMC_LIT121 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT121)
#define _OMC_LIT122_data "true"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT122,4,_OMC_LIT122_data);
#define _OMC_LIT122 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT122)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT123,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT122}};
#define _OMC_LIT123 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT123)
#define _OMC_LIT124_data "0"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT124,1,_OMC_LIT124_data);
#define _OMC_LIT124 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT124)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT125,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT124}};
#define _OMC_LIT125 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT125)
#define _OMC_LIT126_data "0.0"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT126,3,_OMC_LIT126_data);
#define _OMC_LIT126 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT126)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT127,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT126}};
#define _OMC_LIT127 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT127)
#define _OMC_LIT128_data "/*"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT128,2,_OMC_LIT128_data);
#define _OMC_LIT128 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT128)
#define _OMC_LIT129_data "(*"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT129,2,_OMC_LIT129_data);
#define _OMC_LIT129 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT129)
#define _OMC_LIT130_data "*/"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT130,2,_OMC_LIT130_data);
#define _OMC_LIT130 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT130)
#define _OMC_LIT131_data "*)"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT131,2,_OMC_LIT131_data);
#define _OMC_LIT131 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT131)
#define _OMC_LIT132_data "UNKNOWN_SUBSCRIPT /* "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT132,21,_OMC_LIT132_data);
#define _OMC_LIT132 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT132)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT133,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT132}};
#define _OMC_LIT133 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT133)
#define _OMC_LIT134_data " */"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT134,3,_OMC_LIT134_data);
#define _OMC_LIT134 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT134)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT135,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT134}};
#define _OMC_LIT135 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT135)
#define _OMC_LIT136_data "WHOLEDIM"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT136,8,_OMC_LIT136_data);
#define _OMC_LIT136 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT136)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT137,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT136}};
#define _OMC_LIT137 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT137)
#define _OMC_LIT138_data "WHOLE_NONEXP"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT138,12,_OMC_LIT138_data);
#define _OMC_LIT138 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT138)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT139,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT138}};
#define _OMC_LIT139 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT139)
#define _OMC_LIT140_data "UNKNOWN_SUBSCRIPT"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT140,17,_OMC_LIT140_data);
#define _OMC_LIT140 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT140)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT141,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT140}};
#define _OMC_LIT141 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT141)
#define _OMC_LIT142_data "("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT142,1,_OMC_LIT142_data);
#define _OMC_LIT142 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT142)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT143,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT142}};
#define _OMC_LIT143 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT143)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT144,1,1) {_OMC_LIT63}};
#define _OMC_LIT144 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT144)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT145,9,3) {&Tpl_IterOptions_ITER__OPTIONS__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT144,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT7,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT7}};
#define _OMC_LIT145 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT145)
#define _OMC_LIT146_data "der_"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT146,4,_OMC_LIT146_data);
#define _OMC_LIT146 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT146)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT147,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT146}};
#define _OMC_LIT147 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT147)
#define _OMC_LIT148_data "pre_"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT148,4,_OMC_LIT148_data);
#define _OMC_LIT148 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT148)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT149,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT148}};
#define _OMC_LIT149 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT149)
#define _OMC_LIT150_data "_"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT150,1,_OMC_LIT150_data);
#define _OMC_LIT150 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT150)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT151,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT150}};
#define _OMC_LIT151 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT151)
#define _OMC_LIT152_data "CREF_NOT_IDENT_OR_QUAL"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT152,22,_OMC_LIT152_data);
#define _OMC_LIT152 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT152)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT152}};
#define _OMC_LIT153 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153)
#define _OMC_LIT154_data "$DER"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT154,4,_OMC_LIT154_data);
#define _OMC_LIT154 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT154)
#define _OMC_LIT155_data "$CLKPRE"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT155,7,_OMC_LIT155_data);
#define _OMC_LIT155 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT155)
#define _OMC_LIT156_data "["
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT156,1,_OMC_LIT156_data);
#define _OMC_LIT156 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT156)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT157,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT156}};
#define _OMC_LIT157 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT157)
#define _OMC_LIT158_data "]"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT158,1,_OMC_LIT158_data);
#define _OMC_LIT158 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT158)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT159,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT158}};
#define _OMC_LIT159 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT159)
#define _OMC_LIT160_data "der("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT160,4,_OMC_LIT160_data);
#define _OMC_LIT160 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT160)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT161,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT160}};
#define _OMC_LIT161 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT161)
#define _OMC_LIT162_data "previous("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT162,9,_OMC_LIT162_data);
#define _OMC_LIT162 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT162)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT163,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT162}};
#define _OMC_LIT163 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT163)
#define _OMC_LIT164_data "._"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT164,2,_OMC_LIT164_data);
#define _OMC_LIT164 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT164)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT165,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT164}};
#define _OMC_LIT165 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT165)
#define _OMC_LIT166_data "msvc"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT166,4,_OMC_LIT166_data);
#define _OMC_LIT166 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT166)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT167,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT166}};
#define _OMC_LIT167 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT167)
#define _OMC_LIT168_data "msvc10"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT168,6,_OMC_LIT168_data);
#define _OMC_LIT168 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT168)
#define _OMC_LIT169_data "msvc12"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT169,6,_OMC_LIT169_data);
#define _OMC_LIT169 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT169)
#define _OMC_LIT170_data "msvc13"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT170,6,_OMC_LIT170_data);
#define _OMC_LIT170 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT170)
#define _OMC_LIT171_data "msvc15"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT171,6,_OMC_LIT171_data);
#define _OMC_LIT171 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT171)
#define _OMC_LIT172_data "msvc19"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT172,6,_OMC_LIT172_data);
#define _OMC_LIT172 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT172)
#define _OMC_LIT173_data "__"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT173,2,_OMC_LIT173_data);
#define _OMC_LIT173 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT173)
#include "util/modelica.h"
#include "CodegenUtil_includes.h"
#if !defined(PROTECTED_FUNCTION_STATIC)
#define PROTECTED_FUNCTION_STATIC
#endif
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenUtil_fun__61(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_startValue);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenUtil_fun__61,2,0) {(void*) boxptr_CodegenUtil_fun__61,0}};
#define boxvar_CodegenUtil_fun__61 MMC_REFSTRUCTLIT(boxvar_lit_CodegenUtil_fun__61)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenUtil_fun__58(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_type__, modelica_string _in_a_unit, modelica_string _in_a_displayUnit, modelica_metatype _in_a_minValue, modelica_metatype _in_a_maxValue, modelica_metatype _in_a_startValue, modelica_metatype _in_a_nominalValue, modelica_boolean _in_a_isFixed);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenUtil_fun__58(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_type__, modelica_metatype _in_a_unit, modelica_metatype _in_a_displayUnit, modelica_metatype _in_a_minValue, modelica_metatype _in_a_maxValue, modelica_metatype _in_a_startValue, modelica_metatype _in_a_nominalValue, modelica_metatype _in_a_isFixed);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenUtil_fun__58,2,0) {(void*) boxptr_CodegenUtil_fun__58,0}};
#define boxvar_CodegenUtil_fun__58 MMC_REFSTRUCTLIT(boxvar_lit_CodegenUtil_fun__58)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenUtil_fun__53(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_a_bool);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenUtil_fun__53(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_bool);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenUtil_fun__53,2,0) {(void*) boxptr_CodegenUtil_fun__53,0}};
#define boxvar_CodegenUtil_fun__53 MMC_REFSTRUCTLIT(boxvar_lit_CodegenUtil_fun__53)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenUtil_lm__48(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenUtil_lm__48,2,0) {(void*) boxptr_CodegenUtil_lm__48,0}};
#define boxvar_CodegenUtil_lm__48 MMC_REFSTRUCTLIT(boxvar_lit_CodegenUtil_lm__48)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenUtil_lm__45(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenUtil_lm__45,2,0) {(void*) boxptr_CodegenUtil_lm__45,0}};
#define boxvar_CodegenUtil_lm__45 MMC_REFSTRUCTLIT(boxvar_lit_CodegenUtil_lm__45)
DLLExport
modelica_metatype omc_CodegenUtil_errorMsg(threadData_t *threadData, modelica_metatype _txt, modelica_string _a_errMessage)
{
modelica_metatype _out_txt = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
omc_Tpl_addTemplateError(threadData, _a_errMessage);
_out_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT4);
_out_txt = omc_Tpl_writeStr(threadData, _out_txt, _a_errMessage);
_out_txt = omc_Tpl_writeTok(threadData, _out_txt, _OMC_LIT6);
_out_txt = omc_Tpl_writeTok(threadData, _out_txt, _OMC_LIT7);
_return: OMC_LABEL_UNUSED
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_error(threadData_t *threadData, modelica_metatype _txt, modelica_metatype _a_srcInfo, modelica_string _a_errMessage)
{
modelica_metatype _out_txt = NULL;
modelica_string _ret_0 = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
omc_Tpl_addSourceTemplateError(threadData, _a_errMessage, _a_srcInfo);
_out_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT4);
_ret_0 = omc_Error_infoStr(threadData, _a_srcInfo);
_out_txt = omc_Tpl_writeStr(threadData, _out_txt, _ret_0);
_out_txt = omc_Tpl_writeTok(threadData, _out_txt, _OMC_LIT9);
_out_txt = omc_Tpl_writeStr(threadData, _out_txt, _a_errMessage);
_out_txt = omc_Tpl_writeTok(threadData, _out_txt, _OMC_LIT6);
_out_txt = omc_Tpl_writeTok(threadData, _out_txt, _OMC_LIT7);
_return: OMC_LABEL_UNUSED
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_dotPath(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_path)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _in_txt;
tmp4_2 = _in_a_path;
{
modelica_metatype _txt = NULL;
modelica_string _i_name_1 = NULL;
modelica_metatype _i_path = NULL;
modelica_string _i_name = NULL;
int tmp4;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp4_2))) {
case 3: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,2) == 0) goto tmp3_end;
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
_i_name = tmpMeta5;
_i_path = tmpMeta6;
_txt = tmp4_1;
_txt = omc_Tpl_writeStr(threadData, _txt, _i_name);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT11);
_in_txt = _txt;
_in_a_path = _i_path;
goto _tailrecursive;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
_i_name_1 = tmpMeta7;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeStr(threadData, _txt, _i_name_1);
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
_i_path = tmpMeta8;
_txt = tmp4_1;
_in_txt = _txt;
_in_a_path = _i_path;
goto _tailrecursive;
goto tmp3_done;
}
default:
tmp3_default: OMC_LABEL_UNUSED; {
_txt = tmp4_1;
tmpMeta1 = _txt;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_ScalarVariableTypeRealMaxAttribute(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_maxValue)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _in_txt;
tmp4_2 = _in_a_maxValue;
{
modelica_metatype _txt = NULL;
modelica_metatype _i_exp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (optionNone(tmp4_2)) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
_i_exp = tmpMeta6;
_txt = tmp4_1;
tmpMeta1 = omc_CodegenUtil_MaxString(threadData, _txt, _i_exp);
goto tmp3_done;
}
case 1: {
_txt = tmp4_1;
tmpMeta1 = _txt;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_ScalarVariableTypeRealMinAttribute(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_minValue)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _in_txt;
tmp4_2 = _in_a_minValue;
{
modelica_metatype _txt = NULL;
modelica_metatype _i_exp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (optionNone(tmp4_2)) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
_i_exp = tmpMeta6;
_txt = tmp4_1;
tmpMeta1 = omc_CodegenUtil_MinString(threadData, _txt, _i_exp);
goto tmp3_done;
}
case 1: {
_txt = tmp4_1;
tmpMeta1 = _txt;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_ScalarVariableTypeIntegerMaxAttribute(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_maxValue)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _in_txt;
tmp4_2 = _in_a_maxValue;
{
modelica_metatype _txt = NULL;
modelica_metatype _i_exp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (optionNone(tmp4_2)) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
_i_exp = tmpMeta6;
_txt = tmp4_1;
tmpMeta1 = omc_CodegenUtil_MaxString(threadData, _txt, _i_exp);
goto tmp3_done;
}
case 1: {
_txt = tmp4_1;
tmpMeta1 = _txt;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_MaxString(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_exp)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _in_txt;
tmp4_2 = _in_a_exp;
{
modelica_metatype _txt = NULL;
modelica_metatype _i_exp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 6; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,1) == 0) goto tmp3_end;
_i_exp = tmp4_2;
_txt = tmp4_1;
_txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT12);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT14);
_txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_exp);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT6);
tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
goto tmp3_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
_i_exp = tmp4_2;
_txt = tmp4_1;
_txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT12);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT14);
_txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_exp);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT6);
tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
goto tmp3_done;
}
case 2: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
_i_exp = tmp4_2;
_txt = tmp4_1;
_txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT12);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT14);
_txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_exp);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT6);
tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
goto tmp3_done;
}
case 3: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,3,1) == 0) goto tmp3_end;
_i_exp = tmp4_2;
_txt = tmp4_1;
_txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT12);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT14);
_txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_exp);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT6);
tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
goto tmp3_done;
}
case 4: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,5,2) == 0) goto tmp3_end;
_i_exp = tmp4_2;
_txt = tmp4_1;
_txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT12);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT14);
_txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_exp);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT6);
tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
goto tmp3_done;
}
case 5: {
_txt = tmp4_1;
tmpMeta1 = _txt;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_ScalarVariableTypeIntegerMinAttribute(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_minValue)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _in_txt;
tmp4_2 = _in_a_minValue;
{
modelica_metatype _txt = NULL;
modelica_metatype _i_exp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (optionNone(tmp4_2)) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
_i_exp = tmpMeta6;
_txt = tmp4_1;
tmpMeta1 = omc_CodegenUtil_MinString(threadData, _txt, _i_exp);
goto tmp3_done;
}
case 1: {
_txt = tmp4_1;
tmpMeta1 = _txt;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_MinString(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_exp)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _in_txt;
tmp4_2 = _in_a_exp;
{
modelica_metatype _txt = NULL;
modelica_metatype _i_exp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 6; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,1) == 0) goto tmp3_end;
_i_exp = tmp4_2;
_txt = tmp4_1;
_txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT12);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT16);
_txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_exp);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT6);
tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
goto tmp3_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
_i_exp = tmp4_2;
_txt = tmp4_1;
_txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT12);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT16);
_txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_exp);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT6);
tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
goto tmp3_done;
}
case 2: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
_i_exp = tmp4_2;
_txt = tmp4_1;
_txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT12);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT16);
_txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_exp);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT6);
tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
goto tmp3_done;
}
case 3: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,3,1) == 0) goto tmp3_end;
_i_exp = tmp4_2;
_txt = tmp4_1;
_txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT12);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT16);
_txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_exp);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT6);
tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
goto tmp3_done;
}
case 4: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,5,2) == 0) goto tmp3_end;
_i_exp = tmp4_2;
_txt = tmp4_1;
_txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT12);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT16);
_txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_exp);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT6);
tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
goto tmp3_done;
}
case 5: {
_txt = tmp4_1;
tmpMeta1 = _txt;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_ScalarVariableTypeDisplayUnitAttribute(threadData_t *threadData, modelica_metatype _in_txt, modelica_string _in_a_displayUnit)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_string tmp4_2;
tmp4_1 = _in_txt;
tmp4_2 = _in_a_displayUnit;
{
modelica_metatype _txt = NULL;
modelica_string _i_displayUnit = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (0 != MMC_STRLEN(tmp4_2) || strcmp(MMC_STRINGDATA(_OMC_LIT19), MMC_STRINGDATA(tmp4_2)) != 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = _txt;
goto tmp3_done;
}
case 1: {
_txt = tmp4_1;
_i_displayUnit = tmp4_2;
_txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT12);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT18);
_txt = omc_Tpl_writeStr(threadData, _txt, _i_displayUnit);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT6);
tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_ScalarVariableTypeUnitAttribute(threadData_t *threadData, modelica_metatype _in_txt, modelica_string _in_a_unit)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_string tmp4_2;
tmp4_1 = _in_txt;
tmp4_2 = _in_a_unit;
{
modelica_metatype _txt = NULL;
modelica_string _i_unit = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (0 != MMC_STRLEN(tmp4_2) || strcmp(MMC_STRINGDATA(_OMC_LIT19), MMC_STRINGDATA(tmp4_2)) != 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = _txt;
goto tmp3_done;
}
case 1: {
_txt = tmp4_1;
_i_unit = tmp4_2;
_txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT12);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT21);
_txt = omc_Tpl_writeStr(threadData, _txt, _i_unit);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT6);
tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_ScalarVariableTypeNominalAttribute(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_nominalValue)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _in_txt;
tmp4_2 = _in_a_nominalValue;
{
modelica_metatype _txt = NULL;
modelica_metatype _i_exp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (optionNone(tmp4_2)) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
_i_exp = tmpMeta6;
_txt = tmp4_1;
_txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT12);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT23);
_txt = omc_CodegenUtil_NominalString(threadData, _txt, _i_exp);
tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
goto tmp3_done;
}
case 1: {
if (!optionNone(tmp4_2)) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT25);
goto tmp3_done;
}
case 2: {
_txt = tmp4_1;
tmpMeta1 = _txt;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_NominalString(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_exp)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _in_txt;
tmp4_2 = _in_a_exp;
{
modelica_metatype _txt = NULL;
modelica_metatype _i_exp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,1) == 0) goto tmp3_end;
_i_exp = tmp4_2;
_txt = tmp4_1;
_txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT12);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT27);
_txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_exp);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT6);
tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
goto tmp3_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
_i_exp = tmp4_2;
_txt = tmp4_1;
_txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT12);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT27);
_txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_exp);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT6);
tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
goto tmp3_done;
}
case 2: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
_i_exp = tmp4_2;
_txt = tmp4_1;
_txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT12);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT27);
_txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_exp);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT6);
tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
goto tmp3_done;
}
case 3: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,3,1) == 0) goto tmp3_end;
_i_exp = tmp4_2;
_txt = tmp4_1;
_txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT12);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT27);
_txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_exp);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT6);
tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
goto tmp3_done;
}
case 4: {
_txt = tmp4_1;
tmpMeta1 = _txt;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_ScalarVariableTypeFixedAttribute(threadData_t *threadData, modelica_metatype _txt, modelica_boolean _a_isFixed)
{
modelica_metatype _out_txt = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_out_txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT12);
_out_txt = omc_Tpl_writeTok(threadData, _out_txt, _OMC_LIT29);
_out_txt = omc_Tpl_writeStr(threadData, _out_txt, omc_Tpl_booleanString(threadData, _a_isFixed));
_out_txt = omc_Tpl_writeTok(threadData, _out_txt, _OMC_LIT6);
_out_txt = omc_Tpl_popBlock(threadData, _out_txt);
_return: OMC_LABEL_UNUSED
return _out_txt;
}
modelica_metatype boxptr_CodegenUtil_ScalarVariableTypeFixedAttribute(threadData_t *threadData, modelica_metatype _txt, modelica_metatype _a_isFixed)
{
modelica_integer tmp1;
modelica_metatype _out_txt = NULL;
tmp1 = mmc_unbox_integer(_a_isFixed);
_out_txt = omc_CodegenUtil_ScalarVariableTypeFixedAttribute(threadData, _txt, tmp1);
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_ScalarVariableTypeStartAttribute(threadData_t *threadData, modelica_metatype _txt, modelica_metatype _a_startValue, modelica_metatype _a_type__)
{
modelica_metatype _out_txt = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_out_txt = omc_CodegenUtil_fun__61(threadData, _txt, _a_startValue);
_return: OMC_LABEL_UNUSED
return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenUtil_fun__61(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_startValue)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _in_txt;
tmp4_2 = _in_a_startValue;
{
modelica_metatype _txt = NULL;
modelica_metatype _i_exp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (optionNone(tmp4_2)) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
_i_exp = tmpMeta6;
_txt = tmp4_1;
tmpMeta1 = omc_CodegenUtil_StartString(threadData, _txt, _i_exp);
goto tmp3_done;
}
case 1: {
_txt = tmp4_1;
tmpMeta1 = _txt;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_StartString(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_exp)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _in_txt;
tmp4_2 = _in_a_exp;
{
modelica_metatype _txt = NULL;
modelica_metatype _i_exp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 6; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,1) == 0) goto tmp3_end;
_i_exp = tmp4_2;
_txt = tmp4_1;
_txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT12);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT31);
_txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_exp);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT6);
tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
goto tmp3_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
_i_exp = tmp4_2;
_txt = tmp4_1;
_txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT12);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT31);
_txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_exp);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT6);
tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
goto tmp3_done;
}
case 2: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
_i_exp = tmp4_2;
_txt = tmp4_1;
_txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT12);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT31);
_txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_exp);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT6);
tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
goto tmp3_done;
}
case 3: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,3,1) == 0) goto tmp3_end;
_i_exp = tmp4_2;
_txt = tmp4_1;
_txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT12);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT31);
_txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_exp);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT6);
tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
goto tmp3_done;
}
case 4: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,5,2) == 0) goto tmp3_end;
_i_exp = tmp4_2;
_txt = tmp4_1;
_txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT12);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT31);
_txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_exp);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT6);
tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
goto tmp3_done;
}
case 5: {
_txt = tmp4_1;
tmpMeta1 = _txt;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_ScalarVariableType(threadData_t *threadData, modelica_metatype _txt, modelica_string _a_unit, modelica_string _a_displayUnit, modelica_metatype _a_minValue, modelica_metatype _a_maxValue, modelica_metatype _a_startValue, modelica_metatype _a_nominalValue, modelica_boolean _a_isFixed, modelica_metatype _a_type__)
{
modelica_metatype _out_txt = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_out_txt = omc_CodegenUtil_fun__58(threadData, _txt, _a_type__, _a_unit, _a_displayUnit, _a_minValue, _a_maxValue, _a_startValue, _a_nominalValue, _a_isFixed);
_return: OMC_LABEL_UNUSED
return _out_txt;
}
modelica_metatype boxptr_CodegenUtil_ScalarVariableType(threadData_t *threadData, modelica_metatype _txt, modelica_metatype _a_unit, modelica_metatype _a_displayUnit, modelica_metatype _a_minValue, modelica_metatype _a_maxValue, modelica_metatype _a_startValue, modelica_metatype _a_nominalValue, modelica_metatype _a_isFixed, modelica_metatype _a_type__)
{
modelica_integer tmp1;
modelica_metatype _out_txt = NULL;
tmp1 = mmc_unbox_integer(_a_isFixed);
_out_txt = omc_CodegenUtil_ScalarVariableType(threadData, _txt, _a_unit, _a_displayUnit, _a_minValue, _a_maxValue, _a_startValue, _a_nominalValue, tmp1, _a_type__);
return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenUtil_fun__58(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_type__, modelica_string _in_a_unit, modelica_string _in_a_displayUnit, modelica_metatype _in_a_minValue, modelica_metatype _in_a_maxValue, modelica_metatype _in_a_startValue, modelica_metatype _in_a_nominalValue, modelica_boolean _in_a_isFixed)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_string tmp4_3;modelica_string tmp4_4;modelica_metatype tmp4_5;modelica_metatype tmp4_6;modelica_metatype tmp4_7;modelica_metatype tmp4_8;modelica_boolean tmp4_9;
tmp4_1 = _in_txt;
tmp4_2 = _in_a_type__;
tmp4_3 = _in_a_unit;
tmp4_4 = _in_a_displayUnit;
tmp4_5 = _in_a_minValue;
tmp4_6 = _in_a_maxValue;
tmp4_7 = _in_a_startValue;
tmp4_8 = _in_a_nominalValue;
tmp4_9 = _in_a_isFixed;
{
modelica_metatype _txt = NULL;
modelica_string _a_unit = NULL;
modelica_string _a_displayUnit = NULL;
modelica_metatype _a_minValue = NULL;
modelica_metatype _a_maxValue = NULL;
modelica_metatype _a_startValue = NULL;
modelica_metatype _a_nominalValue = NULL;
modelica_boolean _a_isFixed;
modelica_metatype _i_ci_path = NULL;
modelica_metatype _i_type__ = NULL;
modelica_metatype _txt_2 = NULL;
modelica_string _ret_2 = NULL;
modelica_string _ret_1 = NULL;
modelica_metatype _txt_0 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 7; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,1) == 0) goto tmp3_end;
_i_type__ = tmp4_2;
_txt = tmp4_1;
_a_unit = tmp4_3;
_a_displayUnit = tmp4_4;
_a_minValue = tmp4_5;
_a_maxValue = tmp4_6;
_a_startValue = tmp4_7;
_a_isFixed = tmp4_9;
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT33);
_txt = omc_CodegenUtil_ScalarVariableTypeStartAttribute(threadData, _txt, _a_startValue, _i_type__);
_txt = omc_CodegenUtil_ScalarVariableTypeFixedAttribute(threadData, _txt, _a_isFixed);
_txt = omc_CodegenUtil_ScalarVariableTypeIntegerMinAttribute(threadData, _txt, _a_minValue);
_txt = omc_CodegenUtil_ScalarVariableTypeIntegerMaxAttribute(threadData, _txt, _a_maxValue);
_txt = omc_CodegenUtil_ScalarVariableTypeUnitAttribute(threadData, _txt, _a_unit);
_txt = omc_CodegenUtil_ScalarVariableTypeDisplayUnitAttribute(threadData, _txt, _a_displayUnit);
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT35);
goto tmp3_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
_i_type__ = tmp4_2;
_txt = tmp4_1;
_a_unit = tmp4_3;
_a_displayUnit = tmp4_4;
_a_minValue = tmp4_5;
_a_maxValue = tmp4_6;
_a_startValue = tmp4_7;
_a_nominalValue = tmp4_8;
_a_isFixed = tmp4_9;
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT37);
_txt = omc_CodegenUtil_ScalarVariableTypeStartAttribute(threadData, _txt, _a_startValue, _i_type__);
_txt = omc_CodegenUtil_ScalarVariableTypeFixedAttribute(threadData, _txt, _a_isFixed);
_txt = omc_CodegenUtil_ScalarVariableTypeNominalAttribute(threadData, _txt, _a_nominalValue);
_txt = omc_CodegenUtil_ScalarVariableTypeRealMinAttribute(threadData, _txt, _a_minValue);
_txt = omc_CodegenUtil_ScalarVariableTypeRealMaxAttribute(threadData, _txt, _a_maxValue);
_txt = omc_CodegenUtil_ScalarVariableTypeUnitAttribute(threadData, _txt, _a_unit);
_txt = omc_CodegenUtil_ScalarVariableTypeDisplayUnitAttribute(threadData, _txt, _a_displayUnit);
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT35);
goto tmp3_done;
}
case 2: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,3,1) == 0) goto tmp3_end;
_i_type__ = tmp4_2;
_txt = tmp4_1;
_a_unit = tmp4_3;
_a_displayUnit = tmp4_4;
_a_startValue = tmp4_7;
_a_isFixed = tmp4_9;
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT39);
_txt = omc_CodegenUtil_ScalarVariableTypeStartAttribute(threadData, _txt, _a_startValue, _i_type__);
_txt = omc_CodegenUtil_ScalarVariableTypeFixedAttribute(threadData, _txt, _a_isFixed);
_txt = omc_CodegenUtil_ScalarVariableTypeUnitAttribute(threadData, _txt, _a_unit);
_txt = omc_CodegenUtil_ScalarVariableTypeDisplayUnitAttribute(threadData, _txt, _a_displayUnit);
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT35);
goto tmp3_done;
}
case 3: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
_i_type__ = tmp4_2;
_txt = tmp4_1;
_a_unit = tmp4_3;
_a_displayUnit = tmp4_4;
_a_startValue = tmp4_7;
_a_isFixed = tmp4_9;
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT41);
_txt = omc_CodegenUtil_ScalarVariableTypeStartAttribute(threadData, _txt, _a_startValue, _i_type__);
_txt = omc_CodegenUtil_ScalarVariableTypeFixedAttribute(threadData, _txt, _a_isFixed);
_txt = omc_CodegenUtil_ScalarVariableTypeUnitAttribute(threadData, _txt, _a_unit);
_txt = omc_CodegenUtil_ScalarVariableTypeDisplayUnitAttribute(threadData, _txt, _a_displayUnit);
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT35);
goto tmp3_done;
}
case 4: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,5,5) == 0) goto tmp3_end;
_i_type__ = tmp4_2;
_txt = tmp4_1;
_a_unit = tmp4_3;
_a_displayUnit = tmp4_4;
_a_startValue = tmp4_7;
_a_isFixed = tmp4_9;
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT33);
_txt = omc_CodegenUtil_ScalarVariableTypeStartAttribute(threadData, _txt, _a_startValue, _i_type__);
_txt = omc_CodegenUtil_ScalarVariableTypeFixedAttribute(threadData, _txt, _a_isFixed);
_txt = omc_CodegenUtil_ScalarVariableTypeUnitAttribute(threadData, _txt, _a_unit);
_txt = omc_CodegenUtil_ScalarVariableTypeDisplayUnitAttribute(threadData, _txt, _a_displayUnit);
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT35);
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,9,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,17,1) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
_i_ci_path = tmpMeta7;
_txt = tmp4_1;
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT43);
_txt_0 = omc_CodegenUtil_dotPath(threadData, _OMC_LIT44, _i_ci_path);
_ret_1 = omc_Util_escapeModelicaStringToXmlString(threadData, omc_Tpl_textString(threadData, _txt_0));
_txt = omc_Tpl_writeStr(threadData, _txt, _ret_1);
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT46);
goto tmp3_done;
}
case 6: {
_txt = tmp4_1;
_i_type__ = tmp4_2;
_txt_2 = omc_Tpl_writeTok(threadData, _OMC_LIT44, _OMC_LIT48);
_ret_2 = omc_Types_unparseType(threadData, _i_type__);
_txt_2 = omc_Tpl_writeStr(threadData, _txt_2, _ret_2);
tmpMeta1 = omc_CodegenUtil_error(threadData, _txt, omc_Tpl_sourceInfo(threadData, _OMC_LIT49, ((modelica_integer) 269), ((modelica_integer) 16)), omc_Tpl_textString(threadData, _txt_2));
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenUtil_fun__58(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_type__, modelica_metatype _in_a_unit, modelica_metatype _in_a_displayUnit, modelica_metatype _in_a_minValue, modelica_metatype _in_a_maxValue, modelica_metatype _in_a_startValue, modelica_metatype _in_a_nominalValue, modelica_metatype _in_a_isFixed)
{
modelica_integer tmp1;
modelica_metatype _out_txt = NULL;
tmp1 = mmc_unbox_integer(_in_a_isFixed);
_out_txt = omc_CodegenUtil_fun__58(threadData, _in_txt, _in_a_type__, _in_a_unit, _in_a_displayUnit, _in_a_minValue, _in_a_maxValue, _in_a_startValue, _in_a_nominalValue, tmp1);
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_getAliasVar(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_aliasvar)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _in_txt;
tmp4_2 = _in_a_aliasvar;
{
modelica_metatype _txt = NULL;
modelica_metatype _i_varName = NULL;
int tmp4;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp4_2))) {
case 3: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,0) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT51);
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta5;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
_i_varName = tmpMeta5;
_txt = tmp4_1;
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT53);
_txt = omc_CodegenUtil_crefStrNoUnderscore(threadData, _txt, _i_varName);
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT6);
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
_i_varName = tmpMeta6;
_txt = tmp4_1;
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT55);
_txt = omc_CodegenUtil_crefStrNoUnderscore(threadData, _txt, _i_varName);
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT6);
goto tmp3_done;
}
default:
tmp3_default: OMC_LABEL_UNUSED; {
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT51);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_variabilityString(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_varKind)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _in_txt;
tmp4_2 = _in_a_varKind;
{
modelica_metatype _txt = NULL;
modelica_metatype _i_fullClassName = NULL;
modelica_metatype _i_dcr = NULL;
modelica_integer _i_index;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 26; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,0) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT57);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_integer tmp7;
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
tmp7 = mmc_unbox_integer(tmpMeta6);
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
if (!optionNone(tmpMeta8)) goto tmp3_end;
_i_index = tmp7;
_txt = tmp4_1;
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT59);
_txt = omc_Tpl_writeStr(threadData, _txt, intString(_i_index));
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT61);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta9;
modelica_integer tmp10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,3) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
tmp10 = mmc_unbox_integer(tmpMeta9);
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
if (optionNone(tmpMeta11)) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 1));
_i_index = tmp10;
_i_dcr = tmpMeta12;
_txt = tmp4_1;
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT59);
_txt = omc_Tpl_writeStr(threadData, _txt, intString(_i_index));
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT63);
_txt = omc_CodegenUtil_crefStrNoUnderscore(threadData, _txt, _i_dcr);
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT61);
goto tmp3_done;
}
case 3: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,0) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT65);
goto tmp3_done;
}
case 4: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,3,0) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT67);
goto tmp3_done;
}
case 5: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,4,0) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT69);
goto tmp3_done;
}
case 6: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,5,2) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT71);
goto tmp3_done;
}
case 7: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,6,0) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT73);
goto tmp3_done;
}
case 8: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,7,0) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT75);
goto tmp3_done;
}
case 9: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,8,0) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT77);
goto tmp3_done;
}
case 10: {
modelica_metatype tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,9,1) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
_i_fullClassName = tmpMeta13;
_txt = tmp4_1;
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT79);
tmpMeta1 = omc_CodegenUtil_dotPath(threadData, _txt, _i_fullClassName);
goto tmp3_done;
}
case 11: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,10,0) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT81);
goto tmp3_done;
}
case 12: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,11,0) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT83);
goto tmp3_done;
}
case 13: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,12,0) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT85);
goto tmp3_done;
}
case 14: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,13,0) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT87);
goto tmp3_done;
}
case 15: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,14,0) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT89);
goto tmp3_done;
}
case 16: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,15,0) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT91);
goto tmp3_done;
}
case 17: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,16,0) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT93);
goto tmp3_done;
}
case 18: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,17,0) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT95);
goto tmp3_done;
}
case 19: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,18,1) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT97);
goto tmp3_done;
}
case 20: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,19,0) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT99);
goto tmp3_done;
}
case 21: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,21,0) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT101);
goto tmp3_done;
}
case 22: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,22,0) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT103);
goto tmp3_done;
}
case 23: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,23,0) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT105);
goto tmp3_done;
}
case 24: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,24,0) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT107);
goto tmp3_done;
}
case 25: {
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT109);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_getVariablity(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_varKind)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _in_txt;
tmp4_2 = _in_a_varKind;
{
modelica_metatype _txt = NULL;
int tmp4;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp4_2))) {
case 9: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,6,0) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT111);
goto tmp3_done;
}
case 10: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,7,0) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT113);
goto tmp3_done;
}
case 11: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,8,0) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT115);
goto tmp3_done;
}
default:
tmp3_default: OMC_LABEL_UNUSED; {
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT117);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_initValXml(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_exp)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _in_txt;
tmp4_2 = _in_a_exp;
{
modelica_metatype _txt = NULL;
modelica_metatype _i_exp = NULL;
modelica_integer _i_index;
modelica_boolean _i_bool;
modelica_string _i_string = NULL;
modelica_real _i_real;
modelica_integer _i_integer;
modelica_metatype _txt_1 = NULL;
modelica_string _ret_0 = NULL;
int tmp4;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp4_2))) {
case 3: {
modelica_metatype tmpMeta5;
modelica_integer tmp6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,1) == 0) goto tmp3_end;
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
tmp6 = mmc_unbox_integer(tmpMeta5);
_i_integer = tmp6;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeStr(threadData, _txt, intString(_i_integer));
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta7;
modelica_real tmp8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
tmp8 = mmc_unbox_real(tmpMeta7);
_i_real = tmp8;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeStr(threadData, _txt, realString(_i_real));
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
_i_string = tmpMeta9;
_txt = tmp4_1;
_ret_0 = omc_Util_escapeModelicaStringToXmlString(threadData, _i_string);
tmpMeta1 = omc_Tpl_writeStr(threadData, _txt, _ret_0);
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta10;
modelica_integer tmp11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,3,1) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
tmp11 = mmc_unbox_integer(tmpMeta10);
_i_bool = tmp11;
_txt = tmp4_1;
tmpMeta1 = omc_CodegenUtil_fun__53(threadData, _txt, _i_bool);
goto tmp3_done;
}
case 8: {
modelica_metatype tmpMeta12;
modelica_integer tmp13;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,5,2) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
tmp13 = mmc_unbox_integer(tmpMeta12);
_i_index = tmp13;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeStr(threadData, _txt, intString(_i_index));
goto tmp3_done;
}
default:
tmp3_default: OMC_LABEL_UNUSED; {
_txt = tmp4_1;
_i_exp = tmp4_2;
_txt_1 = omc_Tpl_writeTok(threadData, _OMC_LIT44, _OMC_LIT119);
_txt_1 = omc_ExpressionDumpTpl_dumpExp(threadData, _txt_1, _i_exp, _OMC_LIT5);
tmpMeta1 = omc_CodegenUtil_error(threadData, _txt, omc_Tpl_sourceInfo(threadData, _OMC_LIT49, ((modelica_integer) 198), ((modelica_integer) 14)), omc_Tpl_textString(threadData, _txt_1));
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenUtil_fun__53(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_a_bool)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_boolean tmp4_2;
tmp4_1 = _in_txt;
tmp4_2 = _in_a_bool;
{
modelica_metatype _txt = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (0 != tmp4_2) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT121);
goto tmp3_done;
}
case 1: {
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT123);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenUtil_fun__53(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_bool)
{
modelica_integer tmp1;
modelica_metatype _out_txt = NULL;
tmp1 = mmc_unbox_integer(_in_a_bool);
_out_txt = omc_CodegenUtil_fun__53(threadData, _in_txt, tmp1);
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_initDefaultValXml(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_type__)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _in_txt;
tmp4_2 = _in_a_type__;
{
modelica_metatype _txt = NULL;
modelica_metatype _i_type__ = NULL;
modelica_metatype _txt_0 = NULL;
modelica_string _ret_0 = NULL;
int tmp4;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp4_2))) {
case 3: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,1) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT125);
goto tmp3_done;
}
case 4: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT127);
goto tmp3_done;
}
case 6: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,3,1) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT121);
goto tmp3_done;
}
case 5: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = _txt;
goto tmp3_done;
}
case 8: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,5,5) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT125);
goto tmp3_done;
}
default:
tmp3_default: OMC_LABEL_UNUSED; {
_txt = tmp4_1;
_i_type__ = tmp4_2;
_txt_0 = omc_Tpl_writeTok(threadData, _OMC_LIT44, _OMC_LIT119);
_ret_0 = omc_Types_unparseType(threadData, _i_type__);
_txt_0 = omc_Tpl_writeStr(threadData, _txt_0, _ret_0);
tmpMeta1 = omc_CodegenUtil_error(threadData, _txt, omc_Tpl_sourceInfo(threadData, _OMC_LIT49, ((modelica_integer) 187), ((modelica_integer) 14)), omc_Tpl_textString(threadData, _txt_0));
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_escapeCComments(threadData_t *threadData, modelica_metatype _txt, modelica_string _a_stringWithCComments)
{
modelica_metatype _out_txt = NULL;
modelica_string _ret_1 = NULL;
modelica_string _ret_0 = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_ret_0 = omc_System_stringReplace(threadData, _a_stringWithCComments, _OMC_LIT128, _OMC_LIT129);
_ret_1 = omc_System_stringReplace(threadData, _ret_0, _OMC_LIT130, _OMC_LIT131);
_out_txt = omc_Tpl_writeStr(threadData, _txt, _ret_1);
_return: OMC_LABEL_UNUSED
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_subscriptStr(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_subscript)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _in_txt;
tmp4_2 = _in_a_subscript;
{
modelica_metatype _txt = NULL;
modelica_metatype _i_exp = NULL;
modelica_metatype _i_n = NULL;
modelica_boolean _i_i_1;
modelica_integer _i_i;
modelica_string _ret_2 = NULL;
modelica_string _ret_1 = NULL;
modelica_string _ret_0 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 10; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_integer tmp8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmp8 = mmc_unbox_integer(tmpMeta7);
_i_i = tmp8;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeStr(threadData, _txt, intString(_i_i));
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_integer tmp11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,3,1) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
tmp11 = mmc_unbox_integer(tmpMeta10);
_i_i_1 = tmp11;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeStr(threadData, _txt, omc_Tpl_booleanString(threadData, _i_i_1));
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,5,2) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
_i_n = tmpMeta13;
_txt = tmp4_1;
tmpMeta1 = omc_CodegenUtil_dotPath(threadData, _txt, _i_n);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta14;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,6,2) == 0) goto tmp3_end;
_i_exp = tmpMeta14;
_txt = tmp4_1;
_ret_0 = omc_ExpressionDump_printExpStr(threadData, _i_exp);
tmpMeta1 = omc_Tpl_writeStr(threadData, _txt, _ret_0);
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_integer tmp17;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,0,1) == 0) goto tmp3_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
tmp17 = mmc_unbox_integer(tmpMeta16);
_i_i = tmp17;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeStr(threadData, _txt, intString(_i_i));
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta18;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
_i_exp = tmpMeta18;
_txt = tmp4_1;
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT133);
_ret_1 = omc_ExpressionDump_printExpStr(threadData, _i_exp);
_txt = omc_CodegenUtil_escapeCComments(threadData, _txt, _ret_1);
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT135);
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta19;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
_i_exp = tmpMeta19;
_txt = tmp4_1;
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT133);
_ret_2 = omc_ExpressionDump_printExpStr(threadData, _i_exp);
_txt = omc_CodegenUtil_escapeCComments(threadData, _txt, _ret_2);
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT135);
goto tmp3_done;
}
case 7: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,0) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT137);
goto tmp3_done;
}
case 8: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,3,1) == 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT139);
goto tmp3_done;
}
case 9: {
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT141);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_subscriptsStrMatlabSafe(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_subscripts)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _in_txt;
tmp4_2 = _in_a_subscripts;
{
modelica_metatype _txt = NULL;
modelica_metatype _i_subscripts = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_2)) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = _txt;
goto tmp3_done;
}
case 1: {
_txt = tmp4_1;
_i_subscripts = tmp4_2;
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT143);
_txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT145);
_txt = omc_CodegenUtil_lm__48(threadData, _txt, _i_subscripts);
_txt = omc_Tpl_popIter(threadData, _txt);
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT61);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenUtil_lm__48(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _in_txt;
tmp4_2 = _in_items;
{
modelica_metatype _txt = NULL;
modelica_metatype _rest = NULL;
modelica_metatype _i_s = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_2)) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = _txt;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_2);
tmpMeta7 = MMC_CDR(tmp4_2);
_i_s = tmpMeta6;
_rest = tmpMeta7;
_txt = tmp4_1;
_txt = omc_CodegenUtil_subscriptStr(threadData, _txt, _i_s);
_txt = omc_Tpl_nextIter(threadData, _txt);
_in_txt = _txt;
_in_items = _rest;
goto _tailrecursive;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_crefStrMatlabSafe(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_cr)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _in_txt;
tmp4_2 = _in_a_cr;
{
modelica_metatype _txt = NULL;
modelica_metatype _i_componentRef = NULL;
modelica_metatype _i_subscriptLst = NULL;
modelica_string _i_ident = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 4));
_i_ident = tmpMeta6;
_i_subscriptLst = tmpMeta7;
_txt = tmp4_1;
_txt = omc_Tpl_writeStr(threadData, _txt, _i_ident);
tmpMeta1 = omc_CodegenUtil_subscriptsStrMatlabSafe(threadData, _txt, _i_subscriptLst);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,4) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (4 != MMC_STRLEN(tmpMeta8) || strcmp(MMC_STRINGDATA(_OMC_LIT154), MMC_STRINGDATA(tmpMeta8)) != 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 5));
_i_componentRef = tmpMeta9;
_txt = tmp4_1;
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT147);
_in_txt = _txt;
_in_a_cr = _i_componentRef;
goto _tailrecursive;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,4) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (7 != MMC_STRLEN(tmpMeta10) || strcmp(MMC_STRINGDATA(_OMC_LIT155), MMC_STRINGDATA(tmpMeta10)) != 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 5));
_i_componentRef = tmpMeta11;
_txt = tmp4_1;
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT149);
_in_txt = _txt;
_in_a_cr = _i_componentRef;
goto _tailrecursive;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,4) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 4));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 5));
_i_ident = tmpMeta12;
_i_subscriptLst = tmpMeta13;
_i_componentRef = tmpMeta14;
_txt = tmp4_1;
_txt = omc_Tpl_writeStr(threadData, _txt, _i_ident);
_txt = omc_CodegenUtil_subscriptsStrMatlabSafe(threadData, _txt, _i_subscriptLst);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT151);
_in_txt = _txt;
_in_a_cr = _i_componentRef;
goto _tailrecursive;
goto tmp3_done;
}
case 4: {
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT153);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_subscriptsStr(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_subscripts)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _in_txt;
tmp4_2 = _in_a_subscripts;
{
modelica_metatype _txt = NULL;
modelica_metatype _i_subscripts = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_2)) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = _txt;
goto tmp3_done;
}
case 1: {
_txt = tmp4_1;
_i_subscripts = tmp4_2;
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT157);
_txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT145);
_txt = omc_CodegenUtil_lm__45(threadData, _txt, _i_subscripts);
_txt = omc_Tpl_popIter(threadData, _txt);
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT159);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenUtil_lm__45(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _in_txt;
tmp4_2 = _in_items;
{
modelica_metatype _txt = NULL;
modelica_metatype _rest = NULL;
modelica_metatype _i_s = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_2)) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = _txt;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_2);
tmpMeta7 = MMC_CDR(tmp4_2);
_i_s = tmpMeta6;
_rest = tmpMeta7;
_txt = tmp4_1;
_txt = omc_CodegenUtil_subscriptStr(threadData, _txt, _i_s);
_txt = omc_Tpl_nextIter(threadData, _txt);
_in_txt = _txt;
_in_items = _rest;
goto _tailrecursive;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_crefStrNoUnderscore(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_cr)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _in_txt;
tmp4_2 = _in_a_cr;
{
modelica_metatype _txt = NULL;
modelica_metatype _i_componentRef = NULL;
modelica_metatype _i_subscriptLst = NULL;
modelica_string _i_ident = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 4));
_i_ident = tmpMeta6;
_i_subscriptLst = tmpMeta7;
_txt = tmp4_1;
_txt = omc_Tpl_writeStr(threadData, _txt, _i_ident);
tmpMeta1 = omc_CodegenUtil_subscriptsStr(threadData, _txt, _i_subscriptLst);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,4) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (4 != MMC_STRLEN(tmpMeta8) || strcmp(MMC_STRINGDATA(_OMC_LIT154), MMC_STRINGDATA(tmpMeta8)) != 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 5));
_i_componentRef = tmpMeta9;
_txt = tmp4_1;
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT161);
_txt = omc_CodegenUtil_crefStrNoUnderscore(threadData, _txt, _i_componentRef);
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT61);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,4) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (7 != MMC_STRLEN(tmpMeta10) || strcmp(MMC_STRINGDATA(_OMC_LIT155), MMC_STRINGDATA(tmpMeta10)) != 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 5));
_i_componentRef = tmpMeta11;
_txt = tmp4_1;
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT163);
_txt = omc_CodegenUtil_crefStrNoUnderscore(threadData, _txt, _i_componentRef);
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT61);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,4) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 4));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 5));
_i_ident = tmpMeta12;
_i_subscriptLst = tmpMeta13;
_i_componentRef = tmpMeta14;
_txt = tmp4_1;
_txt = omc_Tpl_writeStr(threadData, _txt, _i_ident);
_txt = omc_CodegenUtil_subscriptsStr(threadData, _txt, _i_subscriptLst);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT11);
_in_txt = _txt;
_in_a_cr = _i_componentRef;
goto _tailrecursive;
goto tmp3_done;
}
case 4: {
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT153);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_crefStr(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_cr)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _in_txt;
tmp4_2 = _in_a_cr;
{
modelica_metatype _txt = NULL;
modelica_metatype _i_componentRef = NULL;
modelica_metatype _i_subscriptLst = NULL;
modelica_string _i_ident = NULL;
modelica_string _ret_1 = NULL;
modelica_string _ret_0 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 4));
_i_ident = tmpMeta6;
_i_subscriptLst = tmpMeta7;
_txt = tmp4_1;
_ret_0 = omc_System_unquoteIdentifier(threadData, _i_ident);
_txt = omc_Tpl_writeStr(threadData, _txt, _ret_0);
tmpMeta1 = omc_CodegenUtil_subscriptsStr(threadData, _txt, _i_subscriptLst);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,4) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (4 != MMC_STRLEN(tmpMeta8) || strcmp(MMC_STRINGDATA(_OMC_LIT154), MMC_STRINGDATA(tmpMeta8)) != 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 5));
_i_componentRef = tmpMeta9;
_txt = tmp4_1;
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT161);
_txt = omc_CodegenUtil_crefStr(threadData, _txt, _i_componentRef);
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT61);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,4) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (7 != MMC_STRLEN(tmpMeta10) || strcmp(MMC_STRINGDATA(_OMC_LIT155), MMC_STRINGDATA(tmpMeta10)) != 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 5));
_i_componentRef = tmpMeta11;
_txt = tmp4_1;
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT163);
_txt = omc_CodegenUtil_crefStr(threadData, _txt, _i_componentRef);
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT61);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,4) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 4));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 5));
_i_ident = tmpMeta12;
_i_subscriptLst = tmpMeta13;
_i_componentRef = tmpMeta14;
_txt = tmp4_1;
_ret_1 = omc_System_unquoteIdentifier(threadData, _i_ident);
_txt = omc_Tpl_writeStr(threadData, _txt, _ret_1);
_txt = omc_CodegenUtil_subscriptsStr(threadData, _txt, _i_subscriptLst);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT165);
_in_txt = _txt;
_in_a_cr = _i_componentRef;
goto _tailrecursive;
goto tmp3_done;
}
case 4: {
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT153);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_underscorePath(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_path)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _in_txt;
tmp4_2 = _in_a_path;
{
modelica_metatype _txt = NULL;
modelica_string _i_name_1 = NULL;
modelica_metatype _i_path = NULL;
modelica_string _i_name = NULL;
int tmp4;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp4_2))) {
case 3: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,2) == 0) goto tmp3_end;
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
_i_name = tmpMeta5;
_i_path = tmpMeta6;
_txt = tmp4_1;
_txt = omc_CodegenUtil_replaceDotAndUnderscore(threadData, _txt, _i_name);
_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT151);
_in_txt = _txt;
_in_a_path = _i_path;
goto _tailrecursive;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
_i_name_1 = tmpMeta7;
_txt = tmp4_1;
tmpMeta1 = omc_CodegenUtil_replaceDotAndUnderscore(threadData, _txt, _i_name_1);
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
_i_path = tmpMeta8;
_txt = tmp4_1;
_in_txt = _txt;
_in_a_path = _i_path;
goto _tailrecursive;
goto tmp3_done;
}
default:
tmp3_default: OMC_LABEL_UNUSED; {
_txt = tmp4_1;
tmpMeta1 = _txt;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_getGeneralTarget(threadData_t *threadData, modelica_metatype _in_txt, modelica_string _in_a_str)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_string tmp4_2;
tmp4_1 = _in_txt;
tmp4_2 = _in_a_str;
{
modelica_metatype _txt = NULL;
modelica_string _i_str = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 6; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (6 != MMC_STRLEN(tmp4_2) || strcmp(MMC_STRINGDATA(_OMC_LIT168), MMC_STRINGDATA(tmp4_2)) != 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT167);
goto tmp3_done;
}
case 1: {
if (6 != MMC_STRLEN(tmp4_2) || strcmp(MMC_STRINGDATA(_OMC_LIT169), MMC_STRINGDATA(tmp4_2)) != 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT167);
goto tmp3_done;
}
case 2: {
if (6 != MMC_STRLEN(tmp4_2) || strcmp(MMC_STRINGDATA(_OMC_LIT170), MMC_STRINGDATA(tmp4_2)) != 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT167);
goto tmp3_done;
}
case 3: {
if (6 != MMC_STRLEN(tmp4_2) || strcmp(MMC_STRINGDATA(_OMC_LIT171), MMC_STRINGDATA(tmp4_2)) != 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT167);
goto tmp3_done;
}
case 4: {
if (6 != MMC_STRLEN(tmp4_2) || strcmp(MMC_STRINGDATA(_OMC_LIT172), MMC_STRINGDATA(tmp4_2)) != 0) goto tmp3_end;
_txt = tmp4_1;
tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT167);
goto tmp3_done;
}
case 5: {
_txt = tmp4_1;
_i_str = tmp4_2;
tmpMeta1 = omc_Tpl_writeStr(threadData, _txt, _i_str);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_replaceDotAndUnderscore(threadData_t *threadData, modelica_metatype _in_txt, modelica_string _in_a_str)
{
modelica_metatype _out_txt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_string tmp4_2;
tmp4_1 = _in_txt;
tmp4_2 = _in_a_str;
{
modelica_metatype _txt = NULL;
modelica_string _i_name = NULL;
modelica_string _ret_4 = NULL;
modelica_string _ret_3 = NULL;
modelica_metatype _l_str__underscores = NULL;
modelica_string _ret_1 = NULL;
modelica_metatype _l_str__dots = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
_txt = tmp4_1;
_i_name = tmp4_2;
_ret_1 = omc_System_stringReplace(threadData, _i_name, _OMC_LIT10, _OMC_LIT150);
_l_str__dots = omc_Tpl_writeStr(threadData, _OMC_LIT44, _ret_1);
_ret_3 = omc_System_stringReplace(threadData, omc_Tpl_textString(threadData, _l_str__dots), _OMC_LIT150, _OMC_LIT173);
_l_str__underscores = omc_Tpl_writeStr(threadData, _OMC_LIT44, _ret_3);
_ret_4 = omc_System_unquoteIdentifier(threadData, omc_Tpl_textString(threadData, _l_str__underscores));
tmpMeta1 = omc_Tpl_writeStr(threadData, _txt, _ret_4);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out_txt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out_txt;
}
DLLExport
modelica_metatype omc_CodegenUtil_symbolName(threadData_t *threadData, modelica_metatype _txt, modelica_string _a_modelNamePrefix, modelica_string _a_symbolName)
{
modelica_metatype _out_txt = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_out_txt = omc_Tpl_writeStr(threadData, _txt, _a_modelNamePrefix);
_out_txt = omc_Tpl_writeTok(threadData, _out_txt, _OMC_LIT151);
_out_txt = omc_Tpl_writeStr(threadData, _out_txt, _a_symbolName);
_return: OMC_LABEL_UNUSED
return _out_txt;
}
