1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318 |
- "no use strict";
- !(function(window) {
- if (typeof window.window != "undefined" && window.document)
- return;
- if (window.ace_require && window.define)
- return;
- if (!window.console) {
- window.console = function() {
- var msgs = Array.prototype.slice.call(arguments, 0);
- postMessage({type: "log", data: msgs});
- };
- window.console.error =
- window.console.warn =
- window.console.log =
- window.console.trace = window.console;
- }
- window.window = window;
- window.ace = window;
- window.onerror = function(message, file, line, col, err) {
- postMessage({type: "error", data: {
- message: message,
- data: err.data,
- file: file,
- line: line,
- col: col,
- stack: err.stack
- }});
- };
- window.normalizeModule = function(parentId, moduleName) {
- // normalize plugin requires
- if (moduleName.indexOf("!") !== -1) {
- var chunks = moduleName.split("!");
- return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
- }
- // normalize relative requires
- if (moduleName.charAt(0) == ".") {
- var base = parentId.split("/").slice(0, -1).join("/");
- moduleName = (base ? base + "/" : "") + moduleName;
-
- while (moduleName.indexOf(".") !== -1 && previous != moduleName) {
- var previous = moduleName;
- moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
- }
- }
-
- return moduleName;
- };
- window.ace_require = function ace_require(parentId, id) {
- if (!id) {
- id = parentId;
- parentId = null;
- }
- if (!id.charAt)
- throw new Error("worker.js ace_require() accepts only (parentId, id) as arguments");
- id = window.normalizeModule(parentId, id);
- var module = window.ace_require.modules[id];
- if (module) {
- if (!module.initialized) {
- module.initialized = true;
- module.exports = module.factory().exports;
- }
- return module.exports;
- }
-
- if (!window.ace_require.tlns)
- return console.log("unable to load " + id);
-
- var path = resolveModuleId(id, window.ace_require.tlns);
- if (path.slice(-3) != ".js") path += ".js";
-
- window.ace_require.id = id;
- window.ace_require.modules[id] = {}; // prevent infinite loop on broken modules
- importScripts(path);
- return window.ace_require(parentId, id);
- };
- function resolveModuleId(id, paths) {
- var testPath = id, tail = "";
- while (testPath) {
- var alias = paths[testPath];
- if (typeof alias == "string") {
- return alias + tail;
- } else if (alias) {
- return alias.location.replace(/\/*$/, "/") + (tail || alias.main || alias.name);
- } else if (alias === false) {
- return "";
- }
- var i = testPath.lastIndexOf("/");
- if (i === -1) break;
- tail = testPath.substr(i) + tail;
- testPath = testPath.slice(0, i);
- }
- return id;
- }
- window.ace_require.modules = {};
- window.ace_require.tlns = {};
- window.define = function(id, deps, factory) {
- if (arguments.length == 2) {
- factory = deps;
- if (typeof id != "string") {
- deps = id;
- id = window.ace_require.id;
- }
- } else if (arguments.length == 1) {
- factory = id;
- deps = [];
- id = window.ace_require.id;
- }
-
- if (typeof factory != "function") {
- window.ace_require.modules[id] = {
- exports: factory,
- initialized: true
- };
- return;
- }
- if (!deps.length)
- // If there is no dependencies, we inject "ace_require", "exports" and
- // "module" as dependencies, to provide CommonJS compatibility.
- deps = ["ace_require", "exports", "module"];
- var req = function(childId) {
- return window.ace_require(id, childId);
- };
- window.ace_require.modules[id] = {
- exports: {},
- factory: function() {
- var module = this;
- var returnExports = factory.apply(this, deps.slice(0, factory.length).map(function(dep) {
- switch (dep) {
- // Because "ace_require", "exports" and "module" aren't actual
- // dependencies, we must handle them seperately.
- case "ace_require": return req;
- case "exports": return module.exports;
- case "module": return module;
- // But for all other dependencies, we can just go ahead and
- // ace_require them.
- default: return req(dep);
- }
- }));
- if (returnExports)
- module.exports = returnExports;
- return module;
- }
- };
- };
- window.define.amd = {};
- ace_require.tlns = {};
- window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
- for (var i in topLevelNamespaces)
- ace_require.tlns[i] = topLevelNamespaces[i];
- };
- window.initSender = function initSender() {
- var EventEmitter = window.ace_require("ace/lib/event_emitter").EventEmitter;
- var oop = window.ace_require("ace/lib/oop");
-
- var Sender = function() {};
-
- (function() {
-
- oop.implement(this, EventEmitter);
-
- this.callback = function(data, callbackId) {
- postMessage({
- type: "call",
- id: callbackId,
- data: data
- });
- };
-
- this.emit = function(name, data) {
- postMessage({
- type: "event",
- name: name,
- data: data
- });
- };
-
- }).call(Sender.prototype);
-
- return new Sender();
- };
- var main = window.main = null;
- var sender = window.sender = null;
- window.onmessage = function(e) {
- var msg = e.data;
- if (msg.event && sender) {
- sender._signal(msg.event, msg.data);
- }
- else if (msg.command) {
- if (main[msg.command])
- main[msg.command].apply(main, msg.args);
- else if (window[msg.command])
- window[msg.command].apply(window, msg.args);
- else
- throw new Error("Unknown command:" + msg.command);
- }
- else if (msg.init) {
- window.initBaseUrls(msg.tlns);
- ace_require("ace/lib/es5-shim");
- sender = window.sender = window.initSender();
- var clazz = ace_require(msg.module)[msg.classname];
- main = window.main = new clazz(sender);
- }
- };
- })(this);
- define("ace/lib/oop",[], function(ace_require, exports, module) {
- "use strict";
- exports.inherits = function(ctor, superCtor) {
- ctor.super_ = superCtor;
- ctor.prototype = Object.create(superCtor.prototype, {
- constructor: {
- value: ctor,
- enumerable: false,
- writable: true,
- configurable: true
- }
- });
- };
- exports.mixin = function(obj, mixin) {
- for (var key in mixin) {
- obj[key] = mixin[key];
- }
- return obj;
- };
- exports.implement = function(proto, mixin) {
- exports.mixin(proto, mixin);
- };
- });
- define("ace/range",[], function(ace_require, exports, module) {
- "use strict";
- var comparePoints = function(p1, p2) {
- return p1.row - p2.row || p1.column - p2.column;
- };
- var Range = function(startRow, startColumn, endRow, endColumn) {
- this.start = {
- row: startRow,
- column: startColumn
- };
- this.end = {
- row: endRow,
- column: endColumn
- };
- };
- (function() {
- this.isEqual = function(range) {
- return this.start.row === range.start.row &&
- this.end.row === range.end.row &&
- this.start.column === range.start.column &&
- this.end.column === range.end.column;
- };
- this.toString = function() {
- return ("Range: [" + this.start.row + "/" + this.start.column +
- "] -> [" + this.end.row + "/" + this.end.column + "]");
- };
- this.contains = function(row, column) {
- return this.compare(row, column) == 0;
- };
- this.compareRange = function(range) {
- var cmp,
- end = range.end,
- start = range.start;
- cmp = this.compare(end.row, end.column);
- if (cmp == 1) {
- cmp = this.compare(start.row, start.column);
- if (cmp == 1) {
- return 2;
- } else if (cmp == 0) {
- return 1;
- } else {
- return 0;
- }
- } else if (cmp == -1) {
- return -2;
- } else {
- cmp = this.compare(start.row, start.column);
- if (cmp == -1) {
- return -1;
- } else if (cmp == 1) {
- return 42;
- } else {
- return 0;
- }
- }
- };
- this.comparePoint = function(p) {
- return this.compare(p.row, p.column);
- };
- this.containsRange = function(range) {
- return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
- };
- this.intersects = function(range) {
- var cmp = this.compareRange(range);
- return (cmp == -1 || cmp == 0 || cmp == 1);
- };
- this.isEnd = function(row, column) {
- return this.end.row == row && this.end.column == column;
- };
- this.isStart = function(row, column) {
- return this.start.row == row && this.start.column == column;
- };
- this.setStart = function(row, column) {
- if (typeof row == "object") {
- this.start.column = row.column;
- this.start.row = row.row;
- } else {
- this.start.row = row;
- this.start.column = column;
- }
- };
- this.setEnd = function(row, column) {
- if (typeof row == "object") {
- this.end.column = row.column;
- this.end.row = row.row;
- } else {
- this.end.row = row;
- this.end.column = column;
- }
- };
- this.inside = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isEnd(row, column) || this.isStart(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.insideStart = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isEnd(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.insideEnd = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isStart(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.compare = function(row, column) {
- if (!this.isMultiLine()) {
- if (row === this.start.row) {
- return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
- }
- }
- if (row < this.start.row)
- return -1;
- if (row > this.end.row)
- return 1;
- if (this.start.row === row)
- return column >= this.start.column ? 0 : -1;
- if (this.end.row === row)
- return column <= this.end.column ? 0 : 1;
- return 0;
- };
- this.compareStart = function(row, column) {
- if (this.start.row == row && this.start.column == column) {
- return -1;
- } else {
- return this.compare(row, column);
- }
- };
- this.compareEnd = function(row, column) {
- if (this.end.row == row && this.end.column == column) {
- return 1;
- } else {
- return this.compare(row, column);
- }
- };
- this.compareInside = function(row, column) {
- if (this.end.row == row && this.end.column == column) {
- return 1;
- } else if (this.start.row == row && this.start.column == column) {
- return -1;
- } else {
- return this.compare(row, column);
- }
- };
- this.clipRows = function(firstRow, lastRow) {
- if (this.end.row > lastRow)
- var end = {row: lastRow + 1, column: 0};
- else if (this.end.row < firstRow)
- var end = {row: firstRow, column: 0};
- if (this.start.row > lastRow)
- var start = {row: lastRow + 1, column: 0};
- else if (this.start.row < firstRow)
- var start = {row: firstRow, column: 0};
- return Range.fromPoints(start || this.start, end || this.end);
- };
- this.extend = function(row, column) {
- var cmp = this.compare(row, column);
- if (cmp == 0)
- return this;
- else if (cmp == -1)
- var start = {row: row, column: column};
- else
- var end = {row: row, column: column};
- return Range.fromPoints(start || this.start, end || this.end);
- };
- this.isEmpty = function() {
- return (this.start.row === this.end.row && this.start.column === this.end.column);
- };
- this.isMultiLine = function() {
- return (this.start.row !== this.end.row);
- };
- this.clone = function() {
- return Range.fromPoints(this.start, this.end);
- };
- this.collapseRows = function() {
- if (this.end.column == 0)
- return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0);
- else
- return new Range(this.start.row, 0, this.end.row, 0);
- };
- this.toScreenRange = function(session) {
- var screenPosStart = session.documentToScreenPosition(this.start);
- var screenPosEnd = session.documentToScreenPosition(this.end);
- return new Range(
- screenPosStart.row, screenPosStart.column,
- screenPosEnd.row, screenPosEnd.column
- );
- };
- this.moveBy = function(row, column) {
- this.start.row += row;
- this.start.column += column;
- this.end.row += row;
- this.end.column += column;
- };
- }).call(Range.prototype);
- Range.fromPoints = function(start, end) {
- return new Range(start.row, start.column, end.row, end.column);
- };
- Range.comparePoints = comparePoints;
- Range.comparePoints = function(p1, p2) {
- return p1.row - p2.row || p1.column - p2.column;
- };
- exports.Range = Range;
- });
- define("ace/apply_delta",[], function(ace_require, exports, module) {
- "use strict";
- function throwDeltaError(delta, errorText){
- console.log("Invalid Delta:", delta);
- throw "Invalid Delta: " + errorText;
- }
- function positionInDocument(docLines, position) {
- return position.row >= 0 && position.row < docLines.length &&
- position.column >= 0 && position.column <= docLines[position.row].length;
- }
- function validateDelta(docLines, delta) {
- if (delta.action != "insert" && delta.action != "remove")
- throwDeltaError(delta, "delta.action must be 'insert' or 'remove'");
- if (!(delta.lines instanceof Array))
- throwDeltaError(delta, "delta.lines must be an Array");
- if (!delta.start || !delta.end)
- throwDeltaError(delta, "delta.start/end must be an present");
- var start = delta.start;
- if (!positionInDocument(docLines, delta.start))
- throwDeltaError(delta, "delta.start must be contained in document");
- var end = delta.end;
- if (delta.action == "remove" && !positionInDocument(docLines, end))
- throwDeltaError(delta, "delta.end must contained in document for 'remove' actions");
- var numRangeRows = end.row - start.row;
- var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0));
- if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars)
- throwDeltaError(delta, "delta.range must match delta lines");
- }
- exports.applyDelta = function(docLines, delta, doNotValidate) {
-
- var row = delta.start.row;
- var startColumn = delta.start.column;
- var line = docLines[row] || "";
- switch (delta.action) {
- case "insert":
- var lines = delta.lines;
- if (lines.length === 1) {
- docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn);
- } else {
- var args = [row, 1].concat(delta.lines);
- docLines.splice.apply(docLines, args);
- docLines[row] = line.substring(0, startColumn) + docLines[row];
- docLines[row + delta.lines.length - 1] += line.substring(startColumn);
- }
- break;
- case "remove":
- var endColumn = delta.end.column;
- var endRow = delta.end.row;
- if (row === endRow) {
- docLines[row] = line.substring(0, startColumn) + line.substring(endColumn);
- } else {
- docLines.splice(
- row, endRow - row + 1,
- line.substring(0, startColumn) + docLines[endRow].substring(endColumn)
- );
- }
- break;
- }
- };
- });
- define("ace/lib/event_emitter",[], function(ace_require, exports, module) {
- "use strict";
- var EventEmitter = {};
- var stopPropagation = function() { this.propagationStopped = true; };
- var preventDefault = function() { this.defaultPrevented = true; };
- EventEmitter._emit =
- EventEmitter._dispatchEvent = function(eventName, e) {
- this._eventRegistry || (this._eventRegistry = {});
- this._defaultHandlers || (this._defaultHandlers = {});
- var listeners = this._eventRegistry[eventName] || [];
- var defaultHandler = this._defaultHandlers[eventName];
- if (!listeners.length && !defaultHandler)
- return;
- if (typeof e != "object" || !e)
- e = {};
- if (!e.type)
- e.type = eventName;
- if (!e.stopPropagation)
- e.stopPropagation = stopPropagation;
- if (!e.preventDefault)
- e.preventDefault = preventDefault;
- listeners = listeners.slice();
- for (var i=0; i<listeners.length; i++) {
- listeners[i](e, this);
- if (e.propagationStopped)
- break;
- }
-
- if (defaultHandler && !e.defaultPrevented)
- return defaultHandler(e, this);
- };
- EventEmitter._signal = function(eventName, e) {
- var listeners = (this._eventRegistry || {})[eventName];
- if (!listeners)
- return;
- listeners = listeners.slice();
- for (var i=0; i<listeners.length; i++)
- listeners[i](e, this);
- };
- EventEmitter.once = function(eventName, callback) {
- var _self = this;
- this.on(eventName, function newCallback() {
- _self.off(eventName, newCallback);
- callback.apply(null, arguments);
- });
- if (!callback) {
- return new Promise(function(resolve) {
- callback = resolve;
- });
- }
- };
- EventEmitter.setDefaultHandler = function(eventName, callback) {
- var handlers = this._defaultHandlers;
- if (!handlers)
- handlers = this._defaultHandlers = {_disabled_: {}};
-
- if (handlers[eventName]) {
- var old = handlers[eventName];
- var disabled = handlers._disabled_[eventName];
- if (!disabled)
- handlers._disabled_[eventName] = disabled = [];
- disabled.push(old);
- var i = disabled.indexOf(callback);
- if (i != -1)
- disabled.splice(i, 1);
- }
- handlers[eventName] = callback;
- };
- EventEmitter.removeDefaultHandler = function(eventName, callback) {
- var handlers = this._defaultHandlers;
- if (!handlers)
- return;
- var disabled = handlers._disabled_[eventName];
-
- if (handlers[eventName] == callback) {
- if (disabled)
- this.setDefaultHandler(eventName, disabled.pop());
- } else if (disabled) {
- var i = disabled.indexOf(callback);
- if (i != -1)
- disabled.splice(i, 1);
- }
- };
- EventEmitter.on =
- EventEmitter.addEventListener = function(eventName, callback, capturing) {
- this._eventRegistry = this._eventRegistry || {};
- var listeners = this._eventRegistry[eventName];
- if (!listeners)
- listeners = this._eventRegistry[eventName] = [];
- if (listeners.indexOf(callback) == -1)
- listeners[capturing ? "unshift" : "push"](callback);
- return callback;
- };
- EventEmitter.off =
- EventEmitter.removeListener =
- EventEmitter.removeEventListener = function(eventName, callback) {
- this._eventRegistry = this._eventRegistry || {};
- var listeners = this._eventRegistry[eventName];
- if (!listeners)
- return;
- var index = listeners.indexOf(callback);
- if (index !== -1)
- listeners.splice(index, 1);
- };
- EventEmitter.removeAllListeners = function(eventName) {
- if (!eventName) this._eventRegistry = this._defaultHandlers = undefined;
- if (this._eventRegistry) this._eventRegistry[eventName] = undefined;
- if (this._defaultHandlers) this._defaultHandlers[eventName] = undefined;
- };
- exports.EventEmitter = EventEmitter;
- });
- define("ace/anchor",[], function(ace_require, exports, module) {
- "use strict";
- var oop = ace_require("./lib/oop");
- var EventEmitter = ace_require("./lib/event_emitter").EventEmitter;
- var Anchor = exports.Anchor = function(doc, row, column) {
- this.$onChange = this.onChange.bind(this);
- this.attach(doc);
-
- if (typeof column == "undefined")
- this.setPosition(row.row, row.column);
- else
- this.setPosition(row, column);
- };
- (function() {
- oop.implement(this, EventEmitter);
- this.getPosition = function() {
- return this.$clipPositionToDocument(this.row, this.column);
- };
- this.getDocument = function() {
- return this.document;
- };
- this.$insertRight = false;
- this.onChange = function(delta) {
- if (delta.start.row == delta.end.row && delta.start.row != this.row)
- return;
- if (delta.start.row > this.row)
- return;
-
- var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight);
- this.setPosition(point.row, point.column, true);
- };
-
- function $pointsInOrder(point1, point2, equalPointsInOrder) {
- var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
- return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
- }
-
- function $getTransformedPoint(delta, point, moveIfEqual) {
- var deltaIsInsert = delta.action == "insert";
- var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
- var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
- var deltaStart = delta.start;
- var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
- if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
- return {
- row: point.row,
- column: point.column
- };
- }
- if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
- return {
- row: point.row + deltaRowShift,
- column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
- };
- }
-
- return {
- row: deltaStart.row,
- column: deltaStart.column
- };
- }
- this.setPosition = function(row, column, noClip) {
- var pos;
- if (noClip) {
- pos = {
- row: row,
- column: column
- };
- } else {
- pos = this.$clipPositionToDocument(row, column);
- }
- if (this.row == pos.row && this.column == pos.column)
- return;
- var old = {
- row: this.row,
- column: this.column
- };
- this.row = pos.row;
- this.column = pos.column;
- this._signal("change", {
- old: old,
- value: pos
- });
- };
- this.detach = function() {
- this.document.off("change", this.$onChange);
- };
- this.attach = function(doc) {
- this.document = doc || this.document;
- this.document.on("change", this.$onChange);
- };
- this.$clipPositionToDocument = function(row, column) {
- var pos = {};
- if (row >= this.document.getLength()) {
- pos.row = Math.max(0, this.document.getLength() - 1);
- pos.column = this.document.getLine(pos.row).length;
- }
- else if (row < 0) {
- pos.row = 0;
- pos.column = 0;
- }
- else {
- pos.row = row;
- pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
- }
- if (column < 0)
- pos.column = 0;
- return pos;
- };
- }).call(Anchor.prototype);
- });
- define("ace/document",[], function(ace_require, exports, module) {
- "use strict";
- var oop = ace_require("./lib/oop");
- var applyDelta = ace_require("./apply_delta").applyDelta;
- var EventEmitter = ace_require("./lib/event_emitter").EventEmitter;
- var Range = ace_require("./range").Range;
- var Anchor = ace_require("./anchor").Anchor;
- var Document = function(textOrLines) {
- this.$lines = [""];
- if (textOrLines.length === 0) {
- this.$lines = [""];
- } else if (Array.isArray(textOrLines)) {
- this.insertMergedLines({row: 0, column: 0}, textOrLines);
- } else {
- this.insert({row: 0, column:0}, textOrLines);
- }
- };
- (function() {
- oop.implement(this, EventEmitter);
- this.setValue = function(text) {
- var len = this.getLength() - 1;
- this.remove(new Range(0, 0, len, this.getLine(len).length));
- this.insert({row: 0, column: 0}, text);
- };
- this.getValue = function() {
- return this.getAllLines().join(this.getNewLineCharacter());
- };
- this.createAnchor = function(row, column) {
- return new Anchor(this, row, column);
- };
- if ("aaa".split(/a/).length === 0) {
- this.$split = function(text) {
- return text.replace(/\r\n|\r/g, "\n").split("\n");
- };
- } else {
- this.$split = function(text) {
- return text.split(/\r\n|\r|\n/);
- };
- }
- this.$detectNewLine = function(text) {
- var match = text.match(/^.*?(\r\n|\r|\n)/m);
- this.$autoNewLine = match ? match[1] : "\n";
- this._signal("changeNewLineMode");
- };
- this.getNewLineCharacter = function() {
- switch (this.$newLineMode) {
- case "windows":
- return "\r\n";
- case "unix":
- return "\n";
- default:
- return this.$autoNewLine || "\n";
- }
- };
- this.$autoNewLine = "";
- this.$newLineMode = "auto";
- this.setNewLineMode = function(newLineMode) {
- if (this.$newLineMode === newLineMode)
- return;
- this.$newLineMode = newLineMode;
- this._signal("changeNewLineMode");
- };
- this.getNewLineMode = function() {
- return this.$newLineMode;
- };
- this.isNewLine = function(text) {
- return (text == "\r\n" || text == "\r" || text == "\n");
- };
- this.getLine = function(row) {
- return this.$lines[row] || "";
- };
- this.getLines = function(firstRow, lastRow) {
- return this.$lines.slice(firstRow, lastRow + 1);
- };
- this.getAllLines = function() {
- return this.getLines(0, this.getLength());
- };
- this.getLength = function() {
- return this.$lines.length;
- };
- this.getTextRange = function(range) {
- return this.getLinesForRange(range).join(this.getNewLineCharacter());
- };
- this.getLinesForRange = function(range) {
- var lines;
- if (range.start.row === range.end.row) {
- lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];
- } else {
- lines = this.getLines(range.start.row, range.end.row);
- lines[0] = (lines[0] || "").substring(range.start.column);
- var l = lines.length - 1;
- if (range.end.row - range.start.row == l)
- lines[l] = lines[l].substring(0, range.end.column);
- }
- return lines;
- };
- this.insertLines = function(row, lines) {
- console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead.");
- return this.insertFullLines(row, lines);
- };
- this.removeLines = function(firstRow, lastRow) {
- console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead.");
- return this.removeFullLines(firstRow, lastRow);
- };
- this.insertNewLine = function(position) {
- console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.");
- return this.insertMergedLines(position, ["", ""]);
- };
- this.insert = function(position, text) {
- if (this.getLength() <= 1)
- this.$detectNewLine(text);
-
- return this.insertMergedLines(position, this.$split(text));
- };
- this.insertInLine = function(position, text) {
- var start = this.clippedPos(position.row, position.column);
- var end = this.pos(position.row, position.column + text.length);
-
- this.applyDelta({
- start: start,
- end: end,
- action: "insert",
- lines: [text]
- }, true);
-
- return this.clonePos(end);
- };
-
- this.clippedPos = function(row, column) {
- var length = this.getLength();
- if (row === undefined) {
- row = length;
- } else if (row < 0) {
- row = 0;
- } else if (row >= length) {
- row = length - 1;
- column = undefined;
- }
- var line = this.getLine(row);
- if (column == undefined)
- column = line.length;
- column = Math.min(Math.max(column, 0), line.length);
- return {row: row, column: column};
- };
-
- this.clonePos = function(pos) {
- return {row: pos.row, column: pos.column};
- };
-
- this.pos = function(row, column) {
- return {row: row, column: column};
- };
-
- this.$clipPosition = function(position) {
- var length = this.getLength();
- if (position.row >= length) {
- position.row = Math.max(0, length - 1);
- position.column = this.getLine(length - 1).length;
- } else {
- position.row = Math.max(0, position.row);
- position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length);
- }
- return position;
- };
- this.insertFullLines = function(row, lines) {
- row = Math.min(Math.max(row, 0), this.getLength());
- var column = 0;
- if (row < this.getLength()) {
- lines = lines.concat([""]);
- column = 0;
- } else {
- lines = [""].concat(lines);
- row--;
- column = this.$lines[row].length;
- }
- this.insertMergedLines({row: row, column: column}, lines);
- };
- this.insertMergedLines = function(position, lines) {
- var start = this.clippedPos(position.row, position.column);
- var end = {
- row: start.row + lines.length - 1,
- column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length
- };
-
- this.applyDelta({
- start: start,
- end: end,
- action: "insert",
- lines: lines
- });
-
- return this.clonePos(end);
- };
- this.remove = function(range) {
- var start = this.clippedPos(range.start.row, range.start.column);
- var end = this.clippedPos(range.end.row, range.end.column);
- this.applyDelta({
- start: start,
- end: end,
- action: "remove",
- lines: this.getLinesForRange({start: start, end: end})
- });
- return this.clonePos(start);
- };
- this.removeInLine = function(row, startColumn, endColumn) {
- var start = this.clippedPos(row, startColumn);
- var end = this.clippedPos(row, endColumn);
-
- this.applyDelta({
- start: start,
- end: end,
- action: "remove",
- lines: this.getLinesForRange({start: start, end: end})
- }, true);
-
- return this.clonePos(start);
- };
- this.removeFullLines = function(firstRow, lastRow) {
- firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);
- lastRow = Math.min(Math.max(0, lastRow ), this.getLength() - 1);
- var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;
- var deleteLastNewLine = lastRow < this.getLength() - 1;
- var startRow = ( deleteFirstNewLine ? firstRow - 1 : firstRow );
- var startCol = ( deleteFirstNewLine ? this.getLine(startRow).length : 0 );
- var endRow = ( deleteLastNewLine ? lastRow + 1 : lastRow );
- var endCol = ( deleteLastNewLine ? 0 : this.getLine(endRow).length );
- var range = new Range(startRow, startCol, endRow, endCol);
- var deletedLines = this.$lines.slice(firstRow, lastRow + 1);
-
- this.applyDelta({
- start: range.start,
- end: range.end,
- action: "remove",
- lines: this.getLinesForRange(range)
- });
- return deletedLines;
- };
- this.removeNewLine = function(row) {
- if (row < this.getLength() - 1 && row >= 0) {
- this.applyDelta({
- start: this.pos(row, this.getLine(row).length),
- end: this.pos(row + 1, 0),
- action: "remove",
- lines: ["", ""]
- });
- }
- };
- this.replace = function(range, text) {
- if (!(range instanceof Range))
- range = Range.fromPoints(range.start, range.end);
- if (text.length === 0 && range.isEmpty())
- return range.start;
- if (text == this.getTextRange(range))
- return range.end;
- this.remove(range);
- var end;
- if (text) {
- end = this.insert(range.start, text);
- }
- else {
- end = range.start;
- }
-
- return end;
- };
- this.applyDeltas = function(deltas) {
- for (var i=0; i<deltas.length; i++) {
- this.applyDelta(deltas[i]);
- }
- };
- this.revertDeltas = function(deltas) {
- for (var i=deltas.length-1; i>=0; i--) {
- this.revertDelta(deltas[i]);
- }
- };
- this.applyDelta = function(delta, doNotValidate) {
- var isInsert = delta.action == "insert";
- if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]
- : !Range.comparePoints(delta.start, delta.end)) {
- return;
- }
-
- if (isInsert && delta.lines.length > 20000) {
- this.$splitAndapplyLargeDelta(delta, 20000);
- }
- else {
- applyDelta(this.$lines, delta, doNotValidate);
- this._signal("change", delta);
- }
- };
-
- this.$safeApplyDelta = function(delta) {
- var docLength = this.$lines.length;
- if (
- delta.action == "remove" && delta.start.row < docLength && delta.end.row < docLength
- || delta.action == "insert" && delta.start.row <= docLength
- ) {
- this.applyDelta(delta);
- }
- };
-
- this.$splitAndapplyLargeDelta = function(delta, MAX) {
- var lines = delta.lines;
- var l = lines.length - MAX + 1;
- var row = delta.start.row;
- var column = delta.start.column;
- for (var from = 0, to = 0; from < l; from = to) {
- to += MAX - 1;
- var chunk = lines.slice(from, to);
- chunk.push("");
- this.applyDelta({
- start: this.pos(row + from, column),
- end: this.pos(row + to, column = 0),
- action: delta.action,
- lines: chunk
- }, true);
- }
- delta.lines = lines.slice(from);
- delta.start.row = row + from;
- delta.start.column = column;
- this.applyDelta(delta, true);
- };
- this.revertDelta = function(delta) {
- this.$safeApplyDelta({
- start: this.clonePos(delta.start),
- end: this.clonePos(delta.end),
- action: (delta.action == "insert" ? "remove" : "insert"),
- lines: delta.lines.slice()
- });
- };
- this.indexToPosition = function(index, startRow) {
- var lines = this.$lines || this.getAllLines();
- var newlineLength = this.getNewLineCharacter().length;
- for (var i = startRow || 0, l = lines.length; i < l; i++) {
- index -= lines[i].length + newlineLength;
- if (index < 0)
- return {row: i, column: index + lines[i].length + newlineLength};
- }
- return {row: l-1, column: index + lines[l-1].length + newlineLength};
- };
- this.positionToIndex = function(pos, startRow) {
- var lines = this.$lines || this.getAllLines();
- var newlineLength = this.getNewLineCharacter().length;
- var index = 0;
- var row = Math.min(pos.row, lines.length);
- for (var i = startRow || 0; i < row; ++i)
- index += lines[i].length + newlineLength;
- return index + pos.column;
- };
- }).call(Document.prototype);
- exports.Document = Document;
- });
- define("ace/lib/lang",[], function(ace_require, exports, module) {
- "use strict";
- exports.last = function(a) {
- return a[a.length - 1];
- };
- exports.stringReverse = function(string) {
- return string.split("").reverse().join("");
- };
- exports.stringRepeat = function (string, count) {
- var result = '';
- while (count > 0) {
- if (count & 1)
- result += string;
- if (count >>= 1)
- string += string;
- }
- return result;
- };
- var trimBeginRegexp = /^\s\s*/;
- var trimEndRegexp = /\s\s*$/;
- exports.stringTrimLeft = function (string) {
- return string.replace(trimBeginRegexp, '');
- };
- exports.stringTrimRight = function (string) {
- return string.replace(trimEndRegexp, '');
- };
- exports.copyObject = function(obj) {
- var copy = {};
- for (var key in obj) {
- copy[key] = obj[key];
- }
- return copy;
- };
- exports.copyArray = function(array){
- var copy = [];
- for (var i=0, l=array.length; i<l; i++) {
- if (array[i] && typeof array[i] == "object")
- copy[i] = this.copyObject(array[i]);
- else
- copy[i] = array[i];
- }
- return copy;
- };
- exports.deepCopy = function deepCopy(obj) {
- if (typeof obj !== "object" || !obj)
- return obj;
- var copy;
- if (Array.isArray(obj)) {
- copy = [];
- for (var key = 0; key < obj.length; key++) {
- copy[key] = deepCopy(obj[key]);
- }
- return copy;
- }
- if (Object.prototype.toString.call(obj) !== "[object Object]")
- return obj;
-
- copy = {};
- for (var key in obj)
- copy[key] = deepCopy(obj[key]);
- return copy;
- };
- exports.arrayToMap = function(arr) {
- var map = {};
- for (var i=0; i<arr.length; i++) {
- map[arr[i]] = 1;
- }
- return map;
- };
- exports.createMap = function(props) {
- var map = Object.create(null);
- for (var i in props) {
- map[i] = props[i];
- }
- return map;
- };
- exports.arrayRemove = function(array, value) {
- for (var i = 0; i <= array.length; i++) {
- if (value === array[i]) {
- array.splice(i, 1);
- }
- }
- };
- exports.escapeRegExp = function(str) {
- return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
- };
- exports.escapeHTML = function(str) {
- return ("" + str).replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<");
- };
- exports.getMatchOffsets = function(string, regExp) {
- var matches = [];
- string.replace(regExp, function(str) {
- matches.push({
- offset: arguments[arguments.length-2],
- length: str.length
- });
- });
- return matches;
- };
- exports.deferredCall = function(fcn) {
- var timer = null;
- var callback = function() {
- timer = null;
- fcn();
- };
- var deferred = function(timeout) {
- deferred.cancel();
- timer = setTimeout(callback, timeout || 0);
- return deferred;
- };
- deferred.schedule = deferred;
- deferred.call = function() {
- this.cancel();
- fcn();
- return deferred;
- };
- deferred.cancel = function() {
- clearTimeout(timer);
- timer = null;
- return deferred;
- };
-
- deferred.isPending = function() {
- return timer;
- };
- return deferred;
- };
- exports.delayedCall = function(fcn, defaultTimeout) {
- var timer = null;
- var callback = function() {
- timer = null;
- fcn();
- };
- var _self = function(timeout) {
- if (timer == null)
- timer = setTimeout(callback, timeout || defaultTimeout);
- };
- _self.delay = function(timeout) {
- timer && clearTimeout(timer);
- timer = setTimeout(callback, timeout || defaultTimeout);
- };
- _self.schedule = _self;
- _self.call = function() {
- this.cancel();
- fcn();
- };
- _self.cancel = function() {
- timer && clearTimeout(timer);
- timer = null;
- };
- _self.isPending = function() {
- return timer;
- };
- return _self;
- };
- });
- define("ace/worker/mirror",[], function(ace_require, exports, module) {
- "use strict";
- var Range = ace_require("../range").Range;
- var Document = ace_require("../document").Document;
- var lang = ace_require("../lib/lang");
-
- var Mirror = exports.Mirror = function(sender) {
- this.sender = sender;
- var doc = this.doc = new Document("");
-
- var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
-
- var _self = this;
- sender.on("change", function(e) {
- var data = e.data;
- if (data[0].start) {
- doc.applyDeltas(data);
- } else {
- for (var i = 0; i < data.length; i += 2) {
- if (Array.isArray(data[i+1])) {
- var d = {action: "insert", start: data[i], lines: data[i+1]};
- } else {
- var d = {action: "remove", start: data[i], end: data[i+1]};
- }
- doc.applyDelta(d, true);
- }
- }
- if (_self.$timeout)
- return deferredUpdate.schedule(_self.$timeout);
- _self.onUpdate();
- });
- };
- (function() {
-
- this.$timeout = 500;
-
- this.setTimeout = function(timeout) {
- this.$timeout = timeout;
- };
-
- this.setValue = function(value) {
- this.doc.setValue(value);
- this.deferredUpdate.schedule(this.$timeout);
- };
-
- this.getValue = function(callbackId) {
- this.sender.callback(this.doc.getValue(), callbackId);
- };
-
- this.onUpdate = function() {
- };
-
- this.isPending = function() {
- return this.deferredUpdate.isPending();
- };
-
- }).call(Mirror.prototype);
- });
- define("ace/mode/php/php",[], function(ace_require, exports, module) {
- var PHP = {Constants:{}};
- PHP.Constants.T_INCLUDE = 257;
- PHP.Constants.T_INCLUDE_ONCE = 258;
- PHP.Constants.T_EVAL = 259;
- PHP.Constants.T_REQUIRE = 260;
- PHP.Constants.T_REQUIRE_ONCE = 261;
- PHP.Constants.T_LOGICAL_OR = 262;
- PHP.Constants.T_LOGICAL_XOR = 263;
- PHP.Constants.T_LOGICAL_AND = 264;
- PHP.Constants.T_PRINT = 265;
- PHP.Constants.T_YIELD = 266;
- PHP.Constants.T_DOUBLE_ARROW = 267;
- PHP.Constants.T_YIELD_FROM = 268;
- PHP.Constants.T_PLUS_EQUAL = 269;
- PHP.Constants.T_MINUS_EQUAL = 270;
- PHP.Constants.T_MUL_EQUAL = 271;
- PHP.Constants.T_DIV_EQUAL = 272;
- PHP.Constants.T_CONCAT_EQUAL = 273;
- PHP.Constants.T_MOD_EQUAL = 274;
- PHP.Constants.T_AND_EQUAL = 275;
- PHP.Constants.T_OR_EQUAL = 276;
- PHP.Constants.T_XOR_EQUAL = 277;
- PHP.Constants.T_SL_EQUAL = 278;
- PHP.Constants.T_SR_EQUAL = 279;
- PHP.Constants.T_POW_EQUAL = 280;
- PHP.Constants.T_COALESCE = 281;
- PHP.Constants.T_BOOLEAN_OR = 282;
- PHP.Constants.T_BOOLEAN_AND = 283;
- PHP.Constants.T_IS_EQUAL = 284;
- PHP.Constants.T_IS_NOT_EQUAL = 285;
- PHP.Constants.T_IS_IDENTICAL = 286;
- PHP.Constants.T_IS_NOT_IDENTICAL = 287;
- PHP.Constants.T_SPACESHIP = 288;
- PHP.Constants.T_IS_SMALLER_OR_EQUAL = 289;
- PHP.Constants.T_IS_GREATER_OR_EQUAL = 290;
- PHP.Constants.T_SL = 291;
- PHP.Constants.T_SR = 292;
- PHP.Constants.T_INSTANCEOF = 293;
- PHP.Constants.T_INC = 294;
- PHP.Constants.T_DEC = 295;
- PHP.Constants.T_INT_CAST = 296;
- PHP.Constants.T_DOUBLE_CAST = 297;
- PHP.Constants.T_STRING_CAST = 298;
- PHP.Constants.T_ARRAY_CAST = 299;
- PHP.Constants.T_OBJECT_CAST = 300;
- PHP.Constants.T_BOOL_CAST = 301;
- PHP.Constants.T_UNSET_CAST = 302;
- PHP.Constants.T_POW = 303;
- PHP.Constants.T_NEW = 304;
- PHP.Constants.T_CLONE = 305;
- PHP.Constants.T_EXIT = 306;
- PHP.Constants.T_IF = 307;
- PHP.Constants.T_ELSEIF = 308;
- PHP.Constants.T_ELSE = 309;
- PHP.Constants.T_ENDIF = 310;
- PHP.Constants.T_LNUMBER = 311;
- PHP.Constants.T_DNUMBER = 312;
- PHP.Constants.T_STRING = 313;
- PHP.Constants.T_STRING_VARNAME = 314;
- PHP.Constants.T_VARIABLE = 315;
- PHP.Constants.T_NUM_STRING = 316;
- PHP.Constants.T_INLINE_HTML = 317;
- PHP.Constants.T_CHARACTER = 318;
- PHP.Constants.T_BAD_CHARACTER = 319;
- PHP.Constants.T_ENCAPSED_AND_WHITESPACE = 320;
- PHP.Constants.T_CONSTANT_ENCAPSED_STRING = 321;
- PHP.Constants.T_ECHO = 322;
- PHP.Constants.T_DO = 323;
- PHP.Constants.T_WHILE = 324;
- PHP.Constants.T_ENDWHILE = 325;
- PHP.Constants.T_FOR = 326;
- PHP.Constants.T_ENDFOR = 327;
- PHP.Constants.T_FOREACH = 328;
- PHP.Constants.T_ENDFOREACH = 329;
- PHP.Constants.T_DECLARE = 330;
- PHP.Constants.T_ENDDECLARE = 331;
- PHP.Constants.T_AS = 332;
- PHP.Constants.T_SWITCH = 333;
- PHP.Constants.T_ENDSWITCH = 334;
- PHP.Constants.T_CASE = 335;
- PHP.Constants.T_DEFAULT = 336;
- PHP.Constants.T_BREAK = 337;
- PHP.Constants.T_CONTINUE = 338;
- PHP.Constants.T_GOTO = 339;
- PHP.Constants.T_FUNCTION = 340;
- PHP.Constants.T_CONST = 341;
- PHP.Constants.T_RETURN = 342;
- PHP.Constants.T_TRY = 343;
- PHP.Constants.T_CATCH = 344;
- PHP.Constants.T_FINALLY = 345;
- PHP.Constants.T_THROW = 346;
- PHP.Constants.T_USE = 347;
- PHP.Constants.T_INSTEADOF = 348;
- PHP.Constants.T_GLOBAL = 349;
- PHP.Constants.T_STATIC = 350;
- PHP.Constants.T_ABSTRACT = 351;
- PHP.Constants.T_FINAL = 352;
- PHP.Constants.T_PRIVATE = 353;
- PHP.Constants.T_PROTECTED = 354;
- PHP.Constants.T_PUBLIC = 355;
- PHP.Constants.T_VAR = 356;
- PHP.Constants.T_UNSET = 357;
- PHP.Constants.T_ISSET = 358;
- PHP.Constants.T_EMPTY = 359;
- PHP.Constants.T_HALT_COMPILER = 360;
- PHP.Constants.T_CLASS = 361;
- PHP.Constants.T_TRAIT = 362;
- PHP.Constants.T_INTERFACE = 363;
- PHP.Constants.T_EXTENDS = 364;
- PHP.Constants.T_IMPLEMENTS = 365;
- PHP.Constants.T_OBJECT_OPERATOR = 366;
- PHP.Constants.T_LIST = 367;
- PHP.Constants.T_ARRAY = 368;
- PHP.Constants.T_CALLABLE = 369;
- PHP.Constants.T_CLASS_C = 370;
- PHP.Constants.T_TRAIT_C = 371;
- PHP.Constants.T_METHOD_C = 372;
- PHP.Constants.T_FUNC_C = 373;
- PHP.Constants.T_LINE = 374;
- PHP.Constants.T_FILE = 375;
- PHP.Constants.T_COMMENT = 376;
- PHP.Constants.T_DOC_COMMENT = 377;
- PHP.Constants.T_OPEN_TAG = 378;
- PHP.Constants.T_OPEN_TAG_WITH_ECHO = 379;
- PHP.Constants.T_CLOSE_TAG = 380;
- PHP.Constants.T_WHITESPACE = 381;
- PHP.Constants.T_START_HEREDOC = 382;
- PHP.Constants.T_END_HEREDOC = 383;
- PHP.Constants.T_DOLLAR_OPEN_CURLY_BRACES = 384;
- PHP.Constants.T_CURLY_OPEN = 385;
- PHP.Constants.T_PAAMAYIM_NEKUDOTAYIM = 386;
- PHP.Constants.T_NAMESPACE = 387;
- PHP.Constants.T_NS_C = 388;
- PHP.Constants.T_DIR = 389;
- PHP.Constants.T_NS_SEPARATOR = 390;
- PHP.Constants.T_ELLIPSIS = 391;
- PHP.Lexer = function(src, ini) {
- var heredoc, heredocEndAllowed,
- stateStack = ['INITIAL'], stackPos = 0,
- swapState = function(state) {
- stateStack[stackPos] = state;
- },
- pushState = function(state) {
- stateStack[++stackPos] = state;
- },
- popState = function() {
- --stackPos;
- },
- shortOpenTag = ini === undefined || /^(on|true|1)$/i.test(ini.short_open_tag),
- openTag = shortOpenTag
- ? /^(\<\?php(?:\r\n|[ \t\r\n])|<\?|\<script language\=('|")?php('|")?\>)/i
- : /^(\<\?php(?:\r\n|[ \t\r\n])|\<script language\=('|")?php('|")?\>)/i,
- inlineHtml = shortOpenTag
- ? /[^<]*(?:<(?!\?|script language\=('|")?php('|")?\>)[^<]*)*/i
- : /[^<]*(?:<(?!\?=|\?php[ \t\r\n]|script language\=('|")?php('|")?\>)[^<]*)*/i,
- labelRegexPart = '[a-zA-Z_\\x7f-\\uffff][a-zA-Z0-9_\\x7f-\\uffff]*',
- stringRegexPart = function(quote) {
- return '[^' + quote + '\\\\${]*(?:(?:\\\\[\\s\\S]|\\$(?!\\{|[a-zA-Z_\\x7f-\\uffff])|\\{(?!\\$))[^' + quote + '\\\\${]*)*';
- },
- sharedStringTokens = [
- {
- value: PHP.Constants.T_VARIABLE,
- re: new RegExp('^\\$' + labelRegexPart + '(?=\\[)'),
- func: function() {
- pushState('VAR_OFFSET');
- }
- },
- {
- value: PHP.Constants.T_VARIABLE,
- re: new RegExp('^\\$' + labelRegexPart + '(?=->' + labelRegexPart + ')'),
- func: function() {
- pushState('LOOKING_FOR_PROPERTY');
- }
- },
- {
- value: PHP.Constants.T_DOLLAR_OPEN_CURLY_BRACES,
- re: new RegExp('^\\$\\{(?=' + labelRegexPart + '[\\[}])'),
- func: function() {
- pushState('LOOKING_FOR_VARNAME');
- }
- },
- {
- value: PHP.Constants.T_VARIABLE,
- re: new RegExp('^\\$' + labelRegexPart)
- },
- {
- value: PHP.Constants.T_DOLLAR_OPEN_CURLY_BRACES,
- re: /^\$\{/,
- func: function() {
- pushState('IN_SCRIPTING');
- }
- },
- {
- value: PHP.Constants.T_CURLY_OPEN,
- re: /^\{(?=\$)/,
- func: function() {
- pushState('IN_SCRIPTING');
- }
- }
- ],
- data = {
- 'INITIAL': [
- {
- value: PHP.Constants.T_OPEN_TAG_WITH_ECHO,
- re: /^<\?=/i,
- func: function() {
- swapState('IN_SCRIPTING');
- }
- },
- {
- value: PHP.Constants.T_OPEN_TAG,
- re: openTag,
- func: function() {
- swapState('IN_SCRIPTING');
- }
- },
- {
- value: PHP.Constants.T_INLINE_HTML,
- re: inlineHtml
- },
- ],
- 'IN_SCRIPTING': [
- {
- value: PHP.Constants.T_WHITESPACE,
- re: /^[ \n\r\t]+/
- },
- {
- value: PHP.Constants.T_ABSTRACT,
- re: /^abstract\b/i
- },
- {
- value: PHP.Constants.T_LOGICAL_AND,
- re: /^and\b/i
- },
- {
- value: PHP.Constants.T_ARRAY,
- re: /^array\b/i
- },
- {
- value: PHP.Constants.T_AS,
- re: /^as\b/i
- },
- {
- value: PHP.Constants.T_BREAK,
- re: /^break\b/i
- },
- {
- value: PHP.Constants.T_CALLABLE,
- re: /^callable\b/i
- },
- {
- value: PHP.Constants.T_CASE,
- re: /^case\b/i
- },
- {
- value: PHP.Constants.T_CATCH,
- re: /^catch\b/i
- },
- {
- value: PHP.Constants.T_CLASS,
- re: /^class\b/i,
- },
- {
- value: PHP.Constants.T_CLONE,
- re: /^clone\b/i
- },
- {
- value: PHP.Constants.T_CONST,
- re: /^const\b/i
- },
- {
- value: PHP.Constants.T_CONTINUE,
- re: /^continue\b/i
- },
- {
- value: PHP.Constants.T_DECLARE,
- re: /^declare\b/i
- },
- {
- value: PHP.Constants.T_DEFAULT,
- re: /^default\b/i
- },
- {
- value: PHP.Constants.T_DO,
- re: /^do\b/i
- },
- {
- value: PHP.Constants.T_ECHO,
- re: /^echo\b/i
- },
- {
- value: PHP.Constants.T_ELSE,
- re: /^else\b/i
- },
- {
- value: PHP.Constants.T_ELSEIF,
- re: /^elseif\b/i
- },
- {
- value: PHP.Constants.T_ENDDECLARE,
- re: /^enddeclare\b/i
- },
- {
- value: PHP.Constants.T_ENDFOR,
- re: /^endfor\b/i
- },
- {
- value: PHP.Constants.T_ENDFOREACH,
- re: /^endforeach\b/i
- },
- {
- value: PHP.Constants.T_ENDIF,
- re: /^endif\b/i
- },
- {
- value: PHP.Constants.T_ENDSWITCH,
- re: /^endswitch\b/i
- },
- {
- value: PHP.Constants.T_ENDWHILE,
- re: /^endwhile\b/i
- },
- {
- value: PHP.Constants.T_EMPTY,
- re: /^empty\b/i
- },
- {
- value: PHP.Constants.T_EVAL,
- re: /^eval\b/i
- },
- {
- value: PHP.Constants.T_EXIT,
- re: /^(?:exit|die)\b/i
- },
- {
- value: PHP.Constants.T_EXTENDS,
- re: /^extends\b/i
- },
- {
- value: PHP.Constants.T_FINAL,
- re: /^final\b/i
- },
- {
- value: PHP.Constants.T_FINALLY,
- re: /^finally\b/i
- },
- {
- value: PHP.Constants.T_FOR,
- re: /^for\b/i
- },
- {
- value: PHP.Constants.T_FOREACH,
- re: /^foreach\b/i
- },
- {
- value: PHP.Constants.T_FUNCTION,
- re: /^function\b/i
- },
- {
- value: PHP.Constants.T_GLOBAL,
- re: /^global\b/i
- },
- {
- value: PHP.Constants.T_GOTO,
- re: /^goto\b/i
- },
- {
- value: PHP.Constants.T_IF,
- re: /^if\b/i
- },
- {
- value: PHP.Constants.T_IMPLEMENTS,
- re: /^implements\b/i
- },
- {
- value: PHP.Constants.T_INCLUDE,
- re: /^include\b/i
- },
- {
- value: PHP.Constants.T_INCLUDE_ONCE,
- re: /^include_once\b/i
- },
- {
- value: PHP.Constants.T_INSTANCEOF,
- re: /^instanceof\b/i
- },
- {
- value: PHP.Constants.T_INSTEADOF,
- re: /^insteadof\b/i
- },
- {
- value: PHP.Constants.T_INTERFACE,
- re: /^interface\b/i
- },
- {
- value: PHP.Constants.T_ISSET,
- re: /^isset\b/i
- },
- {
- value: PHP.Constants.T_LIST,
- re: /^list\b/i
- },
- {
- value: PHP.Constants.T_NAMESPACE,
- re: /^namespace\b/i
- },
- {
- value: PHP.Constants.T_NEW,
- re: /^new\b/i
- },
- {
- value: PHP.Constants.T_LOGICAL_OR,
- re: /^or\b/i
- },
- {
- value: PHP.Constants.T_PRINT,
- re: /^print\b/i
- },
- {
- value: PHP.Constants.T_PRIVATE,
- re: /^private\b/i
- },
- {
- value: PHP.Constants.T_PROTECTED,
- re: /^protected\b/i
- },
- {
- value: PHP.Constants.T_PUBLIC,
- re: /^public\b/i
- },
- {
- value: PHP.Constants.T_REQUIRE,
- re: /^ace_require\b/i
- },
- {
- value: PHP.Constants.T_REQUIRE_ONCE,
- re: /^require_once\b/i
- },
- {
- value: PHP.Constants.T_STATIC,
- re: /^static\b/i
- },
- {
- value: PHP.Constants.T_SWITCH,
- re: /^switch\b/i
- },
- {
- value: PHP.Constants.T_THROW,
- re: /^throw\b/i
- },
- {
- value: PHP.Constants.T_TRAIT,
- re: /^trait\b/i,
- },
- {
- value: PHP.Constants.T_TRY,
- re: /^try\b/i
- },
- {
- value: PHP.Constants.T_UNSET,
- re: /^unset\b/i
- },
- {
- value: PHP.Constants.T_USE,
- re: /^use\b/i
- },
- {
- value: PHP.Constants.T_VAR,
- re: /^var\b/i
- },
- {
- value: PHP.Constants.T_WHILE,
- re: /^while\b/i
- },
- {
- value: PHP.Constants.T_LOGICAL_XOR,
- re: /^xor\b/i
- },
- {
- value: PHP.Constants.T_YIELD_FROM,
- re: /^yield\s+from\b/i
- },
- {
- value: PHP.Constants.T_YIELD,
- re: /^yield\b/i
- },
- {
- value: PHP.Constants.T_RETURN,
- re: /^return\b/i
- },
- {
- value: PHP.Constants.T_METHOD_C,
- re: /^__METHOD__\b/i
- },
- {
- value: PHP.Constants.T_LINE,
- re: /^__LINE__\b/i
- },
- {
- value: PHP.Constants.T_FILE,
- re: /^__FILE__\b/i
- },
- {
- value: PHP.Constants.T_FUNC_C,
- re: /^__FUNCTION__\b/i
- },
- {
- value: PHP.Constants.T_NS_C,
- re: /^__NAMESPACE__\b/i
- },
- {
- value: PHP.Constants.T_TRAIT_C,
- re: /^__TRAIT__\b/i
- },
- {
- value: PHP.Constants.T_DIR,
- re: /^__DIR__\b/i
- },
- {
- value: PHP.Constants.T_CLASS_C,
- re: /^__CLASS__\b/i
- },
- {
- value: PHP.Constants.T_AND_EQUAL,
- re: /^&=/
- },
- {
- value: PHP.Constants.T_ARRAY_CAST,
- re: /^\([ \t]*array[ \t]*\)/i
- },
- {
- value: PHP.Constants.T_BOOL_CAST,
- re: /^\([ \t]*(?:bool|boolean)[ \t]*\)/i
- },
- {
- value: PHP.Constants.T_DOUBLE_CAST,
- re: /^\([ \t]*(?:real|float|double)[ \t]*\)/i
- },
- {
- value: PHP.Constants.T_INT_CAST,
- re: /^\([ \t]*(?:int|integer)[ \t]*\)/i
- },
- {
- value: PHP.Constants.T_OBJECT_CAST,
- re: /^\([ \t]*object[ \t]*\)/i
- },
- {
- value: PHP.Constants.T_STRING_CAST,
- re: /^\([ \t]*(?:binary|string)[ \t]*\)/i
- },
- {
- value: PHP.Constants.T_UNSET_CAST,
- re: /^\([ \t]*unset[ \t]*\)/i
- },
- {
- value: PHP.Constants.T_BOOLEAN_AND,
- re: /^&&/
- },
- {
- value: PHP.Constants.T_BOOLEAN_OR,
- re: /^\|\|/
- },
- {
- value: PHP.Constants.T_CLOSE_TAG,
- re: /^(?:\?>|<\/script>)(\r\n|\r|\n)?/i,
- func: function() {
- swapState('INITIAL');
- }
- },
- {
- value: PHP.Constants.T_DOUBLE_ARROW,
- re: /^=>/
- },
- {
- value: PHP.Constants.T_PAAMAYIM_NEKUDOTAYIM,
- re: /^::/
- },
- {
- value: PHP.Constants.T_INC,
- re: /^\+\+/
- },
- {
- value: PHP.Constants.T_DEC,
- re: /^--/
- },
- {
- value: PHP.Constants.T_CONCAT_EQUAL,
- re: /^\.=/
- },
- {
- value: PHP.Constants.T_DIV_EQUAL,
- re: /^\/=/
- },
- {
- value: PHP.Constants.T_XOR_EQUAL,
- re: /^\^=/
- },
- {
- value: PHP.Constants.T_MUL_EQUAL,
- re: /^\*=/
- },
- {
- value: PHP.Constants.T_MOD_EQUAL,
- re: /^%=/
- },
- {
- value: PHP.Constants.T_SL_EQUAL,
- re: /^<<=/
- },
- {
- value: PHP.Constants.T_START_HEREDOC,
- re: new RegExp('^[bB]?<<<[ \\t]*\'(' + labelRegexPart + ')\'(?:\\r\\n|\\r|\\n)'),
- func: function(result) {
- heredoc = result[1];
- swapState('NOWDOC');
- }
- },
- {
- value: PHP.Constants.T_START_HEREDOC,
- re: new RegExp('^[bB]?<<<[ \\t]*("?)(' + labelRegexPart + ')\\1(?:\\r\\n|\\r|\\n)'),
- func: function(result) {
- heredoc = result[2];
- heredocEndAllowed = true;
- swapState('HEREDOC');
- }
- },
- {
- value: PHP.Constants.T_SL,
- re: /^<</
- },
- {
- value: PHP.Constants.T_SPACESHIP,
- re: /^<=>/
- },
- {
- value: PHP.Constants.T_IS_SMALLER_OR_EQUAL,
- re: /^<=/
- },
- {
- value: PHP.Constants.T_SR_EQUAL,
- re: /^>>=/
- },
- {
- value: PHP.Constants.T_SR,
- re: /^>>/
- },
- {
- value: PHP.Constants.T_IS_GREATER_OR_EQUAL,
- re: /^>=/
- },
- {
- value: PHP.Constants.T_OR_EQUAL,
- re: /^\|=/
- },
- {
- value: PHP.Constants.T_PLUS_EQUAL,
- re: /^\+=/
- },
- {
- value: PHP.Constants.T_MINUS_EQUAL,
- re: /^-=/
- },
- {
- value: PHP.Constants.T_OBJECT_OPERATOR,
- re: new RegExp('^->(?=[ \n\r\t]*' + labelRegexPart + ')'),
- func: function() {
- pushState('LOOKING_FOR_PROPERTY');
- }
- },
- {
- value: PHP.Constants.T_OBJECT_OPERATOR,
- re: /^->/i
- },
- {
- value: PHP.Constants.T_ELLIPSIS,
- re: /^\.\.\./
- },
- {
- value: PHP.Constants.T_POW_EQUAL,
- re: /^\*\*=/
- },
- {
- value: PHP.Constants.T_POW,
- re: /^\*\*/
- },
- {
- value: PHP.Constants.T_COALESCE,
- re: /^\?\?/
- },
- {
- value: PHP.Constants.T_COMMENT,
- re: /^\/\*([\S\s]*?)(?:\*\/|$)/
- },
- {
- value: PHP.Constants.T_COMMENT,
- re: /^(?:\/\/|#)[^\r\n?]*(?:\?(?!>)[^\r\n?]*)*(?:\r\n|\r|\n)?/
- },
- {
- value: PHP.Constants.T_IS_IDENTICAL,
- re: /^===/
- },
- {
- value: PHP.Constants.T_IS_EQUAL,
- re: /^==/
- },
- {
- value: PHP.Constants.T_IS_NOT_IDENTICAL,
- re: /^!==/
- },
- {
- value: PHP.Constants.T_IS_NOT_EQUAL,
- re: /^(!=|<>)/
- },
- {
- value: PHP.Constants.T_DNUMBER,
- re: /^(?:[0-9]+\.[0-9]*|\.[0-9]+)(?:[eE][+-]?[0-9]+)?/
- },
- {
- value: PHP.Constants.T_DNUMBER,
- re: /^[0-9]+[eE][+-]?[0-9]+/
- },
- {
- value: PHP.Constants.T_LNUMBER,
- re: /^(?:0x[0-9A-F]+|0b[01]+|[0-9]+)/i
- },
- {
- value: PHP.Constants.T_VARIABLE,
- re: new RegExp('^\\$' + labelRegexPart)
- },
- {
- value: PHP.Constants.T_CONSTANT_ENCAPSED_STRING,
- re: /^[bB]?'[^'\\]*(?:\\[\s\S][^'\\]*)*'/,
- },
- {
- value: PHP.Constants.T_CONSTANT_ENCAPSED_STRING,
- re: new RegExp('^[bB]?"' + stringRegexPart('"') + '"')
- },
- {
- value: -1,
- re: /^[bB]?"/,
- func: function() {
- swapState('DOUBLE_QUOTES');
- }
- },
- {
- value: -1,
- re: /^`/,
- func: function() {
- swapState('BACKTICKS');
- }
- },
- {
- value: PHP.Constants.T_NS_SEPARATOR,
- re: /^\\/
- },
- {
- value: PHP.Constants.T_STRING,
- re: /^[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/
- },
- {
- value: -1,
- re: /^\{/,
- func: function() {
- pushState('IN_SCRIPTING');
- }
- },
- {
- value: -1,
- re: /^\}/,
- func: function() {
- if (stackPos > 0) {
- popState();
- }
- }
- },
- {
- value: -1,
- re: /^[\[\];:?()!.,><=+-/*|&@^%"'$~]/
- }
- ],
- 'DOUBLE_QUOTES': sharedStringTokens.concat([
- {
- value: -1,
- re: /^"/,
- func: function() {
- swapState('IN_SCRIPTING');
- }
- },
- {
- value: PHP.Constants.T_ENCAPSED_AND_WHITESPACE,
- re: new RegExp('^' + stringRegexPart('"'))
- }
- ]),
- 'BACKTICKS': sharedStringTokens.concat([
- {
- value: -1,
- re: /^`/,
- func: function() {
- swapState('IN_SCRIPTING');
- }
- },
- {
- value: PHP.Constants.T_ENCAPSED_AND_WHITESPACE,
- re: new RegExp('^' + stringRegexPart('`'))
- }
- ]),
- 'VAR_OFFSET': [
- {
- value: -1,
- re: /^\]/,
- func: function() {
- popState();
- }
- },
- {
- value: PHP.Constants.T_NUM_STRING,
- re: /^(?:0x[0-9A-F]+|0b[01]+|[0-9]+)/i
- },
- {
- value: PHP.Constants.T_VARIABLE,
- re: new RegExp('^\\$' + labelRegexPart)
- },
- {
- value: PHP.Constants.T_STRING,
- re: new RegExp('^' + labelRegexPart)
- },
- {
- value: -1,
- re: /^[;:,.\[()|^&+-/*=%!~$<>?@{}"`]/
- }
- ],
- 'LOOKING_FOR_PROPERTY': [
- {
- value: PHP.Constants.T_OBJECT_OPERATOR,
- re: /^->/
- },
- {
- value: PHP.Constants.T_STRING,
- re: new RegExp('^' + labelRegexPart),
- func: function() {
- popState();
- }
- },
- {
- value: PHP.Constants.T_WHITESPACE,
- re: /^[ \n\r\t]+/
- }
- ],
- 'LOOKING_FOR_VARNAME': [
- {
- value: PHP.Constants.T_STRING_VARNAME,
- re: new RegExp('^' + labelRegexPart + '(?=[\\[}])'),
- func: function() {
- swapState('IN_SCRIPTING');
- }
- }
- ],
- 'NOWDOC': [
- {
- value: PHP.Constants.T_END_HEREDOC,
- matchFunc: function(src) {
- var re = new RegExp('^' + heredoc + '(?=;?[\\r\\n])');
- if (src.match(re)) {
- return [src.substr(0, heredoc.length)];
- } else {
- return null;
- }
- },
- func: function() {
- swapState('IN_SCRIPTING');
- }
- },
- {
- value: PHP.Constants.T_ENCAPSED_AND_WHITESPACE,
- matchFunc: function(src) {
- var re = new RegExp('[\\r\\n]' + heredoc + '(?=;?[\\r\\n])');
- var result = re.exec(src);
- var end = result ? result.index + 1 : src.length;
- return [src.substring(0, end)];
- }
- }
- ],
- 'HEREDOC': sharedStringTokens.concat([
- {
- value: PHP.Constants.T_END_HEREDOC,
- matchFunc: function(src) {
- if (!heredocEndAllowed) {
- return null;
- }
- var re = new RegExp('^' + heredoc + '(?=;?[\\r\\n])');
- if (src.match(re)) {
- return [src.substr(0, heredoc.length)];
- } else {
- return null;
- }
- },
- func: function() {
- swapState('IN_SCRIPTING');
- }
- },
- {
- value: PHP.Constants.T_ENCAPSED_AND_WHITESPACE,
- matchFunc: function(src) {
- var end = src.length;
- var re = new RegExp('^' + stringRegexPart(''));
- var result = re.exec(src);
- if (result) {
- end = result[0].length;
- }
- re = new RegExp('([\\r\\n])' + heredoc + '(?=;?[\\r\\n])');
- result = re.exec(src.substring(0, end));
- if (result) {
- end = result.index + 1;
- heredocEndAllowed = true;
- } else {
- heredocEndAllowed = false;
- }
- if (end == 0) {
- return null;
- }
- return [src.substring(0, end)];
- }
- }
- ])
- };
- var results = [],
- line = 1,
- cancel = true;
- if (src === null) {
- return results;
- }
- if (typeof src !== "string") {
- src = src.toString();
- }
- while (src.length > 0 && cancel === true) {
- var state = stateStack[stackPos];
- var tokens = data[state];
- cancel = tokens.some(function(token){
- var result = token.matchFunc !== undefined
- ? token.matchFunc(src)
- : src.match(token.re);
- if (result !== null) {
- if (result[0].length == 0) {
- throw new Error("empty match");
- }
- if (token.func !== undefined) {
- token.func(result);
- }
- if (token.value === -1) {
- results.push(result[0]);
- } else {
- var resultString = result[0];
- results.push([
- parseInt(token.value, 10),
- resultString,
- line
- ]);
- line += resultString.split('\n').length - 1;
- }
- src = src.substring(result[0].length);
- return true;
- }
- return false;
- });
- }
- return results;
- };
- PHP.Parser = function ( preprocessedTokens, evaluate ) {
- var yybase = this.yybase,
- yydefault = this.yydefault,
- yycheck = this.yycheck,
- yyaction = this.yyaction,
- yylen = this.yylen,
- yygbase = this.yygbase,
- yygcheck = this.yygcheck,
- yyp = this.yyp,
- yygoto = this.yygoto,
- yylhs = this.yylhs,
- terminals = this.terminals,
- translate = this.translate,
- yygdefault = this.yygdefault;
- this.pos = -1;
- this.line = 1;
- this.tokenMap = this.createTokenMap( );
- this.dropTokens = {};
- this.dropTokens[ PHP.Constants.T_WHITESPACE ] = 1;
- this.dropTokens[ PHP.Constants.T_OPEN_TAG ] = 1;
- var tokens = [];
- preprocessedTokens.forEach( function( token, index ) {
- if ( typeof token === "object" && token[ 0 ] === PHP.Constants.T_OPEN_TAG_WITH_ECHO) {
- tokens.push([
- PHP.Constants.T_OPEN_TAG,
- token[ 1 ],
- token[ 2 ]
- ]);
- tokens.push([
- PHP.Constants.T_ECHO,
- token[ 1 ],
- token[ 2 ]
- ]);
- } else {
- tokens.push( token );
- }
- });
- this.tokens = tokens;
- var tokenId = this.TOKEN_NONE;
- this.startAttributes = {
- 'startLine': 1
- };
- this.endAttributes = {};
- var attributeStack = [ this.startAttributes ];
- var state = 0;
- var stateStack = [ state ];
- this.yyastk = [];
- this.stackPos = 0;
- var yyn;
- var origTokenId;
- for (;;) {
- if ( yybase[ state ] === 0 ) {
- yyn = yydefault[ state ];
- } else {
- if (tokenId === this.TOKEN_NONE ) {
- origTokenId = this.getNextToken( );
- tokenId = (origTokenId >= 0 && origTokenId < this.TOKEN_MAP_SIZE) ? translate[ origTokenId ] : this.TOKEN_INVALID;
- attributeStack[ this.stackPos ] = this.startAttributes;
- }
- if (((yyn = yybase[ state ] + tokenId) >= 0
- && yyn < this.YYLAST && yycheck[ yyn ] === tokenId
- || (state < this.YY2TBLSTATE
- && (yyn = yybase[state + this.YYNLSTATES] + tokenId) >= 0
- && yyn < this.YYLAST
- && yycheck[ yyn ] === tokenId))
- && (yyn = yyaction[ yyn ]) !== this.YYDEFAULT ) {
- if (yyn > 0) {
- ++this.stackPos;
- stateStack[ this.stackPos ] = state = yyn;
- this.yyastk[ this.stackPos ] = this.tokenValue;
- attributeStack[ this.stackPos ] = this.startAttributes;
- tokenId = this.TOKEN_NONE;
- if (yyn < this.YYNLSTATES)
- continue;
- yyn -= this.YYNLSTATES;
- } else {
- yyn = -yyn;
- }
- } else {
- yyn = yydefault[ state ];
- }
- }
- for (;;) {
- if ( yyn === 0 ) {
- return this.yyval;
- } else if (yyn !== this.YYUNEXPECTED ) {
- for (var attr in this.endAttributes) {
- attributeStack[ this.stackPos - yylen[ yyn ] ][ attr ] = this.endAttributes[ attr ];
- }
- this.stackPos -= yylen[ yyn ];
- yyn = yylhs[ yyn ];
- if ((yyp = yygbase[ yyn ] + stateStack[ this.stackPos ]) >= 0
- && yyp < this.YYGLAST
- && yygcheck[ yyp ] === yyn) {
- state = yygoto[ yyp ];
- } else {
- state = yygdefault[ yyn ];
- }
- ++this.stackPos;
- stateStack[ this.stackPos ] = state;
- this.yyastk[ this.stackPos ] = this.yyval;
- attributeStack[ this.stackPos ] = this.startAttributes;
- } else {
- if (evaluate !== true) {
- var expected = [];
- for (var i = 0; i < this.TOKEN_MAP_SIZE; ++i) {
- if ((yyn = yybase[ state ] + i) >= 0 && yyn < this.YYLAST && yycheck[ yyn ] == i
- || state < this.YY2TBLSTATE
- && (yyn = yybase[ state + this.YYNLSTATES] + i)
- && yyn < this.YYLAST && yycheck[ yyn ] == i
- ) {
- if (yyaction[ yyn ] != this.YYUNEXPECTED) {
- if (expected.length == 4) {
- expected = [];
- break;
- }
- expected.push( this.terminals[ i ] );
- }
- }
- }
- var expectedString = '';
- if (expected.length) {
- expectedString = ', expecting ' + expected.join(' or ');
- }
- throw new PHP.ParseError('syntax error, unexpected ' + terminals[ tokenId ] + expectedString, this.startAttributes['startLine']);
- } else {
- return this.startAttributes['startLine'];
- }
- }
- if (state < this.YYNLSTATES)
- break;
- yyn = state - this.YYNLSTATES;
- }
- }
- };
- PHP.ParseError = function( msg, line ) {
- this.message = msg;
- this.line = line;
- };
- PHP.Parser.prototype.getNextToken = function( ) {
- this.startAttributes = {};
- this.endAttributes = {};
- var token,
- tmp;
- while (this.tokens[++this.pos] !== undefined) {
- token = this.tokens[this.pos];
- if (typeof token === "string") {
- this.startAttributes['startLine'] = this.line;
- this.endAttributes['endLine'] = this.line;
- if ('b"' === token) {
- this.tokenValue = 'b"';
- return '"'.charCodeAt(0);
- } else {
- this.tokenValue = token;
- return token.charCodeAt(0);
- }
- } else {
- this.line += ((tmp = token[ 1 ].match(/\n/g)) === null) ? 0 : tmp.length;
- if (PHP.Constants.T_COMMENT === token[0]) {
- if (!Array.isArray(this.startAttributes['comments'])) {
- this.startAttributes['comments'] = [];
- }
- this.startAttributes['comments'].push( {
- type: "comment",
- comment: token[1],
- line: token[2]
- });
- } else if (PHP.Constants.T_DOC_COMMENT === token[0]) {
- this.startAttributes['comments'].push( new PHPParser_Comment_Doc(token[1], token[2]) );
- } else if (this.dropTokens[token[0]] === undefined) {
- this.tokenValue = token[1];
- this.startAttributes['startLine'] = token[2];
- this.endAttributes['endLine'] = this.line;
- return this.tokenMap[token[0]];
- }
- }
- }
- this.startAttributes['startLine'] = this.line;
- return 0;
- };
- PHP.Parser.prototype.tokenName = function( token ) {
- var constants = ["T_INCLUDE","T_INCLUDE_ONCE","T_EVAL","T_REQUIRE","T_REQUIRE_ONCE","T_LOGICAL_OR","T_LOGICAL_XOR","T_LOGICAL_AND","T_PRINT","T_YIELD","T_DOUBLE_ARROW","T_YIELD_FROM","T_PLUS_EQUAL","T_MINUS_EQUAL","T_MUL_EQUAL","T_DIV_EQUAL","T_CONCAT_EQUAL","T_MOD_EQUAL","T_AND_EQUAL","T_OR_EQUAL","T_XOR_EQUAL","T_SL_EQUAL","T_SR_EQUAL","T_POW_EQUAL","T_COALESCE","T_BOOLEAN_OR","T_BOOLEAN_AND","T_IS_EQUAL","T_IS_NOT_EQUAL","T_IS_IDENTICAL","T_IS_NOT_IDENTICAL","T_SPACESHIP","T_IS_SMALLER_OR_EQUAL","T_IS_GREATER_OR_EQUAL","T_SL","T_SR","T_INSTANCEOF","T_INC","T_DEC","T_INT_CAST","T_DOUBLE_CAST","T_STRING_CAST","T_ARRAY_CAST","T_OBJECT_CAST","T_BOOL_CAST","T_UNSET_CAST","T_POW","T_NEW","T_CLONE","T_EXIT","T_IF","T_ELSEIF","T_ELSE","T_ENDIF","T_LNUMBER","T_DNUMBER","T_STRING","T_STRING_VARNAME","T_VARIABLE","T_NUM_STRING","T_INLINE_HTML","T_CHARACTER","T_BAD_CHARACTER","T_ENCAPSED_AND_WHITESPACE","T_CONSTANT_ENCAPSED_STRING","T_ECHO","T_DO","T_WHILE","T_ENDWHILE","T_FOR","T_ENDFOR","T_FOREACH","T_ENDFOREACH","T_DECLARE","T_ENDDECLARE","T_AS","T_SWITCH","T_ENDSWITCH","T_CASE","T_DEFAULT","T_BREAK","T_CONTINUE","T_GOTO","T_FUNCTION","T_CONST","T_RETURN","T_TRY","T_CATCH","T_FINALLY","T_THROW","T_USE","T_INSTEADOF","T_GLOBAL","T_STATIC","T_ABSTRACT","T_FINAL","T_PRIVATE","T_PROTECTED","T_PUBLIC","T_VAR","T_UNSET","T_ISSET","T_EMPTY","T_HALT_COMPILER","T_CLASS","T_TRAIT","T_INTERFACE","T_EXTENDS","T_IMPLEMENTS","T_OBJECT_OPERATOR","T_DOUBLE_ARROW","T_LIST","T_ARRAY","T_CALLABLE","T_CLASS_C","T_TRAIT_C","T_METHOD_C","T_FUNC_C","T_LINE","T_FILE","T_COMMENT","T_DOC_COMMENT","T_OPEN_TAG","T_OPEN_TAG_WITH_ECHO","T_CLOSE_TAG","T_WHITESPACE","T_START_HEREDOC","T_END_HEREDOC","T_DOLLAR_OPEN_CURLY_BRACES","T_CURLY_OPEN","T_PAAMAYIM_NEKUDOTAYIM","T_NAMESPACE","T_NS_C","T_DIR","T_NS_SEPARATOR","T_ELLIPSIS"];
- var current = "UNKNOWN";
- constants.some(function( constant ) {
- if (PHP.Constants[ constant ] === token) {
- current = constant;
- return true;
- } else {
- return false;
- }
- });
- return current;
- };
- PHP.Parser.prototype.createTokenMap = function() {
- var tokenMap = {},
- name,
- i;
- for ( i = 256; i < 1000; ++i ) {
- if( PHP.Constants.T_OPEN_TAG_WITH_ECHO === i ) {
- tokenMap[ i ] = PHP.Constants.T_ECHO;
- } else if( PHP.Constants.T_CLOSE_TAG === i ) {
- tokenMap[ i ] = 59;
- } else if ( 'UNKNOWN' !== (name = this.tokenName( i ) ) ) {
- tokenMap[ i ] = this[name];
- }
- }
- return tokenMap;
- };
- PHP.Parser.prototype.TOKEN_NONE = -1;
- PHP.Parser.prototype.TOKEN_INVALID = 157;
- PHP.Parser.prototype.TOKEN_MAP_SIZE = 392;
- PHP.Parser.prototype.YYLAST = 889;
- PHP.Parser.prototype.YY2TBLSTATE = 337;
- PHP.Parser.prototype.YYGLAST = 410;
- PHP.Parser.prototype.YYNLSTATES = 564;
- PHP.Parser.prototype.YYUNEXPECTED = 32767;
- PHP.Parser.prototype.YYDEFAULT = -32766;
- PHP.Parser.prototype.YYERRTOK = 256;
- PHP.Parser.prototype.T_INCLUDE = 257;
- PHP.Parser.prototype.T_INCLUDE_ONCE = 258;
- PHP.Parser.prototype.T_EVAL = 259;
- PHP.Parser.prototype.T_REQUIRE = 260;
- PHP.Parser.prototype.T_REQUIRE_ONCE = 261;
- PHP.Parser.prototype.T_LOGICAL_OR = 262;
- PHP.Parser.prototype.T_LOGICAL_XOR = 263;
- PHP.Parser.prototype.T_LOGICAL_AND = 264;
- PHP.Parser.prototype.T_PRINT = 265;
- PHP.Parser.prototype.T_YIELD = 266;
- PHP.Parser.prototype.T_DOUBLE_ARROW = 267;
- PHP.Parser.prototype.T_YIELD_FROM = 268;
- PHP.Parser.prototype.T_PLUS_EQUAL = 269;
- PHP.Parser.prototype.T_MINUS_EQUAL = 270;
- PHP.Parser.prototype.T_MUL_EQUAL = 271;
- PHP.Parser.prototype.T_DIV_EQUAL = 272;
- PHP.Parser.prototype.T_CONCAT_EQUAL = 273;
- PHP.Parser.prototype.T_MOD_EQUAL = 274;
- PHP.Parser.prototype.T_AND_EQUAL = 275;
- PHP.Parser.prototype.T_OR_EQUAL = 276;
- PHP.Parser.prototype.T_XOR_EQUAL = 277;
- PHP.Parser.prototype.T_SL_EQUAL = 278;
- PHP.Parser.prototype.T_SR_EQUAL = 279;
- PHP.Parser.prototype.T_POW_EQUAL = 280;
- PHP.Parser.prototype.T_COALESCE = 281;
- PHP.Parser.prototype.T_BOOLEAN_OR = 282;
- PHP.Parser.prototype.T_BOOLEAN_AND = 283;
- PHP.Parser.prototype.T_IS_EQUAL = 284;
- PHP.Parser.prototype.T_IS_NOT_EQUAL = 285;
- PHP.Parser.prototype.T_IS_IDENTICAL = 286;
- PHP.Parser.prototype.T_IS_NOT_IDENTICAL = 287;
- PHP.Parser.prototype.T_SPACESHIP = 288;
- PHP.Parser.prototype.T_IS_SMALLER_OR_EQUAL = 289;
- PHP.Parser.prototype.T_IS_GREATER_OR_EQUAL = 290;
- PHP.Parser.prototype.T_SL = 291;
- PHP.Parser.prototype.T_SR = 292;
- PHP.Parser.prototype.T_INSTANCEOF = 293;
- PHP.Parser.prototype.T_INC = 294;
- PHP.Parser.prototype.T_DEC = 295;
- PHP.Parser.prototype.T_INT_CAST = 296;
- PHP.Parser.prototype.T_DOUBLE_CAST = 297;
- PHP.Parser.prototype.T_STRING_CAST = 298;
- PHP.Parser.prototype.T_ARRAY_CAST = 299;
- PHP.Parser.prototype.T_OBJECT_CAST = 300;
- PHP.Parser.prototype.T_BOOL_CAST = 301;
- PHP.Parser.prototype.T_UNSET_CAST = 302;
- PHP.Parser.prototype.T_POW = 303;
- PHP.Parser.prototype.T_NEW = 304;
- PHP.Parser.prototype.T_CLONE = 305;
- PHP.Parser.prototype.T_EXIT = 306;
- PHP.Parser.prototype.T_IF = 307;
- PHP.Parser.prototype.T_ELSEIF = 308;
- PHP.Parser.prototype.T_ELSE = 309;
- PHP.Parser.prototype.T_ENDIF = 310;
- PHP.Parser.prototype.T_LNUMBER = 311;
- PHP.Parser.prototype.T_DNUMBER = 312;
- PHP.Parser.prototype.T_STRING = 313;
- PHP.Parser.prototype.T_STRING_VARNAME = 314;
- PHP.Parser.prototype.T_VARIABLE = 315;
- PHP.Parser.prototype.T_NUM_STRING = 316;
- PHP.Parser.prototype.T_INLINE_HTML = 317;
- PHP.Parser.prototype.T_CHARACTER = 318;
- PHP.Parser.prototype.T_BAD_CHARACTER = 319;
- PHP.Parser.prototype.T_ENCAPSED_AND_WHITESPACE = 320;
- PHP.Parser.prototype.T_CONSTANT_ENCAPSED_STRING = 321;
- PHP.Parser.prototype.T_ECHO = 322;
- PHP.Parser.prototype.T_DO = 323;
- PHP.Parser.prototype.T_WHILE = 324;
- PHP.Parser.prototype.T_ENDWHILE = 325;
- PHP.Parser.prototype.T_FOR = 326;
- PHP.Parser.prototype.T_ENDFOR = 327;
- PHP.Parser.prototype.T_FOREACH = 328;
- PHP.Parser.prototype.T_ENDFOREACH = 329;
- PHP.Parser.prototype.T_DECLARE = 330;
- PHP.Parser.prototype.T_ENDDECLARE = 331;
- PHP.Parser.prototype.T_AS = 332;
- PHP.Parser.prototype.T_SWITCH = 333;
- PHP.Parser.prototype.T_ENDSWITCH = 334;
- PHP.Parser.prototype.T_CASE = 335;
- PHP.Parser.prototype.T_DEFAULT = 336;
- PHP.Parser.prototype.T_BREAK = 337;
- PHP.Parser.prototype.T_CONTINUE = 338;
- PHP.Parser.prototype.T_GOTO = 339;
- PHP.Parser.prototype.T_FUNCTION = 340;
- PHP.Parser.prototype.T_CONST = 341;
- PHP.Parser.prototype.T_RETURN = 342;
- PHP.Parser.prototype.T_TRY = 343;
- PHP.Parser.prototype.T_CATCH = 344;
- PHP.Parser.prototype.T_FINALLY = 345;
- PHP.Parser.prototype.T_THROW = 346;
- PHP.Parser.prototype.T_USE = 347;
- PHP.Parser.prototype.T_INSTEADOF = 348;
- PHP.Parser.prototype.T_GLOBAL = 349;
- PHP.Parser.prototype.T_STATIC = 350;
- PHP.Parser.prototype.T_ABSTRACT = 351;
- PHP.Parser.prototype.T_FINAL = 352;
- PHP.Parser.prototype.T_PRIVATE = 353;
- PHP.Parser.prototype.T_PROTECTED = 354;
- PHP.Parser.prototype.T_PUBLIC = 355;
- PHP.Parser.prototype.T_VAR = 356;
- PHP.Parser.prototype.T_UNSET = 357;
- PHP.Parser.prototype.T_ISSET = 358;
- PHP.Parser.prototype.T_EMPTY = 359;
- PHP.Parser.prototype.T_HALT_COMPILER = 360;
- PHP.Parser.prototype.T_CLASS = 361;
- PHP.Parser.prototype.T_TRAIT = 362;
- PHP.Parser.prototype.T_INTERFACE = 363;
- PHP.Parser.prototype.T_EXTENDS = 364;
- PHP.Parser.prototype.T_IMPLEMENTS = 365;
- PHP.Parser.prototype.T_OBJECT_OPERATOR = 366;
- PHP.Parser.prototype.T_LIST = 367;
- PHP.Parser.prototype.T_ARRAY = 368;
- PHP.Parser.prototype.T_CALLABLE = 369;
- PHP.Parser.prototype.T_CLASS_C = 370;
- PHP.Parser.prototype.T_TRAIT_C = 371;
- PHP.Parser.prototype.T_METHOD_C = 372;
- PHP.Parser.prototype.T_FUNC_C = 373;
- PHP.Parser.prototype.T_LINE = 374;
- PHP.Parser.prototype.T_FILE = 375;
- PHP.Parser.prototype.T_COMMENT = 376;
- PHP.Parser.prototype.T_DOC_COMMENT = 377;
- PHP.Parser.prototype.T_OPEN_TAG = 378;
- PHP.Parser.prototype.T_OPEN_TAG_WITH_ECHO = 379;
- PHP.Parser.prototype.T_CLOSE_TAG = 380;
- PHP.Parser.prototype.T_WHITESPACE = 381;
- PHP.Parser.prototype.T_START_HEREDOC = 382;
- PHP.Parser.prototype.T_END_HEREDOC = 383;
- PHP.Parser.prototype.T_DOLLAR_OPEN_CURLY_BRACES = 384;
- PHP.Parser.prototype.T_CURLY_OPEN = 385;
- PHP.Parser.prototype.T_PAAMAYIM_NEKUDOTAYIM = 386;
- PHP.Parser.prototype.T_NAMESPACE = 387;
- PHP.Parser.prototype.T_NS_C = 388;
- PHP.Parser.prototype.T_DIR = 389;
- PHP.Parser.prototype.T_NS_SEPARATOR = 390;
- PHP.Parser.prototype.T_ELLIPSIS = 391;
- PHP.Parser.prototype.terminals = [
- "$EOF",
- "error",
- "T_INCLUDE",
- "T_INCLUDE_ONCE",
- "T_EVAL",
- "T_REQUIRE",
- "T_REQUIRE_ONCE",
- "','",
- "T_LOGICAL_OR",
- "T_LOGICAL_XOR",
- "T_LOGICAL_AND",
- "T_PRINT",
- "T_YIELD",
- "T_DOUBLE_ARROW",
- "T_YIELD_FROM",
- "'='",
- "T_PLUS_EQUAL",
- "T_MINUS_EQUAL",
- "T_MUL_EQUAL",
- "T_DIV_EQUAL",
- "T_CONCAT_EQUAL",
- "T_MOD_EQUAL",
- "T_AND_EQUAL",
- "T_OR_EQUAL",
- "T_XOR_EQUAL",
- "T_SL_EQUAL",
- "T_SR_EQUAL",
- "T_POW_EQUAL",
- "'?'",
- "':'",
- "T_COALESCE",
- "T_BOOLEAN_OR",
- "T_BOOLEAN_AND",
- "'|'",
- "'^'",
- "'&'",
- "T_IS_EQUAL",
- "T_IS_NOT_EQUAL",
- "T_IS_IDENTICAL",
- "T_IS_NOT_IDENTICAL",
- "T_SPACESHIP",
- "'<'",
- "T_IS_SMALLER_OR_EQUAL",
- "'>'",
- "T_IS_GREATER_OR_EQUAL",
- "T_SL",
- "T_SR",
- "'+'",
- "'-'",
- "'.'",
- "'*'",
- "'/'",
- "'%'",
- "'!'",
- "T_INSTANCEOF",
- "'~'",
- "T_INC",
- "T_DEC",
- "T_INT_CAST",
- "T_DOUBLE_CAST",
- "T_STRING_CAST",
- "T_ARRAY_CAST",
- "T_OBJECT_CAST",
- "T_BOOL_CAST",
- "T_UNSET_CAST",
- "'@'",
- "T_POW",
- "'['",
- "T_NEW",
- "T_CLONE",
- "T_EXIT",
- "T_IF",
- "T_ELSEIF",
- "T_ELSE",
- "T_ENDIF",
- "T_LNUMBER",
- "T_DNUMBER",
- "T_STRING",
- "T_STRING_VARNAME",
- "T_VARIABLE",
- "T_NUM_STRING",
- "T_INLINE_HTML",
- "T_ENCAPSED_AND_WHITESPACE",
- "T_CONSTANT_ENCAPSED_STRING",
- "T_ECHO",
- "T_DO",
- "T_WHILE",
- "T_ENDWHILE",
- "T_FOR",
- "T_ENDFOR",
- "T_FOREACH",
- "T_ENDFOREACH",
- "T_DECLARE",
- "T_ENDDECLARE",
- "T_AS",
- "T_SWITCH",
- "T_ENDSWITCH",
- "T_CASE",
- "T_DEFAULT",
- "T_BREAK",
- "T_CONTINUE",
- "T_GOTO",
- "T_FUNCTION",
- "T_CONST",
- "T_RETURN",
- "T_TRY",
- "T_CATCH",
- "T_FINALLY",
- "T_THROW",
- "T_USE",
- "T_INSTEADOF",
- "T_GLOBAL",
- "T_STATIC",
- "T_ABSTRACT",
- "T_FINAL",
- "T_PRIVATE",
- "T_PROTECTED",
- "T_PUBLIC",
- "T_VAR",
- "T_UNSET",
- "T_ISSET",
- "T_EMPTY",
- "T_HALT_COMPILER",
- "T_CLASS",
- "T_TRAIT",
- "T_INTERFACE",
- "T_EXTENDS",
- "T_IMPLEMENTS",
- "T_OBJECT_OPERATOR",
- "T_LIST",
- "T_ARRAY",
- "T_CALLABLE",
- "T_CLASS_C",
- "T_TRAIT_C",
- "T_METHOD_C",
- "T_FUNC_C",
- "T_LINE",
- "T_FILE",
- "T_START_HEREDOC",
- "T_END_HEREDOC",
- "T_DOLLAR_OPEN_CURLY_BRACES",
- "T_CURLY_OPEN",
- "T_PAAMAYIM_NEKUDOTAYIM",
- "T_NAMESPACE",
- "T_NS_C",
- "T_DIR",
- "T_NS_SEPARATOR",
- "T_ELLIPSIS",
- "';'",
- "'{'",
- "'}'",
- "'('",
- "')'",
- "'`'",
- "']'",
- "'\"'",
- "'$'"
- , "???"
- ];
- PHP.Parser.prototype.translate = [
- 0, 157, 157, 157, 157, 157, 157, 157, 157, 157,
- 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
- 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
- 157, 157, 157, 53, 155, 157, 156, 52, 35, 157,
- 151, 152, 50, 47, 7, 48, 49, 51, 157, 157,
- 157, 157, 157, 157, 157, 157, 157, 157, 29, 148,
- 41, 15, 43, 28, 65, 157, 157, 157, 157, 157,
- 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
- 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
- 157, 67, 157, 154, 34, 157, 153, 157, 157, 157,
- 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
- 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
- 157, 157, 157, 149, 33, 150, 55, 157, 157, 157,
- 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
- 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
- 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
- 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
- 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
- 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
- 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
- 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
- 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
- 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
- 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
- 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
- 157, 157, 157, 157, 157, 157, 1, 2, 3, 4,
- 5, 6, 8, 9, 10, 11, 12, 13, 14, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
- 27, 30, 31, 32, 36, 37, 38, 39, 40, 42,
- 44, 45, 46, 54, 56, 57, 58, 59, 60, 61,
- 62, 63, 64, 66, 68, 69, 70, 71, 72, 73,
- 74, 75, 76, 77, 78, 79, 80, 81, 157, 157,
- 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
- 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
- 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
- 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
- 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
- 132, 133, 134, 135, 136, 137, 157, 157, 157, 157,
- 157, 157, 138, 139, 140, 141, 142, 143, 144, 145,
- 146, 147
- ];
- PHP.Parser.prototype.yyaction = [
- 569, 570, 571, 572, 573, 215, 574, 575, 576, 612,
- 613, 0, 27, 99, 100, 101, 102, 103, 104, 105,
- 106, 107, 108, 109, 110,-32766,-32766,-32766, 95, 96,
- 97, 24, 240, 226, -267,-32766,-32766,-32766,-32766,-32766,
- -32766, 530, 344, 114, 98,-32766, 286,-32766,-32766,-32766,
- -32766,-32766, 577, 870, 872,-32766,-32766,-32766,-32766,-32766,
- -32766,-32766,-32766, 224,-32766, 714, 578, 579, 580, 581,
- 582, 583, 584,-32766, 264, 644, 840, 841, 842, 839,
- 838, 837, 585, 586, 587, 588, 589, 590, 591, 592,
- 593, 594, 595, 615, 616, 617, 618, 619, 607, 608,
- 609, 610, 611, 596, 597, 598, 599, 600, 601, 602,
- 638, 639, 640, 641, 642, 643, 603, 604, 605, 606,
- 636, 627, 625, 626, 622, 623, 116, 614, 620, 621,
- 628, 629, 631, 630, 632, 633, 42, 43, 381, 44,
- 45, 624, 635, 634, -214, 46, 47, 289, 48,-32767,
- -32767,-32767,-32767, 90, 91, 92, 93, 94, 267, 241,
- 22, 840, 841, 842, 839, 838, 837, 832,-32766,-32766,
- -32766, 306, 1000, 1000, 1037, 120, 966, 436, -423, 244,
- 797, 49, 50, 660, 661, 272, 362, 51,-32766, 52,
- 219, 220, 53, 54, 55, 56, 57, 58, 59, 60,
- 1016, 22, 238, 61, 351, 945,-32766,-32766,-32766, 967,
- 968, 646, 705, 1000, 28, -456, 125, 966,-32766,-32766,
- -32766, 715, 398, 399, 216, 1000,-32766, 339,-32766,-32766,
- -32766,-32766, 25, 222, 980, 552, 355, 378,-32766, -423,
- -32766,-32766,-32766, 121, 65, 1045, 408, 1047, 1046, 274,
- 274, 131, 244, -423, 394, 395, 358, 519, 945, 537,
- -423, 111, -426, 398, 399, 130, 972, 973, 974, 975,
- 969, 970, 243, 128, -422, -421, 1013, 409, 976, 971,
- 353, 791, 792, 7, -162, 63, 124, 255, 701, 256,
- 274, 382, -122, -122, -122, -4, 715, 383, 646, 1042,
- -421, 704, 274, -219, 33, 17, 384, -122, 385, -122,
- 386, -122, 387, -122, 369, 388, -122, -122, -122, 34,
- 35, 389, 352, 520, 36, 390, 353, 702, 62, 112,
- 818, 287, 288, 391, 392, -422, -421, -161, 350, 393,
- 40, 38, 690, 735, 396, 397, 361, 22, 122, -422,
- -421,-32766,-32766,-32766, 791, 792, -422, -421, -425, 1000,
- -456, -421, -238, 966, 409, 41, 382, 353, 717, 535,
- -122,-32766, 383,-32766,-32766, -421, 704, 21, 813, 33,
- 17, 384, -421, 385, -466, 386, 224, 387, -467, 273,
- 388, 367, 945, -458, 34, 35, 389, 352, 345, 36,
- 390, 248, 247, 62, 254, 715, 287, 288, 391, 392,
- 399,-32766,-32766,-32766, 393, 295, 1000, 652, 735, 396,
- 397, 117, 115, 113, 814, 119, 72, 73, 74, -162,
- 764, 65, 240, 541, 370, 518, 274, 118, 270, 92,
- 93, 94, 242, 717, 535, -4, 26, 1000, 75, 76,
- 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
- 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
- 97, 547, 240, 713, 715, 382, 276,-32766,-32766, 126,
- 945, 383, -161, 938, 98, 704, 225, 659, 33, 17,
- 384, 346, 385, 274, 386, 728, 387, 221, 120, 388,
- 505, 506, 540, 34, 35, 389, 715, -238, 36, 390,
- 1017, 223, 62, 494, 18, 287, 288, 127, 297, 376,
- 6, 98, 798, 393, 274, 660, 661, 490, 491, -466,
- 39, -466, 514, -467, 539, -467, 16, 458, -458, 315,
- 791, 792, 829, 553, 382, 817, 563, 653, 538, 765,
- 383, 449, 751, 535, 704, 448, 435, 33, 17, 384,
- 430, 385, 646, 386, 359, 387, 357, 647, 388, 673,
- 429, 1040, 34, 35, 389, 715, 382, 36, 390, 941,
- 492, 62, 383, 503, 287, 288, 704, 434, 440, 33,
- 17, 384, 393, 385,-32766, 386, 445, 387, 495, 509,
- 388, 10, 529, 542, 34, 35, 389, 715, 515, 36,
- 390, 499, 500, 62, 214, -80, 287, 288, 452, 269,
- 736, 717, 535, 488, 393, 356, 266, 979, 265, 730,
- 982, 722, 358, 338, 493, 548, 0, 294, 737, 0,
- 3, 0, 309, 0, 0, 382, 0, 0, 271, 0,
- 0, 383, 0, 717, 535, 704, 227, 0, 33, 17,
- 384, 9, 385, 0, 386, 0, 387, -382, 0, 388,
- 0, 0, 325, 34, 35, 389, 715, 382, 36, 390,
- 321, 341, 62, 383, 340, 287, 288, 704, 22, 320,
- 33, 17, 384, 393, 385, 442, 386, 337, 387, 562,
- 1000, 388, 32, 31, 966, 34, 35, 389, 823, 657,
- 36, 390, 656, 821, 62, 703, 711, 287, 288, 561,
- 822, 825, 717, 535, 695, 393, 747, 749, 693, 759,
- 758, 752, 767, 945, 824, 706, 700, 712, 699, 698,
- 658, 0, 263, 262, 559, 558, 382, 556, 554, 551,
- 398, 399, 383, 550, 717, 535, 704, 546, 545, 33,
- 17, 384, 543, 385, 536, 386, 71, 387, 933, 932,
- 388, 30, 65, 731, 34, 35, 389, 274, 724, 36,
- 390, 830, 734, 62, 663, 662, 287, 288,-32766,-32766,
- -32766, 733, 732, 934, 393, 665, 664, 756, 555, 691,
- 1041, 1001, 994, 1006, 1011, 1014, 757, 1043,-32766, 654,
- -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767,
- -32767, 655, 1044, 717, 535, -446, 926, 348, 343, 268,
- 237, 236, 235, 234, 218, 217, 132, 129, -426, -425,
- -424, 123, 20, 23, 70, 69, 29, 37, 64, 68,
- 66, 67, -448, 0, 15, 19, 250, 910, 296, -217,
- 467, 484, 909, 472, 528, 913, 11, 964, 955, -215,
- 525, 379, 375, 373, 371, 14, 13, 12, -214, 0,
- -393, 0, 1005, 1039, 992, 993, 963, 0, 981
- ];
- PHP.Parser.prototype.yycheck = [
- 2, 3, 4, 5, 6, 13, 8, 9, 10, 11,
- 12, 0, 15, 16, 17, 18, 19, 20, 21, 22,
- 23, 24, 25, 26, 27, 8, 9, 10, 50, 51,
- 52, 7, 54, 7, 79, 8, 9, 10, 8, 9,
- 10, 77, 7, 13, 66, 28, 7, 30, 31, 32,
- 33, 34, 54, 56, 57, 28, 8, 30, 31, 32,
- 33, 34, 35, 35, 109, 1, 68, 69, 70, 71,
- 72, 73, 74, 118, 7, 77, 112, 113, 114, 115,
- 116, 117, 84, 85, 86, 87, 88, 89, 90, 91,
- 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
- 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
- 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
- 122, 123, 124, 125, 126, 127, 7, 129, 130, 131,
- 132, 133, 134, 135, 136, 137, 2, 3, 4, 5,
- 6, 143, 144, 145, 152, 11, 12, 7, 14, 41,
- 42, 43, 44, 45, 46, 47, 48, 49, 109, 7,
- 67, 112, 113, 114, 115, 116, 117, 118, 8, 9,
- 10, 79, 79, 79, 82, 147, 83, 82, 67, 28,
- 152, 47, 48, 102, 103, 7, 7, 53, 28, 55,
- 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
- 1, 67, 68, 69, 70, 112, 8, 9, 10, 75,
- 76, 77, 148, 79, 13, 7, 67, 83, 8, 9,
- 10, 1, 129, 130, 13, 79, 28, 146, 30, 31,
- 32, 33, 140, 141, 139, 29, 102, 7, 28, 128,
- 30, 31, 32, 149, 151, 77, 112, 79, 80, 156,
- 156, 15, 28, 142, 120, 121, 146, 77, 112, 149,
- 149, 15, 151, 129, 130, 15, 132, 133, 134, 135,
- 136, 137, 138, 15, 67, 67, 77, 143, 144, 145,
- 146, 130, 131, 7, 7, 151, 15, 153, 148, 155,
- 156, 71, 72, 73, 74, 0, 1, 77, 77, 150,
- 67, 81, 156, 152, 84, 85, 86, 87, 88, 89,
- 90, 91, 92, 93, 29, 95, 96, 97, 98, 99,
- 100, 101, 102, 143, 104, 105, 146, 148, 108, 15,
- 150, 111, 112, 113, 114, 128, 128, 7, 7, 119,
- 67, 67, 122, 123, 124, 125, 7, 67, 149, 142,
- 142, 8, 9, 10, 130, 131, 149, 149, 151, 79,
- 152, 128, 7, 83, 143, 7, 71, 146, 148, 149,
- 150, 28, 77, 30, 31, 142, 81, 7, 148, 84,
- 85, 86, 149, 88, 7, 90, 35, 92, 7, 33,
- 95, 7, 112, 7, 99, 100, 101, 102, 103, 104,
- 105, 128, 128, 108, 109, 1, 111, 112, 113, 114,
- 130, 8, 9, 10, 119, 142, 79, 122, 123, 124,
- 125, 15, 149, 149, 148, 29, 8, 9, 10, 152,
- 29, 151, 54, 29, 149, 79, 156, 15, 143, 47,
- 48, 49, 29, 148, 149, 150, 28, 79, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
- 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
- 52, 29, 54, 29, 1, 71, 67, 8, 9, 29,
- 112, 77, 152, 152, 66, 81, 35, 148, 84, 85,
- 86, 123, 88, 156, 90, 35, 92, 35, 147, 95,
- 72, 73, 29, 99, 100, 101, 1, 152, 104, 105,
- 152, 35, 108, 72, 73, 111, 112, 97, 98, 102,
- 103, 66, 152, 119, 156, 102, 103, 106, 107, 152,
- 67, 154, 74, 152, 29, 154, 152, 128, 152, 78,
- 130, 131, 148, 149, 71, 148, 149, 148, 149, 148,
- 77, 77, 148, 149, 81, 77, 77, 84, 85, 86,
- 77, 88, 77, 90, 77, 92, 77, 77, 95, 77,
- 77, 77, 99, 100, 101, 1, 71, 104, 105, 79,
- 79, 108, 77, 79, 111, 112, 81, 79, 82, 84,
- 85, 86, 119, 88, 82, 90, 86, 92, 87, 96,
- 95, 94, 89, 29, 99, 100, 101, 1, 91, 104,
- 105, 93, 96, 108, 94, 94, 111, 112, 94, 110,
- 123, 148, 149, 109, 119, 102, 127, 139, 126, 147,
- 139, 150, 146, 149, 154, 29, -1, 142, 123, -1,
- 142, -1, 146, -1, -1, 71, -1, -1, 126, -1,
- -1, 77, -1, 148, 149, 81, 35, -1, 84, 85,
- 86, 142, 88, -1, 90, -1, 92, 142, -1, 95,
- -1, -1, 146, 99, 100, 101, 1, 71, 104, 105,
- 146, 146, 108, 77, 146, 111, 112, 81, 67, 146,
- 84, 85, 86, 119, 88, 146, 90, 149, 92, 148,
- 79, 95, 148, 148, 83, 99, 100, 101, 148, 148,
- 104, 105, 148, 148, 108, 148, 148, 111, 112, 148,
- 148, 148, 148, 149, 148, 119, 148, 148, 148, 148,
- 148, 148, 148, 112, 148, 148, 148, 148, 148, 148,
- 148, -1, 149, 149, 149, 149, 71, 149, 149, 149,
- 129, 130, 77, 149, 148, 149, 81, 149, 149, 84,
- 85, 86, 149, 88, 149, 90, 149, 92, 150, 150,
- 95, 151, 151, 150, 99, 100, 101, 156, 150, 104,
- 105, 150, 150, 108, 150, 150, 111, 112, 8, 9,
- 10, 150, 150, 150, 119, 150, 150, 150, 150, 150,
- 150, 150, 150, 150, 150, 150, 150, 150, 28, 150,
- 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
- 40, 150, 150, 148, 149, 151, 153, 151, 151, 151,
- 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
- 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
- 151, 151, 151, -1, 152, 152, 152, 152, 152, 152,
- 152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
- 152, 152, 152, 152, 152, 152, 152, 152, 152, -1,
- 153, -1, 154, 154, 154, 154, 154, -1, 155
- ];
- PHP.Parser.prototype.yybase = [
- 0, 220, 295, 94, 180, 560, -2, -2, -2, -2,
- -36, 473, 574, 606, 574, 505, 404, 675, 675, 675,
- 28, 351, 462, 462, 462, 461, 396, 476, 451, 134,
- 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
- 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
- 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
- 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
- 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
- 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
- 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
- 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
- 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
- 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
- 134, 134, 134, 401, 64, 201, 568, 704, 713, 708,
- 702, 714, 520, 706, 705, 211, 650, 651, 450, 652,
- 653, 654, 655, 709, 480, 703, 712, 418, 418, 418,
- 418, 418, 418, 418, 418, 418, 418, 418, 418, 418,
- 418, 418, 418, 48, 30, 469, 403, 403, 403, 403,
- 403, 403, 403, 403, 403, 403, 403, 403, 403, 403,
- 403, 403, 403, 403, 403, 160, 160, 160, 343, 210,
- 208, 198, 17, 233, 27, 780, 780, 780, 780, 780,
- 108, 108, 108, 108, 621, 621, 93, 280, 280, 280,
- 280, 280, 280, 280, 280, 280, 280, 280, 632, 641,
- 642, 643, 392, 392, 151, 151, 151, 151, 368, -45,
- 146, 224, 224, 95, 410, 491, 733, 199, 199, 111,
- 207, -22, -22, -22, 81, 506, 92, 92, 233, 233,
- 273, 233, 423, 423, 423, 221, 221, 221, 221, 221,
- 110, 221, 221, 221, 617, 512, 168, 516, 647, 397,
- 503, 656, 274, 381, 377, 538, 535, 337, 523, 337,
- 421, 441, 428, 525, 337, 337, 285, 401, 394, 378,
- 567, 474, 339, 564, 140, 179, 409, 399, 384, 594,
- 561, 711, 330, 710, 358, 149, 378, 378, 378, 370,
- 593, 548, 355, -8, 646, 484, 277, 417, 386, 645,
- 635, 230, 634, 276, 331, 356, 565, 485, 485, 485,
- 485, 485, 485, 460, 485, 483, 691, 691, 478, 501,
- 460, 696, 460, 485, 691, 460, 460, 502, 485, 522,
- 522, 483, 508, 499, 691, 691, 499, 478, 460, 571,
- 551, 514, 482, 413, 413, 514, 460, 413, 501, 413,
- 11, 697, 699, 444, 700, 695, 698, 676, 694, 493,
- 615, 497, 515, 684, 683, 693, 479, 489, 620, 692,
- 549, 592, 487, 246, 314, 498, 463, 689, 523, 486,
- 455, 455, 455, 463, 687, 455, 455, 455, 455, 455,
- 455, 455, 455, 732, 24, 495, 510, 591, 590, 589,
- 406, 588, 496, 524, 422, 599, 488, 549, 549, 649,
- 727, 673, 490, 682, 716, 690, 555, 119, 271, 681,
- 648, 543, 492, 534, 680, 598, 246, 715, 494, 672,
- 549, 671, 455, 674, 701, 730, 731, 688, 728, 722,
- 152, 526, 587, 178, 729, 659, 596, 595, 554, 725,
- 707, 721, 720, 178, 576, 511, 717, 518, 677, 504,
- 678, 613, 258, 657, 686, 584, 724, 723, 726, 583,
- 582, 609, 608, 250, 236, 685, 442, 458, 517, 581,
- 500, 628, 604, 679, 580, 579, 623, 619, 718, 521,
- 486, 519, 509, 507, 513, 600, 618, 719, 206, 578,
- 586, 573, 481, 572, 631, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 134, 134, -2, -2, -2,
- 0, 0, 0, 0, -2, 134, 134, 134, 134, 134,
- 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
- 134, 134, 134, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 418, 418, 418,
- 418, 418, 418, 418, 418, 418, 418, 418, 418, 418,
- 418, 418, 418, 418, 418, 418, 418, 418, 418, 418,
- 418, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 418, 418, 418,
- 418, 418, 418, 418, 418, 418, 418, 418, 418, 418,
- 418, 418, 418, 418, 418, 418, 418, 418, 418, 418,
- 418, 418, 418, 418, -3, 418, 418, -3, 418, 418,
- 418, 418, 418, 418, -22, -22, -22, -22, 221, 221,
- 221, 221, 221, 221, 221, 221, 221, 221, 221, 221,
- 221, 221, 49, 49, 49, 49, -22, -22, 221, 221,
- 221, 221, 221, 49, 221, 221, 221, 92, 221, 92,
- 92, 337, 337, 0, 0, 0, 0, 0, 485, 92,
- 0, 0, 0, 0, 0, 0, 485, 485, 485, 0,
- 0, 0, 0, 0, 485, 0, 0, 0, 337, 92,
- 0, 420, 420, 178, 420, 420, 0, 0, 0, 485,
- 485, 0, 508, 0, 0, 0, 0, 691, 0, 0,
- 0, 0, 0, 455, 119, 682, 0, 39, 0, 0,
- 0, 0, 0, 490, 39, 26, 0, 26, 0, 0,
- 455, 455, 455, 0, 490, 490, 0, 0, 67, 490,
- 0, 0, 0, 67, 35, 0, 35, 0, 0, 0,
- 178
- ];
- PHP.Parser.prototype.yydefault = [
- 3,32767,32767,32767,32767,32767,32767,32767,32767,32767,
- 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
- 32767,32767, 468, 468, 468,32767,32767,32767,32767, 285,
- 460, 285, 285,32767, 419, 419, 419, 419, 419, 419,
- 419, 460,32767,32767,32767,32767,32767, 364,32767,32767,
- 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
- 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
- 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
- 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
- 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
- 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
- 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
- 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
- 32767,32767,32767,32767,32767, 465,32767,32767,32767,32767,
- 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
- 32767,32767,32767,32767,32767,32767,32767, 347, 348, 350,
- 351, 284, 420, 237, 464, 283, 116, 246, 239, 191,
- 282, 223, 119, 312, 365, 314, 363, 367, 313, 290,
- 294, 295, 296, 297, 298, 299, 300, 301, 302, 303,
- 304, 305, 288, 289, 366, 344, 343, 342, 310, 311,
- 287, 315, 317, 287, 316, 333, 334, 331, 332, 335,
- 336, 337, 338, 339,32767,32767,32767,32767,32767,32767,
- 32767,32767,32767,32767,32767,32767,32767,32767, 269, 269,
- 269, 269, 324, 325, 229, 229, 229, 229,32767, 270,
- 32767, 229,32767,32767,32767,32767,32767,32767,32767, 413,
- 341, 319, 320, 318,32767, 392,32767, 394, 307, 309,
- 387, 291,32767,32767,32767,32767,32767,32767,32767,32767,
- 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
- 32767,32767, 389, 421, 421,32767,32767,32767, 381,32767,
- 159, 210, 212, 397,32767,32767,32767,32767,32767, 329,
- 32767,32767,32767,32767,32767,32767, 474,32767,32767,32767,
- 32767,32767, 421,32767,32767,32767, 321, 322, 323,32767,
- 32767,32767, 421, 421,32767,32767, 421,32767, 421,32767,
- 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
- 32767,32767,32767, 163,32767,32767, 395, 395,32767,32767,
- 163, 390, 163,32767,32767, 163, 163, 176,32767, 174,
- 174,32767,32767, 178,32767, 435, 178,32767, 163, 196,
- 196, 373, 165, 231, 231, 373, 163, 231,32767, 231,
- 32767,32767,32767, 82,32767,32767,32767,32767,32767,32767,
- 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
- 383,32767,32767,32767, 401,32767, 414, 433, 381,32767,
- 327, 328, 330,32767, 423, 352, 353, 354, 355, 356,
- 357, 358, 360,32767, 461, 386,32767,32767,32767,32767,
- 32767,32767, 84, 108, 245,32767, 473, 84, 384,32767,
- 473,32767,32767,32767,32767,32767,32767, 286,32767,32767,
- 32767, 84,32767, 84,32767,32767, 457,32767,32767, 421,
- 385,32767, 326, 398, 439,32767,32767, 422,32767,32767,
- 218, 84,32767, 177,32767,32767,32767,32767,32767,32767,
- 401,32767,32767, 179,32767,32767, 421,32767,32767,32767,
- 32767,32767, 281,32767,32767,32767,32767,32767, 421,32767,
- 32767,32767,32767, 222,32767,32767,32767,32767,32767,32767,
- 32767,32767,32767,32767,32767,32767,32767,32767,32767, 82,
- 60,32767, 263,32767,32767,32767,32767,32767,32767,32767,
- 32767,32767,32767,32767,32767, 121, 121, 3, 3, 121,
- 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
- 121, 121, 121, 121, 248, 154, 248, 204, 248, 248,
- 207, 196, 196, 255
- ];
- PHP.Parser.prototype.yygoto = [
- 163, 163, 135, 135, 135, 146, 148, 179, 164, 161,
- 145, 161, 161, 161, 162, 162, 162, 162, 162, 162,
- 162, 145, 157, 158, 159, 160, 176, 174, 177, 410,
- 411, 299, 412, 415, 416, 417, 418, 419, 420, 421,
- 422, 857, 136, 137, 138, 139, 140, 141, 142, 143,
- 144, 147, 173, 175, 178, 195, 198, 199, 201, 202,
- 204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
- 232, 233, 251, 252, 253, 316, 317, 318, 462, 180,
- 181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
- 191, 192, 193, 149, 194, 150, 165, 166, 167, 196,
- 168, 151, 152, 153, 169, 154, 197, 133, 170, 155,
- 171, 172, 156, 521, 200, 257, 246, 464, 432, 687,
- 649, 278, 481, 482, 527, 200, 437, 437, 437, 766,
- 5, 746, 650, 557, 437, 426, 775, 770, 428, 431,
- 444, 465, 466, 468, 483, 279, 651, 336, 450, 453,
- 437, 560, 485, 487, 508, 511, 763, 516, 517, 777,
- 524, 762, 526, 532, 773, 534, 480, 480, 965, 965,
- 965, 965, 965, 965, 965, 965, 965, 965, 965, 965,
- 413, 413, 413, 413, 413, 413, 413, 413, 413, 413,
- 413, 413, 413, 413, 942, 502, 478, 496, 512, 456,
- 298, 437, 437, 451, 471, 437, 437, 674, 437, 229,
- 456, 230, 231, 463, 828, 533, 681, 438, 513, 826,
- 461, 475, 460, 414, 414, 414, 414, 414, 414, 414,
- 414, 414, 414, 414, 414, 414, 414, 301, 674, 674,
- 443, 454, 1033, 1033, 1034, 1034, 425, 531, 425, 708,
- 750, 800, 457, 372, 1033, 943, 1034, 1026, 300, 1018,
- 497, 8, 313, 904, 796, 944, 996, 785, 789, 1007,
- 285, 670, 1036, 329, 307, 310, 804, 668, 544, 332,
- 935, 940, 366, 807, 678, 477, 377, 754, 844, 0,
- 667, 667, 675, 675, 675, 677, 0, 666, 323, 498,
- 328, 312, 312, 258, 259, 283, 459, 261, 322, 284,
- 326, 486, 280, 281, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 790, 790, 790, 790, 946, 0, 946,
- 790, 790, 1004, 790, 1004, 0, 0, 0, 0, 836,
- 0, 1015, 1015, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 744, 744, 744, 720, 744, 0,
- 739, 745, 721, 780, 780, 1023, 0, 0, 1002, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 806, 0, 806, 0, 0, 0, 0, 1008, 1009
- ];
- PHP.Parser.prototype.yygcheck = [
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 52, 45, 112, 112, 80, 8, 10,
- 10, 64, 55, 55, 55, 45, 8, 8, 8, 10,
- 92, 10, 11, 10, 8, 10, 10, 10, 38, 38,
- 38, 38, 38, 38, 62, 62, 12, 62, 28, 8,
- 8, 28, 28, 28, 28, 28, 28, 28, 28, 28,
- 28, 28, 28, 28, 28, 28, 70, 70, 70, 70,
- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
- 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
- 113, 113, 113, 113, 76, 56, 35, 35, 56, 69,
- 56, 8, 8, 8, 8, 8, 8, 19, 8, 60,
- 69, 60, 60, 7, 7, 7, 25, 8, 7, 7,
- 2, 2, 8, 115, 115, 115, 115, 115, 115, 115,
- 115, 115, 115, 115, 115, 115, 115, 53, 19, 19,
- 53, 53, 123, 123, 124, 124, 109, 5, 109, 44,
- 29, 78, 114, 53, 123, 76, 124, 122, 41, 120,
- 43, 53, 42, 96, 74, 76, 76, 72, 75, 117,
- 14, 21, 123, 18, 9, 13, 79, 20, 66, 17,
- 102, 104, 58, 81, 22, 59, 100, 63, 94, -1,
- 19, 19, 19, 19, 19, 19, -1, 19, 45, 45,
- 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 45, 45, 64, 64, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 52, 52, 52, 52, 52, -1, 52,
- 52, 52, 80, 52, 80, -1, -1, -1, -1, 92,
- -1, 80, 80, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 52, 52, 52, 52, 52, -1,
- 52, 52, 52, 69, 69, 69, -1, -1, 80, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 80, -1, 80, -1, -1, -1, -1, 80, 80
- ];
- PHP.Parser.prototype.yygbase = [
- 0, 0, -317, 0, 0, 237, 0, 210, -136, 4,
- 118, 130, 144, -10, 16, 0, 0, -59, 10, -47,
- -9, 7, -77, -20, 0, 209, 0, 0, -388, 234,
- 0, 0, 0, 0, 0, 165, 0, 0, 103, 0,
- 0, 225, 44, 45, 235, 84, 0, 0, 0, 0,
- 0, 0, 109, -115, 0, -113, -179, 0, -78, -81,
- -347, 0, -122, -80, -249, 0, -19, 0, 0, 169,
- -48, 0, 26, 0, 22, 24, -99, 0, 230, -13,
- 114, -79, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 120, 0, -90, 0, 23, 0, 0, 0,
- -89, 0, -67, 0, -69, 0, 0, 0, 0, 8,
- 0, 0, -140, -34, 229, 9, 0, 21, 0, 0,
- 218, 0, 233, -3, -1, 0
- ];
- PHP.Parser.prototype.yygdefault = [
- -32768, 380, 565, 2, 566, 637, 645, 504, 400, 433,
- 748, 688, 689, 303, 342, 401, 302, 330, 324, 676,
- 669, 671, 679, 134, 333, 682, 1, 684, 439, 716,
- 291, 692, 292, 507, 694, 446, 696, 697, 427, 304,
- 305, 447, 311, 479, 707, 203, 308, 709, 290, 710,
- 719, 335, 293, 510, 489, 469, 501, 402, 363, 476,
- 228, 455, 473, 753, 277, 761, 549, 769, 772, 403,
- 404, 470, 784, 368, 794, 788, 960, 319, 799, 805,
- 991, 808, 811, 349, 331, 327, 815, 816, 4, 820,
- 522, 523, 835, 239, 843, 856, 347, 923, 925, 441,
- 374, 936, 360, 334, 939, 995, 354, 405, 364, 952,
- 260, 282, 245, 406, 423, 249, 407, 365, 998, 314,
- 1019, 424, 1027, 1035, 275, 474
- ];
- PHP.Parser.prototype.yylhs = [
- 0, 1, 3, 3, 2, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 6, 6, 6, 6, 6, 6, 6,
- 7, 7, 8, 8, 9, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 14, 14, 15, 15,
- 15, 15, 17, 17, 13, 13, 18, 18, 19, 19,
- 20, 20, 21, 21, 16, 16, 22, 24, 24, 25,
- 26, 26, 28, 27, 27, 27, 27, 29, 29, 29,
- 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
- 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
- 29, 29, 10, 10, 48, 48, 51, 51, 50, 49,
- 49, 42, 42, 53, 53, 54, 54, 11, 12, 12,
- 12, 57, 57, 57, 58, 58, 61, 61, 59, 59,
- 62, 62, 36, 36, 44, 44, 47, 47, 47, 46,
- 46, 63, 37, 37, 37, 37, 64, 64, 65, 65,
- 66, 66, 34, 34, 30, 30, 67, 32, 32, 68,
- 31, 31, 33, 33, 43, 43, 43, 43, 55, 55,
- 71, 71, 72, 72, 74, 74, 75, 75, 75, 73,
- 73, 56, 56, 76, 76, 77, 77, 78, 78, 78,
- 39, 39, 79, 40, 40, 81, 81, 60, 60, 82,
- 82, 82, 82, 87, 87, 88, 88, 89, 89, 89,
- 89, 89, 90, 91, 91, 86, 86, 83, 83, 85,
- 85, 93, 93, 92, 92, 92, 92, 92, 92, 84,
- 84, 94, 94, 41, 41, 35, 35, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 101, 95, 95, 100, 100, 103, 103, 104, 105, 105,
- 105, 109, 109, 52, 52, 52, 96, 96, 107, 107,
- 97, 97, 99, 99, 99, 102, 102, 113, 113, 70,
- 115, 115, 115, 98, 98, 98, 98, 98, 98, 98,
- 98, 98, 98, 98, 98, 98, 98, 98, 98, 38,
- 38, 111, 111, 111, 106, 106, 106, 116, 116, 116,
- 116, 116, 116, 45, 45, 45, 80, 80, 80, 118,
- 110, 110, 110, 110, 110, 110, 108, 108, 108, 117,
- 117, 117, 117, 69, 119, 119, 120, 120, 120, 120,
- 120, 114, 121, 121, 122, 122, 122, 122, 122, 112,
- 112, 112, 112, 124, 123, 123, 123, 123, 123, 123,
- 123, 125, 125, 125
- ];
- PHP.Parser.prototype.yylen = [
- 1, 1, 2, 0, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 3, 1, 1, 1, 1, 1, 3,
- 5, 4, 3, 4, 2, 3, 1, 1, 7, 8,
- 6, 7, 3, 1, 3, 1, 3, 1, 1, 3,
- 1, 2, 1, 2, 3, 1, 3, 3, 1, 3,
- 2, 0, 1, 1, 1, 1, 1, 3, 7, 10,
- 5, 7, 9, 5, 3, 3, 3, 3, 3, 3,
- 1, 2, 5, 7, 9, 5, 6, 3, 3, 2,
- 2, 1, 1, 1, 0, 2, 1, 3, 8, 0,
- 4, 1, 3, 0, 1, 0, 1, 10, 7, 6,
- 5, 1, 2, 2, 0, 2, 0, 2, 0, 2,
- 1, 3, 1, 4, 1, 4, 1, 1, 4, 1,
- 3, 3, 3, 4, 4, 5, 0, 2, 4, 3,
- 1, 1, 1, 4, 0, 2, 5, 0, 2, 6,
- 0, 2, 0, 3, 1, 2, 1, 1, 1, 0,
- 1, 3, 4, 6, 1, 2, 1, 1, 1, 0,
- 1, 0, 2, 2, 3, 1, 3, 1, 2, 2,
- 3, 1, 1, 3, 1, 1, 3, 2, 0, 3,
- 4, 9, 3, 1, 3, 0, 2, 4, 5, 4,
- 4, 4, 3, 1, 1, 1, 3, 1, 1, 0,
- 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
- 3, 1, 3, 3, 1, 0, 1, 1, 3, 3,
- 3, 4, 1, 2, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 2, 2, 2, 2,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 2, 2, 2,
- 2, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 5, 4, 3, 4, 4, 2, 2, 4,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 1, 3, 2, 1, 2, 4, 2, 10, 11,
- 7, 3, 2, 0, 4, 1, 3, 2, 2, 2,
- 4, 1, 1, 1, 2, 3, 1, 1, 1, 1,
- 0, 3, 0, 1, 1, 0, 1, 1, 3, 3,
- 4, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 3, 2, 3, 3, 0,
- 1, 1, 3, 1, 1, 3, 1, 1, 4, 4,
- 4, 1, 4, 1, 1, 3, 1, 4, 2, 3,
- 1, 4, 4, 3, 3, 3, 1, 3, 1, 1,
- 3, 1, 1, 4, 3, 1, 1, 1, 3, 3,
- 0, 1, 3, 1, 3, 1, 4, 2, 0, 2,
- 2, 1, 2, 1, 1, 4, 3, 3, 3, 6,
- 3, 1, 1, 1
- ];
- exports.PHP = PHP;
- });
- define("ace/mode/php_worker",[], function(ace_require, exports, module) {
- "use strict";
- var oop = ace_require("../lib/oop");
- var Mirror = ace_require("../worker/mirror").Mirror;
- var PHP = ace_require("./php/php").PHP;
- var PhpWorker = exports.PhpWorker = function(sender) {
- Mirror.call(this, sender);
- this.setTimeout(500);
- };
- oop.inherits(PhpWorker, Mirror);
- (function() {
- this.setOptions = function(opts) {
- this.inlinePhp = opts && opts.inline;
- };
-
- this.onUpdate = function() {
- var value = this.doc.getValue();
- var errors = [];
- if (this.inlinePhp)
- value = "<?" + value + "?>";
- var tokens = PHP.Lexer(value, {short_open_tag: 1});
- try {
- new PHP.Parser(tokens);
- } catch(e) {
- errors.push({
- row: e.line - 1,
- column: null,
- text: e.message.charAt(0).toUpperCase() + e.message.substring(1),
- type: "error"
- });
- }
- this.sender.emit("annotate", errors);
- };
- }).call(PhpWorker.prototype);
- });
- define("ace/lib/es5-shim",[], function(ace_require, exports, module) {
- function Empty() {}
- if (!Function.prototype.bind) {
- Function.prototype.bind = function bind(that) { // .length is 1
- var target = this;
- if (typeof target != "function") {
- throw new TypeError("Function.prototype.bind called on incompatible " + target);
- }
- var args = slice.call(arguments, 1); // for normal call
- var bound = function () {
- if (this instanceof bound) {
- var result = target.apply(
- this,
- args.concat(slice.call(arguments))
- );
- if (Object(result) === result) {
- return result;
- }
- return this;
- } else {
- return target.apply(
- that,
- args.concat(slice.call(arguments))
- );
- }
- };
- if(target.prototype) {
- Empty.prototype = target.prototype;
- bound.prototype = new Empty();
- Empty.prototype = null;
- }
- return bound;
- };
- }
- var call = Function.prototype.call;
- var prototypeOfArray = Array.prototype;
- var prototypeOfObject = Object.prototype;
- var slice = prototypeOfArray.slice;
- var _toString = call.bind(prototypeOfObject.toString);
- var owns = call.bind(prototypeOfObject.hasOwnProperty);
- var defineGetter;
- var defineSetter;
- var lookupGetter;
- var lookupSetter;
- var supportsAccessors;
- if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
- defineGetter = call.bind(prototypeOfObject.__defineGetter__);
- defineSetter = call.bind(prototypeOfObject.__defineSetter__);
- lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
- lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
- }
- if ([1,2].splice(0).length != 2) {
- if(function() { // test IE < 9 to splice bug - see issue #138
- function makeArray(l) {
- var a = new Array(l+2);
- a[0] = a[1] = 0;
- return a;
- }
- var array = [], lengthBefore;
-
- array.splice.apply(array, makeArray(20));
- array.splice.apply(array, makeArray(26));
- lengthBefore = array.length; //46
- array.splice(5, 0, "XXX"); // add one element
- lengthBefore + 1 == array.length
- if (lengthBefore + 1 == array.length) {
- return true;// has right splice implementation without bugs
- }
- }()) {//IE 6/7
- var array_splice = Array.prototype.splice;
- Array.prototype.splice = function(start, deleteCount) {
- if (!arguments.length) {
- return [];
- } else {
- return array_splice.apply(this, [
- start === void 0 ? 0 : start,
- deleteCount === void 0 ? (this.length - start) : deleteCount
- ].concat(slice.call(arguments, 2)))
- }
- };
- } else {//IE8
- Array.prototype.splice = function(pos, removeCount){
- var length = this.length;
- if (pos > 0) {
- if (pos > length)
- pos = length;
- } else if (pos == void 0) {
- pos = 0;
- } else if (pos < 0) {
- pos = Math.max(length + pos, 0);
- }
- if (!(pos+removeCount < length))
- removeCount = length - pos;
- var removed = this.slice(pos, pos+removeCount);
- var insert = slice.call(arguments, 2);
- var add = insert.length;
- if (pos === length) {
- if (add) {
- this.push.apply(this, insert);
- }
- } else {
- var remove = Math.min(removeCount, length - pos);
- var tailOldPos = pos + remove;
- var tailNewPos = tailOldPos + add - remove;
- var tailCount = length - tailOldPos;
- var lengthAfterRemove = length - remove;
- if (tailNewPos < tailOldPos) { // case A
- for (var i = 0; i < tailCount; ++i) {
- this[tailNewPos+i] = this[tailOldPos+i];
- }
- } else if (tailNewPos > tailOldPos) { // case B
- for (i = tailCount; i--; ) {
- this[tailNewPos+i] = this[tailOldPos+i];
- }
- } // else, add == remove (nothing to do)
- if (add && pos === lengthAfterRemove) {
- this.length = lengthAfterRemove; // truncate array
- this.push.apply(this, insert);
- } else {
- this.length = lengthAfterRemove + add; // reserves space
- for (i = 0; i < add; ++i) {
- this[pos+i] = insert[i];
- }
- }
- }
- return removed;
- };
- }
- }
- if (!Array.isArray) {
- Array.isArray = function isArray(obj) {
- return _toString(obj) == "[object Array]";
- };
- }
- var boxedString = Object("a"),
- splitString = boxedString[0] != "a" || !(0 in boxedString);
- if (!Array.prototype.forEach) {
- Array.prototype.forEach = function forEach(fun /*, thisp*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- thisp = arguments[1],
- i = -1,
- length = self.length >>> 0;
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(); // TODO message
- }
- while (++i < length) {
- if (i in self) {
- fun.call(thisp, self[i], i, object);
- }
- }
- };
- }
- if (!Array.prototype.map) {
- Array.prototype.map = function map(fun /*, thisp*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- result = Array(length),
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
- for (var i = 0; i < length; i++) {
- if (i in self)
- result[i] = fun.call(thisp, self[i], i, object);
- }
- return result;
- };
- }
- if (!Array.prototype.filter) {
- Array.prototype.filter = function filter(fun /*, thisp */) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- result = [],
- value,
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
- for (var i = 0; i < length; i++) {
- if (i in self) {
- value = self[i];
- if (fun.call(thisp, value, i, object)) {
- result.push(value);
- }
- }
- }
- return result;
- };
- }
- if (!Array.prototype.every) {
- Array.prototype.every = function every(fun /*, thisp */) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
- for (var i = 0; i < length; i++) {
- if (i in self && !fun.call(thisp, self[i], i, object)) {
- return false;
- }
- }
- return true;
- };
- }
- if (!Array.prototype.some) {
- Array.prototype.some = function some(fun /*, thisp */) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
- for (var i = 0; i < length; i++) {
- if (i in self && fun.call(thisp, self[i], i, object)) {
- return true;
- }
- }
- return false;
- };
- }
- if (!Array.prototype.reduce) {
- Array.prototype.reduce = function reduce(fun /*, initial*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0;
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
- if (!length && arguments.length == 1) {
- throw new TypeError("reduce of empty array with no initial value");
- }
- var i = 0;
- var result;
- if (arguments.length >= 2) {
- result = arguments[1];
- } else {
- do {
- if (i in self) {
- result = self[i++];
- break;
- }
- if (++i >= length) {
- throw new TypeError("reduce of empty array with no initial value");
- }
- } while (true);
- }
- for (; i < length; i++) {
- if (i in self) {
- result = fun.call(void 0, result, self[i], i, object);
- }
- }
- return result;
- };
- }
- if (!Array.prototype.reduceRight) {
- Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0;
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
- if (!length && arguments.length == 1) {
- throw new TypeError("reduceRight of empty array with no initial value");
- }
- var result, i = length - 1;
- if (arguments.length >= 2) {
- result = arguments[1];
- } else {
- do {
- if (i in self) {
- result = self[i--];
- break;
- }
- if (--i < 0) {
- throw new TypeError("reduceRight of empty array with no initial value");
- }
- } while (true);
- }
- do {
- if (i in this) {
- result = fun.call(void 0, result, self[i], i, object);
- }
- } while (i--);
- return result;
- };
- }
- if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
- Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
- var self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- toObject(this),
- length = self.length >>> 0;
- if (!length) {
- return -1;
- }
- var i = 0;
- if (arguments.length > 1) {
- i = toInteger(arguments[1]);
- }
- i = i >= 0 ? i : Math.max(0, length + i);
- for (; i < length; i++) {
- if (i in self && self[i] === sought) {
- return i;
- }
- }
- return -1;
- };
- }
- if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {
- Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
- var self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- toObject(this),
- length = self.length >>> 0;
- if (!length) {
- return -1;
- }
- var i = length - 1;
- if (arguments.length > 1) {
- i = Math.min(i, toInteger(arguments[1]));
- }
- i = i >= 0 ? i : length - Math.abs(i);
- for (; i >= 0; i--) {
- if (i in self && sought === self[i]) {
- return i;
- }
- }
- return -1;
- };
- }
- if (!Object.getPrototypeOf) {
- Object.getPrototypeOf = function getPrototypeOf(object) {
- return object.__proto__ || (
- object.constructor ?
- object.constructor.prototype :
- prototypeOfObject
- );
- };
- }
- if (!Object.getOwnPropertyDescriptor) {
- var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
- "non-object: ";
- Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
- if ((typeof object != "object" && typeof object != "function") || object === null)
- throw new TypeError(ERR_NON_OBJECT + object);
- if (!owns(object, property))
- return;
- var descriptor, getter, setter;
- descriptor = { enumerable: true, configurable: true };
- if (supportsAccessors) {
- var prototype = object.__proto__;
- object.__proto__ = prototypeOfObject;
- var getter = lookupGetter(object, property);
- var setter = lookupSetter(object, property);
- object.__proto__ = prototype;
- if (getter || setter) {
- if (getter) descriptor.get = getter;
- if (setter) descriptor.set = setter;
- return descriptor;
- }
- }
- descriptor.value = object[property];
- return descriptor;
- };
- }
- if (!Object.getOwnPropertyNames) {
- Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
- return Object.keys(object);
- };
- }
- if (!Object.create) {
- var createEmpty;
- if (Object.prototype.__proto__ === null) {
- createEmpty = function () {
- return { "__proto__": null };
- };
- } else {
- createEmpty = function () {
- var empty = {};
- for (var i in empty)
- empty[i] = null;
- empty.constructor =
- empty.hasOwnProperty =
- empty.propertyIsEnumerable =
- empty.isPrototypeOf =
- empty.toLocaleString =
- empty.toString =
- empty.valueOf =
- empty.__proto__ = null;
- return empty;
- }
- }
- Object.create = function create(prototype, properties) {
- var object;
- if (prototype === null) {
- object = createEmpty();
- } else {
- if (typeof prototype != "object")
- throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
- var Type = function () {};
- Type.prototype = prototype;
- object = new Type();
- object.__proto__ = prototype;
- }
- if (properties !== void 0)
- Object.defineProperties(object, properties);
- return object;
- };
- }
- function doesDefinePropertyWork(object) {
- try {
- Object.defineProperty(object, "sentinel", {});
- return "sentinel" in object;
- } catch (exception) {
- }
- }
- if (Object.defineProperty) {
- var definePropertyWorksOnObject = doesDefinePropertyWork({});
- var definePropertyWorksOnDom = typeof document == "undefined" ||
- doesDefinePropertyWork(document.createElement("div"));
- if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
- var definePropertyFallback = Object.defineProperty;
- }
- }
- if (!Object.defineProperty || definePropertyFallback) {
- var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
- var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
- var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
- "on this javascript engine";
- Object.defineProperty = function defineProperty(object, property, descriptor) {
- if ((typeof object != "object" && typeof object != "function") || object === null)
- throw new TypeError(ERR_NON_OBJECT_TARGET + object);
- if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
- throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
- if (definePropertyFallback) {
- try {
- return definePropertyFallback.call(Object, object, property, descriptor);
- } catch (exception) {
- }
- }
- if (owns(descriptor, "value")) {
- if (supportsAccessors && (lookupGetter(object, property) ||
- lookupSetter(object, property)))
- {
- var prototype = object.__proto__;
- object.__proto__ = prototypeOfObject;
- delete object[property];
- object[property] = descriptor.value;
- object.__proto__ = prototype;
- } else {
- object[property] = descriptor.value;
- }
- } else {
- if (!supportsAccessors)
- throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
- if (owns(descriptor, "get"))
- defineGetter(object, property, descriptor.get);
- if (owns(descriptor, "set"))
- defineSetter(object, property, descriptor.set);
- }
- return object;
- };
- }
- if (!Object.defineProperties) {
- Object.defineProperties = function defineProperties(object, properties) {
- for (var property in properties) {
- if (owns(properties, property))
- Object.defineProperty(object, property, properties[property]);
- }
- return object;
- };
- }
- if (!Object.seal) {
- Object.seal = function seal(object) {
- return object;
- };
- }
- if (!Object.freeze) {
- Object.freeze = function freeze(object) {
- return object;
- };
- }
- try {
- Object.freeze(function () {});
- } catch (exception) {
- Object.freeze = (function freeze(freezeObject) {
- return function freeze(object) {
- if (typeof object == "function") {
- return object;
- } else {
- return freezeObject(object);
- }
- };
- })(Object.freeze);
- }
- if (!Object.preventExtensions) {
- Object.preventExtensions = function preventExtensions(object) {
- return object;
- };
- }
- if (!Object.isSealed) {
- Object.isSealed = function isSealed(object) {
- return false;
- };
- }
- if (!Object.isFrozen) {
- Object.isFrozen = function isFrozen(object) {
- return false;
- };
- }
- if (!Object.isExtensible) {
- Object.isExtensible = function isExtensible(object) {
- if (Object(object) === object) {
- throw new TypeError(); // TODO message
- }
- var name = '';
- while (owns(object, name)) {
- name += '?';
- }
- object[name] = true;
- var returnValue = owns(object, name);
- delete object[name];
- return returnValue;
- };
- }
- if (!Object.keys) {
- var hasDontEnumBug = true,
- dontEnums = [
- "toString",
- "toLocaleString",
- "valueOf",
- "hasOwnProperty",
- "isPrototypeOf",
- "propertyIsEnumerable",
- "constructor"
- ],
- dontEnumsLength = dontEnums.length;
- for (var key in {"toString": null}) {
- hasDontEnumBug = false;
- }
- Object.keys = function keys(object) {
- if (
- (typeof object != "object" && typeof object != "function") ||
- object === null
- ) {
- throw new TypeError("Object.keys called on a non-object");
- }
- var keys = [];
- for (var name in object) {
- if (owns(object, name)) {
- keys.push(name);
- }
- }
- if (hasDontEnumBug) {
- for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
- var dontEnum = dontEnums[i];
- if (owns(object, dontEnum)) {
- keys.push(dontEnum);
- }
- }
- }
- return keys;
- };
- }
- if (!Date.now) {
- Date.now = function now() {
- return new Date().getTime();
- };
- }
- var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003" +
- "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
- "\u2029\uFEFF";
- if (!String.prototype.trim) {
- ws = "[" + ws + "]";
- var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
- trimEndRegexp = new RegExp(ws + ws + "*$");
- String.prototype.trim = function trim() {
- return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
- };
- }
- function toInteger(n) {
- n = +n;
- if (n !== n) { // isNaN
- n = 0;
- } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
- n = (n > 0 || -1) * Math.floor(Math.abs(n));
- }
- return n;
- }
- function isPrimitive(input) {
- var type = typeof input;
- return (
- input === null ||
- type === "undefined" ||
- type === "boolean" ||
- type === "number" ||
- type === "string"
- );
- }
- function toPrimitive(input) {
- var val, valueOf, toString;
- if (isPrimitive(input)) {
- return input;
- }
- valueOf = input.valueOf;
- if (typeof valueOf === "function") {
- val = valueOf.call(input);
- if (isPrimitive(val)) {
- return val;
- }
- }
- toString = input.toString;
- if (typeof toString === "function") {
- val = toString.call(input);
- if (isPrimitive(val)) {
- return val;
- }
- }
- throw new TypeError();
- }
- var toObject = function (o) {
- if (o == null) { // this matches both null and undefined
- throw new TypeError("can't convert "+o+" to object");
- }
- return Object(o);
- };
- });
|