| 1 |
"no use strict"; |
| 2 |
!(function(window) { |
| 3 |
if (typeof window.window != "undefined" && window.document) |
| 4 |
return; |
| 5 |
if (window.require && window.define) |
| 6 |
return; |
| 7 |
|
| 8 |
if (!window.console) { |
| 9 |
window.console = function() { |
| 10 |
var msgs = Array.prototype.slice.call(arguments, 0); |
| 11 |
postMessage({type: "log", data: msgs}); |
| 12 |
}; |
| 13 |
window.console.error = |
| 14 |
window.console.warn = |
| 15 |
window.console.log = |
| 16 |
window.console.trace = window.console; |
| 17 |
} |
| 18 |
window.window = window; |
| 19 |
window.ace = window; |
| 20 |
|
| 21 |
window.onerror = function(message, file, line, col, err) { |
| 22 |
postMessage({type: "error", data: { |
| 23 |
message: message, |
| 24 |
data: err && err.data, |
| 25 |
file: file, |
| 26 |
line: line, |
| 27 |
col: col, |
| 28 |
stack: err && err.stack |
| 29 |
}}); |
| 30 |
}; |
| 31 |
|
| 32 |
window.normalizeModule = function(parentId, moduleName) { |
| 33 |
|
| 34 |
if (moduleName.indexOf("!") !== -1) { |
| 35 |
var chunks = moduleName.split("!"); |
| 36 |
return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]); |
| 37 |
} |
| 38 |
|
| 39 |
if (moduleName.charAt(0) == ".") { |
| 40 |
var base = parentId.split("/").slice(0, -1).join("/"); |
| 41 |
moduleName = (base ? base + "/" : "") + moduleName; |
| 42 |
|
| 43 |
while (moduleName.indexOf(".") !== -1 && previous != moduleName) { |
| 44 |
var previous = moduleName; |
| 45 |
moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, ""); |
| 46 |
} |
| 47 |
} |
| 48 |
|
| 49 |
return moduleName; |
| 50 |
}; |
| 51 |
|
| 52 |
window.require = function require(parentId, id) { |
| 53 |
if (!id) { |
| 54 |
id = parentId; |
| 55 |
parentId = null; |
| 56 |
} |
| 57 |
if (!id.charAt) |
| 58 |
throw new Error("worker.js require() accepts only (parentId, id) as arguments"); |
| 59 |
|
| 60 |
id = window.normalizeModule(parentId, id); |
| 61 |
|
| 62 |
var module = window.require.modules[id]; |
| 63 |
if (module) { |
| 64 |
if (!module.initialized) { |
| 65 |
module.initialized = true; |
| 66 |
module.exports = module.factory().exports; |
| 67 |
} |
| 68 |
return module.exports; |
| 69 |
} |
| 70 |
|
| 71 |
if (!window.require.tlns) |
| 72 |
return console.log("unable to load " + id); |
| 73 |
|
| 74 |
var path = resolveModuleId(id, window.require.tlns); |
| 75 |
if (path.slice(-3) != ".js") path += ".js"; |
| 76 |
|
| 77 |
window.require.id = id; |
| 78 |
window.require.modules[id] = {}; |
| 79 |
importScripts(path); |
| 80 |
return window.require(parentId, id); |
| 81 |
}; |
| 82 |
function resolveModuleId(id, paths) { |
| 83 |
var testPath = id, tail = ""; |
| 84 |
while (testPath) { |
| 85 |
var alias = paths[testPath]; |
| 86 |
if (typeof alias == "string") { |
| 87 |
return alias + tail; |
| 88 |
} else if (alias) { |
| 89 |
return alias.location.replace(/\/*$/, "/") + (tail || alias.main || alias.name); |
| 90 |
} else if (alias === false) { |
| 91 |
return ""; |
| 92 |
} |
| 93 |
var i = testPath.lastIndexOf("/"); |
| 94 |
if (i === -1) break; |
| 95 |
tail = testPath.substr(i) + tail; |
| 96 |
testPath = testPath.slice(0, i); |
| 97 |
} |
| 98 |
return id; |
| 99 |
} |
| 100 |
window.require.modules = {}; |
| 101 |
window.require.tlns = {}; |
| 102 |
|
| 103 |
window.define = function(id, deps, factory) { |
| 104 |
if (arguments.length == 2) { |
| 105 |
factory = deps; |
| 106 |
if (typeof id != "string") { |
| 107 |
deps = id; |
| 108 |
id = window.require.id; |
| 109 |
} |
| 110 |
} else if (arguments.length == 1) { |
| 111 |
factory = id; |
| 112 |
deps = []; |
| 113 |
id = window.require.id; |
| 114 |
} |
| 115 |
|
| 116 |
if (typeof factory != "function") { |
| 117 |
window.require.modules[id] = { |
| 118 |
exports: factory, |
| 119 |
initialized: true |
| 120 |
}; |
| 121 |
return; |
| 122 |
} |
| 123 |
|
| 124 |
if (!deps.length) |
| 125 |
|
| 126 |
|
| 127 |
deps = ["require", "exports", "module"]; |
| 128 |
|
| 129 |
var req = function(childId) { |
| 130 |
return window.require(id, childId); |
| 131 |
}; |
| 132 |
|
| 133 |
window.require.modules[id] = { |
| 134 |
exports: {}, |
| 135 |
factory: function() { |
| 136 |
var module = this; |
| 137 |
var returnExports = factory.apply(this, deps.slice(0, factory.length).map(function(dep) { |
| 138 |
switch (dep) { |
| 139 |
|
| 140 |
|
| 141 |
case "require": return req; |
| 142 |
case "exports": return module.exports; |
| 143 |
case "module": return module; |
| 144 |
|
| 145 |
|
| 146 |
default: return req(dep); |
| 147 |
} |
| 148 |
})); |
| 149 |
if (returnExports) |
| 150 |
module.exports = returnExports; |
| 151 |
return module; |
| 152 |
} |
| 153 |
}; |
| 154 |
}; |
| 155 |
window.define.amd = {}; |
| 156 |
window.require.tlns = {}; |
| 157 |
window.initBaseUrls = function initBaseUrls(topLevelNamespaces) { |
| 158 |
for (var i in topLevelNamespaces) |
| 159 |
this.require.tlns[i] = topLevelNamespaces[i]; |
| 160 |
}; |
| 161 |
|
| 162 |
window.initSender = function initSender() { |
| 163 |
|
| 164 |
var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter; |
| 165 |
var oop = window.require("ace/lib/oop"); |
| 166 |
|
| 167 |
var Sender = function() {}; |
| 168 |
|
| 169 |
(function() { |
| 170 |
|
| 171 |
oop.implement(this, EventEmitter); |
| 172 |
|
| 173 |
this.callback = function(data, callbackId) { |
| 174 |
postMessage({ |
| 175 |
type: "call", |
| 176 |
id: callbackId, |
| 177 |
data: data |
| 178 |
}); |
| 179 |
}; |
| 180 |
|
| 181 |
this.emit = function(name, data) { |
| 182 |
postMessage({ |
| 183 |
type: "event", |
| 184 |
name: name, |
| 185 |
data: data |
| 186 |
}); |
| 187 |
}; |
| 188 |
|
| 189 |
}).call(Sender.prototype); |
| 190 |
|
| 191 |
return new Sender(); |
| 192 |
}; |
| 193 |
|
| 194 |
var main = window.main = null; |
| 195 |
var sender = window.sender = null; |
| 196 |
|
| 197 |
window.onmessage = function(e) { |
| 198 |
var msg = e.data; |
| 199 |
if (msg.event && sender) { |
| 200 |
sender._signal(msg.event, msg.data); |
| 201 |
} |
| 202 |
else if (msg.command) { |
| 203 |
if (main[msg.command]) |
| 204 |
main[msg.command].apply(main, msg.args); |
| 205 |
else if (window[msg.command]) |
| 206 |
window[msg.command].apply(window, msg.args); |
| 207 |
else |
| 208 |
throw new Error("Unknown command:" + msg.command); |
| 209 |
} |
| 210 |
else if (msg.init) { |
| 211 |
window.initBaseUrls(msg.tlns); |
| 212 |
sender = window.sender = window.initSender(); |
| 213 |
var clazz = this.require(msg.module)[msg.classname]; |
| 214 |
main = window.main = new clazz(sender); |
| 215 |
} |
| 216 |
}; |
| 217 |
})(this); |
| 218 |
|
| 219 |
ace.define("ace/lib/oop",[], function(require, exports, module){"use strict"; |
| 220 |
exports.inherits = function (ctor, superCtor) { |
| 221 |
ctor.super_ = superCtor; |
| 222 |
ctor.prototype = Object.create(superCtor.prototype, { |
| 223 |
constructor: { |
| 224 |
value: ctor, |
| 225 |
enumerable: false, |
| 226 |
writable: true, |
| 227 |
configurable: true |
| 228 |
} |
| 229 |
}); |
| 230 |
}; |
| 231 |
exports.mixin = function (obj, mixin) { |
| 232 |
for (var key in mixin) { |
| 233 |
obj[key] = mixin[key]; |
| 234 |
} |
| 235 |
return obj; |
| 236 |
}; |
| 237 |
exports.implement = function (proto, mixin) { |
| 238 |
exports.mixin(proto, mixin); |
| 239 |
}; |
| 240 |
|
| 241 |
}); |
| 242 |
|
| 243 |
ace.define("ace/apply_delta",[], function(require, exports, module){"use strict"; |
| 244 |
function throwDeltaError(delta, errorText) { |
| 245 |
console.log("Invalid Delta:", delta); |
| 246 |
throw "Invalid Delta: " + errorText; |
| 247 |
} |
| 248 |
function positionInDocument(docLines, position) { |
| 249 |
return position.row >= 0 && position.row < docLines.length && |
| 250 |
position.column >= 0 && position.column <= docLines[position.row].length; |
| 251 |
} |
| 252 |
function validateDelta(docLines, delta) { |
| 253 |
if (delta.action != "insert" && delta.action != "remove") |
| 254 |
throwDeltaError(delta, "delta.action must be 'insert' or 'remove'"); |
| 255 |
if (!(delta.lines instanceof Array)) |
| 256 |
throwDeltaError(delta, "delta.lines must be an Array"); |
| 257 |
if (!delta.start || !delta.end) |
| 258 |
throwDeltaError(delta, "delta.start/end must be an present"); |
| 259 |
var start = delta.start; |
| 260 |
if (!positionInDocument(docLines, delta.start)) |
| 261 |
throwDeltaError(delta, "delta.start must be contained in document"); |
| 262 |
var end = delta.end; |
| 263 |
if (delta.action == "remove" && !positionInDocument(docLines, end)) |
| 264 |
throwDeltaError(delta, "delta.end must contained in document for 'remove' actions"); |
| 265 |
var numRangeRows = end.row - start.row; |
| 266 |
var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0)); |
| 267 |
if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars) |
| 268 |
throwDeltaError(delta, "delta.range must match delta lines"); |
| 269 |
} |
| 270 |
exports.applyDelta = function (docLines, delta, doNotValidate) { |
| 271 |
var row = delta.start.row; |
| 272 |
var startColumn = delta.start.column; |
| 273 |
var line = docLines[row] || ""; |
| 274 |
switch (delta.action) { |
| 275 |
case "insert": |
| 276 |
var lines = delta.lines; |
| 277 |
if (lines.length === 1) { |
| 278 |
docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn); |
| 279 |
} |
| 280 |
else { |
| 281 |
var args = [row, 1].concat(delta.lines); |
| 282 |
docLines.splice.apply(docLines, args); |
| 283 |
docLines[row] = line.substring(0, startColumn) + docLines[row]; |
| 284 |
docLines[row + delta.lines.length - 1] += line.substring(startColumn); |
| 285 |
} |
| 286 |
break; |
| 287 |
case "remove": |
| 288 |
var endColumn = delta.end.column; |
| 289 |
var endRow = delta.end.row; |
| 290 |
if (row === endRow) { |
| 291 |
docLines[row] = line.substring(0, startColumn) + line.substring(endColumn); |
| 292 |
} |
| 293 |
else { |
| 294 |
docLines.splice(row, endRow - row + 1, line.substring(0, startColumn) + docLines[endRow].substring(endColumn)); |
| 295 |
} |
| 296 |
break; |
| 297 |
} |
| 298 |
}; |
| 299 |
|
| 300 |
}); |
| 301 |
|
| 302 |
ace.define("ace/lib/event_emitter",[], function(require, exports, module){"use strict"; |
| 303 |
var EventEmitter = {}; |
| 304 |
var stopPropagation = function () { this.propagationStopped = true; }; |
| 305 |
var preventDefault = function () { this.defaultPrevented = true; }; |
| 306 |
EventEmitter._emit = |
| 307 |
EventEmitter._dispatchEvent = function (eventName, e) { |
| 308 |
this._eventRegistry || (this._eventRegistry = {}); |
| 309 |
this._defaultHandlers || (this._defaultHandlers = {}); |
| 310 |
var listeners = this._eventRegistry[eventName] || []; |
| 311 |
var defaultHandler = this._defaultHandlers[eventName]; |
| 312 |
if (!listeners.length && !defaultHandler) |
| 313 |
return; |
| 314 |
if (typeof e != "object" || !e) |
| 315 |
e = {}; |
| 316 |
if (!e.type) |
| 317 |
e.type = eventName; |
| 318 |
if (!e.stopPropagation) |
| 319 |
e.stopPropagation = stopPropagation; |
| 320 |
if (!e.preventDefault) |
| 321 |
e.preventDefault = preventDefault; |
| 322 |
listeners = listeners.slice(); |
| 323 |
for (var i = 0; i < listeners.length; i++) { |
| 324 |
listeners[i](e, this); |
| 325 |
if (e.propagationStopped) |
| 326 |
break; |
| 327 |
} |
| 328 |
if (defaultHandler && !e.defaultPrevented) |
| 329 |
return defaultHandler(e, this); |
| 330 |
}; |
| 331 |
EventEmitter._signal = function (eventName, e) { |
| 332 |
var listeners = (this._eventRegistry || {})[eventName]; |
| 333 |
if (!listeners) |
| 334 |
return; |
| 335 |
listeners = listeners.slice(); |
| 336 |
for (var i = 0; i < listeners.length; i++) |
| 337 |
listeners[i](e, this); |
| 338 |
}; |
| 339 |
EventEmitter.once = function (eventName, callback) { |
| 340 |
var _self = this; |
| 341 |
this.on(eventName, function newCallback() { |
| 342 |
_self.off(eventName, newCallback); |
| 343 |
callback.apply(null, arguments); |
| 344 |
}); |
| 345 |
if (!callback) { |
| 346 |
return new Promise(function (resolve) { |
| 347 |
callback = resolve; |
| 348 |
}); |
| 349 |
} |
| 350 |
}; |
| 351 |
EventEmitter.setDefaultHandler = function (eventName, callback) { |
| 352 |
var handlers = this._defaultHandlers; |
| 353 |
if (!handlers) |
| 354 |
handlers = this._defaultHandlers = { _disabled_: {} }; |
| 355 |
if (handlers[eventName]) { |
| 356 |
var old = handlers[eventName]; |
| 357 |
var disabled = handlers._disabled_[eventName]; |
| 358 |
if (!disabled) |
| 359 |
handlers._disabled_[eventName] = disabled = []; |
| 360 |
disabled.push(old); |
| 361 |
var i = disabled.indexOf(callback); |
| 362 |
if (i != -1) |
| 363 |
disabled.splice(i, 1); |
| 364 |
} |
| 365 |
handlers[eventName] = callback; |
| 366 |
}; |
| 367 |
EventEmitter.removeDefaultHandler = function (eventName, callback) { |
| 368 |
var handlers = this._defaultHandlers; |
| 369 |
if (!handlers) |
| 370 |
return; |
| 371 |
var disabled = handlers._disabled_[eventName]; |
| 372 |
if (handlers[eventName] == callback) { |
| 373 |
if (disabled) |
| 374 |
this.setDefaultHandler(eventName, disabled.pop()); |
| 375 |
} |
| 376 |
else if (disabled) { |
| 377 |
var i = disabled.indexOf(callback); |
| 378 |
if (i != -1) |
| 379 |
disabled.splice(i, 1); |
| 380 |
} |
| 381 |
}; |
| 382 |
EventEmitter.on = |
| 383 |
EventEmitter.addEventListener = function (eventName, callback, capturing) { |
| 384 |
this._eventRegistry = this._eventRegistry || {}; |
| 385 |
var listeners = this._eventRegistry[eventName]; |
| 386 |
if (!listeners) |
| 387 |
listeners = this._eventRegistry[eventName] = []; |
| 388 |
if (listeners.indexOf(callback) == -1) |
| 389 |
listeners[capturing ? "unshift" : "push"](callback); |
| 390 |
return callback; |
| 391 |
}; |
| 392 |
EventEmitter.off = |
| 393 |
EventEmitter.removeListener = |
| 394 |
EventEmitter.removeEventListener = function (eventName, callback) { |
| 395 |
this._eventRegistry = this._eventRegistry || {}; |
| 396 |
var listeners = this._eventRegistry[eventName]; |
| 397 |
if (!listeners) |
| 398 |
return; |
| 399 |
var index = listeners.indexOf(callback); |
| 400 |
if (index !== -1) |
| 401 |
listeners.splice(index, 1); |
| 402 |
}; |
| 403 |
EventEmitter.removeAllListeners = function (eventName) { |
| 404 |
if (!eventName) |
| 405 |
this._eventRegistry = this._defaultHandlers = undefined; |
| 406 |
if (this._eventRegistry) |
| 407 |
this._eventRegistry[eventName] = undefined; |
| 408 |
if (this._defaultHandlers) |
| 409 |
this._defaultHandlers[eventName] = undefined; |
| 410 |
}; |
| 411 |
exports.EventEmitter = EventEmitter; |
| 412 |
|
| 413 |
}); |
| 414 |
|
| 415 |
ace.define("ace/range",[], function(require, exports, module){"use strict"; |
| 416 |
var Range = (function () { |
| 417 |
function Range(startRow, startColumn, endRow, endColumn) { |
| 418 |
this.start = { |
| 419 |
row: startRow, |
| 420 |
column: startColumn |
| 421 |
}; |
| 422 |
this.end = { |
| 423 |
row: endRow, |
| 424 |
column: endColumn |
| 425 |
}; |
| 426 |
} |
| 427 |
Range.prototype.isEqual = function (range) { |
| 428 |
return this.start.row === range.start.row && |
| 429 |
this.end.row === range.end.row && |
| 430 |
this.start.column === range.start.column && |
| 431 |
this.end.column === range.end.column; |
| 432 |
}; |
| 433 |
Range.prototype.toString = function () { |
| 434 |
return ("Range: [" + this.start.row + "/" + this.start.column + |
| 435 |
"] -> [" + this.end.row + "/" + this.end.column + "]"); |
| 436 |
}; |
| 437 |
Range.prototype.contains = function (row, column) { |
| 438 |
return this.compare(row, column) == 0; |
| 439 |
}; |
| 440 |
Range.prototype.compareRange = function (range) { |
| 441 |
var cmp, end = range.end, start = range.start; |
| 442 |
cmp = this.compare(end.row, end.column); |
| 443 |
if (cmp == 1) { |
| 444 |
cmp = this.compare(start.row, start.column); |
| 445 |
if (cmp == 1) { |
| 446 |
return 2; |
| 447 |
} |
| 448 |
else if (cmp == 0) { |
| 449 |
return 1; |
| 450 |
} |
| 451 |
else { |
| 452 |
return 0; |
| 453 |
} |
| 454 |
} |
| 455 |
else if (cmp == -1) { |
| 456 |
return -2; |
| 457 |
} |
| 458 |
else { |
| 459 |
cmp = this.compare(start.row, start.column); |
| 460 |
if (cmp == -1) { |
| 461 |
return -1; |
| 462 |
} |
| 463 |
else if (cmp == 1) { |
| 464 |
return 42; |
| 465 |
} |
| 466 |
else { |
| 467 |
return 0; |
| 468 |
} |
| 469 |
} |
| 470 |
}; |
| 471 |
Range.prototype.comparePoint = function (p) { |
| 472 |
return this.compare(p.row, p.column); |
| 473 |
}; |
| 474 |
Range.prototype.containsRange = function (range) { |
| 475 |
return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; |
| 476 |
}; |
| 477 |
Range.prototype.intersects = function (range) { |
| 478 |
var cmp = this.compareRange(range); |
| 479 |
return (cmp == -1 || cmp == 0 || cmp == 1); |
| 480 |
}; |
| 481 |
Range.prototype.isEnd = function (row, column) { |
| 482 |
return this.end.row == row && this.end.column == column; |
| 483 |
}; |
| 484 |
Range.prototype.isStart = function (row, column) { |
| 485 |
return this.start.row == row && this.start.column == column; |
| 486 |
}; |
| 487 |
Range.prototype.setStart = function (row, column) { |
| 488 |
if (typeof row == "object") { |
| 489 |
this.start.column = row.column; |
| 490 |
this.start.row = row.row; |
| 491 |
} |
| 492 |
else { |
| 493 |
this.start.row = row; |
| 494 |
this.start.column = column; |
| 495 |
} |
| 496 |
}; |
| 497 |
Range.prototype.setEnd = function (row, column) { |
| 498 |
if (typeof row == "object") { |
| 499 |
this.end.column = row.column; |
| 500 |
this.end.row = row.row; |
| 501 |
} |
| 502 |
else { |
| 503 |
this.end.row = row; |
| 504 |
this.end.column = column; |
| 505 |
} |
| 506 |
}; |
| 507 |
Range.prototype.inside = function (row, column) { |
| 508 |
if (this.compare(row, column) == 0) { |
| 509 |
if (this.isEnd(row, column) || this.isStart(row, column)) { |
| 510 |
return false; |
| 511 |
} |
| 512 |
else { |
| 513 |
return true; |
| 514 |
} |
| 515 |
} |
| 516 |
return false; |
| 517 |
}; |
| 518 |
Range.prototype.insideStart = function (row, column) { |
| 519 |
if (this.compare(row, column) == 0) { |
| 520 |
if (this.isEnd(row, column)) { |
| 521 |
return false; |
| 522 |
} |
| 523 |
else { |
| 524 |
return true; |
| 525 |
} |
| 526 |
} |
| 527 |
return false; |
| 528 |
}; |
| 529 |
Range.prototype.insideEnd = function (row, column) { |
| 530 |
if (this.compare(row, column) == 0) { |
| 531 |
if (this.isStart(row, column)) { |
| 532 |
return false; |
| 533 |
} |
| 534 |
else { |
| 535 |
return true; |
| 536 |
} |
| 537 |
} |
| 538 |
return false; |
| 539 |
}; |
| 540 |
Range.prototype.compare = function (row, column) { |
| 541 |
if (!this.isMultiLine()) { |
| 542 |
if (row === this.start.row) { |
| 543 |
return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0); |
| 544 |
} |
| 545 |
} |
| 546 |
if (row < this.start.row) |
| 547 |
return -1; |
| 548 |
if (row > this.end.row) |
| 549 |
return 1; |
| 550 |
if (this.start.row === row) |
| 551 |
return column >= this.start.column ? 0 : -1; |
| 552 |
if (this.end.row === row) |
| 553 |
return column <= this.end.column ? 0 : 1; |
| 554 |
return 0; |
| 555 |
}; |
| 556 |
Range.prototype.compareStart = function (row, column) { |
| 557 |
if (this.start.row == row && this.start.column == column) { |
| 558 |
return -1; |
| 559 |
} |
| 560 |
else { |
| 561 |
return this.compare(row, column); |
| 562 |
} |
| 563 |
}; |
| 564 |
Range.prototype.compareEnd = function (row, column) { |
| 565 |
if (this.end.row == row && this.end.column == column) { |
| 566 |
return 1; |
| 567 |
} |
| 568 |
else { |
| 569 |
return this.compare(row, column); |
| 570 |
} |
| 571 |
}; |
| 572 |
Range.prototype.compareInside = function (row, column) { |
| 573 |
if (this.end.row == row && this.end.column == column) { |
| 574 |
return 1; |
| 575 |
} |
| 576 |
else if (this.start.row == row && this.start.column == column) { |
| 577 |
return -1; |
| 578 |
} |
| 579 |
else { |
| 580 |
return this.compare(row, column); |
| 581 |
} |
| 582 |
}; |
| 583 |
Range.prototype.clipRows = function (firstRow, lastRow) { |
| 584 |
if (this.end.row > lastRow) |
| 585 |
var end = { row: lastRow + 1, column: 0 }; |
| 586 |
else if (this.end.row < firstRow) |
| 587 |
var end = { row: firstRow, column: 0 }; |
| 588 |
if (this.start.row > lastRow) |
| 589 |
var start = { row: lastRow + 1, column: 0 }; |
| 590 |
else if (this.start.row < firstRow) |
| 591 |
var start = { row: firstRow, column: 0 }; |
| 592 |
return Range.fromPoints(start || this.start, end || this.end); |
| 593 |
}; |
| 594 |
Range.prototype.extend = function (row, column) { |
| 595 |
var cmp = this.compare(row, column); |
| 596 |
if (cmp == 0) |
| 597 |
return this; |
| 598 |
else if (cmp == -1) |
| 599 |
var start = { row: row, column: column }; |
| 600 |
else |
| 601 |
var end = { row: row, column: column }; |
| 602 |
return Range.fromPoints(start || this.start, end || this.end); |
| 603 |
}; |
| 604 |
Range.prototype.isEmpty = function () { |
| 605 |
return (this.start.row === this.end.row && this.start.column === this.end.column); |
| 606 |
}; |
| 607 |
Range.prototype.isMultiLine = function () { |
| 608 |
return (this.start.row !== this.end.row); |
| 609 |
}; |
| 610 |
Range.prototype.clone = function () { |
| 611 |
return Range.fromPoints(this.start, this.end); |
| 612 |
}; |
| 613 |
Range.prototype.collapseRows = function () { |
| 614 |
if (this.end.column == 0) |
| 615 |
return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row - 1), 0); |
| 616 |
else |
| 617 |
return new Range(this.start.row, 0, this.end.row, 0); |
| 618 |
}; |
| 619 |
Range.prototype.toScreenRange = function (session) { |
| 620 |
var screenPosStart = session.documentToScreenPosition(this.start); |
| 621 |
var screenPosEnd = session.documentToScreenPosition(this.end); |
| 622 |
return new Range(screenPosStart.row, screenPosStart.column, screenPosEnd.row, screenPosEnd.column); |
| 623 |
}; |
| 624 |
Range.prototype.moveBy = function (row, column) { |
| 625 |
this.start.row += row; |
| 626 |
this.start.column += column; |
| 627 |
this.end.row += row; |
| 628 |
this.end.column += column; |
| 629 |
}; |
| 630 |
return Range; |
| 631 |
}()); |
| 632 |
Range.fromPoints = function (start, end) { |
| 633 |
return new Range(start.row, start.column, end.row, end.column); |
| 634 |
}; |
| 635 |
Range.comparePoints = function (p1, p2) { |
| 636 |
return p1.row - p2.row || p1.column - p2.column; |
| 637 |
}; |
| 638 |
exports.Range = Range; |
| 639 |
|
| 640 |
}); |
| 641 |
|
| 642 |
ace.define("ace/anchor",[], function(require, exports, module){"use strict"; |
| 643 |
var oop = require("./lib/oop"); |
| 644 |
var EventEmitter = require("./lib/event_emitter").EventEmitter; |
| 645 |
var Anchor = (function () { |
| 646 |
function Anchor(doc, row, column) { |
| 647 |
this.$onChange = this.onChange.bind(this); |
| 648 |
this.attach(doc); |
| 649 |
if (typeof row != "number") |
| 650 |
this.setPosition(row.row, row.column); |
| 651 |
else |
| 652 |
this.setPosition(row, column); |
| 653 |
} |
| 654 |
Anchor.prototype.getPosition = function () { |
| 655 |
return this.$clipPositionToDocument(this.row, this.column); |
| 656 |
}; |
| 657 |
Anchor.prototype.getDocument = function () { |
| 658 |
return this.document; |
| 659 |
}; |
| 660 |
Anchor.prototype.onChange = function (delta) { |
| 661 |
if (delta.start.row == delta.end.row && delta.start.row != this.row) |
| 662 |
return; |
| 663 |
if (delta.start.row > this.row) |
| 664 |
return; |
| 665 |
var point = $getTransformedPoint(delta, { row: this.row, column: this.column }, this.$insertRight); |
| 666 |
this.setPosition(point.row, point.column, true); |
| 667 |
}; |
| 668 |
Anchor.prototype.setPosition = function (row, column, noClip) { |
| 669 |
var pos; |
| 670 |
if (noClip) { |
| 671 |
pos = { |
| 672 |
row: row, |
| 673 |
column: column |
| 674 |
}; |
| 675 |
} |
| 676 |
else { |
| 677 |
pos = this.$clipPositionToDocument(row, column); |
| 678 |
} |
| 679 |
if (this.row == pos.row && this.column == pos.column) |
| 680 |
return; |
| 681 |
var old = { |
| 682 |
row: this.row, |
| 683 |
column: this.column |
| 684 |
}; |
| 685 |
this.row = pos.row; |
| 686 |
this.column = pos.column; |
| 687 |
this._signal("change", { |
| 688 |
old: old, |
| 689 |
value: pos |
| 690 |
}); |
| 691 |
}; |
| 692 |
Anchor.prototype.detach = function () { |
| 693 |
this.document.off("change", this.$onChange); |
| 694 |
}; |
| 695 |
Anchor.prototype.attach = function (doc) { |
| 696 |
this.document = doc || this.document; |
| 697 |
this.document.on("change", this.$onChange); |
| 698 |
}; |
| 699 |
Anchor.prototype.$clipPositionToDocument = function (row, column) { |
| 700 |
var pos = {}; |
| 701 |
if (row >= this.document.getLength()) { |
| 702 |
pos.row = Math.max(0, this.document.getLength() - 1); |
| 703 |
pos.column = this.document.getLine(pos.row).length; |
| 704 |
} |
| 705 |
else if (row < 0) { |
| 706 |
pos.row = 0; |
| 707 |
pos.column = 0; |
| 708 |
} |
| 709 |
else { |
| 710 |
pos.row = row; |
| 711 |
pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column)); |
| 712 |
} |
| 713 |
if (column < 0) |
| 714 |
pos.column = 0; |
| 715 |
return pos; |
| 716 |
}; |
| 717 |
return Anchor; |
| 718 |
}()); |
| 719 |
Anchor.prototype.$insertRight = false; |
| 720 |
oop.implement(Anchor.prototype, EventEmitter); |
| 721 |
function $pointsInOrder(point1, point2, equalPointsInOrder) { |
| 722 |
var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column; |
| 723 |
return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter); |
| 724 |
} |
| 725 |
function $getTransformedPoint(delta, point, moveIfEqual) { |
| 726 |
var deltaIsInsert = delta.action == "insert"; |
| 727 |
var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row); |
| 728 |
var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column); |
| 729 |
var deltaStart = delta.start; |
| 730 |
var deltaEnd = deltaIsInsert ? deltaStart : delta.end; |
| 731 |
if ($pointsInOrder(point, deltaStart, moveIfEqual)) { |
| 732 |
return { |
| 733 |
row: point.row, |
| 734 |
column: point.column |
| 735 |
}; |
| 736 |
} |
| 737 |
if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) { |
| 738 |
return { |
| 739 |
row: point.row + deltaRowShift, |
| 740 |
column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0) |
| 741 |
}; |
| 742 |
} |
| 743 |
return { |
| 744 |
row: deltaStart.row, |
| 745 |
column: deltaStart.column |
| 746 |
}; |
| 747 |
} |
| 748 |
exports.Anchor = Anchor; |
| 749 |
|
| 750 |
}); |
| 751 |
|
| 752 |
ace.define("ace/document",[], function(require, exports, module){"use strict"; |
| 753 |
var oop = require("./lib/oop"); |
| 754 |
var applyDelta = require("./apply_delta").applyDelta; |
| 755 |
var EventEmitter = require("./lib/event_emitter").EventEmitter; |
| 756 |
var Range = require("./range").Range; |
| 757 |
var Anchor = require("./anchor").Anchor; |
| 758 |
var Document = (function () { |
| 759 |
function Document(textOrLines) { |
| 760 |
this.$lines = [""]; |
| 761 |
if (textOrLines.length === 0) { |
| 762 |
this.$lines = [""]; |
| 763 |
} |
| 764 |
else if (Array.isArray(textOrLines)) { |
| 765 |
this.insertMergedLines({ row: 0, column: 0 }, textOrLines); |
| 766 |
} |
| 767 |
else { |
| 768 |
this.insert({ row: 0, column: 0 }, textOrLines); |
| 769 |
} |
| 770 |
} |
| 771 |
Document.prototype.setValue = function (text) { |
| 772 |
var len = this.getLength() - 1; |
| 773 |
this.remove(new Range(0, 0, len, this.getLine(len).length)); |
| 774 |
this.insert({ row: 0, column: 0 }, text || ""); |
| 775 |
}; |
| 776 |
Document.prototype.getValue = function () { |
| 777 |
return this.getAllLines().join(this.getNewLineCharacter()); |
| 778 |
}; |
| 779 |
Document.prototype.createAnchor = function (row, column) { |
| 780 |
return new Anchor(this, row, column); |
| 781 |
}; |
| 782 |
Document.prototype.$detectNewLine = function (text) { |
| 783 |
var match = text.match(/^.*?(\r\n|\r|\n)/m); |
| 784 |
this.$autoNewLine = match ? match[1] : "\n"; |
| 785 |
this._signal("changeNewLineMode"); |
| 786 |
}; |
| 787 |
Document.prototype.getNewLineCharacter = function () { |
| 788 |
switch (this.$newLineMode) { |
| 789 |
case "windows": |
| 790 |
return "\r\n"; |
| 791 |
case "unix": |
| 792 |
return "\n"; |
| 793 |
default: |
| 794 |
return this.$autoNewLine || "\n"; |
| 795 |
} |
| 796 |
}; |
| 797 |
Document.prototype.setNewLineMode = function (newLineMode) { |
| 798 |
if (this.$newLineMode === newLineMode) |
| 799 |
return; |
| 800 |
this.$newLineMode = newLineMode; |
| 801 |
this._signal("changeNewLineMode"); |
| 802 |
}; |
| 803 |
Document.prototype.getNewLineMode = function () { |
| 804 |
return this.$newLineMode; |
| 805 |
}; |
| 806 |
Document.prototype.isNewLine = function (text) { |
| 807 |
return (text == "\r\n" || text == "\r" || text == "\n"); |
| 808 |
}; |
| 809 |
Document.prototype.getLine = function (row) { |
| 810 |
return this.$lines[row] || ""; |
| 811 |
}; |
| 812 |
Document.prototype.getLines = function (firstRow, lastRow) { |
| 813 |
return this.$lines.slice(firstRow, lastRow + 1); |
| 814 |
}; |
| 815 |
Document.prototype.getAllLines = function () { |
| 816 |
return this.getLines(0, this.getLength()); |
| 817 |
}; |
| 818 |
Document.prototype.getLength = function () { |
| 819 |
return this.$lines.length; |
| 820 |
}; |
| 821 |
Document.prototype.getTextRange = function (range) { |
| 822 |
return this.getLinesForRange(range).join(this.getNewLineCharacter()); |
| 823 |
}; |
| 824 |
Document.prototype.getLinesForRange = function (range) { |
| 825 |
var lines; |
| 826 |
if (range.start.row === range.end.row) { |
| 827 |
lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)]; |
| 828 |
} |
| 829 |
else { |
| 830 |
lines = this.getLines(range.start.row, range.end.row); |
| 831 |
lines[0] = (lines[0] || "").substring(range.start.column); |
| 832 |
var l = lines.length - 1; |
| 833 |
if (range.end.row - range.start.row == l) |
| 834 |
lines[l] = lines[l].substring(0, range.end.column); |
| 835 |
} |
| 836 |
return lines; |
| 837 |
}; |
| 838 |
Document.prototype.insertLines = function (row, lines) { |
| 839 |
console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."); |
| 840 |
return this.insertFullLines(row, lines); |
| 841 |
}; |
| 842 |
Document.prototype.removeLines = function (firstRow, lastRow) { |
| 843 |
console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."); |
| 844 |
return this.removeFullLines(firstRow, lastRow); |
| 845 |
}; |
| 846 |
Document.prototype.insertNewLine = function (position) { |
| 847 |
console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."); |
| 848 |
return this.insertMergedLines(position, ["", ""]); |
| 849 |
}; |
| 850 |
Document.prototype.insert = function (position, text) { |
| 851 |
if (this.getLength() <= 1) |
| 852 |
this.$detectNewLine(text); |
| 853 |
return this.insertMergedLines(position, this.$split(text)); |
| 854 |
}; |
| 855 |
Document.prototype.insertInLine = function (position, text) { |
| 856 |
var start = this.clippedPos(position.row, position.column); |
| 857 |
var end = this.pos(position.row, position.column + text.length); |
| 858 |
this.applyDelta({ |
| 859 |
start: start, |
| 860 |
end: end, |
| 861 |
action: "insert", |
| 862 |
lines: [text] |
| 863 |
}, true); |
| 864 |
return this.clonePos(end); |
| 865 |
}; |
| 866 |
Document.prototype.clippedPos = function (row, column) { |
| 867 |
var length = this.getLength(); |
| 868 |
if (row === undefined) { |
| 869 |
row = length; |
| 870 |
} |
| 871 |
else if (row < 0) { |
| 872 |
row = 0; |
| 873 |
} |
| 874 |
else if (row >= length) { |
| 875 |
row = length - 1; |
| 876 |
column = undefined; |
| 877 |
} |
| 878 |
var line = this.getLine(row); |
| 879 |
if (column == undefined) |
| 880 |
column = line.length; |
| 881 |
column = Math.min(Math.max(column, 0), line.length); |
| 882 |
return { row: row, column: column }; |
| 883 |
}; |
| 884 |
Document.prototype.clonePos = function (pos) { |
| 885 |
return { row: pos.row, column: pos.column }; |
| 886 |
}; |
| 887 |
Document.prototype.pos = function (row, column) { |
| 888 |
return { row: row, column: column }; |
| 889 |
}; |
| 890 |
Document.prototype.$clipPosition = function (position) { |
| 891 |
var length = this.getLength(); |
| 892 |
if (position.row >= length) { |
| 893 |
position.row = Math.max(0, length - 1); |
| 894 |
position.column = this.getLine(length - 1).length; |
| 895 |
} |
| 896 |
else { |
| 897 |
position.row = Math.max(0, position.row); |
| 898 |
position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length); |
| 899 |
} |
| 900 |
return position; |
| 901 |
}; |
| 902 |
Document.prototype.insertFullLines = function (row, lines) { |
| 903 |
row = Math.min(Math.max(row, 0), this.getLength()); |
| 904 |
var column = 0; |
| 905 |
if (row < this.getLength()) { |
| 906 |
lines = lines.concat([""]); |
| 907 |
column = 0; |
| 908 |
} |
| 909 |
else { |
| 910 |
lines = [""].concat(lines); |
| 911 |
row--; |
| 912 |
column = this.$lines[row].length; |
| 913 |
} |
| 914 |
this.insertMergedLines({ row: row, column: column }, lines); |
| 915 |
}; |
| 916 |
Document.prototype.insertMergedLines = function (position, lines) { |
| 917 |
var start = this.clippedPos(position.row, position.column); |
| 918 |
var end = { |
| 919 |
row: start.row + lines.length - 1, |
| 920 |
column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length |
| 921 |
}; |
| 922 |
this.applyDelta({ |
| 923 |
start: start, |
| 924 |
end: end, |
| 925 |
action: "insert", |
| 926 |
lines: lines |
| 927 |
}); |
| 928 |
return this.clonePos(end); |
| 929 |
}; |
| 930 |
Document.prototype.remove = function (range) { |
| 931 |
var start = this.clippedPos(range.start.row, range.start.column); |
| 932 |
var end = this.clippedPos(range.end.row, range.end.column); |
| 933 |
this.applyDelta({ |
| 934 |
start: start, |
| 935 |
end: end, |
| 936 |
action: "remove", |
| 937 |
lines: this.getLinesForRange({ start: start, end: end }) |
| 938 |
}); |
| 939 |
return this.clonePos(start); |
| 940 |
}; |
| 941 |
Document.prototype.removeInLine = function (row, startColumn, endColumn) { |
| 942 |
var start = this.clippedPos(row, startColumn); |
| 943 |
var end = this.clippedPos(row, endColumn); |
| 944 |
this.applyDelta({ |
| 945 |
start: start, |
| 946 |
end: end, |
| 947 |
action: "remove", |
| 948 |
lines: this.getLinesForRange({ start: start, end: end }) |
| 949 |
}, true); |
| 950 |
return this.clonePos(start); |
| 951 |
}; |
| 952 |
Document.prototype.removeFullLines = function (firstRow, lastRow) { |
| 953 |
firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1); |
| 954 |
lastRow = Math.min(Math.max(0, lastRow), this.getLength() - 1); |
| 955 |
var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0; |
| 956 |
var deleteLastNewLine = lastRow < this.getLength() - 1; |
| 957 |
var startRow = (deleteFirstNewLine ? firstRow - 1 : firstRow); |
| 958 |
var startCol = (deleteFirstNewLine ? this.getLine(startRow).length : 0); |
| 959 |
var endRow = (deleteLastNewLine ? lastRow + 1 : lastRow); |
| 960 |
var endCol = (deleteLastNewLine ? 0 : this.getLine(endRow).length); |
| 961 |
var range = new Range(startRow, startCol, endRow, endCol); |
| 962 |
var deletedLines = this.$lines.slice(firstRow, lastRow + 1); |
| 963 |
this.applyDelta({ |
| 964 |
start: range.start, |
| 965 |
end: range.end, |
| 966 |
action: "remove", |
| 967 |
lines: this.getLinesForRange(range) |
| 968 |
}); |
| 969 |
return deletedLines; |
| 970 |
}; |
| 971 |
Document.prototype.removeNewLine = function (row) { |
| 972 |
if (row < this.getLength() - 1 && row >= 0) { |
| 973 |
this.applyDelta({ |
| 974 |
start: this.pos(row, this.getLine(row).length), |
| 975 |
end: this.pos(row + 1, 0), |
| 976 |
action: "remove", |
| 977 |
lines: ["", ""] |
| 978 |
}); |
| 979 |
} |
| 980 |
}; |
| 981 |
Document.prototype.replace = function (range, text) { |
| 982 |
if (!(range instanceof Range)) |
| 983 |
range = Range.fromPoints(range.start, range.end); |
| 984 |
if (text.length === 0 && range.isEmpty()) |
| 985 |
return range.start; |
| 986 |
if (text == this.getTextRange(range)) |
| 987 |
return range.end; |
| 988 |
this.remove(range); |
| 989 |
var end; |
| 990 |
if (text) { |
| 991 |
end = this.insert(range.start, text); |
| 992 |
} |
| 993 |
else { |
| 994 |
end = range.start; |
| 995 |
} |
| 996 |
return end; |
| 997 |
}; |
| 998 |
Document.prototype.applyDeltas = function (deltas) { |
| 999 |
for (var i = 0; i < deltas.length; i++) { |
| 1000 |
this.applyDelta(deltas[i]); |
| 1001 |
} |
| 1002 |
}; |
| 1003 |
Document.prototype.revertDeltas = function (deltas) { |
| 1004 |
for (var i = deltas.length - 1; i >= 0; i--) { |
| 1005 |
this.revertDelta(deltas[i]); |
| 1006 |
} |
| 1007 |
}; |
| 1008 |
Document.prototype.applyDelta = function (delta, doNotValidate) { |
| 1009 |
var isInsert = delta.action == "insert"; |
| 1010 |
if (isInsert ? delta.lines.length <= 1 && !delta.lines[0] |
| 1011 |
: !Range.comparePoints(delta.start, delta.end)) { |
| 1012 |
return; |
| 1013 |
} |
| 1014 |
if (isInsert && delta.lines.length > 20000) { |
| 1015 |
this.$splitAndapplyLargeDelta(delta, 20000); |
| 1016 |
} |
| 1017 |
else { |
| 1018 |
applyDelta(this.$lines, delta, doNotValidate); |
| 1019 |
this._signal("change", delta); |
| 1020 |
} |
| 1021 |
}; |
| 1022 |
Document.prototype.$safeApplyDelta = function (delta) { |
| 1023 |
var docLength = this.$lines.length; |
| 1024 |
if (delta.action == "remove" && delta.start.row < docLength && delta.end.row < docLength |
| 1025 |
|| delta.action == "insert" && delta.start.row <= docLength) { |
| 1026 |
this.applyDelta(delta); |
| 1027 |
} |
| 1028 |
}; |
| 1029 |
Document.prototype.$splitAndapplyLargeDelta = function (delta, MAX) { |
| 1030 |
var lines = delta.lines; |
| 1031 |
var l = lines.length - MAX + 1; |
| 1032 |
var row = delta.start.row; |
| 1033 |
var column = delta.start.column; |
| 1034 |
for (var from = 0, to = 0; from < l; from = to) { |
| 1035 |
to += MAX - 1; |
| 1036 |
var chunk = lines.slice(from, to); |
| 1037 |
chunk.push(""); |
| 1038 |
this.applyDelta({ |
| 1039 |
start: this.pos(row + from, column), |
| 1040 |
end: this.pos(row + to, column = 0), |
| 1041 |
action: delta.action, |
| 1042 |
lines: chunk |
| 1043 |
}, true); |
| 1044 |
} |
| 1045 |
delta.lines = lines.slice(from); |
| 1046 |
delta.start.row = row + from; |
| 1047 |
delta.start.column = column; |
| 1048 |
this.applyDelta(delta, true); |
| 1049 |
}; |
| 1050 |
Document.prototype.revertDelta = function (delta) { |
| 1051 |
this.$safeApplyDelta({ |
| 1052 |
start: this.clonePos(delta.start), |
| 1053 |
end: this.clonePos(delta.end), |
| 1054 |
action: (delta.action == "insert" ? "remove" : "insert"), |
| 1055 |
lines: delta.lines.slice() |
| 1056 |
}); |
| 1057 |
}; |
| 1058 |
Document.prototype.indexToPosition = function (index, startRow) { |
| 1059 |
var lines = this.$lines || this.getAllLines(); |
| 1060 |
var newlineLength = this.getNewLineCharacter().length; |
| 1061 |
for (var i = startRow || 0, l = lines.length; i < l; i++) { |
| 1062 |
index -= lines[i].length + newlineLength; |
| 1063 |
if (index < 0) |
| 1064 |
return { row: i, column: index + lines[i].length + newlineLength }; |
| 1065 |
} |
| 1066 |
return { row: l - 1, column: index + lines[l - 1].length + newlineLength }; |
| 1067 |
}; |
| 1068 |
Document.prototype.positionToIndex = function (pos, startRow) { |
| 1069 |
var lines = this.$lines || this.getAllLines(); |
| 1070 |
var newlineLength = this.getNewLineCharacter().length; |
| 1071 |
var index = 0; |
| 1072 |
var row = Math.min(pos.row, lines.length); |
| 1073 |
for (var i = startRow || 0; i < row; ++i) |
| 1074 |
index += lines[i].length + newlineLength; |
| 1075 |
return index + pos.column; |
| 1076 |
}; |
| 1077 |
Document.prototype.$split = function (text) { |
| 1078 |
return text.split(/\r\n|\r|\n/); |
| 1079 |
}; |
| 1080 |
return Document; |
| 1081 |
}()); |
| 1082 |
Document.prototype.$autoNewLine = ""; |
| 1083 |
Document.prototype.$newLineMode = "auto"; |
| 1084 |
oop.implement(Document.prototype, EventEmitter); |
| 1085 |
exports.Document = Document; |
| 1086 |
|
| 1087 |
}); |
| 1088 |
|
| 1089 |
ace.define("ace/lib/deep_copy",[], function(require, exports, module){exports.deepCopy = function deepCopy(obj) { |
| 1090 |
if (typeof obj !== "object" || !obj) |
| 1091 |
return obj; |
| 1092 |
var copy; |
| 1093 |
if (Array.isArray(obj)) { |
| 1094 |
copy = []; |
| 1095 |
for (var key = 0; key < obj.length; key++) { |
| 1096 |
copy[key] = deepCopy(obj[key]); |
| 1097 |
} |
| 1098 |
return copy; |
| 1099 |
} |
| 1100 |
if (Object.prototype.toString.call(obj) !== "[object Object]") |
| 1101 |
return obj; |
| 1102 |
copy = {}; |
| 1103 |
for (var key in obj) |
| 1104 |
copy[key] = deepCopy(obj[key]); |
| 1105 |
return copy; |
| 1106 |
}; |
| 1107 |
|
| 1108 |
}); |
| 1109 |
|
| 1110 |
ace.define("ace/lib/lang",[], function(require, exports, module){"use strict"; |
| 1111 |
exports.last = function (a) { |
| 1112 |
return a[a.length - 1]; |
| 1113 |
}; |
| 1114 |
exports.stringReverse = function (string) { |
| 1115 |
return string.split("").reverse().join(""); |
| 1116 |
}; |
| 1117 |
exports.stringRepeat = function (string, count) { |
| 1118 |
var result = ''; |
| 1119 |
while (count > 0) { |
| 1120 |
if (count & 1) |
| 1121 |
result += string; |
| 1122 |
if (count >>= 1) |
| 1123 |
string += string; |
| 1124 |
} |
| 1125 |
return result; |
| 1126 |
}; |
| 1127 |
var trimBeginRegexp = /^\s\s*/; |
| 1128 |
var trimEndRegexp = /\s\s*$/; |
| 1129 |
exports.stringTrimLeft = function (string) { |
| 1130 |
return string.replace(trimBeginRegexp, ''); |
| 1131 |
}; |
| 1132 |
exports.stringTrimRight = function (string) { |
| 1133 |
return string.replace(trimEndRegexp, ''); |
| 1134 |
}; |
| 1135 |
exports.copyObject = function (obj) { |
| 1136 |
var copy = {}; |
| 1137 |
for (var key in obj) { |
| 1138 |
copy[key] = obj[key]; |
| 1139 |
} |
| 1140 |
return copy; |
| 1141 |
}; |
| 1142 |
exports.copyArray = function (array) { |
| 1143 |
var copy = []; |
| 1144 |
for (var i = 0, l = array.length; i < l; i++) { |
| 1145 |
if (array[i] && typeof array[i] == "object") |
| 1146 |
copy[i] = this.copyObject(array[i]); |
| 1147 |
else |
| 1148 |
copy[i] = array[i]; |
| 1149 |
} |
| 1150 |
return copy; |
| 1151 |
}; |
| 1152 |
exports.deepCopy = require("./deep_copy").deepCopy; |
| 1153 |
exports.arrayToMap = function (arr) { |
| 1154 |
var map = {}; |
| 1155 |
for (var i = 0; i < arr.length; i++) { |
| 1156 |
map[arr[i]] = 1; |
| 1157 |
} |
| 1158 |
return map; |
| 1159 |
}; |
| 1160 |
exports.createMap = function (props) { |
| 1161 |
var map = Object.create(null); |
| 1162 |
for (var i in props) { |
| 1163 |
map[i] = props[i]; |
| 1164 |
} |
| 1165 |
return map; |
| 1166 |
}; |
| 1167 |
exports.arrayRemove = function (array, value) { |
| 1168 |
for (var i = 0; i <= array.length; i++) { |
| 1169 |
if (value === array[i]) { |
| 1170 |
array.splice(i, 1); |
| 1171 |
} |
| 1172 |
} |
| 1173 |
}; |
| 1174 |
exports.escapeRegExp = function (str) { |
| 1175 |
return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1'); |
| 1176 |
}; |
| 1177 |
exports.escapeHTML = function (str) { |
| 1178 |
return ("" + str).replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<"); |
| 1179 |
}; |
| 1180 |
exports.getMatchOffsets = function (string, regExp) { |
| 1181 |
var matches = []; |
| 1182 |
string.replace(regExp, function (str) { |
| 1183 |
matches.push({ |
| 1184 |
offset: arguments[arguments.length - 2], |
| 1185 |
length: str.length |
| 1186 |
}); |
| 1187 |
}); |
| 1188 |
return matches; |
| 1189 |
}; |
| 1190 |
exports.deferredCall = function (fcn) { |
| 1191 |
var timer = null; |
| 1192 |
var callback = function () { |
| 1193 |
timer = null; |
| 1194 |
fcn(); |
| 1195 |
}; |
| 1196 |
var deferred = function (timeout) { |
| 1197 |
deferred.cancel(); |
| 1198 |
timer = setTimeout(callback, timeout || 0); |
| 1199 |
return deferred; |
| 1200 |
}; |
| 1201 |
deferred.schedule = deferred; |
| 1202 |
deferred.call = function () { |
| 1203 |
this.cancel(); |
| 1204 |
fcn(); |
| 1205 |
return deferred; |
| 1206 |
}; |
| 1207 |
deferred.cancel = function () { |
| 1208 |
clearTimeout(timer); |
| 1209 |
timer = null; |
| 1210 |
return deferred; |
| 1211 |
}; |
| 1212 |
deferred.isPending = function () { |
| 1213 |
return timer; |
| 1214 |
}; |
| 1215 |
return deferred; |
| 1216 |
}; |
| 1217 |
exports.delayedCall = function (fcn, defaultTimeout) { |
| 1218 |
var timer = null; |
| 1219 |
var callback = function () { |
| 1220 |
timer = null; |
| 1221 |
fcn(); |
| 1222 |
}; |
| 1223 |
var _self = function (timeout) { |
| 1224 |
if (timer == null) |
| 1225 |
timer = setTimeout(callback, timeout || defaultTimeout); |
| 1226 |
}; |
| 1227 |
_self.delay = function (timeout) { |
| 1228 |
timer && clearTimeout(timer); |
| 1229 |
timer = setTimeout(callback, timeout || defaultTimeout); |
| 1230 |
}; |
| 1231 |
_self.schedule = _self; |
| 1232 |
_self.call = function () { |
| 1233 |
this.cancel(); |
| 1234 |
fcn(); |
| 1235 |
}; |
| 1236 |
_self.cancel = function () { |
| 1237 |
timer && clearTimeout(timer); |
| 1238 |
timer = null; |
| 1239 |
}; |
| 1240 |
_self.isPending = function () { |
| 1241 |
return timer; |
| 1242 |
}; |
| 1243 |
return _self; |
| 1244 |
}; |
| 1245 |
exports.supportsLookbehind = function () { |
| 1246 |
try { |
| 1247 |
new RegExp('(?<=.)'); |
| 1248 |
} |
| 1249 |
catch (e) { |
| 1250 |
return false; |
| 1251 |
} |
| 1252 |
return true; |
| 1253 |
}; |
| 1254 |
exports.skipEmptyMatch = function (line, last, supportsUnicodeFlag) { |
| 1255 |
return supportsUnicodeFlag && line.codePointAt(last) > 0xffff ? 2 : 1; |
| 1256 |
}; |
| 1257 |
|
| 1258 |
}); |
| 1259 |
|
| 1260 |
ace.define("ace/worker/mirror",[], function(require, exports, module) { |
| 1261 |
"use strict"; |
| 1262 |
|
| 1263 |
var Document = require("../document").Document; |
| 1264 |
var lang = require("../lib/lang"); |
| 1265 |
|
| 1266 |
var Mirror = exports.Mirror = function(sender) { |
| 1267 |
this.sender = sender; |
| 1268 |
var doc = this.doc = new Document(""); |
| 1269 |
|
| 1270 |
var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this)); |
| 1271 |
|
| 1272 |
var _self = this; |
| 1273 |
sender.on("change", function(e) { |
| 1274 |
var data = e.data; |
| 1275 |
if (data[0].start) { |
| 1276 |
doc.applyDeltas(data); |
| 1277 |
} else { |
| 1278 |
for (var i = 0; i < data.length; i += 2) { |
| 1279 |
var d, err; |
| 1280 |
if (Array.isArray(data[i+1])) { |
| 1281 |
d = {action: "insert", start: data[i], lines: data[i+1]}; |
| 1282 |
} else { |
| 1283 |
d = {action: "remove", start: data[i], end: data[i+1]}; |
| 1284 |
} |
| 1285 |
|
| 1286 |
if ((d.action == "insert" ? d.start : d.end).row >= doc.$lines.length) { |
| 1287 |
err = new Error("Invalid delta"); |
| 1288 |
err.data = { |
| 1289 |
path: _self.$path, |
| 1290 |
linesLength: doc.$lines.length, |
| 1291 |
start: d.start, |
| 1292 |
end: d.end |
| 1293 |
}; |
| 1294 |
throw err; |
| 1295 |
} |
| 1296 |
|
| 1297 |
doc.applyDelta(d, true); |
| 1298 |
} |
| 1299 |
} |
| 1300 |
if (_self.$timeout) |
| 1301 |
return deferredUpdate.schedule(_self.$timeout); |
| 1302 |
_self.onUpdate(); |
| 1303 |
}); |
| 1304 |
}; |
| 1305 |
|
| 1306 |
(function() { |
| 1307 |
|
| 1308 |
this.$timeout = 500; |
| 1309 |
|
| 1310 |
this.setTimeout = function(timeout) { |
| 1311 |
this.$timeout = timeout; |
| 1312 |
}; |
| 1313 |
|
| 1314 |
this.setValue = function(value) { |
| 1315 |
this.doc.setValue(value); |
| 1316 |
this.deferredUpdate.schedule(this.$timeout); |
| 1317 |
}; |
| 1318 |
|
| 1319 |
this.getValue = function(callbackId) { |
| 1320 |
this.sender.callback(this.doc.getValue(), callbackId); |
| 1321 |
}; |
| 1322 |
|
| 1323 |
this.onUpdate = function() { |
| 1324 |
}; |
| 1325 |
|
| 1326 |
this.isPending = function() { |
| 1327 |
return this.deferredUpdate.isPending(); |
| 1328 |
}; |
| 1329 |
|
| 1330 |
}).call(Mirror.prototype); |
| 1331 |
|
| 1332 |
}); |
| 1333 |
|
| 1334 |
ace.define("ace/mode/php/php",[], function (require, exports, module) { |
| 1335 |
|
| 1336 |
var PHP = {Constants: {}}; |
| 1337 |
|
| 1338 |
PHP.Constants.T_THROW = 317 |
| 1339 |
PHP.Constants.T_INCLUDE = 272 |
| 1340 |
PHP.Constants.T_INCLUDE_ONCE = 273 |
| 1341 |
PHP.Constants.T_EVAL = 274 |
| 1342 |
PHP.Constants.T_REQUIRE = 275 |
| 1343 |
PHP.Constants.T_REQUIRE_ONCE = 276 |
| 1344 |
PHP.Constants.T_LOGICAL_OR = 277 |
| 1345 |
PHP.Constants.T_LOGICAL_XOR = 278 |
| 1346 |
PHP.Constants.T_LOGICAL_AND = 279 |
| 1347 |
PHP.Constants.T_PRINT = 280 |
| 1348 |
PHP.Constants.T_YIELD = 281 |
| 1349 |
PHP.Constants.T_DOUBLE_ARROW = 386 |
| 1350 |
PHP.Constants.T_YIELD_FROM = 282 |
| 1351 |
PHP.Constants.T_PLUS_EQUAL = 352 |
| 1352 |
PHP.Constants.T_MINUS_EQUAL = 353 |
| 1353 |
PHP.Constants.T_MUL_EQUAL = 354 |
| 1354 |
PHP.Constants.T_DIV_EQUAL = 355 |
| 1355 |
PHP.Constants.T_CONCAT_EQUAL = 356 |
| 1356 |
PHP.Constants.T_MOD_EQUAL = 357 |
| 1357 |
PHP.Constants.T_AND_EQUAL = 358 |
| 1358 |
PHP.Constants.T_OR_EQUAL = 359 |
| 1359 |
PHP.Constants.T_XOR_EQUAL = 360 |
| 1360 |
PHP.Constants.T_SL_EQUAL = 361 |
| 1361 |
PHP.Constants.T_SR_EQUAL = 362 |
| 1362 |
PHP.Constants.T_POW_EQUAL = 402 |
| 1363 |
PHP.Constants.T_COALESCE_EQUAL = 363 |
| 1364 |
PHP.Constants.T_COALESCE = 400 |
| 1365 |
PHP.Constants.T_BOOLEAN_OR = 364 |
| 1366 |
PHP.Constants.T_BOOLEAN_AND = 365 |
| 1367 |
PHP.Constants.T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG = 404 |
| 1368 |
PHP.Constants.T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG = 403 |
| 1369 |
PHP.Constants.T_IS_EQUAL = 366 |
| 1370 |
PHP.Constants.T_IS_NOT_EQUAL = 367 |
| 1371 |
PHP.Constants.T_IS_IDENTICAL = 368 |
| 1372 |
PHP.Constants.T_IS_NOT_IDENTICAL = 369 |
| 1373 |
PHP.Constants.T_SPACESHIP = 372 |
| 1374 |
PHP.Constants.T_IS_SMALLER_OR_EQUAL = 370 |
| 1375 |
PHP.Constants.T_IS_GREATER_OR_EQUAL = 371 |
| 1376 |
PHP.Constants.T_SL = 373 |
| 1377 |
PHP.Constants.T_SR = 374 |
| 1378 |
PHP.Constants.T_INSTANCEOF = 283 |
| 1379 |
PHP.Constants.T_INC = 375 |
| 1380 |
PHP.Constants.T_DEC = 376 |
| 1381 |
PHP.Constants.T_INT_CAST = 377 |
| 1382 |
PHP.Constants.T_DOUBLE_CAST = 378 |
| 1383 |
PHP.Constants.T_STRING_CAST = 379 |
| 1384 |
PHP.Constants.T_ARRAY_CAST = 380 |
| 1385 |
PHP.Constants.T_OBJECT_CAST = 381 |
| 1386 |
PHP.Constants.T_BOOL_CAST = 382 |
| 1387 |
PHP.Constants.T_UNSET_CAST = 383 |
| 1388 |
PHP.Constants.T_POW = 401 |
| 1389 |
PHP.Constants.T_NEW = 284 |
| 1390 |
PHP.Constants.T_CLONE = 285 |
| 1391 |
PHP.Constants.T_EXIT = 286 |
| 1392 |
PHP.Constants.T_IF = 287 |
| 1393 |
PHP.Constants.T_ELSEIF = 288 |
| 1394 |
PHP.Constants.T_ELSE = 289 |
| 1395 |
PHP.Constants.T_ENDIF = 290 |
| 1396 |
PHP.Constants.T_LNUMBER = 260 |
| 1397 |
PHP.Constants.T_DNUMBER = 261 |
| 1398 |
PHP.Constants.T_STRING = 262 |
| 1399 |
PHP.Constants.T_STRING_VARNAME = 270 |
| 1400 |
PHP.Constants.T_VARIABLE = 266 |
| 1401 |
PHP.Constants.T_NUM_STRING = 271 |
| 1402 |
PHP.Constants.T_INLINE_HTML = 267 |
| 1403 |
PHP.Constants.T_ENCAPSED_AND_WHITESPACE = 268 |
| 1404 |
PHP.Constants.T_CONSTANT_ENCAPSED_STRING = 269 |
| 1405 |
PHP.Constants.T_ECHO = 291 |
| 1406 |
PHP.Constants.T_DO = 292 |
| 1407 |
PHP.Constants.T_WHILE = 293 |
| 1408 |
PHP.Constants.T_ENDWHILE = 294 |
| 1409 |
PHP.Constants.T_FOR = 295 |
| 1410 |
PHP.Constants.T_ENDFOR = 296 |
| 1411 |
PHP.Constants.T_FOREACH = 297 |
| 1412 |
PHP.Constants.T_ENDFOREACH = 298 |
| 1413 |
PHP.Constants.T_DECLARE = 299 |
| 1414 |
PHP.Constants.T_ENDDECLARE = 300 |
| 1415 |
PHP.Constants.T_AS = 301 |
| 1416 |
PHP.Constants.T_SWITCH = 302 |
| 1417 |
PHP.Constants.T_MATCH = 306 |
| 1418 |
PHP.Constants.T_ENDSWITCH = 303 |
| 1419 |
PHP.Constants.T_CASE = 304 |
| 1420 |
PHP.Constants.T_DEFAULT = 305 |
| 1421 |
PHP.Constants.T_BREAK = 307 |
| 1422 |
PHP.Constants.T_CONTINUE = 308 |
| 1423 |
PHP.Constants.T_GOTO = 309 |
| 1424 |
PHP.Constants.T_FUNCTION = 310 |
| 1425 |
PHP.Constants.T_FN = 311 |
| 1426 |
PHP.Constants.T_CONST = 312 |
| 1427 |
PHP.Constants.T_RETURN = 313 |
| 1428 |
PHP.Constants.T_TRY = 314 |
| 1429 |
PHP.Constants.T_CATCH = 315 |
| 1430 |
PHP.Constants.T_FINALLY = 316 |
| 1431 |
PHP.Constants.T_THROW = 317 |
| 1432 |
PHP.Constants.T_USE = 318 |
| 1433 |
PHP.Constants.T_INSTEADOF = 319 |
| 1434 |
PHP.Constants.T_GLOBAL = 320 |
| 1435 |
PHP.Constants.T_STATIC = 321 |
| 1436 |
PHP.Constants.T_ABSTRACT = 322 |
| 1437 |
PHP.Constants.T_FINAL = 323 |
| 1438 |
PHP.Constants.T_PRIVATE = 324 |
| 1439 |
PHP.Constants.T_PROTECTED = 325 |
| 1440 |
PHP.Constants.T_PUBLIC = 326 |
| 1441 |
PHP.Constants.T_READONLY = 327 |
| 1442 |
PHP.Constants.T_VAR = 328 |
| 1443 |
PHP.Constants.T_UNSET = 329 |
| 1444 |
PHP.Constants.T_ISSET = 330 |
| 1445 |
PHP.Constants.T_EMPTY = 331 |
| 1446 |
PHP.Constants.T_HALT_COMPILER = 332 |
| 1447 |
PHP.Constants.T_CLASS = 333 |
| 1448 |
PHP.Constants.T_TRAIT = 334 |
| 1449 |
PHP.Constants.T_INTERFACE = 335 |
| 1450 |
PHP.Constants.T_ENUM = 336 |
| 1451 |
PHP.Constants.T_EXTENDS = 337 |
| 1452 |
PHP.Constants.T_IMPLEMENTS = 338 |
| 1453 |
PHP.Constants.T_OBJECT_OPERATOR = 384 |
| 1454 |
PHP.Constants.T_NULLSAFE_OBJECT_OPERATOR = 385 |
| 1455 |
PHP.Constants.T_DOUBLE_ARROW = 386 |
| 1456 |
PHP.Constants.T_LIST = 340 |
| 1457 |
PHP.Constants.T_ARRAY = 341 |
| 1458 |
PHP.Constants.T_CALLABLE = 342 |
| 1459 |
PHP.Constants.T_CLASS_C = 346 |
| 1460 |
PHP.Constants.T_TRAIT_C = 347 |
| 1461 |
PHP.Constants.T_METHOD_C = 348 |
| 1462 |
PHP.Constants.T_FUNC_C = 349 |
| 1463 |
PHP.Constants.T_LINE = 343 |
| 1464 |
PHP.Constants.T_FILE = 344 |
| 1465 |
PHP.Constants.T_START_HEREDOC = 393 |
| 1466 |
PHP.Constants.T_END_HEREDOC = 394 |
| 1467 |
PHP.Constants.T_DOLLAR_OPEN_CURLY_BRACES = 395 |
| 1468 |
PHP.Constants.T_CURLY_OPEN = 396 |
| 1469 |
PHP.Constants.T_PAAMAYIM_NEKUDOTAYIM = 397 |
| 1470 |
PHP.Constants.T_NAMESPACE = 339 |
| 1471 |
PHP.Constants.T_NS_C = 350 |
| 1472 |
PHP.Constants.T_DIR = 345 |
| 1473 |
PHP.Constants.T_NS_SEPARATOR = 398 |
| 1474 |
PHP.Constants.T_ELLIPSIS = 399 |
| 1475 |
PHP.Constants.T_NAME_FULLY_QUALIFIED = 263 |
| 1476 |
PHP.Constants.T_NAME_QUALIFIED = 265 |
| 1477 |
PHP.Constants.T_NAME_RELATIVE = 264 |
| 1478 |
PHP.Constants.T_ATTRIBUTE = 351 |
| 1479 |
PHP.Constants.T_ENUM = 336 |
| 1480 |
PHP.Constants.T_BAD_CHARACTER = 405 |
| 1481 |
PHP.Constants.T_COMMENT = 387 |
| 1482 |
PHP.Constants.T_DOC_COMMENT = 388 |
| 1483 |
PHP.Constants.T_OPEN_TAG = 389 |
| 1484 |
PHP.Constants.T_OPEN_TAG_WITH_ECHO = 390 |
| 1485 |
PHP.Constants.T_CLOSE_TAG = 391 |
| 1486 |
PHP.Constants.T_WHITESPACE = 392 |
| 1487 |
|
| 1488 |
PHP.Lexer = function (src, ini) { |
| 1489 |
var heredoc, heredocEndAllowed, |
| 1490 |
|
| 1491 |
stateStack = ['INITIAL'], stackPos = 0, |
| 1492 |
swapState = function (state) { |
| 1493 |
stateStack[stackPos] = state; |
| 1494 |
}, |
| 1495 |
pushState = function (state) { |
| 1496 |
stateStack[++stackPos] = state; |
| 1497 |
}, |
| 1498 |
popState = function () { |
| 1499 |
--stackPos; |
| 1500 |
}, |
| 1501 |
|
| 1502 |
shortOpenTag = ini === undefined || /^(on|true|1)$/i.test(ini.short_open_tag), |
| 1503 |
openTag = shortOpenTag |
| 1504 |
? /^(\<\?php(?:\r\n|[ \t\r\n])|<\?|\<script language\=('|")?php('|")?\>)/i |
| 1505 |
: /^(\<\?php(?:\r\n|[ \t\r\n])|\<script language\=('|")?php('|")?\>)/i, |
| 1506 |
inlineHtml = shortOpenTag |
| 1507 |
? /[^<]*(?:<(?!\?|script language\=('|")?php('|")?\>)[^<]*)*/i |
| 1508 |
: /[^<]*(?:<(?!\?=|\?php[ \t\r\n]|script language\=('|")?php('|")?\>)[^<]*)*/i, |
| 1509 |
labelRegexPart = '[a-zA-Z_\\x7f-\\uffff][a-zA-Z0-9_\\x7f-\\uffff]*', |
| 1510 |
stringRegexPart = function (quote) { |
| 1511 |
return '[^' + quote + '\\\\${]*(?:(?:\\\\[\\s\\S]|\\$(?!\\{|[a-zA-Z_\\x7f-\\uffff])|\\{(?!\\$))[^' + quote + '\\\\${]*)*'; |
| 1512 |
}, |
| 1513 |
|
| 1514 |
sharedStringTokens = [ |
| 1515 |
{ |
| 1516 |
value: PHP.Constants.T_VARIABLE, |
| 1517 |
re: new RegExp('^\\$' + labelRegexPart + '(?=\\[)'), |
| 1518 |
func: function () { |
| 1519 |
pushState('VAR_OFFSET'); |
| 1520 |
} |
| 1521 |
}, |
| 1522 |
{ |
| 1523 |
value: PHP.Constants.T_VARIABLE, |
| 1524 |
re: new RegExp('^\\$' + labelRegexPart + '(?=->' + labelRegexPart + ')'), |
| 1525 |
func: function () { |
| 1526 |
pushState('LOOKING_FOR_PROPERTY'); |
| 1527 |
} |
| 1528 |
}, |
| 1529 |
{ |
| 1530 |
value: PHP.Constants.T_DOLLAR_OPEN_CURLY_BRACES, |
| 1531 |
re: new RegExp('^\\$\\{(?=' + labelRegexPart + '[\\[}])'), |
| 1532 |
func: function () { |
| 1533 |
pushState('LOOKING_FOR_VARNAME'); |
| 1534 |
} |
| 1535 |
}, |
| 1536 |
{ |
| 1537 |
value: PHP.Constants.T_VARIABLE, |
| 1538 |
re: new RegExp('^\\$' + labelRegexPart) |
| 1539 |
}, |
| 1540 |
{ |
| 1541 |
value: PHP.Constants.T_DOLLAR_OPEN_CURLY_BRACES, |
| 1542 |
re: /^\$\{/, |
| 1543 |
func: function () { |
| 1544 |
pushState('IN_SCRIPTING'); |
| 1545 |
} |
| 1546 |
}, |
| 1547 |
{ |
| 1548 |
value: PHP.Constants.T_CURLY_OPEN, |
| 1549 |
re: /^\{(?=\$)/, |
| 1550 |
func: function () { |
| 1551 |
pushState('IN_SCRIPTING'); |
| 1552 |
} |
| 1553 |
} |
| 1554 |
], |
| 1555 |
data = { |
| 1556 |
'INITIAL': [ |
| 1557 |
{ |
| 1558 |
value: PHP.Constants.T_OPEN_TAG_WITH_ECHO, |
| 1559 |
re: /^<\?=/i, |
| 1560 |
func: function () { |
| 1561 |
swapState('IN_SCRIPTING'); |
| 1562 |
} |
| 1563 |
}, |
| 1564 |
{ |
| 1565 |
value: PHP.Constants.T_OPEN_TAG, |
| 1566 |
re: openTag, |
| 1567 |
func: function () { |
| 1568 |
swapState('IN_SCRIPTING'); |
| 1569 |
} |
| 1570 |
}, |
| 1571 |
{ |
| 1572 |
value: PHP.Constants.T_INLINE_HTML, |
| 1573 |
re: inlineHtml |
| 1574 |
}, |
| 1575 |
], |
| 1576 |
'IN_SCRIPTING': [ |
| 1577 |
{ |
| 1578 |
value: PHP.Constants.T_WHITESPACE, |
| 1579 |
re: /^[ \n\r\t]+/ |
| 1580 |
}, |
| 1581 |
{ |
| 1582 |
value: PHP.Constants.T_ABSTRACT, |
| 1583 |
re: /^abstract\b/i |
| 1584 |
}, |
| 1585 |
{ |
| 1586 |
value: PHP.Constants.T_LOGICAL_AND, |
| 1587 |
re: /^and\b/i |
| 1588 |
}, |
| 1589 |
{ |
| 1590 |
value: PHP.Constants.T_ARRAY, |
| 1591 |
re: /^array\b/i |
| 1592 |
}, |
| 1593 |
{ |
| 1594 |
value: PHP.Constants.T_AS, |
| 1595 |
re: /^as\b/i |
| 1596 |
}, |
| 1597 |
{ |
| 1598 |
value: PHP.Constants.T_BREAK, |
| 1599 |
re: /^break\b/i |
| 1600 |
}, |
| 1601 |
{ |
| 1602 |
value: PHP.Constants.T_CALLABLE, |
| 1603 |
re: /^callable\b/i |
| 1604 |
}, |
| 1605 |
{ |
| 1606 |
value: PHP.Constants.T_CASE, |
| 1607 |
re: /^case\b/i |
| 1608 |
}, |
| 1609 |
{ |
| 1610 |
value: PHP.Constants.T_CATCH, |
| 1611 |
re: /^catch\b/i |
| 1612 |
}, |
| 1613 |
{ |
| 1614 |
value: PHP.Constants.T_CLASS, |
| 1615 |
re: /^class\b/i, |
| 1616 |
}, |
| 1617 |
{ |
| 1618 |
value: PHP.Constants.T_CLONE, |
| 1619 |
re: /^clone\b/i |
| 1620 |
}, |
| 1621 |
{ |
| 1622 |
value: PHP.Constants.T_CONST, |
| 1623 |
re: /^const\b/i |
| 1624 |
}, |
| 1625 |
{ |
| 1626 |
value: PHP.Constants.T_CONTINUE, |
| 1627 |
re: /^continue\b/i |
| 1628 |
}, |
| 1629 |
{ |
| 1630 |
value: PHP.Constants.T_DECLARE, |
| 1631 |
re: /^declare\b/i |
| 1632 |
}, |
| 1633 |
{ |
| 1634 |
value: PHP.Constants.T_DEFAULT, |
| 1635 |
re: /^default\b/i |
| 1636 |
}, |
| 1637 |
{ |
| 1638 |
value: PHP.Constants.T_DO, |
| 1639 |
re: /^do\b/i |
| 1640 |
}, |
| 1641 |
{ |
| 1642 |
value: PHP.Constants.T_ECHO, |
| 1643 |
re: /^echo\b/i |
| 1644 |
}, |
| 1645 |
{ |
| 1646 |
value: PHP.Constants.T_ELSE, |
| 1647 |
re: /^else\b/i |
| 1648 |
}, |
| 1649 |
{ |
| 1650 |
value: PHP.Constants.T_ELSEIF, |
| 1651 |
re: /^elseif\b/i |
| 1652 |
}, |
| 1653 |
{ |
| 1654 |
value: PHP.Constants.T_ENUM, |
| 1655 |
re: /^enum\b/i |
| 1656 |
}, |
| 1657 |
{ |
| 1658 |
value: PHP.Constants.T_ENDDECLARE, |
| 1659 |
re: /^enddeclare\b/i |
| 1660 |
}, |
| 1661 |
{ |
| 1662 |
value: PHP.Constants.T_ENDFOR, |
| 1663 |
re: /^endfor\b/i |
| 1664 |
}, |
| 1665 |
{ |
| 1666 |
value: PHP.Constants.T_ENDFOREACH, |
| 1667 |
re: /^endforeach\b/i |
| 1668 |
}, |
| 1669 |
{ |
| 1670 |
value: PHP.Constants.T_ENDIF, |
| 1671 |
re: /^endif\b/i |
| 1672 |
}, |
| 1673 |
{ |
| 1674 |
value: PHP.Constants.T_ENDSWITCH, |
| 1675 |
re: /^endswitch\b/i |
| 1676 |
}, |
| 1677 |
{ |
| 1678 |
value: PHP.Constants.T_ENDWHILE, |
| 1679 |
re: /^endwhile\b/i |
| 1680 |
}, |
| 1681 |
{ |
| 1682 |
value: PHP.Constants.T_ENUM, |
| 1683 |
re: /^enum\b/i |
| 1684 |
}, |
| 1685 |
{ |
| 1686 |
value: PHP.Constants.T_EMPTY, |
| 1687 |
re: /^empty\b/i |
| 1688 |
}, |
| 1689 |
{ |
| 1690 |
value: PHP.Constants.T_EVAL, |
| 1691 |
re: /^eval\b/i |
| 1692 |
}, |
| 1693 |
{ |
| 1694 |
value: PHP.Constants.T_EXIT, |
| 1695 |
re: /^(?:exit|die)\b/i |
| 1696 |
}, |
| 1697 |
{ |
| 1698 |
value: PHP.Constants.T_EXTENDS, |
| 1699 |
re: /^extends\b/i |
| 1700 |
}, |
| 1701 |
{ |
| 1702 |
value: PHP.Constants.T_FINAL, |
| 1703 |
re: /^final\b/i |
| 1704 |
}, |
| 1705 |
{ |
| 1706 |
value: PHP.Constants.T_FINALLY, |
| 1707 |
re: /^finally\b/i |
| 1708 |
}, |
| 1709 |
{ |
| 1710 |
value: PHP.Constants.T_FN, |
| 1711 |
re: /^fn\b/i |
| 1712 |
}, |
| 1713 |
{ |
| 1714 |
value: PHP.Constants.T_FOR, |
| 1715 |
re: /^for\b/i |
| 1716 |
}, |
| 1717 |
{ |
| 1718 |
value: PHP.Constants.T_FOREACH, |
| 1719 |
re: /^foreach\b/i |
| 1720 |
}, |
| 1721 |
{ |
| 1722 |
value: PHP.Constants.T_FUNCTION, |
| 1723 |
re: /^function\b/i |
| 1724 |
}, |
| 1725 |
{ |
| 1726 |
value: PHP.Constants.T_GLOBAL, |
| 1727 |
re: /^global\b/i |
| 1728 |
}, |
| 1729 |
{ |
| 1730 |
value: PHP.Constants.T_GOTO, |
| 1731 |
re: /^goto\b/i |
| 1732 |
}, |
| 1733 |
{ |
| 1734 |
value: PHP.Constants.T_IF, |
| 1735 |
re: /^if\b/i |
| 1736 |
}, |
| 1737 |
{ |
| 1738 |
value: PHP.Constants.T_IMPLEMENTS, |
| 1739 |
re: /^implements\b/i |
| 1740 |
}, |
| 1741 |
{ |
| 1742 |
value: PHP.Constants.T_INCLUDE, |
| 1743 |
re: /^include\b/i |
| 1744 |
}, |
| 1745 |
{ |
| 1746 |
value: PHP.Constants.T_INCLUDE_ONCE, |
| 1747 |
re: /^include_once\b/i |
| 1748 |
}, |
| 1749 |
{ |
| 1750 |
value: PHP.Constants.T_INSTANCEOF, |
| 1751 |
re: /^instanceof\b/i |
| 1752 |
}, |
| 1753 |
{ |
| 1754 |
value: PHP.Constants.T_INSTEADOF, |
| 1755 |
re: /^insteadof\b/i |
| 1756 |
}, |
| 1757 |
{ |
| 1758 |
value: PHP.Constants.T_INTERFACE, |
| 1759 |
re: /^interface\b/i |
| 1760 |
}, |
| 1761 |
{ |
| 1762 |
value: PHP.Constants.T_ISSET, |
| 1763 |
re: /^isset\b/i |
| 1764 |
}, |
| 1765 |
{ |
| 1766 |
value: PHP.Constants.T_LIST, |
| 1767 |
re: /^list\b/i |
| 1768 |
}, |
| 1769 |
{ |
| 1770 |
value: PHP.Constants.T_MATCH, |
| 1771 |
re: /^match\b/i |
| 1772 |
}, |
| 1773 |
{ |
| 1774 |
value: PHP.Constants.T_NEW, |
| 1775 |
re: /^new\b/i |
| 1776 |
}, |
| 1777 |
{ |
| 1778 |
value: PHP.Constants.T_LOGICAL_OR, |
| 1779 |
re: /^or\b/i |
| 1780 |
}, |
| 1781 |
{ |
| 1782 |
value: PHP.Constants.T_PRINT, |
| 1783 |
re: /^print\b/i |
| 1784 |
}, |
| 1785 |
{ |
| 1786 |
value: PHP.Constants.T_PRIVATE, |
| 1787 |
re: /^private\b/i |
| 1788 |
}, |
| 1789 |
{ |
| 1790 |
value: PHP.Constants.T_PROTECTED, |
| 1791 |
re: /^protected\b/i |
| 1792 |
}, |
| 1793 |
{ |
| 1794 |
value: PHP.Constants.T_PUBLIC, |
| 1795 |
re: /^public\b/i |
| 1796 |
}, |
| 1797 |
{ |
| 1798 |
value: PHP.Constants.T_READONLY, |
| 1799 |
re: /^readonly\b/i |
| 1800 |
}, |
| 1801 |
{ |
| 1802 |
value: PHP.Constants.T_REQUIRE, |
| 1803 |
re: /^require\b/i |
| 1804 |
}, |
| 1805 |
{ |
| 1806 |
value: PHP.Constants.T_REQUIRE_ONCE, |
| 1807 |
re: /^require_once\b/i |
| 1808 |
}, |
| 1809 |
{ |
| 1810 |
value: PHP.Constants.T_STATIC, |
| 1811 |
re: /^static\b/i |
| 1812 |
}, |
| 1813 |
{ |
| 1814 |
value: PHP.Constants.T_SWITCH, |
| 1815 |
re: /^switch\b/i |
| 1816 |
}, |
| 1817 |
{ |
| 1818 |
value: PHP.Constants.T_THROW, |
| 1819 |
re: /^throw\b/i |
| 1820 |
}, |
| 1821 |
{ |
| 1822 |
value: PHP.Constants.T_TRAIT, |
| 1823 |
re: /^trait\b/i, |
| 1824 |
}, |
| 1825 |
{ |
| 1826 |
value: PHP.Constants.T_TRY, |
| 1827 |
re: /^try\b/i |
| 1828 |
}, |
| 1829 |
{ |
| 1830 |
value: PHP.Constants.T_UNSET, |
| 1831 |
re: /^unset\b/i |
| 1832 |
}, |
| 1833 |
{ |
| 1834 |
value: PHP.Constants.T_USE, |
| 1835 |
re: /^use\b/i |
| 1836 |
}, |
| 1837 |
{ |
| 1838 |
value: PHP.Constants.T_VAR, |
| 1839 |
re: /^var\b/i |
| 1840 |
}, |
| 1841 |
{ |
| 1842 |
value: PHP.Constants.T_WHILE, |
| 1843 |
re: /^while\b/i |
| 1844 |
}, |
| 1845 |
{ |
| 1846 |
value: PHP.Constants.T_LOGICAL_XOR, |
| 1847 |
re: /^xor\b/i |
| 1848 |
}, |
| 1849 |
{ |
| 1850 |
value: PHP.Constants.T_YIELD_FROM, |
| 1851 |
re: /^yield\s+from\b/i |
| 1852 |
}, |
| 1853 |
{ |
| 1854 |
value: PHP.Constants.T_YIELD, |
| 1855 |
re: /^yield\b/i |
| 1856 |
}, |
| 1857 |
{ |
| 1858 |
value: PHP.Constants.T_RETURN, |
| 1859 |
re: /^return\b/i |
| 1860 |
}, |
| 1861 |
{ |
| 1862 |
value: PHP.Constants.T_METHOD_C, |
| 1863 |
re: /^__METHOD__\b/i |
| 1864 |
}, |
| 1865 |
{ |
| 1866 |
value: PHP.Constants.T_LINE, |
| 1867 |
re: /^__LINE__\b/i |
| 1868 |
}, |
| 1869 |
{ |
| 1870 |
value: PHP.Constants.T_FILE, |
| 1871 |
re: /^__FILE__\b/i |
| 1872 |
}, |
| 1873 |
{ |
| 1874 |
value: PHP.Constants.T_FUNC_C, |
| 1875 |
re: /^__FUNCTION__\b/i |
| 1876 |
}, |
| 1877 |
{ |
| 1878 |
value: PHP.Constants.T_NS_C, |
| 1879 |
re: /^__NAMESPACE__\b/i |
| 1880 |
}, |
| 1881 |
{ |
| 1882 |
value: PHP.Constants.T_TRAIT_C, |
| 1883 |
re: /^__TRAIT__\b/i |
| 1884 |
}, |
| 1885 |
{ |
| 1886 |
value: PHP.Constants.T_DIR, |
| 1887 |
re: /^__DIR__\b/i |
| 1888 |
}, |
| 1889 |
{ |
| 1890 |
value: PHP.Constants.T_CLASS_C, |
| 1891 |
re: /^__CLASS__\b/i |
| 1892 |
}, |
| 1893 |
{ |
| 1894 |
value: PHP.Constants.T_AND_EQUAL, |
| 1895 |
re: /^&=/ |
| 1896 |
}, |
| 1897 |
{ |
| 1898 |
value: PHP.Constants.T_ARRAY_CAST, |
| 1899 |
re: /^\([ \t]*array[ \t]*\)/i |
| 1900 |
}, |
| 1901 |
{ |
| 1902 |
value: PHP.Constants.T_BOOL_CAST, |
| 1903 |
re: /^\([ \t]*(?:bool|boolean)[ \t]*\)/i |
| 1904 |
}, |
| 1905 |
{ |
| 1906 |
value: PHP.Constants.T_DOUBLE_CAST, |
| 1907 |
re: /^\([ \t]*(?:real|float|double)[ \t]*\)/i |
| 1908 |
}, |
| 1909 |
{ |
| 1910 |
value: PHP.Constants.T_INT_CAST, |
| 1911 |
re: /^\([ \t]*(?:int|integer)[ \t]*\)/i |
| 1912 |
}, |
| 1913 |
{ |
| 1914 |
value: PHP.Constants.T_OBJECT_CAST, |
| 1915 |
re: /^\([ \t]*object[ \t]*\)/i |
| 1916 |
}, |
| 1917 |
{ |
| 1918 |
value: PHP.Constants.T_STRING_CAST, |
| 1919 |
re: /^\([ \t]*(?:binary|string)[ \t]*\)/i |
| 1920 |
}, |
| 1921 |
{ |
| 1922 |
value: PHP.Constants.T_UNSET_CAST, |
| 1923 |
re: /^\([ \t]*unset[ \t]*\)/i |
| 1924 |
}, |
| 1925 |
{ |
| 1926 |
value: PHP.Constants.T_BOOLEAN_AND, |
| 1927 |
re: /^&&/ |
| 1928 |
}, |
| 1929 |
{ |
| 1930 |
value: PHP.Constants.T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG, |
| 1931 |
re: /^&(?=[$])/ |
| 1932 |
}, |
| 1933 |
{ |
| 1934 |
value: PHP.Constants.T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG, |
| 1935 |
re: /^(&)(?=[^\$|^&])/ |
| 1936 |
}, |
| 1937 |
{ |
| 1938 |
value: PHP.Constants.T_BOOLEAN_OR, |
| 1939 |
re: /^\|\|/ |
| 1940 |
}, |
| 1941 |
{ |
| 1942 |
value: PHP.Constants.T_CLOSE_TAG, |
| 1943 |
re: /^(?:\?>|<\/script>)(\r\n|\r|\n)?/i, |
| 1944 |
func: function () { |
| 1945 |
swapState('INITIAL'); |
| 1946 |
} |
| 1947 |
}, |
| 1948 |
{ |
| 1949 |
value: PHP.Constants.T_DOUBLE_ARROW, |
| 1950 |
re: /^=>/ |
| 1951 |
}, |
| 1952 |
{ |
| 1953 |
value: PHP.Constants.T_PAAMAYIM_NEKUDOTAYIM, |
| 1954 |
re: /^::/ |
| 1955 |
}, |
| 1956 |
{ |
| 1957 |
value: PHP.Constants.T_INC, |
| 1958 |
re: /^\+\+/ |
| 1959 |
}, |
| 1960 |
{ |
| 1961 |
value: PHP.Constants.T_DEC, |
| 1962 |
re: /^--/ |
| 1963 |
}, |
| 1964 |
{ |
| 1965 |
value: PHP.Constants.T_CONCAT_EQUAL, |
| 1966 |
re: /^\.=/ |
| 1967 |
}, |
| 1968 |
{ |
| 1969 |
value: PHP.Constants.T_DIV_EQUAL, |
| 1970 |
re: /^\/=/ |
| 1971 |
}, |
| 1972 |
{ |
| 1973 |
value: PHP.Constants.T_XOR_EQUAL, |
| 1974 |
re: /^\^=/ |
| 1975 |
}, |
| 1976 |
{ |
| 1977 |
value: PHP.Constants.T_MUL_EQUAL, |
| 1978 |
re: /^\*=/ |
| 1979 |
}, |
| 1980 |
{ |
| 1981 |
value: PHP.Constants.T_MOD_EQUAL, |
| 1982 |
re: /^%=/ |
| 1983 |
}, |
| 1984 |
{ |
| 1985 |
value: PHP.Constants.T_SL_EQUAL, |
| 1986 |
re: /^<<=/ |
| 1987 |
}, |
| 1988 |
{ |
| 1989 |
value: PHP.Constants.T_START_HEREDOC, |
| 1990 |
re: new RegExp('^[bB]?<<<[ \\t]*\'(' + labelRegexPart + ')\'(?:\\r\\n|\\r|\\n)'), |
| 1991 |
func: function (result) { |
| 1992 |
heredoc = result[1]; |
| 1993 |
swapState('NOWDOC'); |
| 1994 |
} |
| 1995 |
}, |
| 1996 |
{ |
| 1997 |
value: PHP.Constants.T_START_HEREDOC, |
| 1998 |
re: new RegExp('^[bB]?<<<[ \\t]*("?)(' + labelRegexPart + ')\\1(?:\\r\\n|\\r|\\n)'), |
| 1999 |
func: function (result) { |
| 2000 |
heredoc = result[2]; |
| 2001 |
heredocEndAllowed = true; |
| 2002 |
swapState('HEREDOC'); |
| 2003 |
} |
| 2004 |
}, |
| 2005 |
{ |
| 2006 |
value: PHP.Constants.T_SL, |
| 2007 |
re: /^<</ |
| 2008 |
}, |
| 2009 |
{ |
| 2010 |
value: PHP.Constants.T_SPACESHIP, |
| 2011 |
re: /^<=>/ |
| 2012 |
}, |
| 2013 |
{ |
| 2014 |
value: PHP.Constants.T_IS_SMALLER_OR_EQUAL, |
| 2015 |
re: /^<=/ |
| 2016 |
}, |
| 2017 |
{ |
| 2018 |
value: PHP.Constants.T_SR_EQUAL, |
| 2019 |
re: /^>>=/ |
| 2020 |
}, |
| 2021 |
{ |
| 2022 |
value: PHP.Constants.T_SR, |
| 2023 |
re: /^>>/ |
| 2024 |
}, |
| 2025 |
{ |
| 2026 |
value: PHP.Constants.T_IS_GREATER_OR_EQUAL, |
| 2027 |
re: /^>=/ |
| 2028 |
}, |
| 2029 |
{ |
| 2030 |
value: PHP.Constants.T_OR_EQUAL, |
| 2031 |
re: /^\|=/ |
| 2032 |
}, |
| 2033 |
{ |
| 2034 |
value: PHP.Constants.T_PLUS_EQUAL, |
| 2035 |
re: /^\+=/ |
| 2036 |
}, |
| 2037 |
{ |
| 2038 |
value: PHP.Constants.T_MINUS_EQUAL, |
| 2039 |
re: /^-=/ |
| 2040 |
}, |
| 2041 |
{ |
| 2042 |
value: PHP.Constants.T_OBJECT_OPERATOR, |
| 2043 |
re: new RegExp('^->(?=[ \n\r\t]*' + labelRegexPart + ')'), |
| 2044 |
func: function () { |
| 2045 |
pushState('LOOKING_FOR_PROPERTY'); |
| 2046 |
} |
| 2047 |
}, |
| 2048 |
{ |
| 2049 |
value: PHP.Constants.T_OBJECT_OPERATOR, |
| 2050 |
re: /^->/i |
| 2051 |
}, |
| 2052 |
{ |
| 2053 |
value: PHP.Constants.T_ELLIPSIS, |
| 2054 |
re: /^\.\.\./ |
| 2055 |
}, |
| 2056 |
{ |
| 2057 |
value: PHP.Constants.T_POW_EQUAL, |
| 2058 |
re: /^\*\*=/ |
| 2059 |
}, |
| 2060 |
{ |
| 2061 |
value: PHP.Constants.T_POW, |
| 2062 |
re: /^\*\*/ |
| 2063 |
}, |
| 2064 |
{ |
| 2065 |
value: PHP.Constants.T_COALESCE_EQUAL, |
| 2066 |
re: /^\?\?=/ |
| 2067 |
}, |
| 2068 |
{ |
| 2069 |
value: PHP.Constants.T_COALESCE, |
| 2070 |
re: /^\?\?/ |
| 2071 |
}, |
| 2072 |
{ |
| 2073 |
value: PHP.Constants.T_NULLSAFE_OBJECT_OPERATOR, |
| 2074 |
re: /^\?->/ |
| 2075 |
}, |
| 2076 |
{ |
| 2077 |
value: PHP.Constants.T_NAME_FULLY_QUALIFIED, |
| 2078 |
re: /^\\\w+(?:\\\w+)*/ |
| 2079 |
}, |
| 2080 |
{ |
| 2081 |
value: PHP.Constants.T_NAME_QUALIFIED, |
| 2082 |
re: /^\w+\\\w+(?:\\\w+)*/ |
| 2083 |
}, |
| 2084 |
{ |
| 2085 |
value: PHP.Constants.T_NAME_RELATIVE, |
| 2086 |
re: /^namespace\\\w+(?:\\\w+)*/ |
| 2087 |
}, |
| 2088 |
{ |
| 2089 |
value: PHP.Constants.T_NAMESPACE, |
| 2090 |
re: /^namespace\b/i |
| 2091 |
}, |
| 2092 |
{ |
| 2093 |
value: PHP.Constants.T_ATTRIBUTE, |
| 2094 |
re: /^#\[([\S\s]*?)]/ |
| 2095 |
}, |
| 2096 |
{ |
| 2097 |
value: PHP.Constants.T_COMMENT, |
| 2098 |
re: /^\/\*([\S\s]*?)(?:\*\/|$)/ |
| 2099 |
}, |
| 2100 |
{ |
| 2101 |
value: PHP.Constants.T_COMMENT, |
| 2102 |
re: /^(?:\/\/|#)[^\r\n?]*(?:\?(?!>)[^\r\n?]*)*(?:\r\n|\r|\n)?/ |
| 2103 |
}, |
| 2104 |
{ |
| 2105 |
value: PHP.Constants.T_IS_IDENTICAL, |
| 2106 |
re: /^===/ |
| 2107 |
}, |
| 2108 |
{ |
| 2109 |
value: PHP.Constants.T_IS_EQUAL, |
| 2110 |
re: /^==/ |
| 2111 |
}, |
| 2112 |
{ |
| 2113 |
value: PHP.Constants.T_IS_NOT_IDENTICAL, |
| 2114 |
re: /^!==/ |
| 2115 |
}, |
| 2116 |
{ |
| 2117 |
value: PHP.Constants.T_IS_NOT_EQUAL, |
| 2118 |
re: /^(!=|<>)/ |
| 2119 |
}, |
| 2120 |
{ |
| 2121 |
value: PHP.Constants.T_DNUMBER, |
| 2122 |
re: /^(?:[0-9]+\.[0-9]*|\.[0-9]+)(?:[eE][+-]?[0-9]+)?/ |
| 2123 |
}, |
| 2124 |
{ |
| 2125 |
value: PHP.Constants.T_DNUMBER, |
| 2126 |
re: /^[0-9]+[eE][+-]?[0-9]+/ |
| 2127 |
}, |
| 2128 |
{ |
| 2129 |
value: PHP.Constants.T_LNUMBER, |
| 2130 |
re: /^(?:0x[0-9A-F]+|0b[01]+|[0-9]+)/i |
| 2131 |
}, |
| 2132 |
{ |
| 2133 |
value: PHP.Constants.T_VARIABLE, |
| 2134 |
re: new RegExp('^\\$' + labelRegexPart) |
| 2135 |
}, |
| 2136 |
{ |
| 2137 |
value: PHP.Constants.T_CONSTANT_ENCAPSED_STRING, |
| 2138 |
re: /^[bB]?'[^'\\]*(?:\\[\s\S][^'\\]*)*'/, |
| 2139 |
}, |
| 2140 |
{ |
| 2141 |
value: PHP.Constants.T_CONSTANT_ENCAPSED_STRING, |
| 2142 |
re: new RegExp('^[bB]?"' + stringRegexPart('"') + '"') |
| 2143 |
}, |
| 2144 |
{ |
| 2145 |
value: -1, |
| 2146 |
re: /^[bB]?"/, |
| 2147 |
func: function () { |
| 2148 |
swapState('DOUBLE_QUOTES'); |
| 2149 |
} |
| 2150 |
}, |
| 2151 |
{ |
| 2152 |
value: -1, |
| 2153 |
re: /^`/, |
| 2154 |
func: function () { |
| 2155 |
swapState('BACKTICKS'); |
| 2156 |
} |
| 2157 |
}, |
| 2158 |
{ |
| 2159 |
value: PHP.Constants.T_NS_SEPARATOR, |
| 2160 |
re: /^\\/ |
| 2161 |
}, |
| 2162 |
{ |
| 2163 |
value: PHP.Constants.T_STRING, |
| 2164 |
re: /^[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/ |
| 2165 |
}, |
| 2166 |
{ |
| 2167 |
value: -1, |
| 2168 |
re: /^\{/, |
| 2169 |
func: function () { |
| 2170 |
pushState('IN_SCRIPTING'); |
| 2171 |
} |
| 2172 |
}, |
| 2173 |
{ |
| 2174 |
value: -1, |
| 2175 |
re: /^\}/, |
| 2176 |
func: function () { |
| 2177 |
if (stackPos > 0) { |
| 2178 |
popState(); |
| 2179 |
} |
| 2180 |
} |
| 2181 |
}, |
| 2182 |
{ |
| 2183 |
value: -1, |
| 2184 |
re: /^[\[\];:?()!.,><=+-/*|&@^%"'$~]/ |
| 2185 |
} |
| 2186 |
], |
| 2187 |
'DOUBLE_QUOTES': sharedStringTokens.concat([ |
| 2188 |
{ |
| 2189 |
value: -1, |
| 2190 |
re: /^"/, |
| 2191 |
func: function () { |
| 2192 |
swapState('IN_SCRIPTING'); |
| 2193 |
} |
| 2194 |
}, |
| 2195 |
{ |
| 2196 |
value: PHP.Constants.T_ENCAPSED_AND_WHITESPACE, |
| 2197 |
re: new RegExp('^' + stringRegexPart('"')) |
| 2198 |
} |
| 2199 |
]), |
| 2200 |
'BACKTICKS': sharedStringTokens.concat([ |
| 2201 |
{ |
| 2202 |
value: -1, |
| 2203 |
re: /^`/, |
| 2204 |
func: function () { |
| 2205 |
swapState('IN_SCRIPTING'); |
| 2206 |
} |
| 2207 |
}, |
| 2208 |
{ |
| 2209 |
value: PHP.Constants.T_ENCAPSED_AND_WHITESPACE, |
| 2210 |
re: new RegExp('^' + stringRegexPart('`')) |
| 2211 |
} |
| 2212 |
]), |
| 2213 |
'VAR_OFFSET': [ |
| 2214 |
{ |
| 2215 |
value: -1, |
| 2216 |
re: /^\]/, |
| 2217 |
func: function () { |
| 2218 |
popState(); |
| 2219 |
} |
| 2220 |
}, |
| 2221 |
{ |
| 2222 |
value: PHP.Constants.T_NUM_STRING, |
| 2223 |
re: /^(?:0x[0-9A-F]+|0b[01]+|[0-9]+)/i |
| 2224 |
}, |
| 2225 |
{ |
| 2226 |
value: PHP.Constants.T_VARIABLE, |
| 2227 |
re: new RegExp('^\\$' + labelRegexPart) |
| 2228 |
}, |
| 2229 |
{ |
| 2230 |
value: PHP.Constants.T_STRING, |
| 2231 |
re: new RegExp('^' + labelRegexPart) |
| 2232 |
}, |
| 2233 |
{ |
| 2234 |
value: -1, |
| 2235 |
re: /^[;:,.\[()|^&+-/*=%!~$<>?@{}"`]/ |
| 2236 |
} |
| 2237 |
], |
| 2238 |
'LOOKING_FOR_PROPERTY': [ |
| 2239 |
{ |
| 2240 |
value: PHP.Constants.T_OBJECT_OPERATOR, |
| 2241 |
re: /^->/ |
| 2242 |
}, |
| 2243 |
{ |
| 2244 |
value: PHP.Constants.T_STRING, |
| 2245 |
re: new RegExp('^' + labelRegexPart), |
| 2246 |
func: function () { |
| 2247 |
popState(); |
| 2248 |
} |
| 2249 |
}, |
| 2250 |
{ |
| 2251 |
value: PHP.Constants.T_WHITESPACE, |
| 2252 |
re: /^[ \n\r\t]+/ |
| 2253 |
} |
| 2254 |
], |
| 2255 |
'LOOKING_FOR_VARNAME': [ |
| 2256 |
{ |
| 2257 |
value: PHP.Constants.T_STRING_VARNAME, |
| 2258 |
re: new RegExp('^' + labelRegexPart + '(?=[\\[}])'), |
| 2259 |
func: function () { |
| 2260 |
swapState('IN_SCRIPTING'); |
| 2261 |
} |
| 2262 |
} |
| 2263 |
], |
| 2264 |
'NOWDOC': [ |
| 2265 |
{ |
| 2266 |
value: PHP.Constants.T_END_HEREDOC, |
| 2267 |
matchFunc: function (src) { |
| 2268 |
var re = new RegExp('^' + heredoc + '(?=;?[\\r\\n])'); |
| 2269 |
if (src.match(re)) { |
| 2270 |
return [src.substr(0, heredoc.length)]; |
| 2271 |
} else { |
| 2272 |
return null; |
| 2273 |
} |
| 2274 |
}, |
| 2275 |
func: function () { |
| 2276 |
swapState('IN_SCRIPTING'); |
| 2277 |
} |
| 2278 |
}, |
| 2279 |
{ |
| 2280 |
value: PHP.Constants.T_ENCAPSED_AND_WHITESPACE, |
| 2281 |
matchFunc: function (src) { |
| 2282 |
var re = new RegExp('[\\r\\n]' + heredoc + '(?=;?[\\r\\n])'); |
| 2283 |
var result = re.exec(src); |
| 2284 |
var end = result ? result.index + 1 : src.length; |
| 2285 |
return [src.substring(0, end)]; |
| 2286 |
} |
| 2287 |
} |
| 2288 |
], |
| 2289 |
'HEREDOC': sharedStringTokens.concat([ |
| 2290 |
{ |
| 2291 |
value: PHP.Constants.T_END_HEREDOC, |
| 2292 |
matchFunc: function (src) { |
| 2293 |
if (!heredocEndAllowed) { |
| 2294 |
return null; |
| 2295 |
} |
| 2296 |
var re = new RegExp('^' + heredoc + '(?=;?[\\r\\n])'); |
| 2297 |
if (src.match(re)) { |
| 2298 |
return [src.substr(0, heredoc.length)]; |
| 2299 |
} else { |
| 2300 |
return null; |
| 2301 |
} |
| 2302 |
}, |
| 2303 |
func: function () { |
| 2304 |
swapState('IN_SCRIPTING'); |
| 2305 |
} |
| 2306 |
}, |
| 2307 |
{ |
| 2308 |
value: PHP.Constants.T_ENCAPSED_AND_WHITESPACE, |
| 2309 |
matchFunc: function (src) { |
| 2310 |
var end = src.length; |
| 2311 |
var re = new RegExp('^' + stringRegexPart('')); |
| 2312 |
var result = re.exec(src); |
| 2313 |
if (result) { |
| 2314 |
end = result[0].length; |
| 2315 |
} |
| 2316 |
re = new RegExp('([\\r\\n])' + heredoc + '(?=;?[\\r\\n])'); |
| 2317 |
result = re.exec(src.substring(0, end)); |
| 2318 |
if (result) { |
| 2319 |
end = result.index + 1; |
| 2320 |
heredocEndAllowed = true; |
| 2321 |
} else { |
| 2322 |
heredocEndAllowed = false; |
| 2323 |
} |
| 2324 |
if (end == 0) { |
| 2325 |
return null; |
| 2326 |
} |
| 2327 |
return [src.substring(0, end)]; |
| 2328 |
} |
| 2329 |
} |
| 2330 |
]) |
| 2331 |
}; |
| 2332 |
|
| 2333 |
var results = [], |
| 2334 |
line = 1, |
| 2335 |
cancel = true; |
| 2336 |
|
| 2337 |
if (src === null) { |
| 2338 |
return results; |
| 2339 |
} |
| 2340 |
|
| 2341 |
if (typeof src !== "string") { |
| 2342 |
src = src.toString(); |
| 2343 |
} |
| 2344 |
|
| 2345 |
while (src.length > 0 && cancel === true) { |
| 2346 |
var state = stateStack[stackPos]; |
| 2347 |
var tokens = data[state]; |
| 2348 |
cancel = tokens.some(function (token) { |
| 2349 |
var result = token.matchFunc !== undefined |
| 2350 |
? token.matchFunc(src) |
| 2351 |
: src.match(token.re); |
| 2352 |
if (result !== null) { |
| 2353 |
if (result[0].length == 0) { |
| 2354 |
throw new Error("empty match"); |
| 2355 |
} |
| 2356 |
|
| 2357 |
if (token.func !== undefined) { |
| 2358 |
token.func(result); |
| 2359 |
} |
| 2360 |
|
| 2361 |
if (token.value === -1) { |
| 2362 |
results.push(result[0]); |
| 2363 |
} else { |
| 2364 |
var resultString = result[0]; |
| 2365 |
results.push([ |
| 2366 |
parseInt(token.value, 10), |
| 2367 |
resultString, |
| 2368 |
line |
| 2369 |
]); |
| 2370 |
line += resultString.split('\n').length - 1; |
| 2371 |
} |
| 2372 |
|
| 2373 |
src = src.substring(result[0].length); |
| 2374 |
|
| 2375 |
return true; |
| 2376 |
} |
| 2377 |
return false; |
| 2378 |
}); |
| 2379 |
} |
| 2380 |
|
| 2381 |
return results; |
| 2382 |
}; |
| 2383 |
|
| 2384 |
|
| 2385 |
PHP.Parser = function (preprocessedTokens, evaluate) { |
| 2386 |
|
| 2387 |
var yybase = this.yybase, |
| 2388 |
yydefault = this.yydefault, |
| 2389 |
yycheck = this.yycheck, |
| 2390 |
yyaction = this.yyaction, |
| 2391 |
yylen = this.yylen, |
| 2392 |
yygbase = this.yygbase, |
| 2393 |
yygcheck = this.yygcheck, |
| 2394 |
yyp = this.yyp, |
| 2395 |
yygoto = this.yygoto, |
| 2396 |
yylhs = this.yylhs, |
| 2397 |
terminals = this.terminals, |
| 2398 |
translate = this.translate, |
| 2399 |
yygdefault = this.yygdefault; |
| 2400 |
|
| 2401 |
|
| 2402 |
this.pos = -1; |
| 2403 |
this.line = 1; |
| 2404 |
|
| 2405 |
this.tokenMap = this.createTokenMap(); |
| 2406 |
|
| 2407 |
this.dropTokens = {}; |
| 2408 |
this.dropTokens[PHP.Constants.T_WHITESPACE] = 1; |
| 2409 |
this.dropTokens[PHP.Constants.T_OPEN_TAG] = 1; |
| 2410 |
var tokens = []; |
| 2411 |
preprocessedTokens.forEach(function (token, index) { |
| 2412 |
if (typeof token === "object" && token[0] === PHP.Constants.T_OPEN_TAG_WITH_ECHO) { |
| 2413 |
tokens.push([ |
| 2414 |
PHP.Constants.T_OPEN_TAG, |
| 2415 |
token[1], |
| 2416 |
token[2] |
| 2417 |
]); |
| 2418 |
tokens.push([ |
| 2419 |
PHP.Constants.T_ECHO, |
| 2420 |
token[1], |
| 2421 |
token[2] |
| 2422 |
]); |
| 2423 |
} else { |
| 2424 |
tokens.push(token); |
| 2425 |
} |
| 2426 |
}); |
| 2427 |
this.tokens = tokens; |
| 2428 |
var tokenId = this.TOKEN_NONE; |
| 2429 |
this.startAttributes = { |
| 2430 |
'startLine': 1 |
| 2431 |
}; |
| 2432 |
|
| 2433 |
this.endAttributes = {}; |
| 2434 |
var attributeStack = [this.startAttributes]; |
| 2435 |
var state = 0; |
| 2436 |
var stateStack = [state]; |
| 2437 |
this.yyastk = []; |
| 2438 |
this.stackPos = 0; |
| 2439 |
|
| 2440 |
var yyn; |
| 2441 |
|
| 2442 |
var origTokenId; |
| 2443 |
|
| 2444 |
|
| 2445 |
for (; ;) { |
| 2446 |
|
| 2447 |
if (yybase[state] === 0) { |
| 2448 |
yyn = yydefault[state]; |
| 2449 |
} else { |
| 2450 |
if (tokenId === this.TOKEN_NONE) { |
| 2451 |
origTokenId = this.getNextToken(); |
| 2452 |
tokenId = (origTokenId >= 0 && origTokenId < this.TOKEN_MAP_SIZE) ? translate[origTokenId] : this.TOKEN_INVALID; |
| 2453 |
|
| 2454 |
attributeStack[this.stackPos] = this.startAttributes; |
| 2455 |
} |
| 2456 |
|
| 2457 |
if (((yyn = yybase[state] + tokenId) >= 0 |
| 2458 |
&& yyn < this.YYLAST && yycheck[yyn] === tokenId |
| 2459 |
|| (state < this.YY2TBLSTATE |
| 2460 |
&& (yyn = yybase[state + this.YYNLSTATES] + tokenId) >= 0 |
| 2461 |
&& yyn < this.YYLAST |
| 2462 |
&& yycheck[yyn] === tokenId)) |
| 2463 |
&& (yyn = yyaction[yyn]) !== this.YYDEFAULT) { |
| 2464 |
if (yyn > 0) { |
| 2465 |
++this.stackPos; |
| 2466 |
|
| 2467 |
stateStack[this.stackPos] = state = yyn; |
| 2468 |
this.yyastk[this.stackPos] = this.tokenValue; |
| 2469 |
attributeStack[this.stackPos] = this.startAttributes; |
| 2470 |
tokenId = this.TOKEN_NONE; |
| 2471 |
|
| 2472 |
if (yyn < this.YYNLSTATES) |
| 2473 |
continue; |
| 2474 |
yyn -= this.YYNLSTATES; |
| 2475 |
} else { |
| 2476 |
yyn = -yyn; |
| 2477 |
} |
| 2478 |
} else { |
| 2479 |
yyn = yydefault[state]; |
| 2480 |
} |
| 2481 |
} |
| 2482 |
|
| 2483 |
for (; ;) { |
| 2484 |
|
| 2485 |
if (yyn === 0) { |
| 2486 |
return this.yyval; |
| 2487 |
} else if (yyn !== this.YYUNEXPECTED) { |
| 2488 |
for (var attr in this.endAttributes) { |
| 2489 |
attributeStack[this.stackPos - yylen[yyn]][attr] = this.endAttributes[attr]; |
| 2490 |
} |
| 2491 |
this.stackPos -= yylen[yyn]; |
| 2492 |
yyn = yylhs[yyn]; |
| 2493 |
if ((yyp = yygbase[yyn] + stateStack[this.stackPos]) >= 0 |
| 2494 |
&& yyp < this.YYGLAST |
| 2495 |
&& yygcheck[yyp] === yyn) { |
| 2496 |
state = yygoto[yyp]; |
| 2497 |
} else { |
| 2498 |
state = yygdefault[yyn]; |
| 2499 |
} |
| 2500 |
|
| 2501 |
++this.stackPos; |
| 2502 |
|
| 2503 |
stateStack[this.stackPos] = state; |
| 2504 |
this.yyastk[this.stackPos] = this.yyval; |
| 2505 |
attributeStack[this.stackPos] = this.startAttributes; |
| 2506 |
} else { |
| 2507 |
if (evaluate !== true) { |
| 2508 |
|
| 2509 |
var expected = []; |
| 2510 |
|
| 2511 |
for (var i = 0; i < this.TOKEN_MAP_SIZE; ++i) { |
| 2512 |
if ((yyn = yybase[state] + i) >= 0 && yyn < this.YYLAST && yycheck[yyn] == i |
| 2513 |
|| state < this.YY2TBLSTATE |
| 2514 |
&& (yyn = yybase[state + this.YYNLSTATES] + i) |
| 2515 |
&& yyn < this.YYLAST && yycheck[yyn] == i |
| 2516 |
) { |
| 2517 |
if (yyaction[yyn] != this.YYUNEXPECTED) { |
| 2518 |
if (expected.length == 4) { |
| 2519 |
expected = []; |
| 2520 |
break; |
| 2521 |
} |
| 2522 |
|
| 2523 |
expected.push(this.terminals[i]); |
| 2524 |
} |
| 2525 |
} |
| 2526 |
} |
| 2527 |
|
| 2528 |
var expectedString = ''; |
| 2529 |
if (expected.length) { |
| 2530 |
expectedString = ', expecting ' + expected.join(' or '); |
| 2531 |
} |
| 2532 |
throw new PHP.ParseError('syntax error, unexpected ' + terminals[tokenId] + expectedString, this.startAttributes['startLine']); |
| 2533 |
} else { |
| 2534 |
return this.startAttributes['startLine']; |
| 2535 |
} |
| 2536 |
|
| 2537 |
} |
| 2538 |
|
| 2539 |
if (state < this.YYNLSTATES) |
| 2540 |
break; |
| 2541 |
yyn = state - this.YYNLSTATES; |
| 2542 |
} |
| 2543 |
} |
| 2544 |
}; |
| 2545 |
|
| 2546 |
PHP.ParseError = function (msg, line) { |
| 2547 |
this.message = msg; |
| 2548 |
this.line = line; |
| 2549 |
}; |
| 2550 |
|
| 2551 |
PHP.Parser.prototype.getNextToken = function () { |
| 2552 |
|
| 2553 |
this.startAttributes = {}; |
| 2554 |
this.endAttributes = {}; |
| 2555 |
|
| 2556 |
var token, |
| 2557 |
tmp; |
| 2558 |
|
| 2559 |
while (this.tokens[++this.pos] !== undefined) { |
| 2560 |
token = this.tokens[this.pos]; |
| 2561 |
|
| 2562 |
if (typeof token === "string") { |
| 2563 |
this.startAttributes['startLine'] = this.line; |
| 2564 |
this.endAttributes['endLine'] = this.line; |
| 2565 |
if ('b"' === token) { |
| 2566 |
this.tokenValue = 'b"'; |
| 2567 |
return '"'.charCodeAt(0); |
| 2568 |
} else { |
| 2569 |
this.tokenValue = token; |
| 2570 |
return token.charCodeAt(0); |
| 2571 |
} |
| 2572 |
} else { |
| 2573 |
|
| 2574 |
|
| 2575 |
this.line += ((tmp = token[1].match(/\n/g)) === null) ? 0 : tmp.length; |
| 2576 |
|
| 2577 |
if (PHP.Constants.T_COMMENT === token[0]) { |
| 2578 |
|
| 2579 |
if (!Array.isArray(this.startAttributes['comments'])) { |
| 2580 |
this.startAttributes['comments'] = []; |
| 2581 |
} |
| 2582 |
|
| 2583 |
this.startAttributes['comments'].push({ |
| 2584 |
type: "comment", |
| 2585 |
comment: token[1], |
| 2586 |
line: token[2] |
| 2587 |
}); |
| 2588 |
|
| 2589 |
} |
| 2590 |
else if (PHP.Constants.T_ATTRIBUTE === token[0]) { |
| 2591 |
this.tokenValue = token[1]; |
| 2592 |
this.startAttributes['startLine'] = token[2]; |
| 2593 |
this.endAttributes['endLine'] = this.line; |
| 2594 |
} else if (PHP.Constants.T_DOC_COMMENT === token[0]) { |
| 2595 |
this.startAttributes['comments'].push(new PHPParser_Comment_Doc(token[1], token[2])); |
| 2596 |
} else if (this.dropTokens[token[0]] === undefined) { |
| 2597 |
this.tokenValue = token[1]; |
| 2598 |
this.startAttributes['startLine'] = token[2]; |
| 2599 |
this.endAttributes['endLine'] = this.line; |
| 2600 |
|
| 2601 |
return this.tokenMap[token[0]]; |
| 2602 |
} |
| 2603 |
} |
| 2604 |
} |
| 2605 |
|
| 2606 |
this.startAttributes['startLine'] = this.line; |
| 2607 |
return 0; |
| 2608 |
}; |
| 2609 |
|
| 2610 |
PHP.Parser.prototype.tokenName = function (token) { |
| 2611 |
var constants = ["T_THROW","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_EQUAL","T_COALESCE","T_BOOLEAN_OR","T_BOOLEAN_AND","T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG","T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG","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_MATCH","T_ENDSWITCH","T_CASE","T_DEFAULT","T_BREAK","T_CONTINUE","T_GOTO","T_FUNCTION","T_FN","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_READONLY","T_VAR","T_UNSET","T_ISSET","T_EMPTY","T_HALT_COMPILER","T_CLASS","T_TRAIT","T_INTERFACE","T_ENUM","T_EXTENDS","T_IMPLEMENTS","T_OBJECT_OPERATOR","T_NULLSAFE_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_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","T_NAME_FULLY_QUALIFIED","T_NAME_QUALIFIED","T_NAME_RELATIVE","T_ATTRIBUTE","T_ENUM","T_BAD_CHARACTER","T_COMMENT","T_DOC_COMMENT","T_OPEN_TAG","T_OPEN_TAG_WITH_ECHO","T_CLOSE_TAG","T_WHITESPACE"]; |
| 2612 |
var current = "UNKNOWN"; |
| 2613 |
constants.some(function (constant) { |
| 2614 |
if (PHP.Constants[constant] === token) { |
| 2615 |
current = constant; |
| 2616 |
return true; |
| 2617 |
} else { |
| 2618 |
return false; |
| 2619 |
} |
| 2620 |
}); |
| 2621 |
|
| 2622 |
return current; |
| 2623 |
}; |
| 2624 |
|
| 2625 |
PHP.Parser.prototype.createTokenMap = function () { |
| 2626 |
var tokenMap = {}, |
| 2627 |
name, |
| 2628 |
i; |
| 2629 |
for (i = 256; i < 1000; ++i) { |
| 2630 |
if (PHP.Constants.T_OPEN_TAG_WITH_ECHO === i) { |
| 2631 |
tokenMap[i] = PHP.Constants.T_ECHO; |
| 2632 |
} else if (PHP.Constants.T_CLOSE_TAG === i) { |
| 2633 |
tokenMap[i] = 59; |
| 2634 |
} else if ('UNKNOWN' !== (name = this.tokenName(i))) { |
| 2635 |
tokenMap[i] = this[name]; |
| 2636 |
} |
| 2637 |
} |
| 2638 |
return tokenMap; |
| 2639 |
}; |
| 2640 |
|
| 2641 |
PHP.Parser.prototype.TOKEN_NONE = -1; |
| 2642 |
PHP.Parser.prototype.TOKEN_INVALID = 175; |
| 2643 |
|
| 2644 |
PHP.Parser.prototype.TOKEN_MAP_SIZE = 403; |
| 2645 |
|
| 2646 |
PHP.Parser.prototype.YYLAST = 1196; |
| 2647 |
PHP.Parser.prototype.YY2TBLSTATE = 420; |
| 2648 |
PHP.Parser.prototype.YYGLAST = 545; |
| 2649 |
PHP.Parser.prototype.YYNLSTATES = 710; |
| 2650 |
PHP.Parser.prototype.YYUNEXPECTED = 32767; |
| 2651 |
PHP.Parser.prototype.YYDEFAULT = -32766; |
| 2652 |
PHP.Parser.prototype.YYERRTOK = 256; |
| 2653 |
PHP.Parser.prototype.T_THROW = 257; |
| 2654 |
PHP.Parser.prototype.T_INCLUDE = 258; |
| 2655 |
PHP.Parser.prototype.T_INCLUDE_ONCE = 259; |
| 2656 |
PHP.Parser.prototype.T_EVAL = 260; |
| 2657 |
PHP.Parser.prototype.T_REQUIRE = 261; |
| 2658 |
PHP.Parser.prototype.T_REQUIRE_ONCE = 262; |
| 2659 |
PHP.Parser.prototype.T_LOGICAL_OR = 263; |
| 2660 |
PHP.Parser.prototype.T_LOGICAL_XOR = 264; |
| 2661 |
PHP.Parser.prototype.T_LOGICAL_AND = 265; |
| 2662 |
PHP.Parser.prototype.T_PRINT = 266; |
| 2663 |
PHP.Parser.prototype.T_YIELD = 267; |
| 2664 |
PHP.Parser.prototype.T_DOUBLE_ARROW = 268; |
| 2665 |
PHP.Parser.prototype.T_YIELD_FROM = 269; |
| 2666 |
PHP.Parser.prototype.T_PLUS_EQUAL = 270; |
| 2667 |
PHP.Parser.prototype.T_MINUS_EQUAL = 271; |
| 2668 |
PHP.Parser.prototype.T_MUL_EQUAL = 272; |
| 2669 |
PHP.Parser.prototype.T_DIV_EQUAL = 273; |
| 2670 |
PHP.Parser.prototype.T_CONCAT_EQUAL = 274; |
| 2671 |
PHP.Parser.prototype.T_MOD_EQUAL = 275; |
| 2672 |
PHP.Parser.prototype.T_AND_EQUAL = 276; |
| 2673 |
PHP.Parser.prototype.T_OR_EQUAL = 277; |
| 2674 |
PHP.Parser.prototype.T_XOR_EQUAL = 278; |
| 2675 |
PHP.Parser.prototype.T_SL_EQUAL = 279; |
| 2676 |
PHP.Parser.prototype.T_SR_EQUAL = 280; |
| 2677 |
PHP.Parser.prototype.T_POW_EQUAL = 281; |
| 2678 |
PHP.Parser.prototype.T_COALESCE_EQUAL = 282; |
| 2679 |
PHP.Parser.prototype.T_COALESCE = 283; |
| 2680 |
PHP.Parser.prototype.T_BOOLEAN_OR = 284; |
| 2681 |
PHP.Parser.prototype.T_BOOLEAN_AND = 285; |
| 2682 |
PHP.Parser.prototype.T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG = 286; |
| 2683 |
PHP.Parser.prototype.T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG = 287; |
| 2684 |
PHP.Parser.prototype.T_IS_EQUAL = 288; |
| 2685 |
PHP.Parser.prototype.T_IS_NOT_EQUAL = 289; |
| 2686 |
PHP.Parser.prototype.T_IS_IDENTICAL = 290; |
| 2687 |
PHP.Parser.prototype.T_IS_NOT_IDENTICAL = 291; |
| 2688 |
PHP.Parser.prototype.T_SPACESHIP = 292; |
| 2689 |
PHP.Parser.prototype.T_IS_SMALLER_OR_EQUAL = 293; |
| 2690 |
PHP.Parser.prototype.T_IS_GREATER_OR_EQUAL = 294; |
| 2691 |
PHP.Parser.prototype.T_SL = 295; |
| 2692 |
PHP.Parser.prototype.T_SR = 296; |
| 2693 |
PHP.Parser.prototype.T_INSTANCEOF = 297; |
| 2694 |
PHP.Parser.prototype.T_INC = 298; |
| 2695 |
PHP.Parser.prototype.T_DEC = 299; |
| 2696 |
PHP.Parser.prototype.T_INT_CAST = 300; |
| 2697 |
PHP.Parser.prototype.T_DOUBLE_CAST = 301; |
| 2698 |
PHP.Parser.prototype.T_STRING_CAST = 302; |
| 2699 |
PHP.Parser.prototype.T_ARRAY_CAST = 303; |
| 2700 |
PHP.Parser.prototype.T_OBJECT_CAST = 304; |
| 2701 |
PHP.Parser.prototype.T_BOOL_CAST = 305; |
| 2702 |
PHP.Parser.prototype.T_UNSET_CAST = 306; |
| 2703 |
PHP.Parser.prototype.T_POW = 307; |
| 2704 |
PHP.Parser.prototype.T_NEW = 308; |
| 2705 |
PHP.Parser.prototype.T_CLONE = 309; |
| 2706 |
PHP.Parser.prototype.T_EXIT = 310; |
| 2707 |
PHP.Parser.prototype.T_IF = 311; |
| 2708 |
PHP.Parser.prototype.T_ELSEIF = 312; |
| 2709 |
PHP.Parser.prototype.T_ELSE = 313; |
| 2710 |
PHP.Parser.prototype.T_ENDIF = 314; |
| 2711 |
PHP.Parser.prototype.T_LNUMBER = 315; |
| 2712 |
PHP.Parser.prototype.T_DNUMBER = 316; |
| 2713 |
PHP.Parser.prototype.T_STRING = 317; |
| 2714 |
PHP.Parser.prototype.T_STRING_VARNAME = 318; |
| 2715 |
PHP.Parser.prototype.T_VARIABLE = 319; |
| 2716 |
PHP.Parser.prototype.T_NUM_STRING = 320; |
| 2717 |
PHP.Parser.prototype.T_INLINE_HTML = 321; |
| 2718 |
PHP.Parser.prototype.T_ENCAPSED_AND_WHITESPACE = 322; |
| 2719 |
PHP.Parser.prototype.T_CONSTANT_ENCAPSED_STRING = 323; |
| 2720 |
PHP.Parser.prototype.T_ECHO = 324; |
| 2721 |
PHP.Parser.prototype.T_DO = 325; |
| 2722 |
PHP.Parser.prototype.T_WHILE = 326; |
| 2723 |
PHP.Parser.prototype.T_ENDWHILE = 327; |
| 2724 |
PHP.Parser.prototype.T_FOR = 328; |
| 2725 |
PHP.Parser.prototype.T_ENDFOR = 329; |
| 2726 |
PHP.Parser.prototype.T_FOREACH = 330; |
| 2727 |
PHP.Parser.prototype.T_ENDFOREACH = 331; |
| 2728 |
PHP.Parser.prototype.T_DECLARE = 332; |
| 2729 |
PHP.Parser.prototype.T_ENDDECLARE = 333; |
| 2730 |
PHP.Parser.prototype.T_AS = 334; |
| 2731 |
PHP.Parser.prototype.T_SWITCH = 335; |
| 2732 |
PHP.Parser.prototype.T_MATCH = 336; |
| 2733 |
PHP.Parser.prototype.T_ENDSWITCH = 337; |
| 2734 |
PHP.Parser.prototype.T_CASE = 338; |
| 2735 |
PHP.Parser.prototype.T_DEFAULT = 339; |
| 2736 |
PHP.Parser.prototype.T_BREAK = 340; |
| 2737 |
PHP.Parser.prototype.T_CONTINUE = 341; |
| 2738 |
PHP.Parser.prototype.T_GOTO = 342; |
| 2739 |
PHP.Parser.prototype.T_FUNCTION = 343; |
| 2740 |
PHP.Parser.prototype.T_FN = 344; |
| 2741 |
PHP.Parser.prototype.T_CONST = 345; |
| 2742 |
PHP.Parser.prototype.T_RETURN = 346; |
| 2743 |
PHP.Parser.prototype.T_TRY = 347; |
| 2744 |
PHP.Parser.prototype.T_CATCH = 348; |
| 2745 |
PHP.Parser.prototype.T_FINALLY = 349; |
| 2746 |
PHP.Parser.prototype.T_USE = 350; |
| 2747 |
PHP.Parser.prototype.T_INSTEADOF = 351; |
| 2748 |
PHP.Parser.prototype.T_GLOBAL = 352; |
| 2749 |
PHP.Parser.prototype.T_STATIC = 353; |
| 2750 |
PHP.Parser.prototype.T_ABSTRACT = 354; |
| 2751 |
PHP.Parser.prototype.T_FINAL = 355; |
| 2752 |
PHP.Parser.prototype.T_PRIVATE = 356; |
| 2753 |
PHP.Parser.prototype.T_PROTECTED = 357; |
| 2754 |
PHP.Parser.prototype.T_PUBLIC = 358; |
| 2755 |
PHP.Parser.prototype.T_READONLY = 359; |
| 2756 |
PHP.Parser.prototype.T_VAR = 360; |
| 2757 |
PHP.Parser.prototype.T_UNSET = 361; |
| 2758 |
PHP.Parser.prototype.T_ISSET = 362; |
| 2759 |
PHP.Parser.prototype.T_EMPTY = 363; |
| 2760 |
PHP.Parser.prototype.T_HALT_COMPILER = 364; |
| 2761 |
PHP.Parser.prototype.T_CLASS = 365; |
| 2762 |
PHP.Parser.prototype.T_TRAIT = 366; |
| 2763 |
PHP.Parser.prototype.T_INTERFACE = 367; |
| 2764 |
PHP.Parser.prototype.T_ENUM = 368; |
| 2765 |
PHP.Parser.prototype.T_EXTENDS = 369; |
| 2766 |
PHP.Parser.prototype.T_IMPLEMENTS = 370; |
| 2767 |
PHP.Parser.prototype.T_OBJECT_OPERATOR = 371; |
| 2768 |
PHP.Parser.prototype.T_NULLSAFE_OBJECT_OPERATOR = 372; |
| 2769 |
PHP.Parser.prototype.T_LIST = 373; |
| 2770 |
PHP.Parser.prototype.T_ARRAY = 374; |
| 2771 |
PHP.Parser.prototype.T_CALLABLE = 375; |
| 2772 |
PHP.Parser.prototype.T_CLASS_C = 376; |
| 2773 |
PHP.Parser.prototype.T_TRAIT_C = 377; |
| 2774 |
PHP.Parser.prototype.T_METHOD_C = 378; |
| 2775 |
PHP.Parser.prototype.T_FUNC_C = 379; |
| 2776 |
PHP.Parser.prototype.T_LINE = 380; |
| 2777 |
PHP.Parser.prototype.T_FILE = 381; |
| 2778 |
PHP.Parser.prototype.T_START_HEREDOC = 382; |
| 2779 |
PHP.Parser.prototype.T_END_HEREDOC = 383; |
| 2780 |
PHP.Parser.prototype.T_DOLLAR_OPEN_CURLY_BRACES = 384; |
| 2781 |
PHP.Parser.prototype.T_CURLY_OPEN = 385; |
| 2782 |
PHP.Parser.prototype.T_PAAMAYIM_NEKUDOTAYIM = 386; |
| 2783 |
PHP.Parser.prototype.T_NAMESPACE = 387; |
| 2784 |
PHP.Parser.prototype.T_NS_C = 388; |
| 2785 |
PHP.Parser.prototype.T_DIR = 389; |
| 2786 |
PHP.Parser.prototype.T_NS_SEPARATOR = 390; |
| 2787 |
PHP.Parser.prototype.T_ELLIPSIS = 391; |
| 2788 |
PHP.Parser.prototype.T_NAME_FULLY_QUALIFIED = 392; |
| 2789 |
PHP.Parser.prototype.T_NAME_QUALIFIED = 393; |
| 2790 |
PHP.Parser.prototype.T_NAME_RELATIVE = 394; |
| 2791 |
PHP.Parser.prototype.T_ATTRIBUTE = 395; |
| 2792 |
PHP.Parser.prototype.T_BAD_CHARACTER = 396; |
| 2793 |
PHP.Parser.prototype.T_COMMENT = 397; |
| 2794 |
PHP.Parser.prototype.T_DOC_COMMENT = 398; |
| 2795 |
PHP.Parser.prototype.T_OPEN_TAG = 399; |
| 2796 |
PHP.Parser.prototype.T_OPEN_TAG_WITH_ECHO = 400; |
| 2797 |
PHP.Parser.prototype.T_CLOSE_TAG = 401; |
| 2798 |
PHP.Parser.prototype.T_WHITESPACE = 402; |
| 2799 |
PHP.Parser.prototype.terminals = [ |
| 2800 |
"EOF", |
| 2801 |
"error", |
| 2802 |
"T_THROW", |
| 2803 |
"T_INCLUDE", |
| 2804 |
"T_INCLUDE_ONCE", |
| 2805 |
"T_EVAL", |
| 2806 |
"T_REQUIRE", |
| 2807 |
"T_REQUIRE_ONCE", |
| 2808 |
"','", |
| 2809 |
"T_LOGICAL_OR", |
| 2810 |
"T_LOGICAL_XOR", |
| 2811 |
"T_LOGICAL_AND", |
| 2812 |
"T_PRINT", |
| 2813 |
"T_YIELD", |
| 2814 |
"T_DOUBLE_ARROW", |
| 2815 |
"T_YIELD_FROM", |
| 2816 |
"'='", |
| 2817 |
"T_PLUS_EQUAL", |
| 2818 |
"T_MINUS_EQUAL", |
| 2819 |
"T_MUL_EQUAL", |
| 2820 |
"T_DIV_EQUAL", |
| 2821 |
"T_CONCAT_EQUAL", |
| 2822 |
"T_MOD_EQUAL", |
| 2823 |
"T_AND_EQUAL", |
| 2824 |
"T_OR_EQUAL", |
| 2825 |
"T_XOR_EQUAL", |
| 2826 |
"T_SL_EQUAL", |
| 2827 |
"T_SR_EQUAL", |
| 2828 |
"T_POW_EQUAL", |
| 2829 |
"T_COALESCE_EQUAL", |
| 2830 |
"'?'", |
| 2831 |
"':'", |
| 2832 |
"T_COALESCE", |
| 2833 |
"T_BOOLEAN_OR", |
| 2834 |
"T_BOOLEAN_AND", |
| 2835 |
"'|'", |
| 2836 |
"'^'", |
| 2837 |
"T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG", |
| 2838 |
"T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG", |
| 2839 |
"T_IS_EQUAL", |
| 2840 |
"T_IS_NOT_EQUAL", |
| 2841 |
"T_IS_IDENTICAL", |
| 2842 |
"T_IS_NOT_IDENTICAL", |
| 2843 |
"T_SPACESHIP", |
| 2844 |
"'<'", |
| 2845 |
"T_IS_SMALLER_OR_EQUAL", |
| 2846 |
"'>'", |
| 2847 |
"T_IS_GREATER_OR_EQUAL", |
| 2848 |
"T_SL", |
| 2849 |
"T_SR", |
| 2850 |
"'+'", |
| 2851 |
"'-'", |
| 2852 |
"'.'", |
| 2853 |
"'*'", |
| 2854 |
"'/'", |
| 2855 |
"'%'", |
| 2856 |
"'!'", |
| 2857 |
"T_INSTANCEOF", |
| 2858 |
"'~'", |
| 2859 |
"T_INC", |
| 2860 |
"T_DEC", |
| 2861 |
"T_INT_CAST", |
| 2862 |
"T_DOUBLE_CAST", |
| 2863 |
"T_STRING_CAST", |
| 2864 |
"T_ARRAY_CAST", |
| 2865 |
"T_OBJECT_CAST", |
| 2866 |
"T_BOOL_CAST", |
| 2867 |
"T_UNSET_CAST", |
| 2868 |
"'@'", |
| 2869 |
"T_POW", |
| 2870 |
"'['", |
| 2871 |
"T_NEW", |
| 2872 |
"T_CLONE", |
| 2873 |
"T_EXIT", |
| 2874 |
"T_IF", |
| 2875 |
"T_ELSEIF", |
| 2876 |
"T_ELSE", |
| 2877 |
"T_ENDIF", |
| 2878 |
"T_LNUMBER", |
| 2879 |
"T_DNUMBER", |
| 2880 |
"T_STRING", |
| 2881 |
"T_STRING_VARNAME", |
| 2882 |
"T_VARIABLE", |
| 2883 |
"T_NUM_STRING", |
| 2884 |
"T_INLINE_HTML", |
| 2885 |
"T_ENCAPSED_AND_WHITESPACE", |
| 2886 |
"T_CONSTANT_ENCAPSED_STRING", |
| 2887 |
"T_ECHO", |
| 2888 |
"T_DO", |
| 2889 |
"T_WHILE", |
| 2890 |
"T_ENDWHILE", |
| 2891 |
"T_FOR", |
| 2892 |
"T_ENDFOR", |
| 2893 |
"T_FOREACH", |
| 2894 |
"T_ENDFOREACH", |
| 2895 |
"T_DECLARE", |
| 2896 |
"T_ENDDECLARE", |
| 2897 |
"T_AS", |
| 2898 |
"T_SWITCH", |
| 2899 |
"T_MATCH", |
| 2900 |
"T_ENDSWITCH", |
| 2901 |
"T_CASE", |
| 2902 |
"T_DEFAULT", |
| 2903 |
"T_BREAK", |
| 2904 |
"T_CONTINUE", |
| 2905 |
"T_GOTO", |
| 2906 |
"T_FUNCTION", |
| 2907 |
"T_FN", |
| 2908 |
"T_CONST", |
| 2909 |
"T_RETURN", |
| 2910 |
"T_TRY", |
| 2911 |
"T_CATCH", |
| 2912 |
"T_FINALLY", |
| 2913 |
"T_USE", |
| 2914 |
"T_INSTEADOF", |
| 2915 |
"T_GLOBAL", |
| 2916 |
"T_STATIC", |
| 2917 |
"T_ABSTRACT", |
| 2918 |
"T_FINAL", |
| 2919 |
"T_PRIVATE", |
| 2920 |
"T_PROTECTED", |
| 2921 |
"T_PUBLIC", |
| 2922 |
"T_READONLY", |
| 2923 |
"T_VAR", |
| 2924 |
"T_UNSET", |
| 2925 |
"T_ISSET", |
| 2926 |
"T_EMPTY", |
| 2927 |
"T_HALT_COMPILER", |
| 2928 |
"T_CLASS", |
| 2929 |
"T_TRAIT", |
| 2930 |
"T_INTERFACE", |
| 2931 |
"T_ENUM", |
| 2932 |
"T_EXTENDS", |
| 2933 |
"T_IMPLEMENTS", |
| 2934 |
"T_OBJECT_OPERATOR", |
| 2935 |
"T_NULLSAFE_OBJECT_OPERATOR", |
| 2936 |
"T_LIST", |
| 2937 |
"T_ARRAY", |
| 2938 |
"T_CALLABLE", |
| 2939 |
"T_CLASS_C", |
| 2940 |
"T_TRAIT_C", |
| 2941 |
"T_METHOD_C", |
| 2942 |
"T_FUNC_C", |
| 2943 |
"T_LINE", |
| 2944 |
"T_FILE", |
| 2945 |
"T_START_HEREDOC", |
| 2946 |
"T_END_HEREDOC", |
| 2947 |
"T_DOLLAR_OPEN_CURLY_BRACES", |
| 2948 |
"T_CURLY_OPEN", |
| 2949 |
"T_PAAMAYIM_NEKUDOTAYIM", |
| 2950 |
"T_NAMESPACE", |
| 2951 |
"T_NS_C", |
| 2952 |
"T_DIR", |
| 2953 |
"T_NS_SEPARATOR", |
| 2954 |
"T_ELLIPSIS", |
| 2955 |
"T_NAME_FULLY_QUALIFIED", |
| 2956 |
"T_NAME_QUALIFIED", |
| 2957 |
"T_NAME_RELATIVE", |
| 2958 |
"T_ATTRIBUTE", |
| 2959 |
"';'", |
| 2960 |
"']'", |
| 2961 |
"'{'", |
| 2962 |
"'}'", |
| 2963 |
"'('", |
| 2964 |
"')'", |
| 2965 |
"'`'", |
| 2966 |
"'\"'", |
| 2967 |
"'$'", |
| 2968 |
"T_BAD_CHARACTER", |
| 2969 |
"T_COMMENT", |
| 2970 |
"T_DOC_COMMENT", |
| 2971 |
"T_OPEN_TAG", |
| 2972 |
"T_OPEN_TAG_WITH_ECHO", |
| 2973 |
"T_CLOSE_TAG", |
| 2974 |
"T_WHITESPACE" |
| 2975 |
, "???" |
| 2976 |
]; |
| 2977 |
PHP.Parser.prototype.translate = [ |
| 2978 |
0, 175, 175, 175, 175, 175, 175, 175, 175, 175, |
| 2979 |
175, 175, 175, 175, 175, 175, 175, 175, 175, 175, |
| 2980 |
175, 175, 175, 175, 175, 175, 175, 175, 175, 175, |
| 2981 |
175, 175, 175, 56, 166, 175, 167, 55, 175, 175, |
| 2982 |
163, 164, 53, 50, 8, 51, 52, 54, 175, 175, |
| 2983 |
175, 175, 175, 175, 175, 175, 175, 175, 31, 159, |
| 2984 |
44, 16, 46, 30, 68, 175, 175, 175, 175, 175, |
| 2985 |
175, 175, 175, 175, 175, 175, 175, 175, 175, 175, |
| 2986 |
175, 175, 175, 175, 175, 175, 175, 175, 175, 175, |
| 2987 |
175, 70, 175, 160, 36, 175, 165, 175, 175, 175, |
| 2988 |
175, 175, 175, 175, 175, 175, 175, 175, 175, 175, |
| 2989 |
175, 175, 175, 175, 175, 175, 175, 175, 175, 175, |
| 2990 |
175, 175, 175, 161, 35, 162, 58, 175, 175, 175, |
| 2991 |
175, 175, 175, 175, 175, 175, 175, 175, 175, 175, |
| 2992 |
175, 175, 175, 175, 175, 175, 175, 175, 175, 175, |
| 2993 |
175, 175, 175, 175, 175, 175, 175, 175, 175, 175, |
| 2994 |
175, 175, 175, 175, 175, 175, 175, 175, 175, 175, |
| 2995 |
175, 175, 175, 175, 175, 175, 175, 175, 175, 175, |
| 2996 |
175, 175, 175, 175, 175, 175, 175, 175, 175, 175, |
| 2997 |
175, 175, 175, 175, 175, 175, 175, 175, 175, 175, |
| 2998 |
175, 175, 175, 175, 175, 175, 175, 175, 175, 175, |
| 2999 |
175, 175, 175, 175, 175, 175, 175, 175, 175, 175, |
| 3000 |
175, 175, 175, 175, 175, 175, 175, 175, 175, 175, |
| 3001 |
175, 175, 175, 175, 175, 175, 175, 175, 175, 175, |
| 3002 |
175, 175, 175, 175, 175, 175, 175, 175, 175, 175, |
| 3003 |
175, 175, 175, 175, 175, 175, 1, 2, 3, 4, |
| 3004 |
5, 6, 7, 9, 10, 11, 12, 13, 14, 15, |
| 3005 |
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, |
| 3006 |
27, 28, 29, 32, 33, 34, 37, 38, 39, 40, |
| 3007 |
41, 42, 43, 45, 47, 48, 49, 57, 59, 60, |
| 3008 |
61, 62, 63, 64, 65, 66, 67, 69, 71, 72, |
| 3009 |
73, 74, 75, 76, 77, 78, 79, 80, 81, 82, |
| 3010 |
83, 84, 85, 86, 87, 88, 89, 90, 91, 92, |
| 3011 |
93, 94, 95, 96, 97, 98, 99, 100, 101, 102, |
| 3012 |
103, 104, 105, 106, 107, 108, 109, 110, 111, 112, |
| 3013 |
113, 114, 115, 116, 117, 118, 119, 120, 121, 122, |
| 3014 |
123, 124, 125, 126, 127, 128, 129, 130, 131, 132, |
| 3015 |
133, 134, 135, 136, 137, 138, 139, 140, 141, 142, |
| 3016 |
143, 144, 145, 146, 147, 148, 149, 150, 151, 152, |
| 3017 |
153, 154, 155, 156, 157, 158, 168, 169, 170, 171, |
| 3018 |
172, 173, 174 |
| 3019 |
]; |
| 3020 |
|
| 3021 |
PHP.Parser.prototype.yyaction = [ |
| 3022 |
132, 133, 134, 569, 135, 136, 0, 722, 723, 724, |
| 3023 |
137, 37, 834, 911, 835, 469,-32766,-32766,-32766,-32767, |
| 3024 |
-32767,-32767,-32767, 101, 102, 103, 104, 105, 1068, 1069, |
| 3025 |
1070, 1067, 1066, 1065, 1071, 716, 715,-32766,-32766,-32766, |
| 3026 |
-32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, |
| 3027 |
-32767, 545, 546,-32766,-32766, 725,-32766,-32766,-32766, 998, |
| 3028 |
999, 806, 922, 447, 448, 449, 370, 371, 2, 267, |
| 3029 |
138, 396, 729, 730, 731, 732, 414,-32766, 420,-32766, |
| 3030 |
-32766,-32766,-32766,-32766, 990, 733, 734, 735, 736, 737, |
| 3031 |
738, 739, 740, 741, 742, 743, 763, 570, 764, 765, |
| 3032 |
766, 767, 755, 756, 336, 337, 758, 759, 744, 745, |
| 3033 |
746, 748, 749, 750, 346, 790, 791, 792, 793, 794, |
| 3034 |
795, 751, 752, 571, 572, 784, 775, 773, 774, 787, |
| 3035 |
770, 771, 283, 420, 573, 574, 769, 575, 576, 577, |
| 3036 |
578, 579, 580, 598, -575, 470, 14, 798, 772, 581, |
| 3037 |
582, -575, 139,-32766,-32766,-32766, 132, 133, 134, 569, |
| 3038 |
135, 136, 1017, 722, 723, 724, 137, 37, 1060,-32766, |
| 3039 |
-32766,-32766, 1303, 696,-32766, 1304,-32766,-32766,-32766,-32766, |
| 3040 |
-32766,-32766,-32766, 1068, 1069, 1070, 1067, 1066, 1065, 1071, |
| 3041 |
-32766, 716, 715, 372, 371, 1258,-32766,-32766,-32766, -572, |
| 3042 |
106, 107, 108, 414, 270, 891, -572, 240, 1193, 1192, |
| 3043 |
1194, 725,-32766,-32766,-32766, 1046, 109,-32766,-32766,-32766, |
| 3044 |
-32766, 986, 985, 984, 987, 267, 138, 396, 729, 730, |
| 3045 |
731, 732, 12,-32766, 420,-32766,-32766,-32766,-32766, 998, |
| 3046 |
999, 733, 734, 735, 736, 737, 738, 739, 740, 741, |
| 3047 |
742, 743, 763, 570, 764, 765, 766, 767, 755, 756, |
| 3048 |
336, 337, 758, 759, 744, 745, 746, 748, 749, 750, |
| 3049 |
346, 790, 791, 792, 793, 794, 795, 751, 752, 571, |
| 3050 |
572, 784, 775, 773, 774, 787, 770, 771, 881, 321, |
| 3051 |
573, 574, 769, 575, 576, 577, 578, 579, 580,-32766, |
| 3052 |
82, 83, 84, -575, 772, 581, 582, -575, 148, 747, |
| 3053 |
717, 718, 719, 720, 721, 1278, 722, 723, 724, 760, |
| 3054 |
761, 36, 1277, 85, 86, 87, 88, 89, 90, 91, |
| 3055 |
92, 93, 94, 95, 96, 97, 98, 99, 100, 101, |
| 3056 |
102, 103, 104, 105, 106, 107, 108, 996, 270, 150, |
| 3057 |
-32766,-32766,-32766, 455, 456, 81, 34, -264, -572, 1016, |
| 3058 |
109, 320, -572, 893, 725, 682, 803, 128, 998, 999, |
| 3059 |
592,-32766, 1044,-32766,-32766,-32766, 809, 151, 726, 727, |
| 3060 |
728, 729, 730, 731, 732, -88, 1198, 796, 278, -526, |
| 3061 |
283,-32766,-32766,-32766, 733, 734, 735, 736, 737, 738, |
| 3062 |
739, 740, 741, 742, 743, 763, 786, 764, 765, 766, |
| 3063 |
767, 755, 756, 757, 785, 758, 759, 744, 745, 746, |
| 3064 |
748, 749, 750, 789, 790, 791, 792, 793, 794, 795, |
| 3065 |
751, 752, 753, 754, 784, 775, 773, 774, 787, 770, |
| 3066 |
771, 144, 804, 762, 768, 769, 776, 777, 779, 778, |
| 3067 |
780, 781, -314, -526, -526, -193, -192, 772, 783, 782, |
| 3068 |
49, 50, 51, 500, 52, 53, 239, 807, -526, -86, |
| 3069 |
54, 55, -111, 56, 996, 253,-32766, -111, 800, -111, |
| 3070 |
-526, 541, -532, -352, 300, -352, 304, -111, -111, -111, |
| 3071 |
-111, -111, -111, -111, -111, 998, 999, 998, 999, 153, |
| 3072 |
-32766,-32766,-32766, 1191, 807, 126, 306, 1293, 57, 58, |
| 3073 |
103, 104, 105, -111, 59, 1218, 60, 246, 247, 61, |
| 3074 |
62, 63, 64, 65, 66, 67, 68, -525, 27, 268, |
| 3075 |
69, 436, 501, -328, 808, -86, 1224, 1225, 502, 1189, |
| 3076 |
807, 1198, 1230, 293, 1222, 41, 24, 503, 74, 504, |
| 3077 |
953, 505, 320, 506, 802, 154, 507, 508, 279, 684, |
| 3078 |
280, 43, 44, 437, 367, 366, 891, 45, 509, 35, |
| 3079 |
249, -16, -566, 358, 332, 318, -566, 1198, 1193, 1192, |
| 3080 |
1194, -527, 510, 511, 512, 333, -524, 1274, 48, 716, |
| 3081 |
715, -525, -525, 334, 513, 514, 807, 1212, 1213, 1214, |
| 3082 |
1215, 1209, 1210, 292, 360, 284, -525, 285, -314, 1216, |
| 3083 |
1211, -193, -192, 1193, 1192, 1194, 293, 891, -525, 364, |
| 3084 |
-531, 70, 807, 316, 317, 320, 31, 110, 111, 112, |
| 3085 |
113, 114, 115, 116, 117, 118, 119, 120, 121, 122, |
| 3086 |
-153, -153, -153, 638, 25, -527, -527, 687, 379, 881, |
| 3087 |
-524, -524, 296, 297, 891, -153, 432, -153, 807, -153, |
| 3088 |
-527, -153, 716, 715, 433, -524, 798, 363, -111, 1105, |
| 3089 |
1107, 365, -527, 434, 891, 140, 435, -524, 954, 127, |
| 3090 |
-524, 320, -111, -111, 688, 813, 381, -529, 11, 834, |
| 3091 |
155, 835, 867, -111, -111, -111, -111, 47, 293,-32766, |
| 3092 |
881, 654, 655, 74, 689, 1191, 1045, 320, 708, 149, |
| 3093 |
399, 157,-32766,-32766,-32766, 32,-32766, -79,-32766, 123, |
| 3094 |
-32766, 716, 715,-32766, 893, 891, 682, -153,-32766,-32766, |
| 3095 |
-32766, 716, 715, 891,-32766,-32766, 124, 881, 129, 74, |
| 3096 |
-32766, 411, 130, 320, -524, -524, 143, 141, -75,-32766, |
| 3097 |
158, -529, -529, 320, 27, 691, 159, 881, 160, -524, |
| 3098 |
161, 294, 295, 698, 368, 369, 807, -73,-32766, -72, |
| 3099 |
1222, -524, 373, 374, 1191, 893, -71, 682, -529, 73, |
| 3100 |
-70,-32766,-32766,-32766, -69,-32766, -68,-32766, 125,-32766, |
| 3101 |
630, 631,-32766, -67, -66, -47, -51,-32766,-32766,-32766, |
| 3102 |
-18, 147, 271,-32766,-32766, 277, 697, 700, 881,-32766, |
| 3103 |
411, 890, 893, 146, 682, 282, 881, 907,-32766, 281, |
| 3104 |
513, 514, 286, 1212, 1213, 1214, 1215, 1209, 1210, 326, |
| 3105 |
131, 145, 939, 287, 682, 1216, 1211, 109, 270,-32766, |
| 3106 |
798, 807,-32766, 662, 639, 1191, 657, 72, 675, 1075, |
| 3107 |
317, 320,-32766,-32766,-32766, 1305,-32766, 301,-32766, 628, |
| 3108 |
-32766, 431, 543,-32766,-32766, 923, 555, 924,-32766,-32766, |
| 3109 |
-32766, 1229, 549,-32766,-32766,-32766, -4, 891, -490, 1191, |
| 3110 |
-32766, 411, 644, 893, 299, 682,-32766,-32766,-32766,-32766, |
| 3111 |
-32766, 893,-32766, 682,-32766, 13, 1231,-32766, 452, 480, |
| 3112 |
645, 909,-32766,-32766,-32766,-32766, 658, -480,-32766,-32766, |
| 3113 |
0, 1191, 0, 0,-32766, 411, 0, 298,-32766,-32766, |
| 3114 |
-32766, 305,-32766,-32766,-32766, 0,-32766, 0, 806,-32766, |
| 3115 |
0, 0, 0, 475,-32766,-32766,-32766,-32766, 0, 7, |
| 3116 |
-32766,-32766, 16, 1191, 561, 596,-32766, 411, 1219, 891, |
| 3117 |
-32766,-32766,-32766, 362,-32766,-32766,-32766, 818,-32766, -267, |
| 3118 |
881,-32766, 39, 293, 0, 0,-32766,-32766,-32766, 40, |
| 3119 |
705, 706,-32766,-32766, 872, 963, 940, 947,-32766, 411, |
| 3120 |
937, 948, 365, 870, 427, 891, 935,-32766, 1049, 291, |
| 3121 |
1244, 1052, 1053, -111, -111, 1050, 1051, 1057, -560, 1262, |
| 3122 |
1296, 633, 0, 826, -111, -111, -111, -111, 33, 315, |
| 3123 |
-32766, 361, 683, 686, 690, 692, 1191, 693, 694, 695, |
| 3124 |
699, 685, 320,-32766,-32766,-32766, 9,-32766, 702,-32766, |
| 3125 |
868,-32766, 881, 1300,-32766, 893, 1302, 682, -4,-32766, |
| 3126 |
-32766,-32766, 829, 828, 837,-32766,-32766, 916, -242, -242, |
| 3127 |
-242,-32766, 411, 955, 365, 27, 836, 1301, 915, 917, |
| 3128 |
-32766, 914, 1177, 900, 910, -111, -111, 807, 881, 898, |
| 3129 |
945, 1222, 946, 1299, 1256, 867, -111, -111, -111, -111, |
| 3130 |
1245, 1263, 1269, 1272, -241, -241, -241, -558, -532, -531, |
| 3131 |
365, -530, 1, 28, 29, 38, 42, 46, 71, 0, |
| 3132 |
75, -111, -111, 76, 77, 78, 79, 893, 80, 682, |
| 3133 |
-242, 867, -111, -111, -111, -111, 142, 152, 156, 245, |
| 3134 |
322, 347, 514, 348, 1212, 1213, 1214, 1215, 1209, 1210, |
| 3135 |
349, 350, 351, 352, 353, 354, 1216, 1211, 355, 356, |
| 3136 |
357, 359, 428, 893, -265, 682, -241, -264, 72, 0, |
| 3137 |
18, 317, 320, 19, 20, 21, 23, 398, 471, 472, |
| 3138 |
479, 482, 483, 484, 485, 489, 490, 491, 498, 669, |
| 3139 |
1202, 1145, 1220, 1019, 1018, 1181, -269, -103, 17, 22, |
| 3140 |
26, 290, 397, 589, 593, 620, 674, 1149, 1197, 1146, |
| 3141 |
1275, 0, -494, 1162, 0, 1223 |
| 3142 |
]; |
| 3143 |
|
| 3144 |
PHP.Parser.prototype.yycheck = [ |
| 3145 |
2, 3, 4, 5, 6, 7, 0, 9, 10, 11, |
| 3146 |
12, 13, 106, 1, 108, 31, 9, 10, 11, 44, |
| 3147 |
45, 46, 47, 48, 49, 50, 51, 52, 116, 117, |
| 3148 |
118, 119, 120, 121, 122, 37, 38, 30, 116, 32, |
| 3149 |
33, 34, 35, 36, 37, 38, 39, 40, 41, 42, |
| 3150 |
43, 117, 118, 9, 10, 57, 9, 10, 11, 137, |
| 3151 |
138, 155, 128, 129, 130, 131, 106, 107, 8, 71, |
| 3152 |
72, 73, 74, 75, 76, 77, 116, 30, 80, 32, |
| 3153 |
33, 34, 35, 36, 1, 87, 88, 89, 90, 91, |
| 3154 |
92, 93, 94, 95, 96, 97, 98, 99, 100, 101, |
| 3155 |
102, 103, 104, 105, 106, 107, 108, 109, 110, 111, |
| 3156 |
112, 113, 114, 115, 116, 117, 118, 119, 120, 121, |
| 3157 |
122, 123, 124, 125, 126, 127, 128, 129, 130, 131, |
| 3158 |
132, 133, 30, 80, 136, 137, 138, 139, 140, 141, |
| 3159 |
142, 143, 144, 51, 1, 161, 101, 80, 150, 151, |
| 3160 |
152, 8, 154, 9, 10, 11, 2, 3, 4, 5, |
| 3161 |
6, 7, 164, 9, 10, 11, 12, 13, 123, 9, |
| 3162 |
10, 11, 80, 161, 30, 83, 32, 33, 34, 35, |
| 3163 |
36, 37, 38, 116, 117, 118, 119, 120, 121, 122, |
| 3164 |
30, 37, 38, 106, 107, 1, 9, 10, 11, 1, |
| 3165 |
53, 54, 55, 116, 57, 1, 8, 14, 155, 156, |
| 3166 |
157, 57, 9, 10, 11, 162, 69, 30, 116, 32, |
| 3167 |
33, 119, 120, 121, 122, 71, 72, 73, 74, 75, |
| 3168 |
76, 77, 8, 30, 80, 32, 33, 34, 35, 137, |
| 3169 |
138, 87, 88, 89, 90, 91, 92, 93, 94, 95, |
| 3170 |
96, 97, 98, 99, 100, 101, 102, 103, 104, 105, |
| 3171 |
106, 107, 108, 109, 110, 111, 112, 113, 114, 115, |
| 3172 |
116, 117, 118, 119, 120, 121, 122, 123, 124, 125, |
| 3173 |
126, 127, 128, 129, 130, 131, 132, 133, 84, 70, |
| 3174 |
136, 137, 138, 139, 140, 141, 142, 143, 144, 9, |
| 3175 |
9, 10, 11, 160, 150, 151, 152, 164, 154, 2, |
| 3176 |
3, 4, 5, 6, 7, 1, 9, 10, 11, 12, |
| 3177 |
13, 30, 8, 32, 33, 34, 35, 36, 37, 38, |
| 3178 |
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, |
| 3179 |
49, 50, 51, 52, 53, 54, 55, 116, 57, 14, |
| 3180 |
9, 10, 11, 134, 135, 161, 8, 164, 160, 1, |
| 3181 |
69, 167, 164, 159, 57, 161, 80, 8, 137, 138, |
| 3182 |
1, 30, 1, 32, 33, 34, 1, 14, 71, 72, |
| 3183 |
73, 74, 75, 76, 77, 31, 1, 80, 30, 70, |
| 3184 |
30, 9, 10, 11, 87, 88, 89, 90, 91, 92, |
| 3185 |
93, 94, 95, 96, 97, 98, 99, 100, 101, 102, |
| 3186 |
103, 104, 105, 106, 107, 108, 109, 110, 111, 112, |
| 3187 |
113, 114, 115, 116, 117, 118, 119, 120, 121, 122, |
| 3188 |
123, 124, 125, 126, 127, 128, 129, 130, 131, 132, |
| 3189 |
133, 8, 156, 136, 137, 138, 139, 140, 141, 142, |
| 3190 |
143, 144, 8, 134, 135, 8, 8, 150, 151, 152, |
| 3191 |
2, 3, 4, 5, 6, 7, 97, 82, 149, 31, |
| 3192 |
12, 13, 101, 15, 116, 8, 116, 106, 80, 108, |
| 3193 |
161, 85, 163, 106, 113, 108, 8, 116, 117, 118, |
| 3194 |
119, 120, 121, 122, 123, 137, 138, 137, 138, 14, |
| 3195 |
9, 10, 11, 80, 82, 14, 8, 85, 50, 51, |
| 3196 |
50, 51, 52, 128, 56, 1, 58, 59, 60, 61, |
| 3197 |
62, 63, 64, 65, 66, 67, 68, 70, 70, 71, |
| 3198 |
72, 73, 74, 162, 159, 97, 78, 79, 80, 116, |
| 3199 |
82, 1, 146, 158, 86, 87, 88, 89, 163, 91, |
| 3200 |
31, 93, 167, 95, 156, 14, 98, 99, 35, 161, |
| 3201 |
37, 103, 104, 105, 106, 107, 1, 109, 110, 147, |
| 3202 |
148, 31, 160, 115, 116, 8, 164, 1, 155, 156, |
| 3203 |
157, 70, 124, 125, 126, 8, 70, 1, 70, 37, |
| 3204 |
38, 134, 135, 8, 136, 137, 82, 139, 140, 141, |
| 3205 |
142, 143, 144, 145, 8, 35, 149, 37, 164, 151, |
| 3206 |
152, 164, 164, 155, 156, 157, 158, 1, 161, 8, |
| 3207 |
163, 163, 82, 165, 166, 167, 16, 17, 18, 19, |
| 3208 |
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, |
| 3209 |
75, 76, 77, 75, 76, 134, 135, 31, 8, 84, |
| 3210 |
134, 135, 134, 135, 1, 90, 8, 92, 82, 94, |
| 3211 |
149, 96, 37, 38, 8, 149, 80, 149, 128, 59, |
| 3212 |
60, 106, 161, 8, 1, 161, 8, 161, 159, 161, |
| 3213 |
70, 167, 117, 118, 31, 8, 106, 70, 108, 106, |
| 3214 |
14, 108, 127, 128, 129, 130, 131, 70, 158, 74, |
| 3215 |
84, 75, 76, 163, 31, 80, 159, 167, 161, 101, |
| 3216 |
102, 14, 87, 88, 89, 14, 91, 31, 93, 16, |
| 3217 |
95, 37, 38, 98, 159, 1, 161, 162, 103, 104, |
| 3218 |
105, 37, 38, 1, 109, 110, 16, 84, 16, 163, |
| 3219 |
115, 116, 16, 167, 134, 135, 16, 161, 31, 124, |
| 3220 |
16, 134, 135, 167, 70, 31, 16, 84, 16, 149, |
| 3221 |
16, 134, 135, 31, 106, 107, 82, 31, 74, 31, |
| 3222 |
86, 161, 106, 107, 80, 159, 31, 161, 161, 154, |
| 3223 |
31, 87, 88, 89, 31, 91, 31, 93, 161, 95, |
| 3224 |
111, 112, 98, 31, 31, 31, 31, 103, 104, 105, |
| 3225 |
31, 31, 31, 109, 110, 31, 31, 31, 84, 115, |
| 3226 |
116, 31, 159, 31, 161, 37, 84, 38, 124, 35, |
| 3227 |
136, 137, 35, 139, 140, 141, 142, 143, 144, 35, |
| 3228 |
31, 70, 159, 37, 161, 151, 152, 69, 57, 74, |
| 3229 |
80, 82, 85, 77, 90, 80, 94, 163, 92, 82, |
| 3230 |
166, 167, 87, 88, 89, 83, 91, 114, 93, 113, |
| 3231 |
95, 128, 85, 98, 116, 128, 153, 128, 103, 104, |
| 3232 |
105, 146, 89, 74, 109, 110, 0, 1, 149, 80, |
| 3233 |
115, 116, 96, 159, 133, 161, 87, 88, 89, 124, |
| 3234 |
91, 159, 93, 161, 95, 97, 146, 98, 97, 97, |
| 3235 |
100, 154, 103, 104, 105, 74, 100, 149, 109, 110, |
| 3236 |
-1, 80, -1, -1, 115, 116, -1, 132, 87, 88, |
| 3237 |
89, 132, 91, 124, 93, -1, 95, -1, 155, 98, |
| 3238 |
-1, -1, -1, 102, 103, 104, 105, 74, -1, 149, |
| 3239 |
109, 110, 149, 80, 81, 153, 115, 116, 160, 1, |
| 3240 |
87, 88, 89, 149, 91, 124, 93, 160, 95, 164, |
| 3241 |
84, 98, 159, 158, -1, -1, 103, 104, 105, 159, |
| 3242 |
159, 159, 109, 110, 159, 159, 159, 159, 115, 116, |
| 3243 |
159, 159, 106, 159, 108, 1, 159, 124, 159, 113, |
| 3244 |
160, 159, 159, 117, 118, 159, 159, 159, 163, 160, |
| 3245 |
160, 160, -1, 127, 128, 129, 130, 131, 161, 161, |
| 3246 |
74, 161, 161, 161, 161, 161, 80, 161, 161, 161, |
| 3247 |
161, 161, 167, 87, 88, 89, 150, 91, 162, 93, |
| 3248 |
162, 95, 84, 162, 98, 159, 162, 161, 162, 103, |
| 3249 |
104, 105, 162, 162, 162, 109, 110, 162, 100, 101, |
| 3250 |
102, 115, 116, 162, 106, 70, 162, 162, 162, 162, |
| 3251 |
124, 162, 162, 162, 162, 117, 118, 82, 84, 162, |
| 3252 |
162, 86, 162, 162, 162, 127, 128, 129, 130, 131, |
| 3253 |
162, 162, 162, 162, 100, 101, 102, 163, 163, 163, |
| 3254 |
106, 163, 163, 163, 163, 163, 163, 163, 163, -1, |
| 3255 |
163, 117, 118, 163, 163, 163, 163, 159, 163, 161, |
| 3256 |
162, 127, 128, 129, 130, 131, 163, 163, 163, 163, |
| 3257 |
163, 163, 137, 163, 139, 140, 141, 142, 143, 144, |
| 3258 |
163, 163, 163, 163, 163, 163, 151, 152, 163, 163, |
| 3259 |
163, 163, 163, 159, 164, 161, 162, 164, 163, -1, |
| 3260 |
164, 166, 167, 164, 164, 164, 164, 164, 164, 164, |
| 3261 |
164, 164, 164, 164, 164, 164, 164, 164, 164, 164, |
| 3262 |
164, 164, 164, 164, 164, 164, 164, 164, 164, 164, |
| 3263 |
164, 164, 164, 164, 164, 164, 164, 164, 164, 164, |
| 3264 |
164, -1, 165, 165, -1, 166 |
| 3265 |
]; |
| 3266 |
|
| 3267 |
PHP.Parser.prototype.yybase = [ |
| 3268 |
0, -2, 154, 565, 876, 948, 984, 514, 53, 398, |
| 3269 |
837, 307, 307, 67, 307, 307, 307, 653, 724, 724, |
| 3270 |
732, 724, 616, 673, 204, 204, 204, 625, 625, 625, |
| 3271 |
625, 694, 694, 831, 831, 863, 799, 765, 936, 936, |
| 3272 |
936, 936, 936, 936, 936, 936, 936, 936, 936, 936, |
| 3273 |
936, 936, 936, 936, 936, 936, 936, 936, 936, 936, |
| 3274 |
936, 936, 936, 936, 936, 936, 936, 936, 936, 936, |
| 3275 |
936, 936, 936, 936, 936, 936, 936, 936, 936, 936, |
| 3276 |
936, 936, 936, 936, 936, 936, 936, 936, 936, 936, |
| 3277 |
936, 936, 936, 936, 936, 936, 936, 936, 936, 936, |
| 3278 |
936, 936, 936, 936, 936, 936, 936, 936, 936, 936, |
| 3279 |
936, 936, 936, 936, 936, 936, 936, 936, 936, 936, |
| 3280 |
936, 936, 936, 936, 936, 936, 936, 936, 936, 936, |
| 3281 |
936, 936, 936, 936, 936, 936, 936, 936, 936, 936, |
| 3282 |
936, 936, 936, 936, 936, 936, 936, 936, 936, 936, |
| 3283 |
936, 936, 936, 936, 936, 936, 936, 936, 936, 936, |
| 3284 |
936, 936, 375, 519, 369, 701, 1017, 1023, 1019, 1024, |
| 3285 |
1015, 1014, 1018, 1020, 1025, 911, 912, 782, 918, 919, |
| 3286 |
920, 921, 1021, 841, 1016, 1022, 291, 291, 291, 291, |
| 3287 |
291, 291, 291, 291, 291, 291, 291, 291, 291, 291, |
| 3288 |
291, 291, 291, 291, 291, 291, 291, 291, 291, 291, |
| 3289 |
291, 291, 290, 491, 44, 382, 382, 382, 382, 382, |
| 3290 |
382, 382, 382, 382, 382, 382, 382, 382, 382, 382, |
| 3291 |
382, 382, 382, 382, 382, 160, 160, 160, 187, 684, |
| 3292 |
684, 341, 203, 610, 47, 985, 985, 985, 985, 985, |
| 3293 |
985, 985, 985, 985, 985, 144, 144, 7, 7, 7, |
| 3294 |
7, 7, 371, -25, -25, -25, -25, 540, 385, 102, |
| 3295 |
576, 358, 45, 377, 460, 460, 360, 231, 231, 231, |
| 3296 |
231, 231, 231, -78, -78, -78, -78, -78, -66, 319, |
| 3297 |
457, -94, 396, 423, 586, 586, 586, 586, 423, 423, |
| 3298 |
423, 423, 750, 1029, 423, 423, 423, 511, 516, 516, |
| 3299 |
518, 147, 147, 147, 516, 583, 777, 422, 583, 422, |
| 3300 |
194, 92, 748, -40, 87, 412, 748, 617, 627, 198, |
| 3301 |
143, 773, 658, 773, 1013, 757, 764, 717, 838, 860, |
| 3302 |
1026, 800, 908, 806, 910, 219, 686, 1012, 1012, 1012, |
| 3303 |
1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 855, 552, |
| 3304 |
1013, 286, 855, 855, 855, 552, 552, 552, 552, 552, |
| 3305 |
552, 552, 552, 552, 552, 679, 286, 568, 626, 286, |
| 3306 |
794, 552, 375, 758, 375, 375, 375, 375, 958, 375, |
| 3307 |
375, 375, 375, 375, 375, 970, 769, -16, 375, 519, |
| 3308 |
12, 12, 547, 83, 12, 12, 12, 12, 375, 375, |
| 3309 |
375, 658, 781, 713, 666, 792, 448, 781, 781, 781, |
| 3310 |
438, 444, 193, 447, 570, 523, 580, 760, 760, 767, |
| 3311 |
929, 929, 760, 759, 760, 767, 934, 760, 929, 805, |
| 3312 |
359, 648, 577, 611, 656, 929, 478, 760, 760, 760, |
| 3313 |
760, 665, 760, 467, 433, 760, 760, 785, 774, 789, |
| 3314 |
60, 929, 929, 929, 789, 596, 751, 751, 751, 811, |
| 3315 |
812, 746, 771, 567, 498, 677, 348, 779, 771, 771, |
| 3316 |
760, 640, 746, 771, 746, 771, 747, 771, 771, 771, |
| 3317 |
746, 771, 759, 585, 771, 734, 668, 224, 771, 6, |
| 3318 |
935, 937, 354, 940, 932, 941, 979, 942, 943, 851, |
| 3319 |
956, 933, 945, 931, 930, 780, 703, 720, 790, 729, |
| 3320 |
928, 768, 768, 768, 925, 768, 768, 768, 768, 768, |
| 3321 |
768, 768, 768, 703, 788, 804, 733, 783, 960, 722, |
| 3322 |
726, 725, 868, 1027, 1028, 737, 739, 958, 1006, 953, |
| 3323 |
803, 730, 992, 967, 866, 848, 968, 969, 993, 1007, |
| 3324 |
1008, 871, 761, 874, 880, 797, 971, 852, 768, 935, |
| 3325 |
943, 933, 945, 931, 930, 763, 762, 753, 755, 749, |
| 3326 |
745, 736, 738, 770, 1009, 924, 835, 830, 970, 926, |
| 3327 |
703, 839, 986, 847, 994, 995, 850, 801, 772, 840, |
| 3328 |
881, 972, 975, 976, 853, 1010, 810, 989, 795, 996, |
| 3329 |
802, 882, 997, 998, 999, 1000, 885, 854, 856, 857, |
| 3330 |
815, 754, 980, 786, 891, 335, 787, 796, 978, 363, |
| 3331 |
957, 858, 894, 895, 1001, 1002, 1003, 896, 954, 816, |
| 3332 |
990, 752, 991, 983, 817, 818, 485, 784, 778, 541, |
| 3333 |
676, 897, 899, 900, 955, 775, 766, 821, 822, 1011, |
| 3334 |
901, 697, 824, 740, 902, 1005, 742, 744, 756, 859, |
| 3335 |
793, 743, 798, 977, 776, 827, 907, 829, 832, 833, |
| 3336 |
1004, 836, 0, 0, 0, 0, 0, 0, 0, 0, |
| 3337 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 3338 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 3339 |
0, 458, 458, 458, 458, 458, 458, 307, 307, 307, |
| 3340 |
307, 0, 0, 307, 0, 0, 0, 458, 458, 458, |
| 3341 |
458, 458, 458, 458, 458, 458, 458, 458, 458, 458, |
| 3342 |
458, 458, 458, 458, 458, 458, 458, 458, 458, 458, |
| 3343 |
458, 458, 458, 458, 458, 458, 458, 458, 458, 458, |
| 3344 |
458, 458, 458, 458, 458, 458, 458, 458, 458, 458, |
| 3345 |
458, 458, 458, 458, 458, 458, 458, 458, 458, 458, |
| 3346 |
458, 458, 458, 458, 458, 458, 458, 458, 458, 458, |
| 3347 |
458, 458, 458, 458, 458, 458, 458, 458, 458, 458, |
| 3348 |
458, 458, 458, 458, 458, 458, 458, 458, 458, 458, |
| 3349 |
458, 458, 458, 458, 458, 458, 458, 458, 458, 458, |
| 3350 |
458, 458, 458, 458, 458, 458, 458, 458, 458, 458, |
| 3351 |
458, 458, 458, 458, 458, 458, 458, 458, 458, 458, |
| 3352 |
458, 458, 458, 458, 458, 458, 458, 458, 458, 458, |
| 3353 |
458, 458, 458, 458, 458, 458, 458, 458, 458, 458, |
| 3354 |
458, 458, 458, 458, 458, 458, 458, 458, 458, 458, |
| 3355 |
458, 458, 291, 291, 291, 291, 291, 291, 291, 291, |
| 3356 |
291, 291, 291, 291, 291, 291, 291, 291, 291, 291, |
| 3357 |
291, 291, 291, 291, 291, 291, 0, 0, 0, 0, |
| 3358 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 3359 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 3360 |
0, 0, 291, 291, 291, 291, 291, 291, 291, 291, |
| 3361 |
291, 291, 291, 291, 291, 291, 291, 291, 291, 291, |
| 3362 |
291, 291, 291, 291, 291, 291, 291, 291, 291, 423, |
| 3363 |
423, 291, 291, 0, 291, 423, 423, 423, 423, 423, |
| 3364 |
423, 423, 423, 423, 423, 291, 291, 291, 291, 291, |
| 3365 |
291, 291, 805, 147, 147, 147, 147, 423, 423, 423, |
| 3366 |
423, 423, -88, -88, 147, 147, 423, 423, 423, 423, |
| 3367 |
423, 423, 423, 423, 423, 423, 423, 423, 0, 0, |
| 3368 |
0, 286, 422, 0, 759, 759, 759, 759, 0, 0, |
| 3369 |
0, 0, 422, 422, 0, 0, 0, 0, 0, 0, |
| 3370 |
0, 0, 0, 0, 0, 286, 422, 0, 286, 0, |
| 3371 |
759, 759, 423, 805, 805, 314, 423, 0, 0, 0, |
| 3372 |
0, 286, 759, 286, 552, 422, 552, 552, 12, 375, |
| 3373 |
314, 608, 608, 608, 608, 0, 658, 805, 805, 805, |
| 3374 |
805, 805, 805, 805, 805, 805, 805, 805, 759, 0, |
| 3375 |
805, 0, 759, 759, 759, 0, 0, 0, 0, 0, |
| 3376 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 3377 |
759, 0, 0, 929, 0, 0, 0, 0, 760, 0, |
| 3378 |
0, 0, 0, 0, 0, 760, 934, 0, 0, 0, |
| 3379 |
0, 0, 0, 759, 0, 0, 0, 0, 0, 0, |
| 3380 |
0, 0, 768, 801, 0, 801, 0, 768, 768, 768 |
| 3381 |
]; |
| 3382 |
|
| 3383 |
PHP.Parser.prototype.yydefault = [ |
| 3384 |
3,32767, 103,32767,32767,32767,32767,32767,32767,32767, |
| 3385 |
32767,32767, 101,32767,32767,32767,32767,32767,32767,32767, |
| 3386 |
32767,32767,32767,32767,32767,32767,32767, 578, 578, 578, |
| 3387 |
578,32767,32767, 246, 103,32767,32767, 454, 372, 372, |
| 3388 |
372,32767,32767, 522, 522, 522, 522, 522, 522,32767, |
| 3389 |
32767,32767,32767,32767,32767, 454,32767,32767,32767,32767, |
| 3390 |
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, |
| 3391 |
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, |
| 3392 |
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, |
| 3393 |
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, |
| 3394 |
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, |
| 3395 |
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, |
| 3396 |
32767,32767,32767,32767,32767,32767,32767,32767, 101,32767, |
| 3397 |
32767,32767, 37, 7, 8, 10, 11, 50, 17, 310, |
| 3398 |
32767,32767,32767,32767, 103,32767,32767,32767,32767,32767, |
| 3399 |
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, |
| 3400 |
32767,32767,32767,32767,32767, 571,32767,32767,32767,32767, |
| 3401 |
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, |
| 3402 |
32767,32767,32767,32767,32767,32767, 458, 437, 438, 440, |
| 3403 |
441, 371, 523, 577, 313, 574, 370, 146, 325, 315, |
| 3404 |
234, 316, 250, 459, 251, 460, 463, 464, 211, 279, |
| 3405 |
367, 150, 401, 455, 403, 453, 457, 402, 377, 382, |
| 3406 |
383, 384, 385, 386, 387, 388, 389, 390, 391, 392, |
| 3407 |
393, 394, 375, 376, 456, 434, 433, 432, 399,32767, |
| 3408 |
32767, 400, 404, 374, 407,32767,32767,32767,32767,32767, |
| 3409 |
32767,32767,32767, 103,32767, 405, 406, 423, 424, 421, |
| 3410 |
422, 425,32767, 426, 427, 428, 429,32767,32767, 302, |
| 3411 |
32767,32767, 351, 349, 414, 415, 302,32767,32767,32767, |
| 3412 |
32767,32767,32767,32767,32767,32767,32767,32767,32767, 516, |
| 3413 |
431,32767,32767,32767,32767,32767,32767,32767,32767,32767, |
| 3414 |
32767,32767,32767,32767, 103,32767, 101, 518, 396, 398, |
| 3415 |
486, 409, 410, 408, 378,32767, 493,32767, 103, 495, |
| 3416 |
32767,32767,32767, 112,32767,32767,32767, 517,32767, 524, |
| 3417 |
524,32767, 479, 101, 194,32767, 194, 194,32767,32767, |
| 3418 |
32767,32767,32767,32767,32767, 585, 479, 111, 111, 111, |
| 3419 |
111, 111, 111, 111, 111, 111, 111, 111,32767, 194, |
| 3420 |
111,32767,32767,32767, 101, 194, 194, 194, 194, 194, |
| 3421 |
194, 194, 194, 194, 194, 189,32767, 260, 262, 103, |
| 3422 |
539, 194,32767, 498,32767,32767,32767,32767,32767,32767, |
| 3423 |
32767,32767,32767,32767,32767,32767, 491,32767,32767,32767, |
| 3424 |
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, |
| 3425 |
32767, 479, 419, 139,32767, 139, 524, 411, 412, 413, |
| 3426 |
481, 524, 524, 524, 298, 281,32767,32767,32767,32767, |
| 3427 |
496, 496, 101, 101, 101, 101, 491,32767,32767, 112, |
| 3428 |
100, 100, 100, 100, 100, 104, 102,32767,32767,32767, |
| 3429 |
32767, 100,32767, 102, 102,32767,32767, 217, 208, 215, |
| 3430 |
102,32767, 543, 544, 215, 102, 219, 219, 219, 239, |
| 3431 |
239, 470, 304, 102, 100, 102, 102, 196, 304, 304, |
| 3432 |
32767, 102, 470, 304, 470, 304, 198, 304, 304, 304, |
| 3433 |
470, 304,32767, 102, 304, 210, 100, 100, 304,32767, |
| 3434 |
32767,32767, 481,32767,32767,32767,32767,32767,32767,32767, |
| 3435 |
32767,32767,32767,32767,32767,32767,32767, 511,32767, 528, |
| 3436 |
541, 417, 418, 420, 526, 442, 443, 444, 445, 446, |
| 3437 |
447, 448, 450, 573,32767, 485,32767,32767,32767,32767, |
| 3438 |
324, 583,32767, 583,32767,32767,32767,32767,32767,32767, |
| 3439 |
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, |
| 3440 |
32767, 584,32767, 524,32767,32767,32767,32767, 416, 9, |
| 3441 |
76, 43, 44, 52, 58, 502, 503, 504, 505, 499, |
| 3442 |
500, 506, 501,32767,32767, 507, 549,32767,32767, 525, |
| 3443 |
576,32767,32767,32767,32767,32767,32767, 139,32767,32767, |
| 3444 |
32767,32767,32767,32767,32767,32767,32767,32767, 511,32767, |
| 3445 |
137,32767,32767,32767,32767,32767,32767,32767,32767,32767, |
| 3446 |
32767,32767, 524,32767,32767,32767, 300, 301,32767,32767, |
| 3447 |
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, |
| 3448 |
32767,32767,32767, 524,32767,32767,32767, 283, 284,32767, |
| 3449 |
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, |
| 3450 |
32767,32767,32767, 278,32767,32767, 366,32767,32767,32767, |
| 3451 |
32767, 345,32767,32767,32767,32767,32767,32767,32767,32767, |
| 3452 |
32767,32767, 152, 152, 3, 3, 327, 152, 152, 152, |
| 3453 |
327, 152, 327, 327, 327, 152, 152, 152, 152, 152, |
| 3454 |
152, 272, 184, 254, 257, 239, 239, 152, 337, 152 |
| 3455 |
]; |
| 3456 |
|
| 3457 |
PHP.Parser.prototype.yygoto = [ |
| 3458 |
194, 194, 670, 422, 643, 463, 1264, 1265, 1022, 416, |
| 3459 |
308, 309, 329, 563, 314, 421, 330, 423, 622, 801, |
| 3460 |
678, 637, 586, 651, 652, 653, 165, 165, 165, 165, |
| 3461 |
218, 195, 191, 191, 175, 177, 213, 191, 191, 191, |
| 3462 |
191, 191, 192, 192, 192, 192, 192, 192, 186, 187, |
| 3463 |
188, 189, 190, 215, 213, 216, 521, 522, 412, 523, |
| 3464 |
525, 526, 527, 528, 529, 530, 531, 532, 1091, 166, |
| 3465 |
167, 168, 193, 169, 170, 171, 164, 172, 173, 174, |
| 3466 |
176, 212, 214, 217, 235, 238, 241, 242, 244, 255, |
| 3467 |
256, 257, 258, 259, 260, 261, 263, 264, 265, 266, |
| 3468 |
274, 275, 311, 312, 313, 417, 418, 419, 568, 219, |
| 3469 |
220, 221, 222, 223, 224, 225, 226, 227, 228, 229, |
| 3470 |
230, 231, 232, 233, 178, 234, 179, 196, 197, 198, |
| 3471 |
236, 186, 187, 188, 189, 190, 215, 1091, 199, 180, |
| 3472 |
181, 182, 200, 196, 183, 237, 201, 199, 163, 202, |
| 3473 |
203, 184, 204, 205, 206, 185, 207, 208, 209, 210, |
| 3474 |
211, 323, 323, 323, 323, 827, 608, 608, 824, 547, |
| 3475 |
538, 342, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, |
| 3476 |
1221, 1221, 1239, 1239, 288, 288, 288, 288, 1239, 1239, |
| 3477 |
1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 388, 538, |
| 3478 |
547, 556, 557, 395, 566, 588, 602, 603, 832, 825, |
| 3479 |
880, 875, 876, 889, 15, 833, 877, 830, 878, 879, |
| 3480 |
831, 799, 251, 251, 883, 919, 992, 1000, 1004, 1001, |
| 3481 |
1005, 1237, 1237, 938, 1043, 1039, 1040, 1237, 1237, 1237, |
| 3482 |
1237, 1237, 1237, 1237, 1237, 1237, 1237, 858, 248, 248, |
| 3483 |
248, 248, 250, 252, 533, 533, 533, 533, 487, 590, |
| 3484 |
488, 1190, 1190, 997, 1190, 997, 494, 1290, 1290, 560, |
| 3485 |
997, 997, 997, 997, 997, 997, 997, 997, 997, 997, |
| 3486 |
997, 997, 1261, 1261, 1290, 1261, 340, 1190, 930, 402, |
| 3487 |
677, 1279, 1190, 1190, 1190, 1190, 959, 345, 1190, 1190, |
| 3488 |
1190, 1271, 1271, 1271, 1271, 606, 640, 345, 345, 1273, |
| 3489 |
1273, 1273, 1273, 820, 820, 805, 896, 884, 840, 885, |
| 3490 |
897, 345, 345, 5, 345, 6, 1306, 384, 535, 535, |
| 3491 |
559, 535, 415, 852, 597, 1257, 839, 540, 524, 524, |
| 3492 |
345, 1289, 1289, 642, 524, 524, 524, 524, 524, 524, |
| 3493 |
524, 524, 524, 524, 445, 805, 1140, 805, 1289, 932, |
| 3494 |
932, 932, 932, 1063, 1064, 445, 926, 933, 386, 390, |
| 3495 |
548, 587, 591, 1030, 1292, 331, 554, 1259, 1259, 1030, |
| 3496 |
704, 621, 623, 823, 641, 1250, 319, 303, 660, 664, |
| 3497 |
973, 668, 676, 969, 429, 553, 962, 936, 936, 934, |
| 3498 |
936, 703, 601, 537, 971, 966, 343, 344, 663, 817, |
| 3499 |
595, 609, 612, 613, 614, 615, 634, 635, 636, 680, |
| 3500 |
439, 1186, 845, 454, 454, 439, 439, 1266, 1267, 820, |
| 3501 |
901, 1079, 454, 394, 539, 551, 1183, 605, 540, 539, |
| 3502 |
842, 551, 978, 272, 387, 618, 619, 981, 536, 536, |
| 3503 |
844, 707, 646, 957, 567, 457, 458, 459, 838, 850, |
| 3504 |
254, 254, 1297, 1298, 400, 401, 976, 976, 464, 649, |
| 3505 |
1182, 650, 1028, 404, 405, 406, 1187, 661, 424, 1032, |
| 3506 |
407, 564, 600, 815, 338, 424, 854, 848, 853, 841, |
| 3507 |
1027, 1031, 1009, 1002, 1006, 1003, 1007, 1185, 941, 1188, |
| 3508 |
1247, 1248, 943, 0, 1074, 439, 439, 439, 439, 439, |
| 3509 |
439, 439, 439, 439, 439, 439, 0, 468, 439, 585, |
| 3510 |
1056, 931, 681, 667, 667, 0, 495, 673, 1054, 1171, |
| 3511 |
912, 0, 0, 1172, 1175, 913, 1176, 0, 0, 0, |
| 3512 |
0, 0, 0, 1072, 857 |
| 3513 |
]; |
| 3514 |
|
| 3515 |
PHP.Parser.prototype.yygcheck = [ |
| 3516 |
42, 42, 72, 65, 65, 166, 166, 166, 119, 65, |
| 3517 |
65, 65, 65, 65, 65, 65, 65, 65, 65, 7, |
| 3518 |
9, 84, 122, 84, 84, 84, 42, 42, 42, 42, |
| 3519 |
42, 42, 42, 42, 42, 42, 42, 42, 42, 42, |
| 3520 |
42, 42, 42, 42, 42, 42, 42, 42, 42, 42, |
| 3521 |
42, 42, 42, 42, 42, 42, 42, 42, 42, 42, |
| 3522 |
42, 42, 42, 42, 42, 42, 42, 42, 42, 42, |
| 3523 |
42, 42, 42, 42, 42, 42, 42, 42, 42, 42, |
| 3524 |
42, 42, 42, 42, 42, 42, 42, 42, 42, 42, |
| 3525 |
42, 42, 42, 42, 42, 42, 42, 42, 42, 42, |
| 3526 |
42, 42, 42, 42, 42, 42, 42, 42, 42, 42, |
| 3527 |
42, 42, 42, 42, 42, 42, 42, 42, 42, 42, |
| 3528 |
42, 42, 42, 42, 42, 42, 42, 42, 42, 42, |
| 3529 |
42, 42, 42, 42, 42, 42, 42, 42, 42, 42, |
| 3530 |
42, 42, 42, 42, 42, 42, 42, 42, 42, 42, |
| 3531 |
42, 42, 42, 42, 42, 42, 42, 42, 42, 42, |
| 3532 |
42, 23, 23, 23, 23, 15, 104, 104, 26, 75, |
| 3533 |
75, 93, 104, 104, 104, 104, 104, 104, 104, 104, |
| 3534 |
104, 104, 160, 160, 24, 24, 24, 24, 160, 160, |
| 3535 |
160, 160, 160, 160, 160, 160, 160, 160, 75, 75, |
| 3536 |
75, 75, 75, 75, 75, 75, 75, 75, 15, 27, |
| 3537 |
15, 15, 15, 15, 75, 15, 15, 15, 15, 15, |
| 3538 |
15, 6, 5, 5, 15, 87, 87, 87, 87, 87, |
| 3539 |
87, 161, 161, 49, 15, 15, 15, 161, 161, 161, |
| 3540 |
161, 161, 161, 161, 161, 161, 161, 45, 5, 5, |
| 3541 |
5, 5, 5, 5, 103, 103, 103, 103, 147, 103, |
| 3542 |
147, 72, 72, 72, 72, 72, 147, 173, 173, 162, |
| 3543 |
72, 72, 72, 72, 72, 72, 72, 72, 72, 72, |
| 3544 |
72, 72, 122, 122, 173, 122, 169, 72, 89, 89, |
| 3545 |
89, 171, 72, 72, 72, 72, 99, 14, 72, 72, |
| 3546 |
72, 9, 9, 9, 9, 55, 55, 14, 14, 122, |
| 3547 |
122, 122, 122, 22, 22, 12, 72, 64, 35, 64, |
| 3548 |
72, 14, 14, 46, 14, 46, 14, 61, 19, 19, |
| 3549 |
100, 19, 13, 35, 13, 122, 35, 14, 163, 163, |
| 3550 |
14, 172, 172, 63, 163, 163, 163, 163, 163, 163, |
| 3551 |
163, 163, 163, 163, 19, 12, 143, 12, 172, 19, |
| 3552 |
19, 19, 19, 136, 136, 19, 19, 19, 58, 58, |
| 3553 |
58, 58, 58, 122, 172, 29, 48, 122, 122, 122, |
| 3554 |
48, 48, 48, 25, 48, 14, 159, 159, 48, 48, |
| 3555 |
48, 48, 48, 48, 109, 9, 25, 25, 25, 25, |
| 3556 |
25, 25, 9, 25, 25, 25, 93, 93, 14, 18, |
| 3557 |
79, 79, 79, 79, 79, 79, 79, 79, 79, 79, |
| 3558 |
23, 20, 39, 141, 141, 23, 23, 168, 168, 22, |
| 3559 |
17, 17, 141, 28, 9, 9, 152, 17, 14, 9, |
| 3560 |
37, 9, 17, 24, 9, 83, 83, 106, 24, 24, |
| 3561 |
17, 95, 17, 17, 9, 9, 9, 9, 17, 9, |
| 3562 |
5, 5, 9, 9, 80, 80, 103, 103, 149, 80, |
| 3563 |
17, 80, 121, 80, 80, 80, 20, 80, 113, 124, |
| 3564 |
80, 2, 2, 20, 80, 113, 41, 9, 16, 16, |
| 3565 |
16, 16, 113, 113, 113, 113, 113, 14, 16, 20, |
| 3566 |
20, 20, 92, -1, 139, 23, 23, 23, 23, 23, |
| 3567 |
23, 23, 23, 23, 23, 23, -1, 82, 23, 8, |
| 3568 |
8, 16, 8, 8, 8, -1, 8, 8, 8, 78, |
| 3569 |
78, -1, -1, 78, 78, 78, 78, -1, -1, -1, |
| 3570 |
-1, -1, -1, 16, 16 |
| 3571 |
]; |
| 3572 |
|
| 3573 |
PHP.Parser.prototype.yygbase = [ |
| 3574 |
0, 0, -203, 0, 0, 221, 208, 10, 512, 7, |
| 3575 |
0, 0, 24, 1, 5, -174, 47, -23, 105, 61, |
| 3576 |
38, 0, -10, 158, 181, 379, 164, 205, 102, 84, |
| 3577 |
0, 0, 0, 0, 0, -43, 0, 107, 0, 104, |
| 3578 |
0, 54, -1, 0, 0, 235, -384, 0, -307, 210, |
| 3579 |
0, 0, 0, 0, 0, 266, 0, 0, 324, 0, |
| 3580 |
0, 286, 0, 103, 298, -236, 0, 0, 0, 0, |
| 3581 |
0, 0, -6, 0, 0, -167, 0, 0, 129, 62, |
| 3582 |
-14, 0, 53, -22, -669, 0, 0, -52, 0, -11, |
| 3583 |
0, 0, 68, -299, 0, 52, 0, 0, 0, 262, |
| 3584 |
288, 0, 0, 227, -73, 0, 87, 0, 0, 118, |
| 3585 |
0, 0, 0, 209, 0, 0, 0, 0, 0, 6, |
| 3586 |
0, 108, 15, 0, 46, 0, 0, 0, 0, 0, |
| 3587 |
0, 0, 0, 0, 0, 0, 91, 0, 0, 69, |
| 3588 |
0, 390, 0, 86, 0, 0, 0, -224, 0, 37, |
| 3589 |
0, 0, 77, 0, 0, 0, 0, 0, 0, 70, |
| 3590 |
-57, -8, 241, 99, 0, 0, -290, 0, 65, 257, |
| 3591 |
0, 261, 39, -35, 0, 0 |
| 3592 |
]; |
| 3593 |
|
| 3594 |
PHP.Parser.prototype.yygdefault = [ |
| 3595 |
-32768, 499, 711, 4, 712, 905, 788, 797, 583, 515, |
| 3596 |
679, 339, 610, 413, 1255, 882, 1078, 565, 816, 1199, |
| 3597 |
1207, 446, 819, 324, 701, 864, 865, 866, 391, 376, |
| 3598 |
382, 389, 632, 611, 481, 851, 442, 843, 473, 846, |
| 3599 |
441, 855, 162, 410, 497, 859, 3, 861, 542, 892, |
| 3600 |
377, 869, 378, 656, 871, 550, 873, 874, 385, 392, |
| 3601 |
393, 1083, 558, 607, 886, 243, 552, 887, 375, 888, |
| 3602 |
895, 380, 383, 665, 453, 492, 486, 403, 1058, 594, |
| 3603 |
629, 450, 467, 617, 616, 604, 466, 425, 408, 928, |
| 3604 |
474, 451, 942, 341, 950, 709, 1090, 624, 476, 958, |
| 3605 |
625, 965, 968, 516, 517, 465, 980, 269, 983, 477, |
| 3606 |
1015, 647, 648, 995, 626, 627, 1013, 460, 584, 1021, |
| 3607 |
443, 1029, 1243, 444, 1033, 262, 1036, 276, 409, 426, |
| 3608 |
1041, 1042, 8, 1048, 671, 672, 10, 273, 496, 1073, |
| 3609 |
666, 440, 1089, 430, 1159, 1161, 544, 478, 1179, 1178, |
| 3610 |
659, 493, 1184, 1246, 438, 518, 461, 310, 519, 302, |
| 3611 |
327, 307, 534, 289, 328, 520, 462, 1252, 1260, 325, |
| 3612 |
30, 1280, 1291, 335, 562, 599 |
| 3613 |
]; |
| 3614 |
|
| 3615 |
PHP.Parser.prototype.yylhs = [ |
| 3616 |
0, 1, 3, 3, 2, 5, 5, 6, 6, 6, |
| 3617 |
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, |
| 3618 |
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, |
| 3619 |
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, |
| 3620 |
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, |
| 3621 |
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, |
| 3622 |
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, |
| 3623 |
6, 6, 6, 6, 6, 6, 6, 6, 7, 7, |
| 3624 |
7, 7, 7, 7, 7, 7, 8, 8, 9, 10, |
| 3625 |
11, 11, 11, 12, 12, 13, 13, 14, 15, 15, |
| 3626 |
16, 16, 17, 17, 18, 18, 21, 21, 22, 23, |
| 3627 |
23, 24, 24, 4, 4, 4, 4, 4, 4, 4, |
| 3628 |
4, 4, 4, 4, 29, 29, 30, 30, 32, 34, |
| 3629 |
34, 28, 36, 36, 33, 38, 38, 35, 35, 37, |
| 3630 |
37, 39, 39, 31, 40, 40, 41, 43, 44, 44, |
| 3631 |
45, 46, 46, 48, 47, 47, 47, 47, 49, 49, |
| 3632 |
49, 49, 49, 49, 49, 49, 49, 49, 49, 49, |
| 3633 |
49, 49, 49, 49, 49, 49, 49, 49, 49, 49, |
| 3634 |
49, 49, 25, 25, 68, 68, 71, 71, 70, 69, |
| 3635 |
69, 62, 74, 74, 75, 75, 76, 76, 77, 77, |
| 3636 |
78, 78, 26, 26, 27, 27, 27, 27, 86, 86, |
| 3637 |
88, 88, 81, 81, 81, 82, 82, 85, 85, 83, |
| 3638 |
83, 89, 90, 90, 56, 56, 64, 64, 67, 67, |
| 3639 |
67, 66, 91, 91, 92, 57, 57, 57, 57, 93, |
| 3640 |
93, 94, 94, 95, 95, 96, 97, 97, 98, 98, |
| 3641 |
99, 99, 54, 54, 50, 50, 101, 52, 52, 102, |
| 3642 |
51, 51, 53, 53, 63, 63, 63, 63, 79, 79, |
| 3643 |
105, 105, 107, 107, 108, 108, 108, 108, 106, 106, |
| 3644 |
106, 110, 110, 110, 110, 87, 87, 113, 113, 113, |
| 3645 |
111, 111, 114, 114, 112, 112, 115, 115, 116, 116, |
| 3646 |
116, 116, 109, 109, 80, 80, 80, 20, 20, 20, |
| 3647 |
118, 117, 117, 119, 119, 119, 119, 59, 120, 120, |
| 3648 |
121, 60, 123, 123, 124, 124, 125, 125, 84, 126, |
| 3649 |
126, 126, 126, 126, 126, 131, 131, 132, 132, 133, |
| 3650 |
133, 133, 133, 133, 134, 135, 135, 130, 130, 127, |
| 3651 |
127, 129, 129, 137, 137, 136, 136, 136, 136, 136, |
| 3652 |
136, 136, 128, 138, 138, 140, 139, 139, 61, 100, |
| 3653 |
141, 141, 55, 55, 42, 42, 42, 42, 42, 42, |
| 3654 |
42, 42, 42, 42, 42, 42, 42, 42, 42, 42, |
| 3655 |
42, 42, 42, 42, 42, 42, 42, 42, 42, 42, |
| 3656 |
42, 42, 42, 42, 42, 42, 42, 42, 42, 42, |
| 3657 |
42, 42, 42, 42, 42, 42, 42, 42, 42, 42, |
| 3658 |
42, 42, 42, 42, 42, 42, 42, 42, 42, 42, |
| 3659 |
42, 42, 42, 42, 42, 42, 42, 42, 42, 42, |
| 3660 |
42, 42, 42, 42, 42, 42, 42, 42, 42, 42, |
| 3661 |
42, 42, 42, 42, 42, 42, 42, 42, 42, 42, |
| 3662 |
42, 42, 42, 42, 42, 42, 42, 148, 142, 142, |
| 3663 |
147, 147, 150, 151, 151, 152, 153, 153, 153, 19, |
| 3664 |
19, 72, 72, 72, 72, 143, 143, 143, 143, 155, |
| 3665 |
155, 144, 144, 146, 146, 146, 149, 149, 160, 160, |
| 3666 |
160, 160, 160, 160, 160, 160, 160, 161, 161, 104, |
| 3667 |
163, 163, 163, 163, 145, 145, 145, 145, 145, 145, |
| 3668 |
145, 145, 58, 58, 158, 158, 158, 158, 164, 164, |
| 3669 |
154, 154, 154, 165, 165, 165, 165, 165, 165, 73, |
| 3670 |
73, 65, 65, 65, 65, 122, 122, 122, 122, 168, |
| 3671 |
167, 157, 157, 157, 157, 157, 157, 157, 156, 156, |
| 3672 |
156, 166, 166, 166, 166, 103, 162, 170, 170, 169, |
| 3673 |
169, 171, 171, 171, 171, 171, 171, 171, 171, 159, |
| 3674 |
159, 159, 159, 173, 174, 172, 172, 172, 172, 172, |
| 3675 |
172, 172, 172, 175, 175, 175, 175 |
| 3676 |
]; |
| 3677 |
|
| 3678 |
PHP.Parser.prototype.yylen = [ |
| 3679 |
1, 1, 2, 0, 1, 1, 1, 1, 1, 1, |
| 3680 |
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 3681 |
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 3682 |
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 3683 |
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 3684 |
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 3685 |
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 3686 |
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 3687 |
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 3688 |
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 3689 |
0, 1, 0, 1, 1, 2, 1, 3, 4, 1, |
| 3690 |
2, 0, 1, 1, 1, 1, 1, 3, 5, 4, |
| 3691 |
3, 4, 2, 3, 1, 1, 7, 6, 2, 3, |
| 3692 |
1, 2, 3, 1, 2, 3, 1, 1, 3, 1, |
| 3693 |
3, 1, 2, 2, 3, 1, 3, 2, 3, 1, |
| 3694 |
3, 2, 0, 1, 1, 1, 1, 1, 3, 7, |
| 3695 |
10, 5, 7, 9, 5, 3, 3, 3, 3, 3, |
| 3696 |
3, 1, 2, 5, 7, 9, 6, 5, 6, 3, |
| 3697 |
2, 1, 1, 1, 0, 2, 1, 3, 8, 0, |
| 3698 |
4, 2, 1, 3, 0, 1, 0, 1, 0, 1, |
| 3699 |
3, 1, 8, 9, 8, 7, 6, 8, 0, 2, |
| 3700 |
0, 2, 1, 2, 2, 0, 2, 0, 2, 0, |
| 3701 |
2, 2, 1, 3, 1, 4, 1, 4, 1, 1, |
| 3702 |
4, 2, 1, 3, 3, 3, 4, 4, 5, 0, |
| 3703 |
2, 4, 3, 1, 1, 7, 0, 2, 1, 3, |
| 3704 |
3, 4, 1, 4, 0, 2, 5, 0, 2, 6, |
| 3705 |
0, 2, 0, 3, 1, 2, 1, 1, 2, 0, |
| 3706 |
1, 3, 0, 2, 1, 1, 1, 1, 6, 8, |
| 3707 |
6, 1, 2, 1, 1, 1, 1, 1, 1, 1, |
| 3708 |
3, 3, 3, 3, 3, 3, 3, 3, 1, 2, |
| 3709 |
1, 1, 0, 1, 0, 2, 2, 2, 4, 3, |
| 3710 |
1, 1, 3, 1, 2, 2, 3, 2, 3, 1, |
| 3711 |
1, 2, 3, 1, 1, 3, 2, 0, 1, 5, |
| 3712 |
5, 10, 3, 5, 1, 1, 3, 0, 2, 4, |
| 3713 |
5, 4, 4, 4, 3, 1, 1, 1, 1, 1, |
| 3714 |
1, 0, 1, 1, 2, 1, 1, 1, 1, 1, |
| 3715 |
1, 1, 2, 1, 3, 1, 1, 3, 2, 2, |
| 3716 |
3, 1, 0, 1, 1, 3, 3, 3, 4, 1, |
| 3717 |
1, 2, 3, 3, 3, 3, 3, 3, 3, 3, |
| 3718 |
3, 3, 3, 3, 3, 2, 2, 2, 2, 3, |
| 3719 |
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
| 3720 |
3, 3, 3, 3, 3, 3, 3, 2, 2, 2, |
| 3721 |
2, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
| 3722 |
3, 3, 5, 4, 3, 4, 4, 2, 2, 4, |
| 3723 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 3724 |
2, 1, 3, 2, 1, 2, 4, 2, 2, 8, |
| 3725 |
9, 8, 9, 9, 10, 9, 10, 8, 3, 2, |
| 3726 |
0, 4, 2, 1, 3, 2, 2, 2, 4, 1, |
| 3727 |
1, 1, 1, 1, 1, 1, 1, 3, 1, 1, |
| 3728 |
1, 0, 3, 0, 1, 1, 0, 1, 1, 1, |
| 3729 |
1, 1, 1, 1, 1, 1, 1, 3, 3, 3, |
| 3730 |
4, 1, 1, 3, 1, 1, 1, 1, 1, 3, |
| 3731 |
2, 3, 0, 1, 1, 3, 1, 1, 1, 1, |
| 3732 |
1, 3, 1, 1, 4, 4, 1, 4, 4, 0, |
| 3733 |
1, 1, 1, 3, 3, 1, 4, 2, 2, 1, |
| 3734 |
3, 1, 4, 4, 3, 3, 3, 3, 1, 3, |
| 3735 |
1, 1, 3, 1, 1, 4, 1, 1, 1, 3, |
| 3736 |
1, 1, 2, 1, 3, 4, 3, 2, 0, 2, |
| 3737 |
2, 1, 2, 1, 1, 1, 4, 3, 3, 3, |
| 3738 |
3, 6, 3, 1, 1, 2, 1 |
| 3739 |
]; |
| 3740 |
|
| 3741 |
|
| 3742 |
|
| 3743 |
exports.PHP = PHP; |
| 3744 |
}); |
| 3745 |
|
| 3746 |
ace.define("ace/mode/php_worker",[], function(require, exports, module) { |
| 3747 |
"use strict"; |
| 3748 |
|
| 3749 |
var oop = require("../lib/oop"); |
| 3750 |
var Mirror = require("../worker/mirror").Mirror; |
| 3751 |
var PHP = require("./php/php").PHP; |
| 3752 |
|
| 3753 |
var PhpWorker = exports.PhpWorker = function(sender) { |
| 3754 |
Mirror.call(this, sender); |
| 3755 |
this.setTimeout(500); |
| 3756 |
}; |
| 3757 |
|
| 3758 |
oop.inherits(PhpWorker, Mirror); |
| 3759 |
|
| 3760 |
(function() { |
| 3761 |
this.setOptions = function(opts) { |
| 3762 |
this.inlinePhp = opts && opts.inline; |
| 3763 |
}; |
| 3764 |
|
| 3765 |
this.onUpdate = function() { |
| 3766 |
var value = this.doc.getValue(); |
| 3767 |
var errors = []; |
| 3768 |
if (this.inlinePhp) |
| 3769 |
value = "<?" + value + "?>"; |
| 3770 |
|
| 3771 |
var tokens = PHP.Lexer(value, {short_open_tag: 1}); |
| 3772 |
try { |
| 3773 |
new PHP.Parser(tokens); |
| 3774 |
} catch(e) { |
| 3775 |
errors.push({ |
| 3776 |
row: e.line - 1, |
| 3777 |
column: null, |
| 3778 |
text: e.message.charAt(0).toUpperCase() + e.message.substring(1), |
| 3779 |
type: "error" |
| 3780 |
}); |
| 3781 |
} |
| 3782 |
|
| 3783 |
this.sender.emit("annotate", errors); |
| 3784 |
}; |
| 3785 |
|
| 3786 |
}).call(PhpWorker.prototype); |
| 3787 |
|
| 3788 |
}); |