UNPKG

mmir-lib

Version:

MMIR (Mobile Multimodal Interaction and Relay) library

2 lines 5.12 kB
define(["mmirf/antlr3"],function(r){var a=function(t,e){e=e||new r.antlr.runtime.RecognizerSharedState,function(){this.isDebug=!0,this.extractString=function(t){return t?0<t.length?t.substring(1,t.length-1):"":null}}.call(this),a.superclass.constructor.call(this,t,e),this.adaptor=new r.antlr.runtime.tree.CommonTreeAdaptor};return r.antlr.lang.augmentObject(a,{EOF:-1,CHAR:4,NL:5,END:6,EscapeExit:7,ESC_DoEnter:8,COMMENT:9,DoEnterBlock:10,DoEnterStatement:11,DoEnterIncludeScript:12,DoEnterIncludeStyle:13,DoEnterLocalize:14,DoEnterYieldDeclaration:15,DoEnterYieldContent:16,DoEnterIfStatement:17,DoEnterElseStatement:18,DoEnterForStatement:19,DoEnterDeclareVar:20,DoEnterHelper:21,DoEnterRender:22,END_SCRIPT:23,DoExit:24,DoExitStatement:25,DoEnter:26,STRING:27,SSTRING:28,WS:29,ESC_SEQ:30,HEX_DIGIT:31,UNICODE_ESC:32,OCTAL_ESC:33}),r.antlr.lang.extend(a,r.antlr.runtime.Parser,{getTokenNames:function(){return a.tokenNames},getGrammarFileName:function(){return"MmirScript.g"}}),r.antlr.lang.augmentObject(a.prototype,{main:function(){var t=null,e=null;try{this.pushFollow(a.FOLLOW_text_in_main62),e=this.text(),this.state._fsp--,t=e&&this.input.toString(e.start,e.stop)?e?this.input.toString(e.start,e.stop):null:"";t:for(;;){var n=2,i=this.input.LA(1);if(5==i&&(n=1),1!==n)break t;this.match(this.input,5,a.FOLLOW_NL_in_main67),this.pushFollow(a.FOLLOW_text_in_main71),e=this.text(),this.state._fsp--,t=t+"\r\n"+(e&&this.input.toString(e.start,e.stop)?e?this.input.toString(e.start,e.stop):null:"")}this.isDebug&&this.printInfo("SCRIPT_main.text",t)}catch(t){if(!(t instanceof r.antlr.runtime.RecognitionException))throw t;this.reportError(t),this.recover(this.input,t)}return t},text_return:(a.text_return=function(){},void r.antlr.lang.extend(a.text_return,r.antlr.runtime.ParserRuleReturnScope,{})),text:function(){var t=new a.text_return;t.start=this.input.LT(1);try{t:for(;;){var e=7;switch(this.input.LA(1)){case 9:case 27:case 28:e=1;break;case 24:e=2;break;case 25:e=3;break;case 26:e=4;break;case 11:e=5;break;case 4:e=6}switch(e){case 1:this.pushFollow(a.FOLLOW_other_in_text88),this.other(),this.state._fsp--;break;case 2:this.match(this.input,24,a.FOLLOW_DoExit_in_text92);break;case 3:this.match(this.input,25,a.FOLLOW_DoExitStatement_in_text96);break;case 4:this.match(this.input,26,a.FOLLOW_DoEnter_in_text100);break;case 5:this.match(this.input,11,a.FOLLOW_DoEnterStatement_in_text104);break;case 6:this.match(this.input,4,a.FOLLOW_CHAR_in_text108);break;default:break t}}t.stop=this.input.LT(-1)}catch(t){if(!(t instanceof r.antlr.runtime.RecognitionException))throw t;this.reportError(t),this.recover(this.input,t)}return t},other:function(){var t=null,e=null,n=null;try{var i=3;switch(this.input.LA(1)){case 9:i=1;break;case 27:i=2;break;case 28:i=3;break;default:throw new r.antlr.runtime.NoViableAltException("",3,0,this.input)}switch(i){case 1:t=this.match(this.input,9,a.FOLLOW_COMMENT_in_other121),this.isDebug&&this.printInfo("SCRIPT_BLOCK_comment",t?t.getText():null);break;case 2:e=this.match(this.input,27,a.FOLLOW_STRING_in_other129),this.isDebug&&this.printInfo("SCRIPT_BLOCK_String",e?e.getText():null);break;case 3:n=this.match(this.input,28,a.FOLLOW_SSTRING_in_other138),this.isDebug&&this.printInfo("SCRIPT_BLOCK_string",n?n.getText():null)}}catch(t){if(!(t instanceof r.antlr.runtime.RecognitionException))throw t;this.reportError(t),this.recover(this.input,t)}},line_end:function(){try{if(-1!=this.input.LA(1)&&5!=this.input.LA(1))throw new r.antlr.runtime.MismatchedSetException(null,this.input);this.input.consume(),this.state.errorRecovery=!1}catch(t){if(!(t instanceof r.antlr.runtime.RecognitionException))throw t;this.reportError(t),this.recover(this.input,t)}}},!0),r.antlr.lang.augmentObject(a,{tokenNames:["<invalid>","<EOR>","<DOWN>","<UP>","CHAR","NL","END","EscapeExit","ESC_DoEnter","COMMENT","DoEnterBlock","DoEnterStatement","DoEnterIncludeScript","DoEnterIncludeStyle","DoEnterLocalize","DoEnterYieldDeclaration","DoEnterYieldContent","DoEnterIfStatement","DoEnterElseStatement","DoEnterForStatement","DoEnterDeclareVar","DoEnterHelper","DoEnterRender","END_SCRIPT","DoExit","DoExitStatement","DoEnter","STRING","SSTRING","WS","ESC_SEQ","HEX_DIGIT","UNICODE_ESC","OCTAL_ESC"],FOLLOW_text_in_main62:new r.antlr.runtime.BitSet([34,0]),FOLLOW_NL_in_main67:new r.antlr.runtime.BitSet([520096304,0]),FOLLOW_text_in_main71:new r.antlr.runtime.BitSet([34,0]),FOLLOW_other_in_text88:new r.antlr.runtime.BitSet([520096274,0]),FOLLOW_DoExit_in_text92:new r.antlr.runtime.BitSet([520096274,0]),FOLLOW_DoExitStatement_in_text96:new r.antlr.runtime.BitSet([520096274,0]),FOLLOW_DoEnter_in_text100:new r.antlr.runtime.BitSet([520096274,0]),FOLLOW_DoEnterStatement_in_text104:new r.antlr.runtime.BitSet([520096274,0]),FOLLOW_CHAR_in_text108:new r.antlr.runtime.BitSet([520096274,0]),FOLLOW_COMMENT_in_other121:new r.antlr.runtime.BitSet([2,0]),FOLLOW_STRING_in_other129:new r.antlr.runtime.BitSet([2,0]),FOLLOW_SSTRING_in_other138:new r.antlr.runtime.BitSet([2,0]),FOLLOW_set_in_line_end0:new r.antlr.runtime.BitSet([2,0])}),a}); //# sourceMappingURL=MmirScriptParser_amd.min.js.map