UNPKG

mmir-lib

Version:

MMIR (Mobile Multimodal Interaction and Relay) library

2 lines 5.22 kB
define(["mmirf/antlr3"],function(u){var h=function(t,e){e=e||new u.antlr.runtime.RecognizerSharedState,function(){}.call(this),h.superclass.constructor.call(this,t,e),this.adaptor=new u.antlr.runtime.tree.CommonTreeAdaptor};return u.antlr.lang.augmentObject(h,{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}),u.antlr.lang.extend(h,u.antlr.runtime.Parser,{setTreeAdaptor:function(t){this.adaptor=t},getTreeAdaptor:function(){return this.adaptor},getTokenNames:function(){return h.tokenNames},getGrammarFileName:function(){return"MmirTemplate.g"}}),u.antlr.lang.augmentObject(h.prototype,{main_return:(h.main_return=function(){},void u.antlr.lang.extend(h.main_return,u.antlr.runtime.ParserRuleReturnScope,{getTree:function(){return this.tree}})),main:function(){var e=new h.main_return;e.start=this.input.LT(1);var t,r=null;try{t=this.adaptor.nil(),this.pushFollow(h.FOLLOW_text_in_main45),r=this.text(),this.state._fsp--,this.adaptor.addChild(t,r.getTree()),e.stop=this.input.LT(-1),e.tree=this.adaptor.rulePostProcessing(t),this.adaptor.setTokenBoundaries(e.tree,e.start,e.stop)}catch(t){if(!(t instanceof u.antlr.runtime.RecognitionException))throw t;this.reportError(t),this.recover(this.input,t),e.tree=this.adaptor.errorNode(this.input,e.start,this.input.LT(-1),t)}return e},text_return:(h.text_return=function(){},void u.antlr.lang.extend(h.text_return,u.antlr.runtime.ParserRuleReturnScope,{getTree:function(){return this.tree}})),text:function(){var e=new h.text_return;e.start=this.input.LT(1);var t=null;try{var r=this.adaptor.nil(),n=0;t:for(;;){var i=2,a=this.input.LA(1);if(4<=a&&a<=19&&(i=1),1!==i){if(1<=n)break t;throw new u.antlr.runtime.EarlyExitException(1,this.input)}this.pushFollow(h.FOLLOW_line_in_text58),t=this.line(),this.state._fsp--,this.adaptor.addChild(r,t.getTree()),n++}e.stop=this.input.LT(-1),e.tree=this.adaptor.rulePostProcessing(r),this.adaptor.setTokenBoundaries(e.tree,e.start,e.stop)}catch(t){if(!(t instanceof u.antlr.runtime.RecognitionException))throw t;this.reportError(t),this.recover(this.input,t),e.tree=this.adaptor.errorNode(this.input,e.start,this.input.LT(-1),t)}return e},line_return:(h.line_return=function(){},void u.antlr.lang.extend(h.line_return,u.antlr.runtime.ParserRuleReturnScope,{getTree:function(){return this.tree}})),line:function(){var e=new h.line_return;e.start=this.input.LT(1);var t,r,n,i=null;try{t=this.adaptor.nil();t:for(;;){var a=3,o=this.input.LA(1);switch(7<=o&&o<=19?a=1:4==o&&(a=2),a){case 1:this.pushFollow(h.FOLLOW_other_in_line86),i=this.other(),this.state._fsp--,this.adaptor.addChild(t,i.getTree());break;case 2:r=this.match(this.input,4,h.FOLLOW_CHAR_in_line124),n=this.adaptor.create(r),this.adaptor.addChild(t,n);break;default:break t}}var s=this.input.LT(1);if(!(5<=this.input.LA(1)&&this.input.LA(1)<=6))throw new u.antlr.runtime.MismatchedSetException(null,this.input);this.input.consume(),this.adaptor.addChild(t,this.adaptor.create(s)),this.state.errorRecovery=!1,e.stop=this.input.LT(-1),e.tree=this.adaptor.rulePostProcessing(t),this.adaptor.setTokenBoundaries(e.tree,e.start,e.stop)}catch(t){if(!(t instanceof u.antlr.runtime.RecognitionException))throw t;this.reportError(t),this.recover(this.input,t),e.tree=this.adaptor.errorNode(this.input,e.start,this.input.LT(-1),t)}return e},other_return:(h.other_return=function(){},void u.antlr.lang.extend(h.other_return,u.antlr.runtime.ParserRuleReturnScope,{getTree:function(){return this.tree}})),other:function(){var e=new h.other_return;e.start=this.input.LT(1);try{var t=this.adaptor.nil(),r=this.input.LT(1);if(!(7<=this.input.LA(1)&&this.input.LA(1)<=19))throw new u.antlr.runtime.MismatchedSetException(null,this.input);this.input.consume(),this.adaptor.addChild(t,this.adaptor.create(r)),this.state.errorRecovery=!1,e.stop=this.input.LT(-1),e.tree=this.adaptor.rulePostProcessing(t),this.adaptor.setTokenBoundaries(e.tree,e.start,e.stop)}catch(t){if(!(t instanceof u.antlr.runtime.RecognitionException))throw t;this.reportError(t),this.recover(this.input,t),e.tree=this.adaptor.errorNode(this.input,e.start,this.input.LT(-1),t)}return e}},!0),u.antlr.lang.augmentObject(h,{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"],FOLLOW_text_in_main45:new u.antlr.runtime.BitSet([2,0]),FOLLOW_line_in_text58:new u.antlr.runtime.BitSet([1048562,0]),FOLLOW_other_in_line86:new u.antlr.runtime.BitSet([1048560,0]),FOLLOW_CHAR_in_line124:new u.antlr.runtime.BitSet([1048560,0]),FOLLOW_set_in_line145:new u.antlr.runtime.BitSet([2,0]),FOLLOW_set_in_other0:new u.antlr.runtime.BitSet([2,0])}),h}); //# sourceMappingURL=MmirTemplateParser_amd.min.js.map