function i(e){for(var t={},T=e.split(" "),E=0;E<T.length;++E)t[T[E]]=!0;return t}var I={name:"ttcn-cfg",keywords:i("Yes No LogFile FileMask ConsoleMask AppendFile TimeStampFormat LogEventTypes SourceInfoFormat LogEntityName LogSourceInfo DiskFullAction LogFileNumber LogFileSize MatchingHints Detailed Compact SubCategories Stack Single None Seconds DateTime Time Stop Error Retry Delete TCPPort KillTimer NumHCs UnixSocketsEnabled LocalAddress"),fileNCtrlMaskOptions:i("TTCN_EXECUTOR TTCN_ERROR TTCN_WARNING TTCN_PORTEVENT TTCN_TIMEROP TTCN_VERDICTOP TTCN_DEFAULTOP TTCN_TESTCASE TTCN_ACTION TTCN_USER TTCN_FUNCTION TTCN_STATISTICS TTCN_PARALLEL TTCN_MATCHING TTCN_DEBUG EXECUTOR ERROR WARNING PORTEVENT TIMEROP VERDICTOP DEFAULTOP TESTCASE ACTION USER FUNCTION STATISTICS PARALLEL MATCHING DEBUG LOG_ALL LOG_NOTHING ACTION_UNQUALIFIED DEBUG_ENCDEC DEBUG_TESTPORT DEBUG_UNQUALIFIED DEFAULTOP_ACTIVATE DEFAULTOP_DEACTIVATE DEFAULTOP_EXIT DEFAULTOP_UNQUALIFIED ERROR_UNQUALIFIED EXECUTOR_COMPONENT EXECUTOR_CONFIGDATA EXECUTOR_EXTCOMMAND EXECUTOR_LOGOPTIONS EXECUTOR_RUNTIME EXECUTOR_UNQUALIFIED FUNCTION_RND FUNCTION_UNQUALIFIED MATCHING_DONE MATCHING_MCSUCCESS MATCHING_MCUNSUCC MATCHING_MMSUCCESS MATCHING_MMUNSUCC MATCHING_PCSUCCESS MATCHING_PCUNSUCC MATCHING_PMSUCCESS MATCHING_PMUNSUCC MATCHING_PROBLEM MATCHING_TIMEOUT MATCHING_UNQUALIFIED PARALLEL_PORTCONN PARALLEL_PORTMAP PARALLEL_PTC PARALLEL_UNQUALIFIED PORTEVENT_DUALRECV PORTEVENT_DUALSEND PORTEVENT_MCRECV PORTEVENT_MCSEND PORTEVENT_MMRECV PORTEVENT_MMSEND PORTEVENT_MQUEUE PORTEVENT_PCIN PORTEVENT_PCOUT PORTEVENT_PMIN PORTEVENT_PMOUT PORTEVENT_PQUEUE PORTEVENT_STATE PORTEVENT_UNQUALIFIED STATISTICS_UNQUALIFIED STATISTICS_VERDICT TESTCASE_FINISH TESTCASE_START TESTCASE_UNQUALIFIED TIMEROP_GUARD TIMEROP_READ TIMEROP_START TIMEROP_STOP TIMEROP_TIMEOUT TIMEROP_UNQUALIFIED USER_UNQUALIFIED VERDICTOP_FINAL VERDICTOP_GETVERDICT VERDICTOP_SETVERDICT VERDICTOP_UNQUALIFIED WARNING_UNQUALIFIED"),externalCommands:i("BeginControlPart EndControlPart BeginTestCase EndTestCase"),multiLineStrings:!0},U=I.keywords,a=I.fileNCtrlMaskOptions,R=I.externalCommands,S=I.multiLineStrings,l=I.indentStatements!==!1,A=/[\|]/,n;function P(e,t){var T=e.next();if(T=='"'||T=="'")return t.tokenize=L(T),t.tokenize(e,t);if(/[:=]/.test(T))return n=T,"punctuation";if(T=="#")return e.skipToEnd(),"comment";if(/\d/.test(T))return e.eatWhile(/[\w\.]/),"number";if(A.test(T))return e.eatWhile(A),"operator";if(T=="[")return e.eatWhile(/[\w_\]]/),"number";e.eatWhile(/[\w\$_]/);var E=e.current();return U.propertyIsEnumerable(E)?"keyword":a.propertyIsEnumerable(E)?"atom":R.propertyIsEnumerable(E)?"deleted":"variable"}function L(e){return function(t,T){for(var E=!1,N,_=!1;(N=t.next())!=null;){if(N==e&&!E){var C=t.peek();C&&(C=C.toLowerCase(),(C=="b"||C=="h"||C=="o")&&t.next()),_=!0;break}E=!E&&N=="\\"}return(_||!(E||S))&&(T.tokenize=null),"string"}}function O(e,t,T,E,N){this.indented=e,this.column=t,this.type=T,this.align=E,this.prev=N}function o(e,t,T){var E=e.indented;return e.context&&e.context.type=="statement"&&(E=e.context.indented),e.context=new O(E,t,T,null,e.context)}function r(e){var t=e.context.type;return(t==")"||t=="]"||t=="}")&&(e.indented=e.context.indented),e.context=e.context.prev}const s={name:"ttcn",startState:function(){return{tokenize:null,context:new O(0,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,t){var T=t.context;if(e.sol()&&(T.align??(T.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return null;n=null;var E=(t.tokenize||P)(e,t);if(E=="comment")return E;if(T.align??(T.align=!0),(n==";"||n==":"||n==",")&&T.type=="statement")r(t);else if(n=="{")o(t,e.column(),"}");else if(n=="[")o(t,e.column(),"]");else if(n=="(")o(t,e.column(),")");else if(n=="}"){for(;T.type=="statement";)T=r(t);for(T.type=="}"&&(T=r(t));T.type=="statement";)T=r(t)}else n==T.type?r(t):l&&((T.type=="}"||T.type=="top")&&n!=";"||T.type=="statement"&&n=="newstatement")&&o(t,e.column(),"statement");return t.startOfLine=!1,E},languageData:{indentOnInput:/^\s*[{}]$/,commentTokens:{line:"#"}}};export{s as t};
