[ { "input": "*L=grammar_tests/test_import_dir/nested_import1.txt;\nfiles=%*load", "minimised_modl": "*L=grammar_tests/test_import_dir/nested_import1.txt;files=%*load", "expected_output": "{\"files\":[\"grammar_tests/test_import_dir/nested_import1.txt\",\"grammar_tests/test_import_dir/nested_import2.txt\",\"grammar_tests/test_import_dir/nested_import3.txt\",\"grammar_tests/test_import_dir/test_import.txt\"]}" }, { "input": "*L=grammar_tests/1:grammar_tests/2:grammar_tests/3:grammar_tests/1;\nfiles=%*load", "minimised_modl": "*L=grammar_tests/1:grammar_tests/2:grammar_tests/3:grammar_tests/1;files=%*load", "expected_output": "{\"files\":[\"grammar_tests/1.modl\",\"grammar_tests/2.modl\",\"grammar_tests/3.modl\",\"grammar_tests/1.modl\"]}" }, { "input": "*L=\"https://www.modl.uk/tests/message-thread.txt\";\n\nclasses=*class", "minimised_modl": "*L=\"https://www.modl.uk/demo/message-thread.txt\";classes=*class", "expected_output": "{\"classes\":\"*class\"}"}, { "input": "*L=\"http://modules.num.uk/1.txt\";\n\nclasses=%*class", "minimised_modl": "*L=\"http://modules.num.uk/1.txt\";classes=%*class", "expected_output": "{\"classes\":[{\"root\":{\"name\":\"root\",\"superclass\":\"arr\",\"expect\":[\"entity\"]}},{\"object\":{\"name\":\"object\",\"superclass\":\"map\",\"expect\":[\"i\",\"h\",\"q\",\"c_\",\"r_\",\"tz\"]}},{\"entity\":{\"name\":\"entity\",\"superclass\":\"object\",\"assign\":[[\"n\"],[\"n\",\"q\"]],\"expect\":[\"n\",\"+\"]}},{\"media\":{\"name\":\"media\",\"superclass\":\"object\",\"assign\":[[\"v\"],[\"d\",\"v\"],[\"d\",\"v\",\"h\"]],\"expect\":[\"v\",\"ac\"]}},{\"x\":{\"name\":\"extension\",\"superclass\":\"map\",\"expect\":[\"url\",\"pa\"]}},{\"i\":{\"name\":\"introduction\",\"superclass\":\"str\"}},{\"h\":{\"name\":\"hours\",\"superclass\":\"arr\",\"expect\":[\"str\"]}},{\"tz\":{\"name\":\"time_zone_city\",\"superclass\":\"str\"}},{\"q\":{\"name\":\"query\",\"superclass\":\"str\"}},{\"c_\":{\"name\":\"continuation_\",\"superclass\":\"str\"}},{\"r_\":{\"name\":\"redirect_\",\"superclass\":\"str\"}},{\"p\":{\"name\":\"person\",\"superclass\":\"entity\",\"expect\":[\"b\"],\"object_type\":\"entity\",\"object_display_name\":\"Person\"}},{\"o\":{\"name\":\"organisation\",\"superclass\":\"entity\",\"assign\":[[\"n\"],[\"n\",\"+\"],[\"n\",\"s\",\"+\"],[\"?\",\"n\",\"s\",\"+\"],[\"?\",\"n\",\"s\",\"h\",\"+\"]],\"expect\":[\"s\"],\"object_type\":\"entity\",\"object_display_name\":\"Organisation\",\"description_default\":\"View Organisation\"}},{\"dp\":{\"name\":\"department\",\"superclass\":\"entity\",\"expect\":[\"d\"],\"object_type\":\"entity\",\"object_display_name\":\"Department\",\"description_default\":\"View Department\"}},{\"e\":{\"name\":\"employee\",\"superclass\":\"entity\",\"assign\":[[\"n\"],[\"n\",\"r\"]],\"expect\":[\"r\"],\"object_type\":\"entity\",\"object_display_name\":\"Employee\",\"description_default\":\"View Employee\"}},{\"l\":{\"name\":\"location\",\"superclass\":\"entity\",\"expect\":[\"d\"],\"object_type\":\"entity\",\"object_display_name\":\"Location\"}},{\"f\":{\"name\":\"folder\",\"superclass\":\"entity\",\"expect\":[\"d\"],\"object_type\":\"entity\",\"object_display_name\":\"Folder\"}},{\"n\":{\"name\":\"name\",\"superclass\":\"str\"}},{\"+\":{\"name\":\"objects\",\"superclass\":\"arr\",\"expect\":[\"object\"]}},{\"b\":{\"name\":\"bio\",\"superclass\":\"str\"}},{\"s\":{\"name\":\"slogan\",\"superclass\":\"str\"}},{\"d\":{\"name\":\"description\",\"superclass\":\"str\"}},{\"r\":{\"name\":\"role\",\"superclass\":\"str\"}},{\"v\":{\"name\":\"value\",\"superclass\":\"str\"}},{\"ac\":{\"name\":\"access\",\"superclass\":\"arr\",\"expect\":[\"str\"]}},{\"t\":{\"name\":\"telephone\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"Telephone\",\"description_default\":\"Call\",\"prefix\":\"tel://\",\"media_type\":\"core\"}},{\"sm\":{\"name\":\"sms\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"SMS\",\"description_default\":\"Text\",\"prefix\":\"sms://\",\"media_type\":\"core\"}},{\"u\":{\"name\":\"url\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"URL\",\"de\nscription_default\":\"Click\",\"prefix\":\"https://\",\"media_type\":\"core\"}},{\"uu\":{\"name\":\"unsecure_url\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"URL\",\"description_default\":\"Click\",\"prefix\":\"http://\",\"media_type\":\"core\"}},{\"g\":{\"name\":\"gps\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"GPS\",\"description_default\":\"View Address\",\"prefix\":\"Based on user preferences set in client.\",\"media_type\":\"core\"}},{\"a\":{\"name\":\"address\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"Address\",\"description_default\":\"View Address\",\"prefix\":\"Based on user preferences set in client.\",\"media_type\":\"core\"}},{\"fx\":{\"name\":\"fax\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"Fax\",\"description_default\":\"Send a fax\",\"prefix\":\"Based on user preferences set in client.\",\"media_type\":\"core\"}},{\"em\":{\"name\":\"email\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"Email\",\"description_default\":\"Send an email\",\"prefix\":\"mailto://\",\"media_type\":\"core\"}},{\"aa\":{\"name\":\"android-app\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"Android App\",\"description_default\":\"Download the app\",\"prefix\":\"https://play.google.com/store/apps/details?id=\",\"media_type\":\"3p\"}},{\"as\":{\"name\":\"ios-app\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"iOS App\",\"description_default\":\"Download the app\",\"prefix\":\"https://itunes.apple.com/app/\",\"media_type\":\"3p\"}},{\"bt\":{\"name\":\"baidu_tieba\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"Baidu Tieba\",\"description_default\":\"View Baidu profile\",\"prefix\":\"https://tieba.baidu.com/\",\"media_type\":\"3p\"}},{\"fb\":{\"name\":\"facebook\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"Facebook\",\"description_default\":\"View Facebook profile\",\"prefix\":\"https://www.facebook.com/\",\"media_type\":\"3p\"}},{\"fk\":{\"name\":\"flikr\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"Flikr\",\"description_default\":\"View Flikr profile\",\"prefix\":\"https://www.flikr.com/\",\"media_type\":\"3p\"}},{\"fs\":{\"name\":\"foursquare\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"FourSquare\",\"description_default\":\"View FourSquare page\",\"prefix\":\"https://www.foursquare.com/\",\"media_type\":\"3p\"}},{\"ft\":{\"name\":\"facetime\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"FaceTime\",\"description_default\":\"Call with FaceTime\",\"prefix\":\"facetime://\",\"media_type\":\"3p\"}},{\"gp\":{\"name\":\"google-plus\",\"superclass\":\"media\",\n\"object_type\":\"media\",\"object_display_name\":\"Google Plus\",\"description_default\":\"View Google Plus profile\",\"prefix\":\"https://plus.google.com/\",\"media_type\":\"3p\",\"value_prefix\":\"+\"}},{\"im\":{\"name\":\"imessage\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"iMessage\",\"description_default\":\"Send iMessage\",\"prefix\":\"imessage://\",\"media_type\":\"3p\"}},{\"in\":{\"name\":\"instagram\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"Instagram\",\"description_default\":\"View Instagram profile\",\"prefix\":\"https://www.instagram.com/\",\"media_type\":\"3p\"}},{\"kk\":{\"name\":\"kik\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"Kik\",\"description_default\":\"Connect with Kik\",\"prefix\":\"https://www.kik.com/u/\",\"media_type\":\"3p\"}},{\"li\":{\"name\":\"linkedin\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"LinkedIn\",\"description_default\":\"View LinkedIn page\",\"prefix\":\"https://www.linkedin.com/\",\"media_type\":\"3p\"}},{\"ln\":{\"name\":\"line\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"LINE\",\"description_default\":\"Connect with Line\",\"prefix\":\"line://\",\"media_type\":\"3p\"}},{\"md\":{\"name\":\"medium\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"Medium\",\"description_default\":\"View Medium blog\",\"prefix\":\"https://www.medium.com/\",\"media_type\":\"3p\"}},{\"pr\":{\"name\":\"periscope\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"Periscope\",\"description_default\":\"View Periscope profile\",\"prefix\":\"https://www.periscope.tv/\",\"media_type\":\"3p/\"}},{\"pi\":{\"name\":\"pinterest\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"Pinterest\",\"description_default\":\"View Pinterest board\",\"prefix\":\"https://www.pinterest.com/\",\"media_type\":\"3p\"}},{\"qq\":{\"name\":\"qq\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"QQ\",\"description_default\":\"View QQ Page\",\"prefix\":\"https://www.qq.com/\",\"media_type\":\"3p\"}},{\"qz\":{\"name\":\"qzone\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"Qzone\",\"description_default\":\"View Qzone page\",\"prefix\":\"https://www.qzone.com/\",\"media_type\":\"3p\"}},{\"rd\":{\"name\":\"reddit\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"Reddit\",\"description_default\":\"View subreddit\",\"prefix\":\"https://www.reddit.com/r/\",\"media_type\":\"3p\"}},{\"rn\":{\"name\":\"renren\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"Renren\",\"description_default\":\"View Renren profile\",\"prefix\":\"https://www.renren.com/\",\"media_type\":\"3p\"}},{\"sc\"\n:{\"name\":\"soundcloud\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"SoundCloud\",\"description_default\":\"View SoundCloud page\",\"prefix\":\"https://www.soundcloud.com/\",\"media_type\":\"3p\"}},{\"sk\":{\"name\":\"skype\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"Skype\",\"description_default\":\"Call with Skype\",\"prefix\":\"skype://\",\"media_type\":\"3p\"}},{\"sr\":{\"name\":\"swarm\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"Swarm\",\"description_default\":\"Connect with Swarm\",\"prefix\":\"https://www.swarmapp.com/\",\"media_type\":\"3p\"}},{\"sn\":{\"name\":\"snapchat\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"Snapchat\",\"description_default\":\"Connect with Snapchat\",\"prefix\":\"snapchat://add/\",\"media_type\":\"3p\"}},{\"sw\":{\"name\":\"sina-weibo\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"Sina Weibo\",\"description_default\":\"View Weibo page\",\"prefix\":\"https://www.weibo.com/\",\"media_type\":\"3p\"}},{\"tb\":{\"name\":\"tumblr\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"Tumblr\",\"description_default\":\"View Tumblr blog\",\"prefix\":\"https://.tumblr.com/\",\"media_type\":\"3p\"}},{\"tl\":{\"name\":\"telegram\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"Telegram\",\"description_default\":\"Connect with Telegram\",\"prefix\":\"https://www.telegram.me/\",\"media_type\":\"3p\"}},{\"tw\":{\"name\":\"twitter\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"Twitter\",\"description_default\":\"View Twitter profile\",\"prefix\":\"https://www.twitter.com/\",\"media_type\":\"3p\",\"value_prefix\":\"@\"}},{\"to\":{\"name\":\"twoo\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"Twoo\",\"description_default\":\"View Twoo page\",\"prefix\":\"https://www.twoo.com/\",\"media_type\":\"3p\"}},{\"vb\":{\"name\":\"viber\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"Viber\",\"description_default\":\"Call with Viber\",\"prefix\":\"https://www.viber.com/\",\"media_type\":\"3p\"}},{\"vk\":{\"name\":\"vkontakte\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"Vkontakte\",\"description_default\":\"View VK page\",\"prefix\":\"https://www.vk.com/\",\"media_type\":\"3p\"}},{\"vm\":{\"name\":\"vimeo\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"Vimeo\",\"description_default\":\"View Vimeo profile\",\"prefix\":\"https://www.vimeo.com/\",\"media_type\":\"3p\"}},{\"wa\":{\"name\":\"whatsapp\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"Whatsapp\",\"description_default\":\"Message on Whatsapp\",\"prefix\":\"what\nsapp://\",\"media_type\":\"3p\"}},{\"wc\":{\"name\":\"wechat\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"WeChat\",\"description_default\":\"Connect with WeChat\",\"prefix\":\"https://www.wechat.com/\",\"media_type\":\"3p\"}},{\"xi\":{\"name\":\"xing\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"Xing\",\"description_default\":\"View Xing page\",\"prefix\":\"https://www.xing.com/\",\"media_type\":\"3p\"}},{\"yt\":{\"name\":\"youtube\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"YouTube\",\"description_default\":\"View YouTube channel\",\"prefix\":\"https://www.youtube.com/\",\"media_type\":\"3p\"}},{\"yy\":{\"name\":\"yy\",\"superclass\":\"media\",\"object_type\":\"media\",\"object_display_name\":\"YY\",\"description_default\":\"View YY page\",\"prefix\":\"https://www.yy.com/\",\"media_type\":\"3p\"}}]}" }, { "input": "*method(\n ## The method can be called by it's ID or name\n *id=cn;\n *name=company_name;\n ## The value of the object that the method is called on is transformed using the following methods:\n *transform=`replace(-, ).trim(.).initcap`\n);\n\nm=%*method", "minimised_modl": "*m(*i=cn;*n=company_name;*transform=`replace(-, ).trim(.).initcap`);m=%*method", "expected_output": "{\"m\":[{\"cn\":{\"name\":\"company_name\",\"transform\":\"replace(-,).trim(.).initcap\"}}]}" }, { "input": "*L=\"https://www.modl.uk/tests/message-thread.txt\";\n*class(\n *id=a;\n *name=alpha;\n *superclass=map;\n v=victor\n);\n*class(\n *id=b;\n *name=bravo;\n *superclass=alpha;\n w=whisky\n);\n*class(\n *id=c;\n *name=charlie;\n *superclass=bravo;\n x=xray\n);\n*class(\n *id=d;\n *name=delta;\n *superclass=charlie;\n y=yankee\n);\nclasses=%*class", "minimised_modl": "*L=\"https://www.modl.uk/tests/message-thread.txt\";*class(*id=a;*name=alpha;*superclass=map;v=victor)*class(*id=b;*name=bravo;*superclass=alpha;w=whisky);*class(*id=c;*name=charlie;*superclass=bravo;x=xray)*class(*id=d;*name=delta;*superclass=charlie;y=yankee)classes=%*class", "expected_output": "{\n \"classes\": [\n {\n \"m\": {\n \"name\": \"message\",\n \"superclass\": \"map\",\n \"assign\": [\n [\n \"direction\",\n \"date_time\",\n \"message\"\n ]\n ],\n \"method\": \"sms\"\n }\n },\n {\n \"a\": {\n \"name\": \"alpha\",\n \"superclass\": \"map\",\n \"v\": \"victor\"\n }\n },\n {\n \"b\": {\n \"name\": \"bravo\",\n \"superclass\": \"alpha\",\n \"w\": \"whisky\"\n }\n },\n {\n \"c\": {\n \"name\": \"charlie\",\n \"superclass\": \"bravo\",\n \"x\": \"xray\"\n }\n },\n {\n \"d\": {\n \"name\": \"delta\",\n \"superclass\": \"charlie\",\n \"y\": \"yankee\"\n }\n }\n ]\n}" }, { "input": "_test1=one;\n_one=two;\n{\ntest1=`one`?\n result=match\n/?\n result=nomatch\n}", "minimised_modl": "_test1=one;_one=two{test1=`one`?result=match/?result=nomatch}", "expected_output": "{\n \"result\": \"match\"\n}"}, { "input": "_test1=one;\n_one=two;\n{\ntest1=`two`?\n result=match\n/?\n result=nomatch\n}", "minimised_modl": "_test1=one;_one=two{test1=`two`?result=match/?result=nomatch}", "expected_output": "{\n \"result\": \"nomatch\"\n}"}, { "input": "_test1=one;\n_one=two;\n{\ntest1=\"one\"?\n result=match\n/?\n result=nomatch\n}", "minimised_modl": "_test1=one;_one=two{test1=\"one\"?result=match/?result=nomatch}", "expected_output": "{\n \"result\": \"match\"\n}"}, { "input": "_test1=one;\n_one=two;\n{\ntest1=\"two\"?\n result=match\n/?\n result=nomatch\n}", "minimised_modl": "_test1=one;_one=two{test1=\"two\"?result=match/?result=nomatch}", "expected_output": "{\n \"result\": \"nomatch\"\n}"}, { "input": "_test1=one;\n_one=two;\n{\ntest1=\"one\"?\n result=match\n/?\n result=nomatch\n}", "minimised_modl": "_test1=one;_one=two{test1=`one`?result=match/?result=nomatch}", "expected_output": "{\n \"result\": \"match\"\n}"}, { "input": "_x=a:b:c:d;\n_y=[1;2;3;4];\nz={%x.1=b | %y.2=1?}\n", "minimised_modl": "_x=a:b:c:d;_y=[1;2;3;4];z={%x.1=b | %y.2=1?}", "expected_output": "{\"z\":true}"}, { "input": "_x=a:b:c:d;\n_y=[1;2;3;4];\nz={%x.1=b & %y.2=1?}\n", "minimised_modl": "_x=a:b:c:d;_y=[1;2;3;4];z={%x.1=b & %y.2=1?}", "expected_output": "{\"z\":false}"}, { "input": "_x=a:b:c:d;\n_y=[1;2;3;4];\nz={%x.1=b&%y.2=3?}", "minimised_modl": "_x=a:b:c:d;_y=[1;2;3;4];z={%x.1=b&%y.2=3?}", "expected_output": "{\"z\":true}"}, { "input": "_x=a:b:c:d;\n_y=[1;2;3;4];\nz={%x.1=b|%y.2=3?}", "minimised_modl": "_x=a:b:c:d;_y=[1;2;3;4];z={%x.1=b|%y.2=3?}", "expected_output": "{\"z\":true}"}, { "input": "_x=a:b:c:d;\n_y=[1;2;3;4];\nz={%x.1=b|%y.2=x?}", "minimised_modl": "_x=a:b:c:d;_y=[1;2;3;4];z={%x.1=b|%y.2=x?}", "expected_output": "{\"z\":true}"}, { "input": "_x=a:b:c:d;\n_y=[1;2;3;4];\nz={%x.1=a|%y.2=3?}", "minimised_modl": "_x=a:b:c:d;_y=[1;2;3;4];z={%x.1=a|%y.2=3?}", "expected_output": "{\"z\":true}"}, { "input": "_x=a:b:c:d;\n_y=[1;2;3;4];\nx={%x.1=%y.2?}", "minimised_modl": "_x=a:b:c:d;_y=[1;2;3;4];x={%x.1=%y.2?}", "expected_output": "{\"x\":false}"}, { "input": "_x=[1;2;3;4];\n_y=[1;2;3;4];\nx={%x.2=%y.2?}", "minimised_modl": "_x=[1;2;3;4];_y=[1;2;3;4];x={%x.2=%y.2?}", "expected_output": "{\"x\":false}"}, { "input": "_country=gb;\n{\n country = gb | country = us?\n support_number=+441270123456\n /?\n support_number=+14161234567\n}", "minimised_modl": "_country=gb{country = gb | country = us?support_number=+441270123456/?support_number=+14161234567}", "expected_output": "{\n \"support_number\": \"+441270123456\"\n}"}, { "input": "_country=gb;\n{\n country = us | country = gb?\n support_number=+441270123456\n /?\n support_number=+14161234567\n}", "minimised_modl": "_country=gb{country = us | country = gb?support_number=+441270123456/?support_number=+14161234567}", "expected_output": "{\n \"support_number\": \"+441270123456\"\n}"}, { "input": "?=a:b:c:d;12%3=1", "minimised_modl": "?=a:b:c:d;12%3=1", "expected_output": "{\"12d\":1}"}, { "input": "(name=`e1afmkfd`.p;department=` -7sbcecqbdsccxfizhcp6b8ah`.p)", "minimised_modl": "(name=`e1afmkfd`.p;department=` -7sbcecqbdsccxfizhcp6b8ah`.p)", "expected_output": "{\n \"name\": \"пример\",\n \"department\": \"обслуживание клиентов\"\n}"}, { "input": "`80aafnhi4ae`.p.u=`lsa12dvaxki`.p.u", "minimised_modl": "`80aafnhi4ae`.p=`lsa12dvaxki`.p", "expected_output": "{\n \"НАЗВАНИЕ\":\"БОРИ́С\"\n}" }, { "input": "(\n _name = John;\n %name.u = \"Developer\";\n foo = %name.u\n)", "minimised_modl": "(_name = John;%name.u = \"Developer\";foo = %name.u)", "expected_output": "{\n \"JOHN\" : \"Developer\", \n \"foo\" : \"JOHN\"\n}"}, { "input": "(\n _name = John;\n %name.u = \"Developer\";\n foo = %JOHN\n)", "minimised_modl": "(_name=John;%name.u=\"Developer\";foo = %JOHN)", "expected_output": "{\n \"JOHN\" : \"Developer\", \n \"foo\" : \"Developer\"\n}"}, { "input": "_array[1;2];\n_array_item=%array.0;\ntest={\n array_item=%array.0?\n yes\n /?\n no\n}", "minimised_modl": "_array[1;2];_array_item=%array.0;test={array_item=%array.0?yes/?no}", "expected_output": "{\n \"test\": \"yes\"\n}"}, { "input": "_array[1;2];\ntest={\n %array.0=1?\n yes\n /?\n no\n}", "minimised_modl": "_array[1;2];test={%array.0=1?yes/?no}", "expected_output": "{\n \"test\": \"yes\"\n}"}, { "input": "_array[1;2];\n_array_item=%array.0;\ntest={\n array_item=1?\n yes\n /?\n no\n}", "minimised_modl": "_array[1;2];_array_item=%array.0;test={array_item=1?yes/?no}", "expected_output": "{\n \"test\": \"yes\"\n}"}, { "input": "_person( \n name(\n speak=say;\n first=John;\n last=Smith\n )\n);\njust `%person.name.speak.u`_this=Hello %person.name.first.d!", "minimised_modl": "_person(name(speak=say;first=John;last=Smith));just `%person.name.speak.u`_this=Hello %person.name.first.d!", "expected_output": "{\n \"just SAY_this\": \"Hello john!\"\n}"}, { "input": "*class(\n *i=test;\n *a=[\n [one;two;three]\n ]\n);\ntest=1:2:3", "minimised_modl": "*class(\n *i=test\n *a=[\n [one;two;three]\n ]\n)\ntest=1:2:3", "expected_output": "{\n \"test\": {\n \"one\": 1,\n \"two\": 2,\n \"three\": 3\n }\n}"}, { "input": "*class(\n *i=test;\n *a=[\n [one;two;three]\n ]\n);\n\ntest=1:2:(a=Alpha;b=Bravo;c=Charlie)", "minimised_modl": "*class(\n *i=test\n *a=[\n [one;two;three]\n ]\n)\n\ntest=1:2:(a=Alpha;b=Bravo;c=Charlie)", "expected_output": "{\n \"test\": {\n \"one\": 1,\n \"two\": 2,\n \"three\": {\n \"a\": \"Alpha\",\n \"b\": \"Bravo\",\n \"c\": \"Charlie\"\n }\n }\n}"}, { "input": "*class(\n *i=test;\n *a=[\n [one;two;three]\n ]\n);\n\ntest=1:2:[a;b;c]", "minimised_modl": "*class(\n *i=test\n *a=[\n [one;two;three]\n ]\n)\n\ntest=1:2:[a;b;c]", "expected_output": "{\n \"test\": {\n \"one\": 1,\n \"two\": 2,\n \"three\": [\n \"a\",\n \"b\",\n \"c\"\n ]\n }\n}\n"}, { "input": "_name = John;\n%name = \"123\"", "minimised_modl": "_name = John;%name = \"123\"", "expected_output": "{\"John\":\"123\"}"}, {"input": "[\none;\ntwo;\nthree;\n]", "minimised_modl": "[one;two;three;]", "expected_output": "[\"one\",\"two\",\"three\"]"}, {"input": "[\none;\ntwo;\nthree\n]", "minimised_modl": "[one;two;three]", "expected_output": "[\"one\",\"two\",\"three\"]"}, { "input": "_country = gb;\nsupport_contact = {\ncountry=gb?\n}", "minimised_modl": "_country=gb;support_contact={country=gb?}", "expected_output": "{\"support_contact\": true}"}, { "input": " *class(\n *id=a;\n *name=alpha;\n *superclass=map;\n v=victor\n);\n*class(\n *id=b;\n *name=bravo;\n *superclass=alpha;\n w=whisky\n);\n*class(\n *id=c;\n *name=charlie;\n *superclass=bravo;\n x=xray\n);\n*class(\n *id=d;\n *name=delta;\n *superclass=charlie;\n y=yankee\n);\nd(test1=test2)", "minimised_modl": "*class(*id=a;*name=alpha;*superclass=map;v=victor)*class(*id=b;*name=bravo;*superclass=alpha;w=whisky)*class(*id=c;*name=charlie;*superclass=bravo;x=xray);*class(*id=d;*name=delta;*superclass=charlie;y=yankee)d(test1=test2)", "expected_output": "{\"delta\": {\"test1\": \"test2\",\"y\": \"yankee\",\"x\": \"xray\",\"w\": \"whisky\",\"v\": \"victor\"}}"}, { "input": "*class(\n *id=a;\n *name=alpha;\n *superclass=map;\n v=victor\n);\n*class(\n *id=b;\n *name=bravo;\n *superclass=a;\n w=whisky\n);\n*class(\n *id=c;\n *name=charlie;\n *superclass=b;\n x=xray\n);\n*class(\n *id=d;\n *name=delta;\n *superclass=c;\n y=yankee\n);\nd(test1=test2)", "minimised_modl": "*class(*id=a;*name=alpha;*superclass=map;v=victor)*class(*id=b;*name=bravo;*superclass=a;w=whisky)*class(*id=c;*name=charlie;*superclass=b;x=xray)*class(*id=d;*name=delta;*superclass=c;y=yankee)d(test1=test2)", "expected_output": "{\"delta\": {\"test1\": \"test2\",\"y\": \"yankee\",\"x\": \"xray\",\"w\": \"whisky\",\"v\": \"victor\"}}"}, {"input": "_test=[[a;b]];letters2=%test.0.0", "minimised_modl": "_test=[[a;b]];letters2=%test.0.0", "expected_output": "{\"letters2\": \"a\"}"}, {"input": "?=`e1afmkfd`:` -7sbcecqbdsccxfizhcp6b8ah`;(name=%0.p;department=%1.p)", "minimised_modl": "?=`e1afmkfd`:` -7sbcecqbdsccxfizhcp6b8ah`;(name=%0.p;department=%1.p)", "expected_output": "{\"name\":\"пример\",\"department\":\"обслуживание клиентов\"}" }, {"input": "*class(*id=object;*superclass=arr);sales(name=John Smith;telephone=44800 555 555);service(name=Jim Brown;telephone=44800 666 666)", "minimised_modl": "*c(*id=object;*superclass=arr);sales(name=John Smith;telephone=44800 555 555);service(name=Jim Brown;telephone=44800 666 666)", "expected_output": "[{\"sales\": {\"name\": \"John Smith\",\"telephone\": \"44800 555 555\"}},{\"service\": {\"name\": \"Jim Brown\",\"telephone\": \"44800 666 666\"}}]" }, { "input": "*class(\n *id=p;\n *NAME=person\n);\n\np(name=John Smith;dob=01/01/2001)", "minimised_modl": "*c(*i=p;*N=person);p(name=John Smith;dob=01/01/2001)", "expected_output": "{\n \"person\" : {\n \"name\" : \"John Smith\",\n \"dob\" : \"01/01/2001\"\n }\n}\n" }, {"input": "*class(*id=a;*name=age);a=10", "minimised_modl": "*class(*id=a;*name=age);a=10", "expected_output": "{\"age\":10}" }, {"input": "*class(*id=a;*name=age;*superclass=num);a=10", "minimised_modl": "*class(*id=a;*name=age;*superclass=num);a=10", "expected_output": "{\"age\":10}" }, {"input": "*class(*id=a;*name=age;*superclass=str);a=10", "minimised_modl": "*class(*id=a;*name=age;*superclass=str);a=10", "expected_output": "{\"age\":\"10\"}" }, {"input": "*class(*id=newstr;*superclass=str);*class(*id=a;*name=age;*superclass=newstr);a=10", "minimised_modl": "*class(*id=newstr;*superclass=str);*class(*id=a;*name=age;*superclass=newstr);a=10", "expected_output": "{\"age\":\"10\"}" }, {"input": "?[[a;b;c]];letters=%0", "minimised_modl": "?[[a;b;c]];letters=%0", "expected_output": "{\"letters\": [ \"a\", \"b\", \"c\"]}" }, { "input": "?=[a;b;c;d]:[1;2;3;4;5];\ntest=%1.0", "minimised_modl": "?=[a;b;c;d]:[1;2;3;4;5];test=%1.0", "expected_output": "{\n \"test\" : 1\n}\n" }, {"input": "_test=123;object(print_test = %test.test)", "minimised_modl": "_test=123;object(print_test = %test.test)", "expected_output": "{\"object\":{\"print_test\":\"123.test\"}}"}, {"input": "?=one:two:three;test1=%0;test2=%1;test3=%2;test4=%3;test5=%4;test6=%5;test7=%6;test8=%7;test9=%8", "minimised_modl": "?=one:two:three;test1=%0;test2=%1;test3=%2;test4=%3;test5=%4;test6=%5;test7=%6;test8=%7;test9=%8", "expected_output": "[{\"test1\": \"one\"},{\"test2\": \"two\"},{\"test3\": \"three\"},{\"test4\": \"%3\"},{\"test5\": \"%4\"},{\"test6\": \"%5\"},{\"test7\": \"%6\"},{\"test8\": \"%7\"},{\"test9\": \"%8\"}]"}, { "input": "a=1:2:3;b=4:5:6", "minimised_modl": "a=1:2:3;b=4:5:6", "expected_output": "[ {\n \"a\" : [ 1, 2, 3 ]\n}, {\n \"b\" : [ 4, 5, 6 ]\n} ]"}, { "input": "a=1:2:3;b=4:5:6", "minimised_modl": "a=1:2:3;b=4:5:6;", "expected_output": "[ {\n \"a\" : [ 1, 2, 3 ]\n}, {\n \"b\" : [ 4, 5, 6 ]\n} ]"}, {"input": "a=1:2:3;b=4:5:6", "minimised_modl": "a=1:2:3;b=4:5:6", "expected_output": "[ {\n \"a\" : [ 1, 2, 3 ]\n}, {\n \"b\" : [ 4, 5, 6 ]\n} ]"}, {"input": "a=1:2:3;\nb=4:5:6", "minimised_modl": "a=1:2:3;\nb=4:5:6", "expected_output": "[ {\n \"a\" : [ 1, 2, 3 ]\n}, {\n \"b\" : [ 4, 5, 6 ]\n} ]"}, { "input": "a=1:2:3;\nb=4:5:6", "minimised_modl": "a=1:2:3\nb=4:5:6", "expected_output": "[ {\n \"a\" : [ 1, 2, 3 ]\n}, {\n \"b\" : [ 4, 5, 6 ]\n} ]"}, { "input": "a=1:2:3\n;\nb=4:5:6", "minimised_modl": "a=1:2:3\n;\nb=4:5:6", "expected_output": "[ {\n \"a\" : [ 1, 2, 3 ]\n}, {\n\"b\" : [ 4, 5, 6 ]\n} ]"}, { "input": "_test=(a=b=c=d=f);\nx=%test.a.b.c.d", "minimised_modl": "_test=(a=b=c=d=f)\nx=%test.a.b.c.d", "expected_output": "{\"x\":\"f\"}"}, { "input": "a(b(c(d(e(f=1)))));\ntesting=%a.b.c.d.e.f", "minimised_modl": "a(b(c(d(e(f=1)))))\ntesting=%a.b.c.d.e.f", "expected_output": "[ {\"a\" : {\"b\" : {\"c\" : {\"d\" : {\"e\" : {\"f\" : 1}}}}}}, {\"testing\":1}]"}, { "input": "_test=(a=b=c=d=f);\ntesting=%test.a.b.c.d", "minimised_modl": "_test=(a=b=c=d=f)\ntesting=%test.a.b.c.d", "expected_output": "{\"testing\":\"f\"}"}, { "input": "a=\nb\n=c;\nd=e", "minimised_modl": "a=\nb\n=c\nd=e", "expected_output": "[ {\"a\" : {\"b\" : \"c\"}}, {\"d\" : \"e\"} ]"}, {"input": "test=this is a #hashtag test;test2=#testing 123", "minimised_modl": "test=this is a #hashtag test;test2=#testing 123", "expected_output": "[ {\"test\" : \"this is a #hashtag test\"}, {\"test2\" : \"#testing 123\"} ]"}, {"input": "a=(b=c=d=e=f)", "minimised_modl": "a=(b=c=d=e=f)", "expected_output": "{\"a\": {\"b\": {\"c\": {\"d\": {\"e\": \"f\"}}}}}"}, {"input": "a=b=c=d=e=f", "minimised_modl": "a=b=c=d=e=f", "expected_output": "{\"a\": {\"b\": {\"c\": {\"d\": {\"e\": \"f\"}}}}}"}, {"input": "a=(b=(c=(d=(e=f))))", "minimised_modl": "a=(b=(c=(d=(e=f))))", "expected_output": "{\"a\": {\"b\": {\"c\": {\"d\": {\"e\": \"f\"}}}}}"}, { "input": "country=gb;\nx=[{ country=gb ? this /country=us? that }]", "minimised_modl": "country=gb;x=[{ country=gb? this /country=us? that }]", "expected_output": "[{\"country\" : \"gb\"}, { \"x\" : [ \"this\" ]}]"}, {"input": "_a=3;_b=3;c={a=b?true/?false}", "minimised_modl": "_a=3;_b=3;c={a=b?true/?false}", "expected_output": "{\"c\": true}"}, {"input": "a=1;b=2;b={{a=1}|{b=2}?true/?false}", "minimised_modl": "a=1;b=2;b={{a=1}|{b=2}?true/?false}", "expected_output": "[{\"a\": 1},{\"b\": 2},{\"b\": true}]"}, { "input": "_a=1;\n_b=2;\nx={a=b?}", "minimised_modl": "_a=1;_b=2;x={a=b?}", "expected_output": "{\"x\":false}"}, { "input": "_a=1;\n_b=1;\nx={a=b?}", "minimised_modl": "_a=1;_b=1;x={a=b?}", "expected_output": "{\"x\":true}"}, { "input": "_testing = quick-test of John's variable_methods;\nupcase_example = %testing.u;\ndowncase_example = %testing.d;\ninitcap_example = %testing.i;\nsentence_example = %testing.s;\nurl_encode_example = %testing.u.e", "minimised_modl": "_testing=quick-test of John's variable_methods;upcase_example=%testing.u;downcase_example=%testing.d;initcap_example=%testing.i;sentence_example=%testing.s;url_encode_example=%testing.u.e", "expected_output": "[ {\n \"upcase_example\" : \"QUICK-TEST OF JOHN'S VARIABLE_METHODS\"\n}, {\n \"downcase_example\" : \"quick-test of john's variable_methods\"\n}, {\n \"initcap_example\" : \"Quick-test Of John's Variable_methods\"\n}, {\n \"sentence_example\" : \"Quick-test of John's variable_methods\"\n}, {\n \"url_encode_example\" : \"QUICK-TEST+OF+JOHN%27S+VARIABLE_METHODS\"\n} ]" }, { "input": "*VERSION=1;\n\"test\"=1", "minimised_modl": "*VERSION=1;test=1", "expected_output": "{\"test\" : 1}" }, { "input": "*VERSION=100;\n\"test\"=1", "minimised_modl": "*VERSION=100;test=1", "expected_output": "{\"test\" : 1}" },{ "input": "*class(\n *id=g;\n *name=glossary;\n *superclass=map\n);\n*class(\n *id=t;\n *name=title;\n *superclass=str\n);\n*class(\n *id=d;\n *name=GlossDiv;\n *superclass=map\n);\n*class(\n *id=l;\n *name=GlossList;\n *superclass=map\n);\n*class(\n *id=e;\n *name=GlossEntry;\n *superclass=map;\n *assign[\n [i;s;gt;a;ab;gd;gs]\n ]\n);\n*class(\n *id=i;\n *name=ID;\n *superclass=str\n);\n*class(\n *id=s;\n *name=SortAs;\n *superclass=str\n);\n*class(\n *id=gt;\n *name=GlossTerm;\n *superclass=str\n);\n*class(\n *id=a;\n *name=Acronym;\n *superclass=str\n);\n*class(\n *id=ab;\n *name=Abbrev;\n *superclass=str\n);\n*class(\n *id=gd;\n *name=GlossDef;\n *superclass=map;\n *assign=[\n [p];\n [p;sa]\n ]\n);\n*class(\n *id=p;\n *name=para;\n *superclass=str\n);\n*class(\n *id=sa;\n *name=SeeAlso;\n *superclass=arr\n);\n*class(\n *id=gs;\n *name=GlossSee;\n *superclass=str\n);\n\ng(\n ?=[SGML;markup;language];\n t=example glossary;\n d(\n t=S;\n l(\n e(\n i=%0;\n s=%0;\n gt=Standard Generalized %1.s %2.s;\n a=%0;\n ab=ISO 8879\\:1986;\n gd=A meta-%1 %2, used to create %1 %2s such as DocBook.\n :[GML;XML];\n gs=%1\n )\n )\n )\n)", "minimised_modl": "*c(*i=g;*n=glossary;*s=map);*c(*i=t;*n=title;*s=str);*c(*i=d;*n=GlossDiv;*s=map);*c(*i=l;*n=GlossList;*s=map);*c(*i=e;*n=GlossEntry;*s=map;*a[[i;s;gt;a;ab;gd;gs]]);*c(*i=i;*n=ID;*s=str);*c(*i=s;*n=SortAs;*s=str);*c(*i=gt;*n=GlossTerm;*s=str);*c(*i=a;*n=Acronym;*s=str);*c(*i=ab;*n=Abbrev;*s=str);*c(*i=gd;*n=GlossDef;*s=map;*a=[p]:[p;sa]);*c(*i=p;*n=para;*s=str);*c(*i=sa;*n=SeeAlso;*s=arr);*c(*i=gs;*n=GlossSee;*s=str);g(?=SGML:markup:language;t=example glossary;d(t=S;l(e(i=%0;s=%0;gt=Standard Generalized %1.s %2.s;a=%0;ab=ISO 8879~:1986;gd=A meta-%1 %2, used to create %1 %2s such as DocBook.:[GML;XML];gs=%1))))", "expected_output": "{\n \"glossary\" : {\n \"title\" : \"example glossary\",\n \"GlossDiv\" : {\n \"title\" : \"S\",\n \"GlossList\" : {\n \"GlossEntry\" : {\n \"ID\" : \"SGML\",\n \"SortAs\" : \"SGML\",\n \"GlossTerm\" : \"Standard Generalized Markup Language\",\n \"Acronym\" : \"SGML\",\n \"Abbrev\" : \"ISO 8879:1986\",\n \"GlossDef\" : {\n \"para\" : \"A meta-markup language, used to create markup languages such as DocBook.\",\n \"SeeAlso\" : [ \"GML\", \"XML\" ]\n },\n \"GlossSee\" : \"markup\"\n }\n }\n }\n }\n}\n" }, { "input": "_test=1~:2;\n\nresult={\n test=1~:2?\n yes\n /?\n no\n}", "minimised_modl": "_test=1~:2;result={test=1~:2?yes/?no}", "expected_output": "{\n \"result\" : \"yes\"\n}\n" }, { "input": "_test=\"http://www.tesco.com\";\n\nresult={\n test=\"http://www.tesco.com\"?\n yes\n /?\n no\n}", "minimised_modl": "_test=http~://www.tesco.com;result={test=\"http://www.tesco.com\"?yes/?no}", "expected_output": "{\n \"result\" : \"yes\"\n}\n" }, { "input": "_test=\"http://www.tesco.com\";\n\nresult={\n test=\"http://www.tesco.com\"?\n yes\n /?\n no\n}", "minimised_modl": "_test=http~://www.tesco.com;result={test=\"http://www.tesco.com\"?yes/?no}", "expected_output": "{\n \"result\" : \"yes\"\n}\n" }, { "input": "_branch=\"alex.\";_root=d;namespace=`%branch`blah.`%root`", "minimised_modl": "_branch=alex.;_root=d;namespace=`%branch`blah.`%root`", "expected_output": "{\n \"namespace\" : \"alex.blah.d\"\n}\n" }, { "input": "namespace=`%branch`blah.`%root`", "minimised_modl": "namespace=`%branch`blah.`%root`", "expected_output": "{\n \"namespace\" : \"%branchblah.%root\"\n}\n" }, { "input": "_root=tesco.com;\n_branch=direct.;\nnamespace1=`%branch`numrecord.`%root`;\nnamespace2=`%branch`_`%root`.numq.net", "minimised_modl": "_root=tesco.com;_branch=direct.;namespace1=`%branch`numrecord.`%root`;namespace2=`%branch`_`%root`.numq.net", "expected_output": "[ {\n \"namespace1\" : \"direct.numrecord.tesco.com\"\n}, {\n \"namespace2\" : \"direct._tesco.com.numq.net\"\n} ]\n" }, { "input": "_branch=\"\";\n_root=\"\";\nnamespace=`%branch`numrecord.`%root`", "minimised_modl": "_branch=\"\";_root=\"\";namespace=`%branch`numrecord.`%root`", "expected_output": "{\n \"namespace\" : \"numrecord.\"\n}\n" }, { "input": "*class(\n *id=desc;\n *name=description;\n *superclass=str\n);\n\n*class(\n *id=val;\n *name=value;\n *superclass=str\n);\n\n*class(\n *id=media1;\n *name=media1;\n *superclass=map;\n *assign=[\n [desc;val]\n ]\n);\n\n*class(\n *id=media2;\n *name=media2;\n *superclass=map;\n *assign=[\n [desc;val]\n ]\n);\n*class(\n *id=list;\n *name=list;\n *superclass=map;\n *assign[\n [media1;media2]\n ]\n);\n\n\nlist=[tel;fb]:[yt;tw]", "minimised_modl": "*c(*i=desc;*n=description;*s=str);*c(*i=val;*n=value;*s=str);*c(*i=media1;*n=media1;*s=map;*a[[desc;val]]);*c(*i=media2;*n=media2;*s=map;*a[[desc;val]]);*c(*i=list;*n=list;*s=map;*a[[media1;media2]]);list=[tel;fb]:[yt;tw]", "expected_output": "{\n \"list\" : {\n \"media1\" : {\n \"description\" : \"tel\",\n \"value\" : \"fb\"\n },\n \"media2\" : {\n \"description\" : \"yt\",\n \"value\" : \"tw\"\n }\n }\n}\n" }, { "input": "*CLASS(\n *id=p;\n *name=person;\n *SUPERCLASS=map\n);\n\np(name=John Smith;dob=01/01/2000)", "minimised_modl": "*C(*i=p;*n=person;*S=map);p(name=John Smith;dob=01/01/2000)", "expected_output": "{\n \"person\" : {\n \"name\" : \"John Smith\",\n \"dob\" : \"01/01/2000\"\n }\n}\n" }, { "input": "*c(\n *i=m;\n *n=message;\n *S=map;\n *a=[\n [direction;date_time;message]\n ];\n method=sms\n);\nm=in:2018-03-22:hi", "minimised_modl": "*c(*i=m;*n=message;*S=map;*a[[direction;date_time;message]];method=sms);m=in:2018-03-22:hi", "expected_output": "{\n \"message\" : {\n \"direction\" : \"in\",\n \"date_time\" : \"2018-03-22\",\n \"message\" : \"hi\",\n \"method\" : \"sms\"\n }\n}\n" }, { "input": "*class(\n *id=car;\n *name=car;\n *superclass=map\n);\n\ncar(\n make=Bentley\n)", "minimised_modl": "*c(*i=car;*n=car;*s=map);car(make=Bentley)", "expected_output": "{\n \"car\" : {\n \"make\" : \"Bentley\"\n }\n}\n" }, { "input": "?=[one;two];\ntest=Blah `%0.s` %1.s", "minimised_modl": "?=one:two;test=Blah `%0.s` %1.s", "expected_output": "{\n \"test\" : \"Blah One Two\"\n}\n" }, { "input": "?=one:two;\ntest=Blah `%0.r(o,huzzah)` `%1.t(w)`", "minimised_modl": "?=one:two;test=Blah `%0.r(o,huzzah)` `%1.t(w)`", "expected_output": "{\n \"test\" : \"Blah huzzahne t\"\n}\n" }, { "input": "_test=\"123\";\nobject(\n print_test = %test.test\n)", "minimised_modl": "_test=\"123\";object(print_test=%test.test)", "expected_output": "{\n \"object\" : {\n \"print_test\" : \"123.test\"\n }\n}\n" }, { "input": "_var = NotThisOne;_var=`%var`blah;out=`%var`deblah", "minimised_modl": "_var=NotThisOne;_var=`%var`blah;out=`%var`deblah", "expected_output": "{\n \"out\" : \"NotThisOneblahdeblah\"\n}\n" }, { "input": "_var = NotThisOne;_var=blah;out=`%var`deblah", "minimised_modl": "_var=NotThisOne;_var=blah;out=`%var`deblah", "expected_output": "{\n \"out\" : \"blahdeblah\"\n}\n" }, { "input": "test(\n map(\n array[]\n );\n array[\n map();\n array[1;2;3]\n ]\n)", "minimised_modl": "test(map(array[]);array[map();array=1:2:3])", "expected_output": "{\n \"test\" : {\n \"map\" : {\n \"array\" : [ ]\n },\n \"array\" : [ {\n \"map\" : { }\n }, {\n \"array\" : [ 1, 2, 3 ]\n } ]\n }\n}\n" }, { "input": "{\n01?\n test=1\n}", "minimised_modl": "{01?test=1}", "expected_output": "{\n \"test\" : 1\n}\n" }, { "input": "test=()", "minimised_modl": "test()", "expected_output": "{\n \"test\" : { }\n}\n" }, { "input": "_co=at;\n_l=de;\n{\n co=at?\n country=Austria\n language={\n l=fr?\n French\n /l=de?\n German\n /?\n Other\n }\n /?\n country=Other\n}", "minimised_modl": "_co=at;_l=de;{co=at?country=Austria;language={l=fr?French/l=de?German/?Other}/?country=Other}", "expected_output": "[ {\n \"country\" : \"Austria\"\n}, {\n \"language\" : \"German\"\n} ]\n" }, { "input": "true2 = 01;\ntrue1 = true;\nfalse2 = 00;\nfalse1 = false;\nnull2 = 000;\nnull1 = null", "minimised_modl": "true2=01;true1=01;false2=00;false1=00;null2=000;null1=000", "expected_output": "[ {\n \"true2\" : true\n}, {\n \"true1\" : true\n}, {\n \"false2\" : false\n}, {\n \"false1\" : false\n}, {\n \"null2\" : null\n}, {\n \"null1\" : null\n} ]\n" }, { "input": "_person( \n name(\n first=John;\n last=Smith\n )\n);\nsay=%person.name.first", "minimised_modl": "_person(name(first=John;last=Smith));say=%person.name.first", "expected_output": "{\"say\":\"John\"}" }, { "input": "_person( \n name(\n first=John;\n last=Smith\n )\n);\nsay=%person.name.first", "minimised_modl": "_person(name(first=John;last=Smith));say=%person.name.first", "expected_output": "{\n \"say\" : \"John\"\n}\n" }, { "input": "_C=gb;\n_COUNTRIES(\n us=United States;\n gb=United Kingdom;\n de=Germany\n);\n\ncountry_name = %COUNTRIES.%C", "minimised_modl": "_C=gb;_COUNTRIES(us=United States;gb=United Kingdom;de=Germany);country_name=%COUNTRIES.%C", "expected_output": "{\n \"country_name\" : \"United Kingdom\"\n}\n" }, { "input": "*class(\n *id=car;\n *name=car;\n *superclass=map;\n *assign=[\n [m];\n [m;md]\n ]\n);\n\n_C=gb;\n\ncar=Bentley:{C=ru?ContinentalRussia GT/?Continental GT}", "minimised_modl": "*c(*i=car;*n=car;*s=map;*a=[m]:[m;md]);_C=gb;car=Bentley:{C=ru?ContinentalRussia GT/?Continental GT}", "expected_output": "{\n \"car\" : {\n \"m\" : \"Bentley\",\n \"md\" : \"Continental GT\"\n }\n}\n" }, { "input": "_person( \n name(\n first=\"John\"\n )\n);\na=%person.name.first", "minimised_modl": "_person(name(first=John));a=%person.name.first", "expected_output": "{\n \"a\" : \"John\"\n}\n" }, { "input": "?=[a;b;c;d]:[1;2;3;4;5];\ntest=%1", "minimised_modl": "?=[a;b;c;d]:[1;2;3;4;5];test=%1", "expected_output": "{\n \"test\" : [ 1, 2, 3, 4, 5 ]\n}\n" }, { "input": "_test=123;\nprint=%_test", "minimised_modl": "_test=123;print=%_test", "expected_output": "{\n \"print\" : 123\n}\n" }, { "input": "_test=abc;\n\n{\n test?\n result=test is defined\n /?\n result=test is not defined\n}", "minimised_modl": "_test=abc;{test?result=test is defined/?result=test is not defined}", "expected_output": "{\n \"result\" : \"test is defined\"\n}\n" }, { "input": "{\n true?\n result=true\n}\n", "minimised_modl": "{01?result=01}", "expected_output": "{\n \"result\" : true\n}\n" }, { "input": "_test=true;\n\n{\n test?\n result=%test\n}\n", "minimised_modl": "_test=01;{test?result=%test}", "expected_output": "{\n \"result\" : true\n}\n" }, { "input": "_test=false;\n\n{\n test?\n result=result is true\n /?\n result=result is false\n}", "minimised_modl": "_test=00;{test?result=result is true/?result=result is false}", "expected_output": "{\n \"result\" : \"result is false\"\n}\n" }, { "input": "{\n test?\n result=test is defined\n /?\n result=test is not defined\n}\n", "minimised_modl": "{test?result=test is defined/?result=test is not defined}", "expected_output": "{\n \"result\" : \"test is not defined\"\n}\n" }, { "input": "{\n !test?\n result=test is not defined\n /?\n result=test is defined\n}\n", "minimised_modl": "{!test?result=test is not defined/?result=test is defined}", "expected_output": "{\n \"result\" : \"test is not defined\"\n}\n" }, { "input": "_colour = green;\n_test = { colour=green? true /? false }; \n\n{\n !test?\n result=it's not green\n /?\n result=it's green\n}", "minimised_modl": "_colour=green;_test={colour=green?01/?00};{!test?result=it's not green/?result=it's green}", "expected_output": "{\n \"result\" : \"it's green\"\n}\n" }, { "input": "_test=1;\nresult={\n %test=1?\n yes\n /?\n no\n}", "minimised_modl": "_test=1;result={%test=1?yes/?no}", "expected_output": "{\n \"result\" : \"yes\"\n}\n" }, { "input": "_test=1;\nresult={\n test=1?\n yes\n /?\n no\n}", "minimised_modl": "_test=1;result={test=1?yes/?no}", "expected_output": "{\n \"result\" : \"yes\"\n}\n" }, { "input": "_test=1;\nresult={\n _test=1?\n yes\n /?\n no\n}", "minimised_modl": "_test=1;result={_test=1?yes/?no}", "expected_output": "{\n \"result\" : \"yes\"\n}\n" }, { "input": "_test=1;\nresult={\n %_test=1?\n yes\n /?\n no\n}", "minimised_modl": "_test=1;result={%_test=1?yes/?no}", "expected_output": "{\n \"result\" : \"yes\"\n}\n" }, { "input": "?[[a;b;c];[one;two;three]];letters=%0;numbers=%1", "minimised_modl": "?=[a;b;c]:[one;two;three];letters=%0;numbers=%1", "expected_output": "[ {\n \"letters\" : [ \"a\", \"b\", \"c\" ]\n}, {\n \"numbers\" : [ \"one\", \"two\", \"three\" ]\n} ]\n" }, { "input": "?=[a;b;c]:[one;two;three];letters=%0;numbers=%1", "minimised_modl": "?=[a;b;c]:[one;two;three];letters=%0;numbers=%1", "expected_output": "[ {\n \"letters\" : [ \"a\", \"b\", \"c\" ]\n}, {\n \"numbers\" : [ \"one\", \"two\", \"three\" ]\n} ]\n" }, { "input": "?[a;b;c];letters=%0", "minimised_modl": "?=a:b:c;letters=%0", "expected_output": "{\n \"letters\" : \"a\"\n}\n" }, { "input": "?=[a;b;c]:[one;two;three];letters=%0;numbers=%1", "minimised_modl": "?=[a;b;c]:[one;two;three];letters=%0;numbers=%1", "expected_output": "[ {\n \"letters\" : [ \"a\", \"b\", \"c\" ]\n}, {\n \"numbers\" : [ \"one\", \"two\", \"three\" ]\n} ]\n" }, { "input": "test=[zero;one]:[a;b]", "minimised_modl": "test=[zero;one]:[a;b]", "expected_output": "{\n \"test\" : [ [ \"zero\", \"one\" ], [ \"a\", \"b\" ] ]\n}\n" }, { "input": "test=[zero;one]:[a;b]", "minimised_modl": "test=[zero;one]:[a;b]", "expected_output": "{\n \"test\" : [ [ \"zero\", \"one\" ], [ \"a\", \"b\" ] ]\n}\n" }, { "input": "?[zero;one;two];\nfirst_var=%0;\nsecond_var=%1;\nthird_var=%2", "minimised_modl": "?=zero:one:two;first_var=%0;second_var=%1;third_var=%2", "expected_output": "[ {\n \"first_var\" : \"zero\"\n}, {\n \"second_var\" : \"one\"\n}, {\n \"third_var\" : \"two\"\n} ]\n" }, { "input": "_C=gb;\no(\n{C=gb?test1=123};\ntest2=456\n)", "minimised_modl": "_C=gb;o({C=gb?test1=123};test2=456)", "expected_output": "{\n \"o\" : {\n \"test1\" : 123,\n \"test2\" : 456\n }\n}\n" }, { "input": "{\ntrue?\n test=1\n}", "minimised_modl": "{01?test=1}", "expected_output": "{\n \"test\" : 1\n}\n" }, { "input": "_test[a;b;c];alex=%test", "minimised_modl": "_test=a:b:c;alex=%test", "expected_output": "{\n \"alex\" : [ \"a\", \"b\", \"c\" ]\n}\n" }, { "input": "_test[a;b;c];alex=%test.0", "minimised_modl": "_test=a:b:c;alex=%test.0", "expected_output": "{\n \"alex\" : \"a\"\n}\n" }, { "input": "?[a;b;c];alex=%0", "minimised_modl": "?=a:b:c;alex=%0", "expected_output": "{\n \"alex\" : \"a\"\n}\n" }, { "input": "_bool=true;\n{\n%bool?\n test=1\n}", "minimised_modl": "_bool=01;{%bool?test=1}", "expected_output": "{\n \"test\" : 1\n}\n" }, { "input": "_co = gb;\ntest = {\n co = gb?\n UK\n /?\n Other\n}", "minimised_modl": "_co=gb;test={co=gb?UK/?Other}", "expected_output": "{\n \"test\" : \"UK\"\n}\n" }, { "input": "?=0:1:2;\nresult={\n%1>1?\n yes\n/?\n no\n}", "minimised_modl": "?=0:1:2;result={%1>1?yes/?no}", "expected_output": "{\n \"result\" : \"no\"\n}\n" }, { "input": "_test_vars(\n one = 1;\n two = 2\n);\n\nfirst_number = %test_vars.one", "minimised_modl": "_test_vars(one=1;two=2);first_number=%test_vars.one", "expected_output": "{\n \"first_number\" : 1\n}\n" }, { "input": "_C=gb;\n_COUNTRIES[\n United States;\n United Kingdom;\n Germany\n];\n\ncountry_name = %COUNTRIES.0", "minimised_modl": "_C=gb;_COUNTRIES=United States:United Kingdom:Germany;country_name=%COUNTRIES.0", "expected_output": "{\n \"country_name\" : \"United States\"\n}\n" }, { "input": "(_C=gb;\n{C=gb?test1=123};\ntest2=456)", "minimised_modl": "(_C=gb;{C=gb?test1=123};test2=456)", "expected_output": "{\n \"test1\" : 123,\n \"test2\" : 456\n}\n" }, { "input": "alex=1.2345", "minimised_modl": "alex=1.2345", "expected_output": "{\n \"alex\" : 1.2345\n}\n" }, { "input": "?=zero:one:two;\ndiscount=%30", "minimised_modl": "?=zero:one:two;discount=%30", "expected_output": "{\n \"discount\" : \"%30\"\n}\n" }, { "input": "{\ntrue?\n test=1\n}", "minimised_modl": "{01?test=1}", "expected_output": "{\n \"test\" : 1\n}\n" }, { "input": "{\nTRUE?\n test=1\n}", "minimised_modl": "{01?test=1}", "expected_output": "{\n \"test\" : 1\n}\n" }, { "input": "_test=abcdefg;\nresult={\n {test!=a*}?\n in\n /?\n out\n}", "minimised_modl": "_test=abcdefg;result={{test!=a*}?in/?out}", "expected_output": "{\n \"result\" : \"out\"\n}\n" }, { "input": "test=[]", "minimised_modl": "test[]", "expected_output": "{\n \"test\" : [ ]\n}\n" }, { "input": "test(\n empty_array=[];\n empty_map=()\n)\n", "minimised_modl": "test(empty_array[];empty_map())", "expected_output": "{\n \"test\" : {\n \"empty_array\" : [ ],\n \"empty_map\" : { }\n }\n}\n" }, { "input": "_num1 = 2;\n_num2 = 1000;\n\nresult={\n num1>num2?\n num1 is bigger\n /?\n num1 is not bigger\n}\n", "minimised_modl": "_num1=2;_num2=1000;result={num1>num2?num1 is bigger/?num1 is not bigger}", "expected_output": "{\n \"result\" : \"num1 is not bigger\"\n}\n" }, { "input": "?=0:1:2;\nzero=%0;\none=%1;\ntwo=%2", "minimised_modl": "?=0:1:2;zero=%0;one=%1;two=%2", "expected_output": "[ {\n \"zero\" : 0\n}, {\n \"one\" : 1\n}, {\n \"two\" : 2\n} ]\n" }, { "input": "?=a:b:c;\nzero=%0;\none=%1;\ntwo=%2\n", "minimised_modl": "?=a:b:c;zero=%0;one=%1;two=%2", "expected_output": "[ {\n \"zero\" : \"a\"\n}, {\n \"one\" : \"b\"\n}, {\n \"two\" : \"c\"\n} ]\n" }, { "input": "_num1 = 5;\n_num2 = 2;\n\nresult={\n num1>num2?\n num1 is bigger\n /?\n num1 is not bigger\n}", "minimised_modl": "_num1=5;_num2=2;result={num1>num2?num1 is bigger/?num1 is not bigger}", "expected_output": "{\n \"result\" : \"num1 is bigger\"\n}\n" }, { "input": "?=\"A\":B:C;\nfirst_letter=%0", "minimised_modl": "?=A:B:C;first_letter=%0", "expected_output": "{\n \"first_letter\" : \"A\"\n}\n" }, { "input": "test=100%", "minimised_modl": "test=100%", "expected_output": "{\n \"test\" : \"100%\"\n}\n" }, { "input": "test=`test`", "minimised_modl": "test=`test`", "expected_output": "{\n \"test\" : \"test\"\n}\n" }, { "input": "test=\u0021", "minimised_modl": "test=\u0021", "expected_output": "{\n \"test\" : \"!\"\n}\n" }, { "input": "test=[zero;one]", "minimised_modl": "test=zero:one", "expected_output": "{\n \"test\" : [ \"zero\", \"one\" ]\n}\n" }, { "input": "_C=fr;\n{C=gb?test1=123};\ntest2=456", "minimised_modl": "_C=fr;{C=gb?test1=123};test2=456", "expected_output": "{\n \"test2\" : 456\n}\n" }, { "input": "_C=ca;\n_L=en;\n{\n C=ca?\n n=Tesco Canada\n {L=fr?\n s=Chaque Petite Contribution\n }\n}", "minimised_modl": "_C=ca;_L=en;{C=ca?n=Tesco Canada;{L=fr?s=Chaque Petite Contribution}}", "expected_output": "{\n \"n\" : \"Tesco Canada\"\n}\n" }, { "input": "_L=en;\n{\n C=ca?\n o(\n n=Tesco Canada;\n s={L=fr?\n Chaque Petite Contribution\n /?\n Every Little Helps\n }\n )\n}", "minimised_modl": "_L=en;{C=ca?o(n=Tesco Canada;s={L=fr?Chaque Petite Contribution/?Every Little Helps})}", "expected_output": "null" }, { "input": "_letter=a;\n{\n letter=a?\n word=Apple\n /letter=b?\n word=Bee\n /?\n word=Other\n}", "minimised_modl": "_letter=a;{letter=a?word=Apple/letter=b?word=Bee/?word=Other}", "expected_output": "{\n \"word\" : \"Apple\"\n}\n" }, { "input": "_int=1;\n{\n int=1?\n number=one\n /int=2?\n number=two\n /int=3?\n number=three\n /?\n number=other\n}", "minimised_modl": "_int=1;{int=1?number=one/int=2?number=two/int=3?number=three/?number=other}", "expected_output": "{\n \"number\" : \"one\"\n}\n" }, { "input": "_number=one;\n{\n number=one?\n int=1\n /number=two?\n int=2\n /number=three?\n int=3\n}", "minimised_modl": "_number=one;{number=one?int=1/number=two?int=2/number=three?int=3}", "expected_output": "{\n \"int\" : 1\n}\n" }, { "input": "_co=gb;\n{\nco=gb?\n country = United Kingdom\n/?\n country = Other\n}", "minimised_modl": "_co=gb;{co=gb?country=United Kingdom/?country=Other}", "expected_output": "{\n \"country\" : \"United Kingdom\"\n}\n" }, { "input": "_co=gb;\n{\nco=gb?\n country = United Kingdom\n/?\n country = Other\n}", "minimised_modl": "_co=gb;{co=gb?country=United Kingdom/?country=Other}", "expected_output": "{\n \"country\" : \"United Kingdom\"\n}\n" }, { "input": "_co = gb;\ntest = {\n co = gb?\n test=123\n /?\n test\n}", "minimised_modl": "_co=gb;test={co=gb?test=123/?test}", "expected_output": "{\n \"test\" : {\n \"test\" : 123\n }\n}\n" }, { "input": "_co = fr;\ntest = {\n co = gb?\n test=123\n /?\n test\n}", "minimised_modl": "_co=fr;test={co=gb?test=123/?test}", "expected_output": "{\n \"test\" : \"test\"\n}\n" }, { "input": "_COUNTRY=gb;\ncountry=The country is %COUNTRY", "minimised_modl": "_COUNTRY=gb;country=The country is %COUNTRY", "expected_output": "{\n \"country\" : \"The country is gb\"\n}\n" }, { "input": "COUNTRY=gb;\ncountry=The country is %COUNTRY", "minimised_modl": "COUNTRY=gb;country=The country is %COUNTRY", "expected_output": "[ {\n \"COUNTRY\" : \"gb\"\n}, {\n \"country\" : \"The country is gb\"\n} ]\n" }, { "input": "_co=gb;\ncountry=The country is %co", "minimised_modl": "_co=gb;country=The country is %co", "expected_output": "{\n \"country\" : \"The country is gb\"\n}\n" }, { "input": "_test = 123;\n_test2 = abc", "minimised_modl": "_test=123;_test2=abc", "expected_output": "null" }, { "input": "_co=gb;\ntest=123", "minimised_modl": "_co=gb;test=123", "expected_output": "{\n \"test\" : 123\n}\n" }, { "input": "*method(\n ## The method can be called by it's ID or name;\n *id=cn;\n *name=company_name;\n ## The value of the object that the method is called on is transformed using the following methods:\n *transform=`replace(-, ).trim(.).initcap`\n);\n\n_domain = smiths-limited.com;\nfriendly_name = %domain.cn ## The value \"Smiths Limited\" is assigned to the key \"friendly_name\"", "minimised_modl": "*m(*i=cn;*n=company_name;*transform=`replace(-, ).trim(.).initcap`);_domain=smiths-limited.com;friendly_name=%domain.cn", "expected_output": "{\n \"friendly_name\" : \"Smiths Limited\"\n}\n" }, { "input": "*method(\n *id=rt;\n *name=remove_two;\n *transform=`replace(two,)`\n);\n\n_numbers = one two three;\nname = %numbers.rt", "minimised_modl": "*m(*i=rt;*n=remove_two;*transform=`replace(two,)`);_numbers=one two three;name=%numbers.rt", "expected_output": "{\n \"name\" : \"one three\"\n}\n" }, { "input": "_co=ca;\n_l=fr;\n{\n { co = ca & l = fr } | co = fr?\n support_number=14161234567\n /?\n support_number=441270123456\n}", "minimised_modl": "_co=ca;_l=fr;{{co=ca&l=fr}|co=fr?support_number=14161234567/?support_number=441270123456}", "expected_output": "{\n \"support_number\" : 14161234567\n}\n" }, { "input": "_input=\"hi apple ios\";\n{\n {input=*apple*ios*}?\n support_number=441270123456\n /?\n support_number=International Clients:14161234567\n}", "minimised_modl": "_input=hi apple ios;{{input=*apple*ios*}?support_number=441270123456/?support_number=International Clients:14161234567}", "expected_output": "{\n \"support_number\" : 441270123456\n}\n" }, { "input": "_input=\"An iOS string\";\n{\n {input=*iOS*}?\n support_number=441270123456\n /?\n support_number=International Clients:14161234567\n}", "minimised_modl": "_input=An iOS string;{{input=*iOS*}?support_number=441270123456/?support_number=International Clients:14161234567}", "expected_output": "{\n \"support_number\" : 441270123456\n}\n" }, { "input": "_input=\"An iOS string\";\n{\n !{input=iOS*}?\n support_number=441270123456\n /?\n support_number=International Clients:14161234567\n}", "minimised_modl": "_input=An iOS string;{!{input=iOS*}?support_number=441270123456/?support_number=International Clients:14161234567}", "expected_output": "{\n \"support_number\" : 441270123456\n}\n" }, { "input": "_number=42;\n{\n {number>41}?\n support_number=441270123456\n /?\n support_number=International Clients:14161234567\n}", "minimised_modl": "_number=42;{{number>41}?support_number=441270123456/?support_number=International Clients:14161234567}", "expected_output": "{\n \"support_number\" : 441270123456\n}\n" }, { "input": "_co=ca;\n{\n co = fr?\n support_number=14161234567\n /?\n support_number=441270123456\n}", "minimised_modl": "_co=ca;{co=fr?support_number=14161234567/?support_number=441270123456}", "expected_output": "{\n \"support_number\" : 441270123456\n}\n" }, { "input": "_country=gb;\n{\n country=us/gb/au?\n support_number=441270123456\n /?\n support_number=International Clients:14161234567\n}", "minimised_modl": "_country=gb;{country=us/gb/au?support_number=441270123456/?support_number=International Clients:14161234567}", "expected_output": "{\n \"support_number\" : 441270123456\n}\n" }, { "input": "_test=gb;\nresult={test=gb/au?No/?Yes}", "minimised_modl": "_test=gb;result={test=gb/au?No/?Yes}", "expected_output": "{\n \"result\" : \"No\"\n}\n" }, { "input": "_number=42;\n{\n !{number>41}?\n support_number=441270123456\n /?\n support_number=International Clients:14161234567\n}", "minimised_modl": "_number=42;{!{number>41}?support_number=441270123456/?support_number=International Clients:14161234567}", "expected_output": "{\n \"support_number\" : [ \"International Clients\", 14161234567 ]\n}\n" }, { "input": "_country=gb;\n{\n !{country=us/gb/au}?\n support_number=441270123456\n /?\n support_number=International Clients:14161234567\n}", "minimised_modl": "_country=gb;{!{country=us/gb/au}?support_number=441270123456/?support_number=International Clients:14161234567}", "expected_output": "{\n \"support_number\" : [ \"International Clients\", 14161234567 ]\n}\n" }, { "input": "*L=\"https://www.modl.uk/tests/message-thread.txt\";\n\nm=out:2018-03-22 15\\:25:Hi;\nm=in:2018-03-22 15\\:26:Hello, how are you?;\nm=out:2018-03-22 15\\:25:Hi, good thanks;\nm=out:2018-03-22 15\\:26:How about you?;\nm=in:2018-03-22 15\\:26:Yes, fine thanks. What are you up to?;\nm=out:2018-03-22 15\\:25:Just testing out MODL;\nm=in:2018-03-22 15\\:26:Cool!", "minimised_modl": "*L=\"https://www.modl.uk/demo/message-thread.txt\";m=out:2018-03-22 15~:25:Hi;m=in:2018-03-22 15~:26:Hello, how are you?;m=out:2018-03-22 15~:25:Hi, good thanks;m=out:2018-03-22 15~:26:How about you?;m=in:2018-03-22 15~:26:Yes, fine thanks. What are you up to?;m=out:2018-03-22 15~:25:Just testing out MODL;m=in:2018-03-22 15~:26:Cool!", "expected_output": "[ {\n \"message\" : {\n \"direction\" : \"out\",\n \"date_time\" : \"2018-03-22 15:25\",\n \"message\" : \"Hi\",\n \"method\" : \"sms\"\n }\n}, {\n \"message\" : {\n \"direction\" : \"in\",\n \"date_time\" : \"2018-03-22 15:26\",\n \"message\" : \"Hello, how are you?\",\n \"method\" : \"sms\"\n }\n}, {\n \"message\" : {\n \"direction\" : \"out\",\n \"date_time\" : \"2018-03-22 15:25\",\n \"message\" : \"Hi, good thanks\",\n \"method\" : \"sms\"\n }\n}, {\n \"message\" : {\n \"direction\" : \"out\",\n \"date_time\" : \"2018-03-22 15:26\",\n \"message\" : \"How about you?\",\n \"method\" : \"sms\"\n }\n}, {\n \"message\" : {\n \"direction\" : \"in\",\n \"date_time\" : \"2018-03-22 15:26\",\n \"message\" : \"Yes, fine thanks. What are you up to?\",\n \"method\" : \"sms\"\n }\n}, {\n \"message\" : {\n \"direction\" : \"out\",\n \"date_time\" : \"2018-03-22 15:25\",\n \"message\" : \"Just testing out MODL\",\n \"method\" : \"sms\"\n }\n}, {\n \"message\" : {\n \"direction\" : \"in\",\n \"date_time\" : \"2018-03-22 15:26\",\n \"message\" : \"Cool!\",\n \"method\" : \"sms\"\n }\n} ]\n" }, { "input": "_var=2;\n*L=\"http://s3-eu-west-1.amazonaws.com/modltestfiles/testing.txt!\";\nprint=%update_date\n", "minimised_modl": "_var=2;*L=http~://s3-eu-west-1.amazonaws.com/modltestfiles/testing.txt!;print=%update_date", "expected_output": "{\n \"print\" : \"20180921 08:20 2\"\n}\n" }, { "input": "_T=grammar_tests/demo;\n*L=`%T`_config", "minimised_modl": "_T=grammar_tests/demo;*L=`%T`_config", "expected_output": "null" }, { "input": "*l=grammar_tests/1;*L=grammar_tests/1;a=1", "minimised_modl": "*l=grammar_tests/1;*L=grammar_tests/1;a=1", "expected_output": "{\n \"a\" : 1\n}\n" }, { "input": "*l=grammar_tests/1;*l=grammar_tests/1;a=1", "minimised_modl": "*L=grammar_tests/1;*l=grammar_tests/1;a=1", "expected_output": "{\n \"a\" : 1\n}\n" }, { "input": "*L=grammar_tests/1:grammar_tests/2:grammar_tests/3;\nthe_number=%number", "minimised_modl": "*L=grammar_tests/1:grammar_tests/2:grammar_tests/3;the_number=%number", "expected_output": "{\n \"the_number\" : 3\n}\n" }, { "input": "*L=grammar_tests/1:grammar_tests/2:grammar_tests/3:grammar_tests/1;\nthe_number=%number", "minimised_modl": "*L=grammar_tests/1:grammar_tests/2:grammar_tests/3:grammar_tests/1;the_number=%number", "expected_output": "{\n \"the_number\" : 1\n}\n" }, { "input": "*L[grammar_tests/1;grammar_tests/2;grammar_tests/3;grammar_tests/1];\nthe_number=%number", "minimised_modl": "*L=grammar_tests/1:grammar_tests/2:grammar_tests/3:grammar_tests/1;the_number=%number", "expected_output": "{\n \"the_number\" : 1\n}\n" }, { "input": "*L=grammar_tests/a:grammar_tests/b:grammar_tests/c;\nvar=%var", "minimised_modl": "*L=grammar_tests/a:grammar_tests/b:grammar_tests/c;var=%var", "expected_output": "{\n \"var\" : \"abc\"\n}\n" }, { "input": "*L=grammar_tests/demo_config;\n\nm=out:2018-03-22 15\\:25:Hi;\nm=in:2018-03-22 15\\:26:Hello, how are you?;\nm=out:2018-03-22 15\\:25:Hi, good thanks;\nm=out:2018-03-22 15\\:26:How about you?;\nm=in:2018-03-22 15\\:26:Yes, fine thanks. What are you up to?;\nm=out:2018-03-22 15\\:25:Just testing out MODL;\nm=in:2018-03-22 15\\:26:Cool!", "minimised_modl": "*L=grammar_tests/demo_config;m=out:2018-03-22 15~:25:Hi;m=in:2018-03-22 15~:26:Hello, how are you?;m=out:2018-03-22 15~:25:Hi, good thanks;m=out:2018-03-22 15~:26:How about you?;m=in:2018-03-22 15~:26:Yes, fine thanks. What are you up to?;m=out:2018-03-22 15~:25:Just testing out MODL;m=in:2018-03-22 15~:26:Cool!", "expected_output": "[ {\n \"message\" : {\n \"direction\" : \"out\",\n \"date_time\" : \"2018-03-22 15:25\",\n \"message\" : \"Hi\",\n \"method\" : \"sms\"\n }\n}, {\n \"message\" : {\n \"direction\" : \"in\",\n \"date_time\" : \"2018-03-22 15:26\",\n \"message\" : \"Hello, how are you?\",\n \"method\" : \"sms\"\n }\n}, {\n \"message\" : {\n \"direction\" : \"out\",\n \"date_time\" : \"2018-03-22 15:25\",\n \"message\" : \"Hi, good thanks\",\n \"method\" : \"sms\"\n }\n}, {\n \"message\" : {\n \"direction\" : \"out\",\n \"date_time\" : \"2018-03-22 15:26\",\n \"message\" : \"How about you?\",\n \"method\" : \"sms\"\n }\n}, {\n \"message\" : {\n \"direction\" : \"in\",\n \"date_time\" : \"2018-03-22 15:26\",\n \"message\" : \"Yes, fine thanks. What are you up to?\",\n \"method\" : \"sms\"\n }\n}, {\n \"message\" : {\n \"direction\" : \"out\",\n \"date_time\" : \"2018-03-22 15:25\",\n \"message\" : \"Just testing out MODL\",\n \"method\" : \"sms\"\n }\n}, {\n \"message\" : {\n \"direction\" : \"in\",\n \"date_time\" : \"2018-03-22 15:26\",\n \"message\" : \"Cool!\",\n \"method\" : \"sms\"\n }\n} ]\n" }, { "input": "## country\n_c = us;\n## language\n_l = en;\n\n*L=grammar_tests/import_config.modl;\n\ncountry = %c;\nlanguage = %l;\ntime_zone = %tz", "minimised_modl": "_c=us;_l=en;*L=grammar_tests/import_config.modl;country=%c;language=%l;time_zone=%tz", "expected_output": "[ {\n \"country\" : \"us\"\n}, {\n \"language\" : \"en\"\n}, {\n \"time_zone\" : \"EST\"\n} ]\n" }, { "input": "*L=grammar_tests/test_import_dir/test_import.txt;\n\nm=out:2018-03-22 15\\:25:Hi;\nm=in:2018-03-22 15\\:26:Hello, how are you?;\nm=out:2018-03-22 15\\:25:Hi, good thanks;\nm=out:2018-03-22 15\\:26:How about you?;\nm=in:2018-03-22 15\\:26:Yes, fine thanks. What are you up to?;\nm=out:2018-03-22 15\\:25:Just testing out MODL;\nm=in:2018-03-22 15\\:26:Cool!", "minimised_modl": "*L=grammar_tests/test_import_dir/test_import.txt;m=out:2018-03-22 15~:25:Hi;m=in:2018-03-22 15~:26:Hello, how are you?;m=out:2018-03-22 15~:25:Hi, good thanks;m=out:2018-03-22 15~:26:How about you?;m=in:2018-03-22 15~:26:Yes, fine thanks. What are you up to?;m=out:2018-03-22 15~:25:Just testing out MODL;m=in:2018-03-22 15~:26:Cool!", "expected_output": "[ {\n \"message\" : {\n \"direction\" : \"out\",\n \"date_time\" : \"2018-03-22 15:25\",\n \"message\" : \"Hi\",\n \"method\" : \"sms\"\n }\n}, {\n \"message\" : {\n \"direction\" : \"in\",\n \"date_time\" : \"2018-03-22 15:26\",\n \"message\" : \"Hello, how are you?\",\n \"method\" : \"sms\"\n }\n}, {\n \"message\" : {\n \"direction\" : \"out\",\n \"date_time\" : \"2018-03-22 15:25\",\n \"message\" : \"Hi, good thanks\",\n \"method\" : \"sms\"\n }\n}, {\n \"message\" : {\n \"direction\" : \"out\",\n \"date_time\" : \"2018-03-22 15:26\",\n \"message\" : \"How about you?\",\n \"method\" : \"sms\"\n }\n}, {\n \"message\" : {\n \"direction\" : \"in\",\n \"date_time\" : \"2018-03-22 15:26\",\n \"message\" : \"Yes, fine thanks. What are you up to?\",\n \"method\" : \"sms\"\n }\n}, {\n \"message\" : {\n \"direction\" : \"out\",\n \"date_time\" : \"2018-03-22 15:25\",\n \"message\" : \"Just testing out MODL\",\n \"method\" : \"sms\"\n }\n}, {\n \"message\" : {\n \"direction\" : \"in\",\n \"date_time\" : \"2018-03-22 15:26\",\n \"message\" : \"Cool!\",\n \"method\" : \"sms\"\n }\n} ]\n" }, { "input": "o=[test;test;t=Customer Service:44123]", "minimised_modl": "o[test;test;t=Customer Service:44123]", "expected_output": "{\n \"o\" : [ \"test\", \"test\", {\n \"t\" : [ \"Customer Service\", 44123 ]\n } ]\n}\n" }, { "input": "test[number=1;number=2;number=3]", "minimised_modl": "test[number=1;number=2;number=3]", "expected_output": "{\n \"test\" : [ {\n \"number\" : 1\n }, {\n \"number\" : 2\n }, {\n \"number\" : 3\n } ]\n}\n" }, { "input": "test(one=1;two=2;three=3)", "minimised_modl": "test(one=1;two=2;three=3)", "expected_output": "{\n \"test\" : {\n \"one\" : 1,\n \"two\" : 2,\n \"three\" : 3\n }\n}\n" }, { "input": "test=test", "minimised_modl": "test=test", "expected_output": "{\n \"test\" : \"test\"\n}\n" }, { "input": "one=1;two=2;three=3", "minimised_modl": "one=1;two=2;three=3", "expected_output": "[ {\n \"one\" : 1\n}, {\n \"two\" : 2\n}, {\n \"three\" : 3\n} ]\n" }, { "input": "[o(n=test);o(n=test2)]", "minimised_modl": "[o(n=test);o(n=test2)]", "expected_output": "[ {\n \"o\" : {\n \"n\" : \"test\"\n }\n}, {\n \"o\" : {\n \"n\" : \"test2\"\n }\n} ]\n" }, { "input": "R=0;\nnumber=1;number=2;number=3", "minimised_modl": "R=0;number=1;number=2;number=3", "expected_output": "[ {\n \"R\" : 0\n}, {\n \"number\" : 1\n}, {\n \"number\" : 2\n}, {\n \"number\" : 3\n} ]\n" }, { "input": "test=(one=1)", "minimised_modl": "test(one=1)", "expected_output": "{\n \"test\" : {\n \"one\" : 1\n }\n}\n" }, { "input": "test(one=1)", "minimised_modl": "test(one=1)", "expected_output": "{\n \"test\" : {\n \"one\" : 1\n }\n}\n" }, { "input": "test=[1;2;3]", "minimised_modl": "test=1:2:3", "expected_output": "{\n \"test\" : [ 1, 2, 3 ]\n}\n" }, { "input": "test[1;2;3]", "minimised_modl": "test=1:2:3", "expected_output": "{\n \"test\" : [ 1, 2, 3 ]\n}\n" }, { "input": "o(n=Tesco;s=Every Little Helps)", "minimised_modl": "o(n=Tesco;s=Every Little Helps)", "expected_output": "{\n \"o\" : {\n \"n\" : \"Tesco\",\n \"s\" : \"Every Little Helps\"\n }\n}\n" }, { "input": "o(n=test)", "minimised_modl": "o(n=test)", "expected_output": "{\n \"o\" : {\n \"n\" : \"test\"\n }\n}\n" }, { "input": "o(n=test)\n", "minimised_modl": "o(n=test)", "expected_output": "{\n \"o\" : {\n \"n\" : \"test\"\n }\n}\n" }, { "input": "o(\nn=test\n)", "minimised_modl": "o(n=test)", "expected_output": "{\n \"o\" : {\n \"n\" : \"test\"\n }\n}\n" }, { "input": "o(n=test)", "minimised_modl": "o(n=test)", "expected_output": "{\n \"o\" : {\n \"n\" : \"test\"\n }\n}\n" }, { "input": "o(n=test);\no(n=test2)", "minimised_modl": "o(n=test);o(n=test2)", "expected_output": "[ {\n \"o\" : {\n \"n\" : \"test\"\n }\n}, {\n \"o\" : {\n \"n\" : \"test2\"\n }\n} ]\n" }, { "input": "o(n=test);o(n=test2)", "minimised_modl": "o(n=test);o(n=test2)", "expected_output": "[ {\n \"o\" : {\n \"n\" : \"test\"\n }\n}, {\n \"o\" : {\n \"n\" : \"test2\"\n }\n} ]\n" }, { "input": "o=[test;test]", "minimised_modl": "o=test:test", "expected_output": "{\n \"o\" : [ \"test\", \"test\" ]\n}\n" }, { "input": "o=test", "minimised_modl": "o=test", "expected_output": "{\n \"o\" : \"test\"\n}\n" }, { "input": "o=[1;2]", "minimised_modl": "o=1:2", "expected_output": "{\n \"o\" : [ 1, 2 ]\n}\n" }, { "input": "o=[test1;test2]", "minimised_modl": "o=test1:test2", "expected_output": "{\n \"o\" : [ \"test1\", \"test2\" ]\n}\n" }, { "input": "o(t=test1;t2=test2)", "minimised_modl": "o(t=test1;t2=test2)", "expected_output": "{\n \"o\" : {\n \"t\" : \"test1\",\n \"t2\" : \"test2\"\n }\n}\n" }, { "input": "o(t(a=test;b=test2);t2(c=test;d=test2))", "minimised_modl": "o(t(a=test;b=test2);t2(c=test;d=test2))", "expected_output": "{\n \"o\" : {\n \"t\" : {\n \"a\" : \"test\",\n \"b\" : \"test2\"\n },\n \"t2\" : {\n \"c\" : \"test\",\n \"d\" : \"test2\"\n }\n }\n}" }, { "input": "o=1:2::4:5", "minimised_modl": "5", "expected_output": "{\n \"o\" : [ 1, 2, null, 4, 5 ]\n}" }, { "input": "o=[1;2;;4;5]", "minimised_modl": "o=1:2::4:5", "expected_output": "{\n \"o\" : [ 1, 2, null, 4, 5 ]\n}" }, { "input": "o=[1;\n2;\n\n3;\n4;\n5]", "minimised_modl": "o=1:2:3:4:5", "expected_output": "{\n \"o\" : [ 1, 2, 3, 4, 5 ]\n}" }, { "input": "o=[1 2 3 4 5]", "minimised_modl": "o=1 2 3 4 5", "expected_output": "{\n \"o\" : [ \"1 2 3 4 5\" ]\n}" }, { "input": "o=`ok`", "minimised_modl": "o=`ok`", "expected_output": "{\n \"o\" : \"ok\"\n}" }, { "input": "o=``", "minimised_modl": "o=``", "expected_output": "{\n \"o\" : \"\"\n}" }, { "input": "_test=(\n numbers=[[1;2;3;4;5];[6;7;8;9;10]]\n);\n \ntesting=%test.numbers.0.0", "minimised_modl": "_test=(numbers=[[1;2;3;4;5];[6;7;8;9;10]]);testing=%test.numbers.0.0", "expected_output": "{\n \"testing\" : 1\n}" }, { "input": "_test=(\n numbers=(\"one\"=1)\n);\n \ntesting = this is a string that includes a reference with a letter s after it `%test.numbers.one`s", "minimised_modl": "_test=(numbers=(one=1));testing=this is a string that includes a reference with a letter s after it `%test.numbers.one`s", "expected_output": "{\n \"testing\" : \"this is a string that includes a reference with a letter s after it 1s\"\n}" }, { "input": "_test=(\n numbers=(\"v\"=TEST)\n);\n \ntesting = this is a string that includes extra transforms for the value `%test.numbers.v.d`_value", "minimised_modl": "_test=(numbers=(v=TEST));testing=this is a string that includes extra transforms for the value `%test.numbers.v.d`_value", "expected_output": "{\n \"testing\" : \"this is a string that includes extra transforms for the value test_value\"\n}" }, { "input": "_test=(\n first=(\"v\"=TEST);\n second=(\"v\"=TEST2)\n);\n \ntesting = this is a string that includes extra transforms for the value `%test.second.v.d`_value", "minimised_modl": "_test=(first=(v=TEST);second=(v=TEST2));testing=this is a string that includes extra transforms for the value `%test.second.v.d`_value", "expected_output": "{\n \"testing\" : \"this is a string that includes extra transforms for the value test2_value\"\n}" }, { "input": "_test=(\n first=(\"v1\"=one);\n second=(\"v2\"=two:three)\n);\n \ntesting = \"`%test.second.v2.1`\"", "minimised_modl": "_test=(first=(v1=one);second=(v2=two:three));testing=`%test.second.v2.1`", "expected_output": "{\n \"testing\" : \"three\"\n}\n" }, { "input": "_test=(\n first=(\"v1\"=[one]);\n second=(\"v2\"=two:three)\n);\n \ntesting = \"`%test.first.v1.0``%test.second.v2.0``%test.second.v2.1`\"", "minimised_modl": "_test=(first=(v1=[one]);second=(v2=two:three));testing=`%test.first.v1.0``%test.second.v2.0``%test.second.v2.1`", "expected_output": "{\n \"testing\" : \"onetwothree\"\n}\n" }, { "input": "_test=(\n first=(\"v1\"=(one=(two=three)))\n);\n \ntesting = \"`%test.first.v1.one.two`\"", "minimised_modl": "_test=(first=(v1=(one=(two=three))));testing=`%test.first.v1.one.two`", "expected_output": "{\n \"testing\" : \"three\"\n}\n" }, {"input": "b=2;c=2;d=2;e=2;a={{b=c & d=e}?v1:v2:v3/?v4:v5:v6}", "minimised_modl": "b=2;c=2;d=2;e=2;a={{b=c & d=e}?v1:v2:v3/?v4:v5:v6}", "expected_output": "[{\"b\": 2},{\"c\": 2},{\"d\": 2},{\"e\": 2}, {\"a\": [\"v1\",\"v2\",\"v3\"]}]"}, {"input" : "o=1:2:3:4:5", "minimised_modl" : "o=1:2:3:4:5", "expected_output" : "{\n \"o\" : [ 1, 2, 3, 4, 5 ]\n}" }, {"input" : "o=1:2::4:5", "minimised_modl" : "o=1:2::4:5", "expected_output" : "{\n \"o\" : [ 1, 2, null, 4, 5 ]\n}" }, {"input" : "o=[1;2;3;4;5]", "minimised_modl" : "o=[1;2;3;4;5]", "expected_output" : "{\n \"o\" : [ 1, 2, 3, 4, 5 ]\n}" }, {"input" : "o=[1;2;;4;5]", "minimised_modl" : "o=[1;2;;4;5]", "expected_output" : "{\n \"o\" : [ 1, 2, null, 4, 5 ]\n}" }, { "input": "o=[1;\n2;\n3;\n4;\n5]", "minimised_modl" : "o=[1\n2\n3\n4\n5]", "expected_output" : "{\n \"o\" : [ 1, 2, 3, 4, 5 ]\n}" }, { "input": "o=[1;\n2;\n\n3;\n4;\n5]", "minimised_modl" : "o=[1\n2\n\n3\n4\n5]", "expected_output" : "{\n \"o\" : [ 1, 2, 3, 4, 5 ]\n}" }, {"input" : "o=[1 2 3 4 5]", "minimised_modl" : "o=[1 2 3 4 5]", "expected_output" : "{\n \"o\" : [ \"1 2 3 4 5\" ]\n}" }, {"input" : "o=`ok`", "minimised_modl" : "o=ok", "expected_output" : "{\n \"o\" : \"ok\"}" }, {"input" : "o=``", "minimised_modl" : "o=``", "expected_output" : "{\n \"o\" : \"\"\n}" }, {"input" : "o=\"ok\"", "minimised_modl" : "o=ok", "expected_output" : "{\n \"o\" : \"ok\"}" }, {"input" : "o=\"\"", "minimised_modl" : "o=\"\"", "expected_output" : "{\n \"o\" : \"\"\n}" }, { "input": "_test=( numbers=[[1;2;3;4;5];[6;7;8;9;10]]\n);\n \ntesting=%test.numbers.0.0", "minimised_modl" : "_test=(numbers=[[1;2;3;4;5];[6;7;8;9;10]]);testing=%test.numbers.0.0", "expected_output" : "{\"testing\":1}" }, { "input": "_test=(\n numbers=(\"one\"=1)\n);\n\ntesting = this is a string that includes a reference with a letter s after it `%test.numbers.one`s", "minimised_modl" : "_test=(numbers=(\"one\"=1));testing = this is a string that includes a reference with a letter s after it `%test.numbers.one`s", "expected_output" : "{\"testing\":\"this is a string that includes a reference with a letter s after it 1s\"}" }, { "input": "_test=(\n numbers=(\"v\"=TEST)\n);\n \ntesting = this is a string that includes extra transforms for the value `%test.numbers.v.d`_value", "minimised_modl" : "_test=(numbers=(\"v\"=TEST));testing = this is a string that includes extra transforms for the value `%test.numbers.v.d`_value", "expected_output" : "{\"testing\":\"this is a string that includes extra transforms for the value test_value\"}" }, { "input": "_test=(\n first=(\"v\"=TEST);\n second=(\"v\"=TEST2)\n);\n \ntesting = this is a string that includes extra transforms for the value `%test.second.v.d`_value", "minimised_modl" : "_test=(first=(\"v\"=TEST);second=(\"v\"=TEST2));testing = this is a string that includes extra transforms for the value `%test.second.v.d`_value", "expected_output" : "{\"testing\":\"this is a string that includes extra transforms for the value test2_value\"}" }, { "input": "_test=(\n first=(\"v1\"=one);\n second=(\"v2\"=two:three)\n);\n \ntesting = \"`%test.second.v2.1`\"", "minimised_modl" : "_test=(first=(\"v1\"=one);second=(\"v2\"=two:three));testing = \"`%test.second.v2.1`\"", "expected_output" : "{\"testing\":\"three\"}" }, { "input": "_test=(\n first=(\"v1\"=[one]);\n second=(\"v2\"=two:three)\n);\n \ntesting = \"`%test.first.v1.0``%test.second.v2.0``%test.second.v2.1`\"", "minimised_modl" : "_test=(first=(\"v1\"=[one]);second=(\"v2\"=two:three));testing = \"`%test.first.v1.0``%test.second.v2.0``%test.second.v2.1`\"", "expected_output" : "{\"testing\":\"onetwothree\"}" }, { "input": "_test=(\n first=(\"v1\"=(one=(two=three)))\n);\n \ntesting = \"`%test.first.v1.one.two`\"", "minimised_modl" : "_test=(first=(\"v1\"=(one=(two=three))));testing = \"`%test.first.v1.one.two`\"", "expected_output" : "{\"testing\":\"three\"}" }, { "input": "tony=hungry;\nneeds_food_1={tony=hungry?true/?false};\nneeds_food_2={!tony=hungry?false/?true};\nneeds_food_3={tony!=hungry?false/?true};\nneeds_food_3={!tony!=hungry?true/?false}", "minimised_modl": "tony=hungry\nneeds_food_1={tony=hungry?true/?false}\nneeds_food_2={!tony=hungry?false/?true}\nneeds_food_3={tony!=hungry?false/?true}\nneeds_food_3={!tony!=hungry?true/?false}", "expected_output": "[{\"tony\": \"hungry\"},{\"needs_food_1\": true},{\"needs_food_2\": true},{\"needs_food_3\": true},{\"needs_food_3\": true}]" }, { "input": "_c=de;\nresult={c!=de/at?German or Austrian/?Other}", "minimised_modl": "_c=de\nresult={c!=de/at?German or Austrian/?Other}", "expected_output": "{\"result\":\"Other\"}"}, { "input": "_test = 1;\nresult={!test!=1?one/?Other}", "minimised_modl": "_test = 1\nresult={!test!=1?one/?Other}", "expected_output": "{\"result\":\"one\"}"}, {"input": "x=[1;2:3:4]", "minimised_modl": "x=[1;2:3:4]", "expected_output": "{\"x\": [1,[2,3,4]]}"}, { "input": "_x=[1;2:3:4];\na=%x.1.1", "minimised_modl": "_x=[1;2:3:4]\na=%x.1.1", "expected_output": "{\"a\":3}"}, {"input": "x=[1;;;;;;;2:::::::::3;;;;;;;;;;4:::::::::5]", "minimised_modl": "x=[1;;;;;;;2:::::::::3;;;;;;;;;;4:::::::::5]", "expected_output": "{\"x\" : [ 1, null, null, null, null, null, null, [2, null, null, null, null, null, null, null, null, 3], null, null, null, null, null, null, null, null, null, [4, null, null, null, null, null, null, null, null, 5] ]}"}, {"input": "*LOAD=\"http://modules.num.uk/1.txt\";o=Tesco:Every Little Helps:[t=Customer Service:0845555555];", "minimised_modl": "*LOAD=\"http://modules.num.uk/1.txt\";o=Tesco:Every Little Helps:[t=Customer Service:0845555555];", "expected_output": "{\"organisation\":{\"name\":\"Tesco\",\"slogan\":\"Every Little Helps\",\"objects\":[{\"telephone\":{\"description\":\"Customer Service\",\"value\":\"0845555555\",\"object_type\":\"media\",\"object_display_name\":\"Telephone\",\"description_default\":\"Call\",\"prefix\":\"tel://\",\"media_type\":\"core\"}}],\"object_type\":\"entity\",\"object_display_name\":\"Organisation\",\"description_default\":\"View Organisation\"}}"} ]