How to use continue method in Playwright Internal

Best JavaScript code snippet using playwright-internal

SourceJavaScriptTokenizer.js

Source:SourceJavaScriptTokenizer.js Github

copy

Full Screen

1/* Generated by re2c 0.13.5 on Fri May 13 20:01:13 2011 */2/*3 * Copyright (C) 2009 Google Inc. All rights reserved.4 *5 * Redistribution and use in source and binary forms, with or without6 * modification, are permitted provided that the following conditions are7 * met:8 *9 * * Redistributions of source code must retain the above copyright10 * notice, this list of conditions and the following disclaimer.11 * * Redistributions in binary form must reproduce the above12 * copyright notice, this list of conditions and the following disclaimer13 * in the documentation and/or other materials provided with the14 * distribution.15 * * Neither the name of Google Inc. nor the names of its16 * contributors may be used to endorse or promote products derived from17 * this software without specific prior written permission.18 *19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT23 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.30 */31// Generate js file as follows:32//33// re2c -isc WebCore/inspector/front-end/SourceJavaScriptTokenizer.re2js \34// | sed 's|^yy\([^:]*\)*\:|case \1:|' \35// | sed 's|[*]cursor[+][+]|this._charAt(cursor++)|' \36// | sed 's|[[*][+][+]cursor|this._charAt(++cursor)|' \37// | sed 's|[*]cursor|this._charAt(cursor)|' \38// | sed 's|yych = \*\([^;]*\)|yych = this._charAt\1|' \39// | sed 's|{ gotoCase = \([^; continue; };]*\)|{ gotoCase = \1; continue; }|' \40// | sed 's|yych <= \(0x[0-9a-fA-f]+\)|yych <= String.fromCharCode(\1)|' \41// | sed 's|unsigned\ int|var|' \42// | sed 's|var\ yych|case 1: case 1: var yych|'43/**44 * @constructor45 * @extends {WebInspector.SourceTokenizer}46 */47WebInspector.SourceJavaScriptTokenizer = function()48{49 WebInspector.SourceTokenizer.call(this);50 this._lexConditions = {51 DIV: 0,52 NODIV: 1,53 COMMENT: 2,54 DSTRING: 3,55 SSTRING: 4,56 REGEX: 557 };58 this.case_DIV = 1000;59 this.case_NODIV = 1001;60 this.case_COMMENT = 1002;61 this.case_DSTRING = 1003;62 this.case_SSTRING = 1004;63 this.case_REGEX = 1005;64 this.condition = this.createInitialCondition();65}66WebInspector.SourceJavaScriptTokenizer.Keywords = [67 "null", "true", "false", "break", "case", "catch", "const", "default", "finally", "for",68 "instanceof", "new", "var", "continue", "function", "return", "void", "delete", "if",69 "this", "do", "while", "else", "in", "switch", "throw", "try", "typeof", "debugger",70 "class", "enum", "export", "extends", "import", "super", "get", "set", "with"71 ].keySet();72WebInspector.SourceJavaScriptTokenizer.prototype = {73 createInitialCondition: function()74 {75 return { lexCondition: this._lexConditions.NODIV };76 },77 nextToken: function(cursor)78 {79 var cursorOnEnter = cursor;80 var gotoCase = 1;81 var YYMARKER;82 while (1) {83 switch (gotoCase)84 // Following comment is replaced with generated state machine.85 {86 case 1: var yych;87 var yyaccept = 0;88 if (this.getLexCondition() < 3) {89 if (this.getLexCondition() < 1) {90 { gotoCase = this.case_DIV; continue; };91 } else {92 if (this.getLexCondition() < 2) {93 { gotoCase = this.case_NODIV; continue; };94 } else {95 { gotoCase = this.case_COMMENT; continue; };96 }97 }98 } else {99 if (this.getLexCondition() < 4) {100 { gotoCase = this.case_DSTRING; continue; };101 } else {102 if (this.getLexCondition() < 5) {103 { gotoCase = this.case_SSTRING; continue; };104 } else {105 { gotoCase = this.case_REGEX; continue; };106 }107 }108 }109/* *********************************** */110case this.case_COMMENT:111 yych = this._charAt(cursor);112 if (yych <= '\f') {113 if (yych == '\n') { gotoCase = 4; continue; };114 { gotoCase = 3; continue; };115 } else {116 if (yych <= '\r') { gotoCase = 4; continue; };117 if (yych == '*') { gotoCase = 6; continue; };118 { gotoCase = 3; continue; };119 }120case 2:121 { this.tokenType = "javascript-comment"; return cursor; }122case 3:123 yyaccept = 0;124 yych = this._charAt(YYMARKER = ++cursor);125 { gotoCase = 12; continue; };126case 4:127 ++cursor;128 { this.tokenType = null; return cursor; }129case 6:130 yyaccept = 1;131 yych = this._charAt(YYMARKER = ++cursor);132 if (yych == '*') { gotoCase = 9; continue; };133 if (yych != '/') { gotoCase = 11; continue; };134case 7:135 ++cursor;136 this.setLexCondition(this._lexConditions.NODIV);137 { this.tokenType = "javascript-comment"; return cursor; }138case 9:139 ++cursor;140 yych = this._charAt(cursor);141 if (yych == '*') { gotoCase = 9; continue; };142 if (yych == '/') { gotoCase = 7; continue; };143case 11:144 yyaccept = 0;145 YYMARKER = ++cursor;146 yych = this._charAt(cursor);147case 12:148 if (yych <= '\f') {149 if (yych == '\n') { gotoCase = 2; continue; };150 { gotoCase = 11; continue; };151 } else {152 if (yych <= '\r') { gotoCase = 2; continue; };153 if (yych == '*') { gotoCase = 9; continue; };154 { gotoCase = 11; continue; };155 }156/* *********************************** */157case this.case_DIV:158 yych = this._charAt(cursor);159 if (yych <= '9') {160 if (yych <= '(') {161 if (yych <= '#') {162 if (yych <= ' ') { gotoCase = 15; continue; };163 if (yych <= '!') { gotoCase = 17; continue; };164 if (yych <= '"') { gotoCase = 19; continue; };165 } else {166 if (yych <= '%') {167 if (yych <= '$') { gotoCase = 20; continue; };168 { gotoCase = 22; continue; };169 } else {170 if (yych <= '&') { gotoCase = 23; continue; };171 if (yych <= '\'') { gotoCase = 24; continue; };172 { gotoCase = 25; continue; };173 }174 }175 } else {176 if (yych <= ',') {177 if (yych <= ')') { gotoCase = 26; continue; };178 if (yych <= '*') { gotoCase = 28; continue; };179 if (yych <= '+') { gotoCase = 29; continue; };180 { gotoCase = 25; continue; };181 } else {182 if (yych <= '.') {183 if (yych <= '-') { gotoCase = 30; continue; };184 { gotoCase = 31; continue; };185 } else {186 if (yych <= '/') { gotoCase = 32; continue; };187 if (yych <= '0') { gotoCase = 34; continue; };188 { gotoCase = 36; continue; };189 }190 }191 }192 } else {193 if (yych <= '\\') {194 if (yych <= '>') {195 if (yych <= ';') { gotoCase = 25; continue; };196 if (yych <= '<') { gotoCase = 37; continue; };197 if (yych <= '=') { gotoCase = 38; continue; };198 { gotoCase = 39; continue; };199 } else {200 if (yych <= '@') {201 if (yych <= '?') { gotoCase = 25; continue; };202 } else {203 if (yych <= 'Z') { gotoCase = 20; continue; };204 if (yych <= '[') { gotoCase = 25; continue; };205 { gotoCase = 40; continue; };206 }207 }208 } else {209 if (yych <= 'z') {210 if (yych <= '^') {211 if (yych <= ']') { gotoCase = 25; continue; };212 { gotoCase = 41; continue; };213 } else {214 if (yych != '`') { gotoCase = 20; continue; };215 }216 } else {217 if (yych <= '|') {218 if (yych <= '{') { gotoCase = 25; continue; };219 { gotoCase = 42; continue; };220 } else {221 if (yych <= '~') { gotoCase = 25; continue; };222 if (yych >= 0x80) { gotoCase = 20; continue; };223 }224 }225 }226 }227case 15:228 ++cursor;229case 16:230 { this.tokenType = null; return cursor; }231case 17:232 ++cursor;233 if ((yych = this._charAt(cursor)) == '=') { gotoCase = 115; continue; };234case 18:235 this.setLexCondition(this._lexConditions.NODIV);236 { this.tokenType = null; return cursor; }237case 19:238 yyaccept = 0;239 yych = this._charAt(YYMARKER = ++cursor);240 if (yych == '\n') { gotoCase = 16; continue; };241 if (yych == '\r') { gotoCase = 16; continue; };242 { gotoCase = 107; continue; };243case 20:244 yyaccept = 1;245 yych = this._charAt(YYMARKER = ++cursor);246 { gotoCase = 50; continue; };247case 21:248 {249 var token = this._line.substring(cursorOnEnter, cursor);250 if (WebInspector.SourceJavaScriptTokenizer.Keywords[token] === true && token !== "__proto__")251 this.tokenType = "javascript-keyword";252 else253 this.tokenType = "javascript-ident";254 return cursor;255 }256case 22:257 yych = this._charAt(++cursor);258 if (yych == '=') { gotoCase = 43; continue; };259 { gotoCase = 18; continue; };260case 23:261 yych = this._charAt(++cursor);262 if (yych == '&') { gotoCase = 43; continue; };263 if (yych == '=') { gotoCase = 43; continue; };264 { gotoCase = 18; continue; };265case 24:266 yyaccept = 0;267 yych = this._charAt(YYMARKER = ++cursor);268 if (yych == '\n') { gotoCase = 16; continue; };269 if (yych == '\r') { gotoCase = 16; continue; };270 { gotoCase = 96; continue; };271case 25:272 yych = this._charAt(++cursor);273 { gotoCase = 18; continue; };274case 26:275 ++cursor;276 { this.tokenType = null; return cursor; }277case 28:278 yych = this._charAt(++cursor);279 if (yych == '=') { gotoCase = 43; continue; };280 { gotoCase = 18; continue; };281case 29:282 yych = this._charAt(++cursor);283 if (yych == '+') { gotoCase = 43; continue; };284 if (yych == '=') { gotoCase = 43; continue; };285 { gotoCase = 18; continue; };286case 30:287 yych = this._charAt(++cursor);288 if (yych == '-') { gotoCase = 43; continue; };289 if (yych == '=') { gotoCase = 43; continue; };290 { gotoCase = 18; continue; };291case 31:292 yych = this._charAt(++cursor);293 if (yych <= '/') { gotoCase = 18; continue; };294 if (yych <= '9') { gotoCase = 89; continue; };295 { gotoCase = 18; continue; };296case 32:297 yyaccept = 2;298 yych = this._charAt(YYMARKER = ++cursor);299 if (yych <= '.') {300 if (yych == '*') { gotoCase = 78; continue; };301 } else {302 if (yych <= '/') { gotoCase = 80; continue; };303 if (yych == '=') { gotoCase = 77; continue; };304 }305case 33:306 this.setLexCondition(this._lexConditions.NODIV);307 { this.tokenType = null; return cursor; }308case 34:309 yyaccept = 3;310 yych = this._charAt(YYMARKER = ++cursor);311 if (yych <= 'E') {312 if (yych <= '/') {313 if (yych == '.') { gotoCase = 63; continue; };314 } else {315 if (yych <= '7') { gotoCase = 72; continue; };316 if (yych >= 'E') { gotoCase = 62; continue; };317 }318 } else {319 if (yych <= 'd') {320 if (yych == 'X') { gotoCase = 74; continue; };321 } else {322 if (yych <= 'e') { gotoCase = 62; continue; };323 if (yych == 'x') { gotoCase = 74; continue; };324 }325 }326case 35:327 { this.tokenType = "javascript-number"; return cursor; }328case 36:329 yyaccept = 3;330 yych = this._charAt(YYMARKER = ++cursor);331 if (yych <= '9') {332 if (yych == '.') { gotoCase = 63; continue; };333 if (yych <= '/') { gotoCase = 35; continue; };334 { gotoCase = 60; continue; };335 } else {336 if (yych <= 'E') {337 if (yych <= 'D') { gotoCase = 35; continue; };338 { gotoCase = 62; continue; };339 } else {340 if (yych == 'e') { gotoCase = 62; continue; };341 { gotoCase = 35; continue; };342 }343 }344case 37:345 yych = this._charAt(++cursor);346 if (yych <= ';') { gotoCase = 18; continue; };347 if (yych <= '<') { gotoCase = 59; continue; };348 if (yych <= '=') { gotoCase = 43; continue; };349 { gotoCase = 18; continue; };350case 38:351 yych = this._charAt(++cursor);352 if (yych == '=') { gotoCase = 58; continue; };353 { gotoCase = 18; continue; };354case 39:355 yych = this._charAt(++cursor);356 if (yych <= '<') { gotoCase = 18; continue; };357 if (yych <= '=') { gotoCase = 43; continue; };358 if (yych <= '>') { gotoCase = 56; continue; };359 { gotoCase = 18; continue; };360case 40:361 yyaccept = 0;362 yych = this._charAt(YYMARKER = ++cursor);363 if (yych == 'u') { gotoCase = 44; continue; };364 { gotoCase = 16; continue; };365case 41:366 yych = this._charAt(++cursor);367 if (yych == '=') { gotoCase = 43; continue; };368 { gotoCase = 18; continue; };369case 42:370 yych = this._charAt(++cursor);371 if (yych == '=') { gotoCase = 43; continue; };372 if (yych != '|') { gotoCase = 18; continue; };373case 43:374 yych = this._charAt(++cursor);375 { gotoCase = 18; continue; };376case 44:377 yych = this._charAt(++cursor);378 if (yych <= '@') {379 if (yych <= '/') { gotoCase = 45; continue; };380 if (yych <= '9') { gotoCase = 46; continue; };381 } else {382 if (yych <= 'F') { gotoCase = 46; continue; };383 if (yych <= '`') { gotoCase = 45; continue; };384 if (yych <= 'f') { gotoCase = 46; continue; };385 }386case 45:387 cursor = YYMARKER;388 if (yyaccept <= 1) {389 if (yyaccept <= 0) {390 { gotoCase = 16; continue; };391 } else {392 { gotoCase = 21; continue; };393 }394 } else {395 if (yyaccept <= 2) {396 { gotoCase = 33; continue; };397 } else {398 { gotoCase = 35; continue; };399 }400 }401case 46:402 yych = this._charAt(++cursor);403 if (yych <= '@') {404 if (yych <= '/') { gotoCase = 45; continue; };405 if (yych >= ':') { gotoCase = 45; continue; };406 } else {407 if (yych <= 'F') { gotoCase = 47; continue; };408 if (yych <= '`') { gotoCase = 45; continue; };409 if (yych >= 'g') { gotoCase = 45; continue; };410 }411case 47:412 yych = this._charAt(++cursor);413 if (yych <= '@') {414 if (yych <= '/') { gotoCase = 45; continue; };415 if (yych >= ':') { gotoCase = 45; continue; };416 } else {417 if (yych <= 'F') { gotoCase = 48; continue; };418 if (yych <= '`') { gotoCase = 45; continue; };419 if (yych >= 'g') { gotoCase = 45; continue; };420 }421case 48:422 yych = this._charAt(++cursor);423 if (yych <= '@') {424 if (yych <= '/') { gotoCase = 45; continue; };425 if (yych >= ':') { gotoCase = 45; continue; };426 } else {427 if (yych <= 'F') { gotoCase = 49; continue; };428 if (yych <= '`') { gotoCase = 45; continue; };429 if (yych >= 'g') { gotoCase = 45; continue; };430 }431case 49:432 yyaccept = 1;433 YYMARKER = ++cursor;434 yych = this._charAt(cursor);435case 50:436 if (yych <= '[') {437 if (yych <= '/') {438 if (yych == '$') { gotoCase = 49; continue; };439 { gotoCase = 21; continue; };440 } else {441 if (yych <= '9') { gotoCase = 49; continue; };442 if (yych <= '@') { gotoCase = 21; continue; };443 if (yych <= 'Z') { gotoCase = 49; continue; };444 { gotoCase = 21; continue; };445 }446 } else {447 if (yych <= '_') {448 if (yych <= '\\') { gotoCase = 51; continue; };449 if (yych <= '^') { gotoCase = 21; continue; };450 { gotoCase = 49; continue; };451 } else {452 if (yych <= '`') { gotoCase = 21; continue; };453 if (yych <= 'z') { gotoCase = 49; continue; };454 if (yych <= String.fromCharCode(0x7F)) { gotoCase = 21; continue; };455 { gotoCase = 49; continue; };456 }457 }458case 51:459 ++cursor;460 yych = this._charAt(cursor);461 if (yych != 'u') { gotoCase = 45; continue; };462 ++cursor;463 yych = this._charAt(cursor);464 if (yych <= '@') {465 if (yych <= '/') { gotoCase = 45; continue; };466 if (yych >= ':') { gotoCase = 45; continue; };467 } else {468 if (yych <= 'F') { gotoCase = 53; continue; };469 if (yych <= '`') { gotoCase = 45; continue; };470 if (yych >= 'g') { gotoCase = 45; continue; };471 }472case 53:473 ++cursor;474 yych = this._charAt(cursor);475 if (yych <= '@') {476 if (yych <= '/') { gotoCase = 45; continue; };477 if (yych >= ':') { gotoCase = 45; continue; };478 } else {479 if (yych <= 'F') { gotoCase = 54; continue; };480 if (yych <= '`') { gotoCase = 45; continue; };481 if (yych >= 'g') { gotoCase = 45; continue; };482 }483case 54:484 ++cursor;485 yych = this._charAt(cursor);486 if (yych <= '@') {487 if (yych <= '/') { gotoCase = 45; continue; };488 if (yych >= ':') { gotoCase = 45; continue; };489 } else {490 if (yych <= 'F') { gotoCase = 55; continue; };491 if (yych <= '`') { gotoCase = 45; continue; };492 if (yych >= 'g') { gotoCase = 45; continue; };493 }494case 55:495 ++cursor;496 yych = this._charAt(cursor);497 if (yych <= '@') {498 if (yych <= '/') { gotoCase = 45; continue; };499 if (yych <= '9') { gotoCase = 49; continue; };500 { gotoCase = 45; continue; };501 } else {502 if (yych <= 'F') { gotoCase = 49; continue; };503 if (yych <= '`') { gotoCase = 45; continue; };504 if (yych <= 'f') { gotoCase = 49; continue; };505 { gotoCase = 45; continue; };506 }507case 56:508 yych = this._charAt(++cursor);509 if (yych <= '<') { gotoCase = 18; continue; };510 if (yych <= '=') { gotoCase = 43; continue; };511 if (yych >= '?') { gotoCase = 18; continue; };512 yych = this._charAt(++cursor);513 if (yych == '=') { gotoCase = 43; continue; };514 { gotoCase = 18; continue; };515case 58:516 yych = this._charAt(++cursor);517 if (yych == '=') { gotoCase = 43; continue; };518 { gotoCase = 18; continue; };519case 59:520 yych = this._charAt(++cursor);521 if (yych == '=') { gotoCase = 43; continue; };522 { gotoCase = 18; continue; };523case 60:524 yyaccept = 3;525 YYMARKER = ++cursor;526 yych = this._charAt(cursor);527 if (yych <= '9') {528 if (yych == '.') { gotoCase = 63; continue; };529 if (yych <= '/') { gotoCase = 35; continue; };530 { gotoCase = 60; continue; };531 } else {532 if (yych <= 'E') {533 if (yych <= 'D') { gotoCase = 35; continue; };534 } else {535 if (yych != 'e') { gotoCase = 35; continue; };536 }537 }538case 62:539 yych = this._charAt(++cursor);540 if (yych <= ',') {541 if (yych == '+') { gotoCase = 69; continue; };542 { gotoCase = 45; continue; };543 } else {544 if (yych <= '-') { gotoCase = 69; continue; };545 if (yych <= '/') { gotoCase = 45; continue; };546 if (yych <= '9') { gotoCase = 70; continue; };547 { gotoCase = 45; continue; };548 }549case 63:550 yyaccept = 3;551 YYMARKER = ++cursor;552 yych = this._charAt(cursor);553 if (yych <= 'D') {554 if (yych <= '/') { gotoCase = 35; continue; };555 if (yych <= '9') { gotoCase = 63; continue; };556 { gotoCase = 35; continue; };557 } else {558 if (yych <= 'E') { gotoCase = 65; continue; };559 if (yych != 'e') { gotoCase = 35; continue; };560 }561case 65:562 yych = this._charAt(++cursor);563 if (yych <= ',') {564 if (yych != '+') { gotoCase = 45; continue; };565 } else {566 if (yych <= '-') { gotoCase = 66; continue; };567 if (yych <= '/') { gotoCase = 45; continue; };568 if (yych <= '9') { gotoCase = 67; continue; };569 { gotoCase = 45; continue; };570 }571case 66:572 yych = this._charAt(++cursor);573 if (yych <= '/') { gotoCase = 45; continue; };574 if (yych >= ':') { gotoCase = 45; continue; };575case 67:576 ++cursor;577 yych = this._charAt(cursor);578 if (yych <= '/') { gotoCase = 35; continue; };579 if (yych <= '9') { gotoCase = 67; continue; };580 { gotoCase = 35; continue; };581case 69:582 yych = this._charAt(++cursor);583 if (yych <= '/') { gotoCase = 45; continue; };584 if (yych >= ':') { gotoCase = 45; continue; };585case 70:586 ++cursor;587 yych = this._charAt(cursor);588 if (yych <= '/') { gotoCase = 35; continue; };589 if (yych <= '9') { gotoCase = 70; continue; };590 { gotoCase = 35; continue; };591case 72:592 ++cursor;593 yych = this._charAt(cursor);594 if (yych <= '/') { gotoCase = 35; continue; };595 if (yych <= '7') { gotoCase = 72; continue; };596 { gotoCase = 35; continue; };597case 74:598 yych = this._charAt(++cursor);599 if (yych <= '@') {600 if (yych <= '/') { gotoCase = 45; continue; };601 if (yych >= ':') { gotoCase = 45; continue; };602 } else {603 if (yych <= 'F') { gotoCase = 75; continue; };604 if (yych <= '`') { gotoCase = 45; continue; };605 if (yych >= 'g') { gotoCase = 45; continue; };606 }607case 75:608 ++cursor;609 yych = this._charAt(cursor);610 if (yych <= '@') {611 if (yych <= '/') { gotoCase = 35; continue; };612 if (yych <= '9') { gotoCase = 75; continue; };613 { gotoCase = 35; continue; };614 } else {615 if (yych <= 'F') { gotoCase = 75; continue; };616 if (yych <= '`') { gotoCase = 35; continue; };617 if (yych <= 'f') { gotoCase = 75; continue; };618 { gotoCase = 35; continue; };619 }620case 77:621 yych = this._charAt(++cursor);622 { gotoCase = 33; continue; };623case 78:624 ++cursor;625 yych = this._charAt(cursor);626 if (yych <= '\f') {627 if (yych == '\n') { gotoCase = 85; continue; };628 { gotoCase = 78; continue; };629 } else {630 if (yych <= '\r') { gotoCase = 85; continue; };631 if (yych == '*') { gotoCase = 83; continue; };632 { gotoCase = 78; continue; };633 }634case 80:635 ++cursor;636 yych = this._charAt(cursor);637 if (yych == '\n') { gotoCase = 82; continue; };638 if (yych != '\r') { gotoCase = 80; continue; };639case 82:640 { this.tokenType = "javascript-comment"; return cursor; }641case 83:642 ++cursor;643 yych = this._charAt(cursor);644 if (yych == '*') { gotoCase = 83; continue; };645 if (yych == '/') { gotoCase = 87; continue; };646 { gotoCase = 78; continue; };647case 85:648 ++cursor;649 this.setLexCondition(this._lexConditions.COMMENT);650 { this.tokenType = "javascript-comment"; return cursor; }651case 87:652 ++cursor;653 { this.tokenType = "javascript-comment"; return cursor; }654case 89:655 yyaccept = 3;656 YYMARKER = ++cursor;657 yych = this._charAt(cursor);658 if (yych <= 'D') {659 if (yych <= '/') { gotoCase = 35; continue; };660 if (yych <= '9') { gotoCase = 89; continue; };661 { gotoCase = 35; continue; };662 } else {663 if (yych <= 'E') { gotoCase = 91; continue; };664 if (yych != 'e') { gotoCase = 35; continue; };665 }666case 91:667 yych = this._charAt(++cursor);668 if (yych <= ',') {669 if (yych != '+') { gotoCase = 45; continue; };670 } else {671 if (yych <= '-') { gotoCase = 92; continue; };672 if (yych <= '/') { gotoCase = 45; continue; };673 if (yych <= '9') { gotoCase = 93; continue; };674 { gotoCase = 45; continue; };675 }676case 92:677 yych = this._charAt(++cursor);678 if (yych <= '/') { gotoCase = 45; continue; };679 if (yych >= ':') { gotoCase = 45; continue; };680case 93:681 ++cursor;682 yych = this._charAt(cursor);683 if (yych <= '/') { gotoCase = 35; continue; };684 if (yych <= '9') { gotoCase = 93; continue; };685 { gotoCase = 35; continue; };686case 95:687 ++cursor;688 yych = this._charAt(cursor);689case 96:690 if (yych <= '\r') {691 if (yych == '\n') { gotoCase = 45; continue; };692 if (yych <= '\f') { gotoCase = 95; continue; };693 { gotoCase = 45; continue; };694 } else {695 if (yych <= '\'') {696 if (yych <= '&') { gotoCase = 95; continue; };697 { gotoCase = 98; continue; };698 } else {699 if (yych != '\\') { gotoCase = 95; continue; };700 }701 }702 ++cursor;703 yych = this._charAt(cursor);704 if (yych <= 'a') {705 if (yych <= '!') {706 if (yych <= '\n') {707 if (yych <= '\t') { gotoCase = 45; continue; };708 { gotoCase = 101; continue; };709 } else {710 if (yych == '\r') { gotoCase = 101; continue; };711 { gotoCase = 45; continue; };712 }713 } else {714 if (yych <= '\'') {715 if (yych <= '"') { gotoCase = 95; continue; };716 if (yych <= '&') { gotoCase = 45; continue; };717 { gotoCase = 95; continue; };718 } else {719 if (yych == '\\') { gotoCase = 95; continue; };720 { gotoCase = 45; continue; };721 }722 }723 } else {724 if (yych <= 'q') {725 if (yych <= 'f') {726 if (yych <= 'b') { gotoCase = 95; continue; };727 if (yych <= 'e') { gotoCase = 45; continue; };728 { gotoCase = 95; continue; };729 } else {730 if (yych == 'n') { gotoCase = 95; continue; };731 { gotoCase = 45; continue; };732 }733 } else {734 if (yych <= 't') {735 if (yych == 's') { gotoCase = 45; continue; };736 { gotoCase = 95; continue; };737 } else {738 if (yych <= 'u') { gotoCase = 100; continue; };739 if (yych <= 'v') { gotoCase = 95; continue; };740 { gotoCase = 45; continue; };741 }742 }743 }744case 98:745 ++cursor;746 { this.tokenType = "javascript-string"; return cursor; }747case 100:748 ++cursor;749 yych = this._charAt(cursor);750 if (yych <= '@') {751 if (yych <= '/') { gotoCase = 45; continue; };752 if (yych <= '9') { gotoCase = 103; continue; };753 { gotoCase = 45; continue; };754 } else {755 if (yych <= 'F') { gotoCase = 103; continue; };756 if (yych <= '`') { gotoCase = 45; continue; };757 if (yych <= 'f') { gotoCase = 103; continue; };758 { gotoCase = 45; continue; };759 }760case 101:761 ++cursor;762 this.setLexCondition(this._lexConditions.SSTRING);763 { this.tokenType = "javascript-string"; return cursor; }764case 103:765 ++cursor;766 yych = this._charAt(cursor);767 if (yych <= '@') {768 if (yych <= '/') { gotoCase = 45; continue; };769 if (yych >= ':') { gotoCase = 45; continue; };770 } else {771 if (yych <= 'F') { gotoCase = 104; continue; };772 if (yych <= '`') { gotoCase = 45; continue; };773 if (yych >= 'g') { gotoCase = 45; continue; };774 }775case 104:776 ++cursor;777 yych = this._charAt(cursor);778 if (yych <= '@') {779 if (yych <= '/') { gotoCase = 45; continue; };780 if (yych >= ':') { gotoCase = 45; continue; };781 } else {782 if (yych <= 'F') { gotoCase = 105; continue; };783 if (yych <= '`') { gotoCase = 45; continue; };784 if (yych >= 'g') { gotoCase = 45; continue; };785 }786case 105:787 ++cursor;788 yych = this._charAt(cursor);789 if (yych <= '@') {790 if (yych <= '/') { gotoCase = 45; continue; };791 if (yych <= '9') { gotoCase = 95; continue; };792 { gotoCase = 45; continue; };793 } else {794 if (yych <= 'F') { gotoCase = 95; continue; };795 if (yych <= '`') { gotoCase = 45; continue; };796 if (yych <= 'f') { gotoCase = 95; continue; };797 { gotoCase = 45; continue; };798 }799case 106:800 ++cursor;801 yych = this._charAt(cursor);802case 107:803 if (yych <= '\r') {804 if (yych == '\n') { gotoCase = 45; continue; };805 if (yych <= '\f') { gotoCase = 106; continue; };806 { gotoCase = 45; continue; };807 } else {808 if (yych <= '"') {809 if (yych <= '!') { gotoCase = 106; continue; };810 { gotoCase = 98; continue; };811 } else {812 if (yych != '\\') { gotoCase = 106; continue; };813 }814 }815 ++cursor;816 yych = this._charAt(cursor);817 if (yych <= 'a') {818 if (yych <= '!') {819 if (yych <= '\n') {820 if (yych <= '\t') { gotoCase = 45; continue; };821 { gotoCase = 110; continue; };822 } else {823 if (yych == '\r') { gotoCase = 110; continue; };824 { gotoCase = 45; continue; };825 }826 } else {827 if (yych <= '\'') {828 if (yych <= '"') { gotoCase = 106; continue; };829 if (yych <= '&') { gotoCase = 45; continue; };830 { gotoCase = 106; continue; };831 } else {832 if (yych == '\\') { gotoCase = 106; continue; };833 { gotoCase = 45; continue; };834 }835 }836 } else {837 if (yych <= 'q') {838 if (yych <= 'f') {839 if (yych <= 'b') { gotoCase = 106; continue; };840 if (yych <= 'e') { gotoCase = 45; continue; };841 { gotoCase = 106; continue; };842 } else {843 if (yych == 'n') { gotoCase = 106; continue; };844 { gotoCase = 45; continue; };845 }846 } else {847 if (yych <= 't') {848 if (yych == 's') { gotoCase = 45; continue; };849 { gotoCase = 106; continue; };850 } else {851 if (yych <= 'u') { gotoCase = 109; continue; };852 if (yych <= 'v') { gotoCase = 106; continue; };853 { gotoCase = 45; continue; };854 }855 }856 }857case 109:858 ++cursor;859 yych = this._charAt(cursor);860 if (yych <= '@') {861 if (yych <= '/') { gotoCase = 45; continue; };862 if (yych <= '9') { gotoCase = 112; continue; };863 { gotoCase = 45; continue; };864 } else {865 if (yych <= 'F') { gotoCase = 112; continue; };866 if (yych <= '`') { gotoCase = 45; continue; };867 if (yych <= 'f') { gotoCase = 112; continue; };868 { gotoCase = 45; continue; };869 }870case 110:871 ++cursor;872 this.setLexCondition(this._lexConditions.DSTRING);873 { this.tokenType = "javascript-string"; return cursor; }874case 112:875 ++cursor;876 yych = this._charAt(cursor);877 if (yych <= '@') {878 if (yych <= '/') { gotoCase = 45; continue; };879 if (yych >= ':') { gotoCase = 45; continue; };880 } else {881 if (yych <= 'F') { gotoCase = 113; continue; };882 if (yych <= '`') { gotoCase = 45; continue; };883 if (yych >= 'g') { gotoCase = 45; continue; };884 }885case 113:886 ++cursor;887 yych = this._charAt(cursor);888 if (yych <= '@') {889 if (yych <= '/') { gotoCase = 45; continue; };890 if (yych >= ':') { gotoCase = 45; continue; };891 } else {892 if (yych <= 'F') { gotoCase = 114; continue; };893 if (yych <= '`') { gotoCase = 45; continue; };894 if (yych >= 'g') { gotoCase = 45; continue; };895 }896case 114:897 ++cursor;898 yych = this._charAt(cursor);899 if (yych <= '@') {900 if (yych <= '/') { gotoCase = 45; continue; };901 if (yych <= '9') { gotoCase = 106; continue; };902 { gotoCase = 45; continue; };903 } else {904 if (yych <= 'F') { gotoCase = 106; continue; };905 if (yych <= '`') { gotoCase = 45; continue; };906 if (yych <= 'f') { gotoCase = 106; continue; };907 { gotoCase = 45; continue; };908 }909case 115:910 ++cursor;911 if ((yych = this._charAt(cursor)) == '=') { gotoCase = 43; continue; };912 { gotoCase = 18; continue; };913/* *********************************** */914case this.case_DSTRING:915 yych = this._charAt(cursor);916 if (yych <= '\r') {917 if (yych == '\n') { gotoCase = 120; continue; };918 if (yych <= '\f') { gotoCase = 119; continue; };919 { gotoCase = 120; continue; };920 } else {921 if (yych <= '"') {922 if (yych <= '!') { gotoCase = 119; continue; };923 { gotoCase = 122; continue; };924 } else {925 if (yych == '\\') { gotoCase = 124; continue; };926 { gotoCase = 119; continue; };927 }928 }929case 118:930 { this.tokenType = "javascript-string"; return cursor; }931case 119:932 yyaccept = 0;933 yych = this._charAt(YYMARKER = ++cursor);934 { gotoCase = 126; continue; };935case 120:936 ++cursor;937case 121:938 { this.tokenType = null; return cursor; }939case 122:940 ++cursor;941case 123:942 this.setLexCondition(this._lexConditions.NODIV);943 { this.tokenType = "javascript-string"; return cursor; }944case 124:945 yyaccept = 1;946 yych = this._charAt(YYMARKER = ++cursor);947 if (yych <= 'e') {948 if (yych <= '\'') {949 if (yych == '"') { gotoCase = 125; continue; };950 if (yych <= '&') { gotoCase = 121; continue; };951 } else {952 if (yych <= '\\') {953 if (yych <= '[') { gotoCase = 121; continue; };954 } else {955 if (yych != 'b') { gotoCase = 121; continue; };956 }957 }958 } else {959 if (yych <= 'r') {960 if (yych <= 'm') {961 if (yych >= 'g') { gotoCase = 121; continue; };962 } else {963 if (yych <= 'n') { gotoCase = 125; continue; };964 if (yych <= 'q') { gotoCase = 121; continue; };965 }966 } else {967 if (yych <= 't') {968 if (yych <= 's') { gotoCase = 121; continue; };969 } else {970 if (yych <= 'u') { gotoCase = 127; continue; };971 if (yych >= 'w') { gotoCase = 121; continue; };972 }973 }974 }975case 125:976 yyaccept = 0;977 YYMARKER = ++cursor;978 yych = this._charAt(cursor);979case 126:980 if (yych <= '\r') {981 if (yych == '\n') { gotoCase = 118; continue; };982 if (yych <= '\f') { gotoCase = 125; continue; };983 { gotoCase = 118; continue; };984 } else {985 if (yych <= '"') {986 if (yych <= '!') { gotoCase = 125; continue; };987 { gotoCase = 133; continue; };988 } else {989 if (yych == '\\') { gotoCase = 132; continue; };990 { gotoCase = 125; continue; };991 }992 }993case 127:994 ++cursor;995 yych = this._charAt(cursor);996 if (yych <= '@') {997 if (yych <= '/') { gotoCase = 128; continue; };998 if (yych <= '9') { gotoCase = 129; continue; };999 } else {1000 if (yych <= 'F') { gotoCase = 129; continue; };1001 if (yych <= '`') { gotoCase = 128; continue; };1002 if (yych <= 'f') { gotoCase = 129; continue; };1003 }1004case 128:1005 cursor = YYMARKER;1006 if (yyaccept <= 0) {1007 { gotoCase = 118; continue; };1008 } else {1009 { gotoCase = 121; continue; };1010 }1011case 129:1012 ++cursor;1013 yych = this._charAt(cursor);1014 if (yych <= '@') {1015 if (yych <= '/') { gotoCase = 128; continue; };1016 if (yych >= ':') { gotoCase = 128; continue; };1017 } else {1018 if (yych <= 'F') { gotoCase = 130; continue; };1019 if (yych <= '`') { gotoCase = 128; continue; };1020 if (yych >= 'g') { gotoCase = 128; continue; };1021 }1022case 130:1023 ++cursor;1024 yych = this._charAt(cursor);1025 if (yych <= '@') {1026 if (yych <= '/') { gotoCase = 128; continue; };1027 if (yych >= ':') { gotoCase = 128; continue; };1028 } else {1029 if (yych <= 'F') { gotoCase = 131; continue; };1030 if (yych <= '`') { gotoCase = 128; continue; };1031 if (yych >= 'g') { gotoCase = 128; continue; };1032 }1033case 131:1034 ++cursor;1035 yych = this._charAt(cursor);1036 if (yych <= '@') {1037 if (yych <= '/') { gotoCase = 128; continue; };1038 if (yych <= '9') { gotoCase = 125; continue; };1039 { gotoCase = 128; continue; };1040 } else {1041 if (yych <= 'F') { gotoCase = 125; continue; };1042 if (yych <= '`') { gotoCase = 128; continue; };1043 if (yych <= 'f') { gotoCase = 125; continue; };1044 { gotoCase = 128; continue; };1045 }1046case 132:1047 ++cursor;1048 yych = this._charAt(cursor);1049 if (yych <= 'e') {1050 if (yych <= '\'') {1051 if (yych == '"') { gotoCase = 125; continue; };1052 if (yych <= '&') { gotoCase = 128; continue; };1053 { gotoCase = 125; continue; };1054 } else {1055 if (yych <= '\\') {1056 if (yych <= '[') { gotoCase = 128; continue; };1057 { gotoCase = 125; continue; };1058 } else {1059 if (yych == 'b') { gotoCase = 125; continue; };1060 { gotoCase = 128; continue; };1061 }1062 }1063 } else {1064 if (yych <= 'r') {1065 if (yych <= 'm') {1066 if (yych <= 'f') { gotoCase = 125; continue; };1067 { gotoCase = 128; continue; };1068 } else {1069 if (yych <= 'n') { gotoCase = 125; continue; };1070 if (yych <= 'q') { gotoCase = 128; continue; };1071 { gotoCase = 125; continue; };1072 }1073 } else {1074 if (yych <= 't') {1075 if (yych <= 's') { gotoCase = 128; continue; };1076 { gotoCase = 125; continue; };1077 } else {1078 if (yych <= 'u') { gotoCase = 127; continue; };1079 if (yych <= 'v') { gotoCase = 125; continue; };1080 { gotoCase = 128; continue; };1081 }1082 }1083 }1084case 133:1085 ++cursor;1086 yych = this._charAt(cursor);1087 { gotoCase = 123; continue; };1088/* *********************************** */1089case this.case_NODIV:1090 yych = this._charAt(cursor);1091 if (yych <= '9') {1092 if (yych <= '(') {1093 if (yych <= '#') {1094 if (yych <= ' ') { gotoCase = 136; continue; };1095 if (yych <= '!') { gotoCase = 138; continue; };1096 if (yych <= '"') { gotoCase = 140; continue; };1097 } else {1098 if (yych <= '%') {1099 if (yych <= '$') { gotoCase = 141; continue; };1100 { gotoCase = 143; continue; };1101 } else {1102 if (yych <= '&') { gotoCase = 144; continue; };1103 if (yych <= '\'') { gotoCase = 145; continue; };1104 { gotoCase = 146; continue; };1105 }1106 }1107 } else {1108 if (yych <= ',') {1109 if (yych <= ')') { gotoCase = 147; continue; };1110 if (yych <= '*') { gotoCase = 149; continue; };1111 if (yych <= '+') { gotoCase = 150; continue; };1112 { gotoCase = 146; continue; };1113 } else {1114 if (yych <= '.') {1115 if (yych <= '-') { gotoCase = 151; continue; };1116 { gotoCase = 152; continue; };1117 } else {1118 if (yych <= '/') { gotoCase = 153; continue; };1119 if (yych <= '0') { gotoCase = 154; continue; };1120 { gotoCase = 156; continue; };1121 }1122 }1123 }1124 } else {1125 if (yych <= '\\') {1126 if (yych <= '>') {1127 if (yych <= ';') { gotoCase = 146; continue; };1128 if (yych <= '<') { gotoCase = 157; continue; };1129 if (yych <= '=') { gotoCase = 158; continue; };1130 { gotoCase = 159; continue; };1131 } else {1132 if (yych <= '@') {1133 if (yych <= '?') { gotoCase = 146; continue; };1134 } else {1135 if (yych <= 'Z') { gotoCase = 141; continue; };1136 if (yych <= '[') { gotoCase = 146; continue; };1137 { gotoCase = 160; continue; };1138 }1139 }1140 } else {1141 if (yych <= 'z') {1142 if (yych <= '^') {1143 if (yych <= ']') { gotoCase = 146; continue; };1144 { gotoCase = 161; continue; };1145 } else {1146 if (yych != '`') { gotoCase = 141; continue; };1147 }1148 } else {1149 if (yych <= '|') {1150 if (yych <= '{') { gotoCase = 146; continue; };1151 { gotoCase = 162; continue; };1152 } else {1153 if (yych <= '~') { gotoCase = 146; continue; };1154 if (yych >= 0x80) { gotoCase = 141; continue; };1155 }1156 }1157 }1158 }1159case 136:1160 ++cursor;1161case 137:1162 { this.tokenType = null; return cursor; }1163case 138:1164 ++cursor;1165 if ((yych = this._charAt(cursor)) == '=') { gotoCase = 260; continue; };1166case 139:1167 { this.tokenType = null; return cursor; }1168case 140:1169 yyaccept = 0;1170 yych = this._charAt(YYMARKER = ++cursor);1171 if (yych == '\n') { gotoCase = 137; continue; };1172 if (yych == '\r') { gotoCase = 137; continue; };1173 { gotoCase = 252; continue; };1174case 141:1175 yyaccept = 1;1176 yych = this._charAt(YYMARKER = ++cursor);1177 { gotoCase = 170; continue; };1178case 142:1179 this.setLexCondition(this._lexConditions.DIV);1180 {1181 var token = this._line.substring(cursorOnEnter, cursor);1182 if (WebInspector.SourceJavaScriptTokenizer.Keywords[token] === true && token !== "__proto__")1183 this.tokenType = "javascript-keyword";1184 else1185 this.tokenType = "javascript-ident";1186 return cursor;1187 }1188case 143:1189 yych = this._charAt(++cursor);1190 if (yych == '=') { gotoCase = 163; continue; };1191 { gotoCase = 139; continue; };1192case 144:1193 yych = this._charAt(++cursor);1194 if (yych == '&') { gotoCase = 163; continue; };1195 if (yych == '=') { gotoCase = 163; continue; };1196 { gotoCase = 139; continue; };1197case 145:1198 yyaccept = 0;1199 yych = this._charAt(YYMARKER = ++cursor);1200 if (yych == '\n') { gotoCase = 137; continue; };1201 if (yych == '\r') { gotoCase = 137; continue; };1202 { gotoCase = 241; continue; };1203case 146:1204 yych = this._charAt(++cursor);1205 { gotoCase = 139; continue; };1206case 147:1207 ++cursor;1208 this.setLexCondition(this._lexConditions.DIV);1209 { this.tokenType = null; return cursor; }1210case 149:1211 yych = this._charAt(++cursor);1212 if (yych == '=') { gotoCase = 163; continue; };1213 { gotoCase = 139; continue; };1214case 150:1215 yych = this._charAt(++cursor);1216 if (yych == '+') { gotoCase = 163; continue; };1217 if (yych == '=') { gotoCase = 163; continue; };1218 { gotoCase = 139; continue; };1219case 151:1220 yych = this._charAt(++cursor);1221 if (yych == '-') { gotoCase = 163; continue; };1222 if (yych == '=') { gotoCase = 163; continue; };1223 { gotoCase = 139; continue; };1224case 152:1225 yych = this._charAt(++cursor);1226 if (yych <= '/') { gotoCase = 139; continue; };1227 if (yych <= '9') { gotoCase = 234; continue; };1228 { gotoCase = 139; continue; };1229case 153:1230 yyaccept = 0;1231 yych = this._charAt(YYMARKER = ++cursor);1232 if (yych <= '*') {1233 if (yych <= '\f') {1234 if (yych == '\n') { gotoCase = 137; continue; };1235 { gotoCase = 197; continue; };1236 } else {1237 if (yych <= '\r') { gotoCase = 137; continue; };1238 if (yych <= ')') { gotoCase = 197; continue; };1239 { gotoCase = 202; continue; };1240 }1241 } else {1242 if (yych <= 'Z') {1243 if (yych == '/') { gotoCase = 204; continue; };1244 { gotoCase = 197; continue; };1245 } else {1246 if (yych <= '[') { gotoCase = 200; continue; };1247 if (yych <= '\\') { gotoCase = 199; continue; };1248 if (yych <= ']') { gotoCase = 137; continue; };1249 { gotoCase = 197; continue; };1250 }1251 }1252case 154:1253 yyaccept = 2;1254 yych = this._charAt(YYMARKER = ++cursor);1255 if (yych <= 'E') {1256 if (yych <= '/') {1257 if (yych == '.') { gotoCase = 183; continue; };1258 } else {1259 if (yych <= '7') { gotoCase = 192; continue; };1260 if (yych >= 'E') { gotoCase = 182; continue; };1261 }1262 } else {1263 if (yych <= 'd') {1264 if (yych == 'X') { gotoCase = 194; continue; };1265 } else {1266 if (yych <= 'e') { gotoCase = 182; continue; };1267 if (yych == 'x') { gotoCase = 194; continue; };1268 }1269 }1270case 155:1271 this.setLexCondition(this._lexConditions.DIV);1272 { this.tokenType = "javascript-number"; return cursor; }1273case 156:1274 yyaccept = 2;1275 yych = this._charAt(YYMARKER = ++cursor);1276 if (yych <= '9') {1277 if (yych == '.') { gotoCase = 183; continue; };1278 if (yych <= '/') { gotoCase = 155; continue; };1279 { gotoCase = 180; continue; };1280 } else {1281 if (yych <= 'E') {1282 if (yych <= 'D') { gotoCase = 155; continue; };1283 { gotoCase = 182; continue; };1284 } else {1285 if (yych == 'e') { gotoCase = 182; continue; };1286 { gotoCase = 155; continue; };1287 }1288 }1289case 157:1290 yych = this._charAt(++cursor);1291 if (yych <= ';') { gotoCase = 139; continue; };1292 if (yych <= '<') { gotoCase = 179; continue; };1293 if (yych <= '=') { gotoCase = 163; continue; };1294 { gotoCase = 139; continue; };1295case 158:1296 yych = this._charAt(++cursor);1297 if (yych == '=') { gotoCase = 178; continue; };1298 { gotoCase = 139; continue; };1299case 159:1300 yych = this._charAt(++cursor);1301 if (yych <= '<') { gotoCase = 139; continue; };1302 if (yych <= '=') { gotoCase = 163; continue; };1303 if (yych <= '>') { gotoCase = 176; continue; };1304 { gotoCase = 139; continue; };1305case 160:1306 yyaccept = 0;1307 yych = this._charAt(YYMARKER = ++cursor);1308 if (yych == 'u') { gotoCase = 164; continue; };1309 { gotoCase = 137; continue; };1310case 161:1311 yych = this._charAt(++cursor);1312 if (yych == '=') { gotoCase = 163; continue; };1313 { gotoCase = 139; continue; };1314case 162:1315 yych = this._charAt(++cursor);1316 if (yych == '=') { gotoCase = 163; continue; };1317 if (yych != '|') { gotoCase = 139; continue; };1318case 163:1319 yych = this._charAt(++cursor);1320 { gotoCase = 139; continue; };1321case 164:1322 yych = this._charAt(++cursor);1323 if (yych <= '@') {1324 if (yych <= '/') { gotoCase = 165; continue; };1325 if (yych <= '9') { gotoCase = 166; continue; };1326 } else {1327 if (yych <= 'F') { gotoCase = 166; continue; };1328 if (yych <= '`') { gotoCase = 165; continue; };1329 if (yych <= 'f') { gotoCase = 166; continue; };1330 }1331case 165:1332 cursor = YYMARKER;1333 if (yyaccept <= 1) {1334 if (yyaccept <= 0) {1335 { gotoCase = 137; continue; };1336 } else {1337 { gotoCase = 142; continue; };1338 }1339 } else {1340 if (yyaccept <= 2) {1341 { gotoCase = 155; continue; };1342 } else {1343 { gotoCase = 217; continue; };1344 }1345 }1346case 166:1347 yych = this._charAt(++cursor);1348 if (yych <= '@') {1349 if (yych <= '/') { gotoCase = 165; continue; };1350 if (yych >= ':') { gotoCase = 165; continue; };1351 } else {1352 if (yych <= 'F') { gotoCase = 167; continue; };1353 if (yych <= '`') { gotoCase = 165; continue; };1354 if (yych >= 'g') { gotoCase = 165; continue; };1355 }1356case 167:1357 yych = this._charAt(++cursor);1358 if (yych <= '@') {1359 if (yych <= '/') { gotoCase = 165; continue; };1360 if (yych >= ':') { gotoCase = 165; continue; };1361 } else {1362 if (yych <= 'F') { gotoCase = 168; continue; };1363 if (yych <= '`') { gotoCase = 165; continue; };1364 if (yych >= 'g') { gotoCase = 165; continue; };1365 }1366case 168:1367 yych = this._charAt(++cursor);1368 if (yych <= '@') {1369 if (yych <= '/') { gotoCase = 165; continue; };1370 if (yych >= ':') { gotoCase = 165; continue; };1371 } else {1372 if (yych <= 'F') { gotoCase = 169; continue; };1373 if (yych <= '`') { gotoCase = 165; continue; };1374 if (yych >= 'g') { gotoCase = 165; continue; };1375 }1376case 169:1377 yyaccept = 1;1378 YYMARKER = ++cursor;1379 yych = this._charAt(cursor);1380case 170:1381 if (yych <= '[') {1382 if (yych <= '/') {1383 if (yych == '$') { gotoCase = 169; continue; };1384 { gotoCase = 142; continue; };1385 } else {1386 if (yych <= '9') { gotoCase = 169; continue; };1387 if (yych <= '@') { gotoCase = 142; continue; };1388 if (yych <= 'Z') { gotoCase = 169; continue; };1389 { gotoCase = 142; continue; };1390 }1391 } else {1392 if (yych <= '_') {1393 if (yych <= '\\') { gotoCase = 171; continue; };1394 if (yych <= '^') { gotoCase = 142; continue; };1395 { gotoCase = 169; continue; };1396 } else {1397 if (yych <= '`') { gotoCase = 142; continue; };1398 if (yych <= 'z') { gotoCase = 169; continue; };1399 if (yych <= String.fromCharCode(0x7F)) { gotoCase = 142; continue; };1400 { gotoCase = 169; continue; };1401 }1402 }1403case 171:1404 ++cursor;1405 yych = this._charAt(cursor);1406 if (yych != 'u') { gotoCase = 165; continue; };1407 ++cursor;1408 yych = this._charAt(cursor);1409 if (yych <= '@') {1410 if (yych <= '/') { gotoCase = 165; continue; };1411 if (yych >= ':') { gotoCase = 165; continue; };1412 } else {1413 if (yych <= 'F') { gotoCase = 173; continue; };1414 if (yych <= '`') { gotoCase = 165; continue; };1415 if (yych >= 'g') { gotoCase = 165; continue; };1416 }1417case 173:1418 ++cursor;1419 yych = this._charAt(cursor);1420 if (yych <= '@') {1421 if (yych <= '/') { gotoCase = 165; continue; };1422 if (yych >= ':') { gotoCase = 165; continue; };1423 } else {1424 if (yych <= 'F') { gotoCase = 174; continue; };1425 if (yych <= '`') { gotoCase = 165; continue; };1426 if (yych >= 'g') { gotoCase = 165; continue; };1427 }1428case 174:1429 ++cursor;1430 yych = this._charAt(cursor);1431 if (yych <= '@') {1432 if (yych <= '/') { gotoCase = 165; continue; };1433 if (yych >= ':') { gotoCase = 165; continue; };1434 } else {1435 if (yych <= 'F') { gotoCase = 175; continue; };1436 if (yych <= '`') { gotoCase = 165; continue; };1437 if (yych >= 'g') { gotoCase = 165; continue; };1438 }1439case 175:1440 ++cursor;1441 yych = this._charAt(cursor);1442 if (yych <= '@') {1443 if (yych <= '/') { gotoCase = 165; continue; };1444 if (yych <= '9') { gotoCase = 169; continue; };1445 { gotoCase = 165; continue; };1446 } else {1447 if (yych <= 'F') { gotoCase = 169; continue; };1448 if (yych <= '`') { gotoCase = 165; continue; };1449 if (yych <= 'f') { gotoCase = 169; continue; };1450 { gotoCase = 165; continue; };1451 }1452case 176:1453 yych = this._charAt(++cursor);1454 if (yych <= '<') { gotoCase = 139; continue; };1455 if (yych <= '=') { gotoCase = 163; continue; };1456 if (yych >= '?') { gotoCase = 139; continue; };1457 yych = this._charAt(++cursor);1458 if (yych == '=') { gotoCase = 163; continue; };1459 { gotoCase = 139; continue; };1460case 178:1461 yych = this._charAt(++cursor);1462 if (yych == '=') { gotoCase = 163; continue; };1463 { gotoCase = 139; continue; };1464case 179:1465 yych = this._charAt(++cursor);1466 if (yych == '=') { gotoCase = 163; continue; };1467 { gotoCase = 139; continue; };1468case 180:1469 yyaccept = 2;1470 YYMARKER = ++cursor;1471 yych = this._charAt(cursor);1472 if (yych <= '9') {1473 if (yych == '.') { gotoCase = 183; continue; };1474 if (yych <= '/') { gotoCase = 155; continue; };1475 { gotoCase = 180; continue; };1476 } else {1477 if (yych <= 'E') {1478 if (yych <= 'D') { gotoCase = 155; continue; };1479 } else {1480 if (yych != 'e') { gotoCase = 155; continue; };1481 }1482 }1483case 182:1484 yych = this._charAt(++cursor);1485 if (yych <= ',') {1486 if (yych == '+') { gotoCase = 189; continue; };1487 { gotoCase = 165; continue; };1488 } else {1489 if (yych <= '-') { gotoCase = 189; continue; };1490 if (yych <= '/') { gotoCase = 165; continue; };1491 if (yych <= '9') { gotoCase = 190; continue; };1492 { gotoCase = 165; continue; };1493 }1494case 183:1495 yyaccept = 2;1496 YYMARKER = ++cursor;1497 yych = this._charAt(cursor);1498 if (yych <= 'D') {1499 if (yych <= '/') { gotoCase = 155; continue; };1500 if (yych <= '9') { gotoCase = 183; continue; };1501 { gotoCase = 155; continue; };1502 } else {1503 if (yych <= 'E') { gotoCase = 185; continue; };1504 if (yych != 'e') { gotoCase = 155; continue; };1505 }1506case 185:1507 yych = this._charAt(++cursor);1508 if (yych <= ',') {1509 if (yych != '+') { gotoCase = 165; continue; };1510 } else {1511 if (yych <= '-') { gotoCase = 186; continue; };1512 if (yych <= '/') { gotoCase = 165; continue; };1513 if (yych <= '9') { gotoCase = 187; continue; };1514 { gotoCase = 165; continue; };1515 }1516case 186:1517 yych = this._charAt(++cursor);1518 if (yych <= '/') { gotoCase = 165; continue; };1519 if (yych >= ':') { gotoCase = 165; continue; };1520case 187:1521 ++cursor;1522 yych = this._charAt(cursor);1523 if (yych <= '/') { gotoCase = 155; continue; };1524 if (yych <= '9') { gotoCase = 187; continue; };1525 { gotoCase = 155; continue; };1526case 189:1527 yych = this._charAt(++cursor);1528 if (yych <= '/') { gotoCase = 165; continue; };1529 if (yych >= ':') { gotoCase = 165; continue; };1530case 190:1531 ++cursor;1532 yych = this._charAt(cursor);1533 if (yych <= '/') { gotoCase = 155; continue; };1534 if (yych <= '9') { gotoCase = 190; continue; };1535 { gotoCase = 155; continue; };1536case 192:1537 ++cursor;1538 yych = this._charAt(cursor);1539 if (yych <= '/') { gotoCase = 155; continue; };1540 if (yych <= '7') { gotoCase = 192; continue; };1541 { gotoCase = 155; continue; };1542case 194:1543 yych = this._charAt(++cursor);1544 if (yych <= '@') {1545 if (yych <= '/') { gotoCase = 165; continue; };1546 if (yych >= ':') { gotoCase = 165; continue; };1547 } else {1548 if (yych <= 'F') { gotoCase = 195; continue; };1549 if (yych <= '`') { gotoCase = 165; continue; };1550 if (yych >= 'g') { gotoCase = 165; continue; };1551 }1552case 195:1553 ++cursor;1554 yych = this._charAt(cursor);1555 if (yych <= '@') {1556 if (yych <= '/') { gotoCase = 155; continue; };1557 if (yych <= '9') { gotoCase = 195; continue; };1558 { gotoCase = 155; continue; };1559 } else {1560 if (yych <= 'F') { gotoCase = 195; continue; };1561 if (yych <= '`') { gotoCase = 155; continue; };1562 if (yych <= 'f') { gotoCase = 195; continue; };1563 { gotoCase = 155; continue; };1564 }1565case 197:1566 ++cursor;1567 yych = this._charAt(cursor);1568 if (yych <= '.') {1569 if (yych <= '\n') {1570 if (yych <= '\t') { gotoCase = 197; continue; };1571 { gotoCase = 165; continue; };1572 } else {1573 if (yych == '\r') { gotoCase = 165; continue; };1574 { gotoCase = 197; continue; };1575 }1576 } else {1577 if (yych <= '[') {1578 if (yych <= '/') { gotoCase = 220; continue; };1579 if (yych <= 'Z') { gotoCase = 197; continue; };1580 { gotoCase = 228; continue; };1581 } else {1582 if (yych <= '\\') { gotoCase = 227; continue; };1583 if (yych <= ']') { gotoCase = 165; continue; };1584 { gotoCase = 197; continue; };1585 }1586 }1587case 199:1588 yych = this._charAt(++cursor);1589 if (yych == '\n') { gotoCase = 165; continue; };1590 if (yych == '\r') { gotoCase = 165; continue; };1591 { gotoCase = 197; continue; };1592case 200:1593 ++cursor;1594 yych = this._charAt(cursor);1595 if (yych <= '*') {1596 if (yych <= '\f') {1597 if (yych == '\n') { gotoCase = 165; continue; };1598 { gotoCase = 200; continue; };1599 } else {1600 if (yych <= '\r') { gotoCase = 165; continue; };1601 if (yych <= ')') { gotoCase = 200; continue; };1602 { gotoCase = 165; continue; };1603 }1604 } else {1605 if (yych <= '[') {1606 if (yych == '/') { gotoCase = 165; continue; };1607 { gotoCase = 200; continue; };1608 } else {1609 if (yych <= '\\') { gotoCase = 215; continue; };1610 if (yych <= ']') { gotoCase = 213; continue; };1611 { gotoCase = 200; continue; };1612 }1613 }1614case 202:1615 ++cursor;1616 yych = this._charAt(cursor);1617 if (yych <= '\f') {1618 if (yych == '\n') { gotoCase = 209; continue; };1619 { gotoCase = 202; continue; };1620 } else {1621 if (yych <= '\r') { gotoCase = 209; continue; };1622 if (yych == '*') { gotoCase = 207; continue; };1623 { gotoCase = 202; continue; };1624 }1625case 204:1626 ++cursor;1627 yych = this._charAt(cursor);1628 if (yych == '\n') { gotoCase = 206; continue; };1629 if (yych != '\r') { gotoCase = 204; continue; };1630case 206:1631 { this.tokenType = "javascript-comment"; return cursor; }1632case 207:1633 ++cursor;1634 yych = this._charAt(cursor);1635 if (yych == '*') { gotoCase = 207; continue; };1636 if (yych == '/') { gotoCase = 211; continue; };1637 { gotoCase = 202; continue; };1638case 209:1639 ++cursor;1640 this.setLexCondition(this._lexConditions.COMMENT);1641 { this.tokenType = "javascript-comment"; return cursor; }1642case 211:1643 ++cursor;1644 { this.tokenType = "javascript-comment"; return cursor; }1645case 213:1646 ++cursor;1647 yych = this._charAt(cursor);1648 if (yych <= '*') {1649 if (yych <= '\f') {1650 if (yych == '\n') { gotoCase = 165; continue; };1651 { gotoCase = 213; continue; };1652 } else {1653 if (yych <= '\r') { gotoCase = 165; continue; };1654 if (yych <= ')') { gotoCase = 213; continue; };1655 { gotoCase = 197; continue; };1656 }1657 } else {1658 if (yych <= 'Z') {1659 if (yych == '/') { gotoCase = 220; continue; };1660 { gotoCase = 213; continue; };1661 } else {1662 if (yych <= '[') { gotoCase = 218; continue; };1663 if (yych <= '\\') { gotoCase = 216; continue; };1664 { gotoCase = 213; continue; };1665 }1666 }1667case 215:1668 ++cursor;1669 yych = this._charAt(cursor);1670 if (yych == '\n') { gotoCase = 165; continue; };1671 if (yych == '\r') { gotoCase = 165; continue; };1672 { gotoCase = 200; continue; };1673case 216:1674 yyaccept = 3;1675 YYMARKER = ++cursor;1676 yych = this._charAt(cursor);1677 if (yych == '\n') { gotoCase = 217; continue; };1678 if (yych != '\r') { gotoCase = 213; continue; };1679case 217:1680 this.setLexCondition(this._lexConditions.REGEX);1681 { this.tokenType = "javascript-regexp"; return cursor; }1682case 218:1683 ++cursor;1684 yych = this._charAt(cursor);1685 if (yych <= '*') {1686 if (yych <= '\f') {1687 if (yych == '\n') { gotoCase = 165; continue; };1688 { gotoCase = 218; continue; };1689 } else {1690 if (yych <= '\r') { gotoCase = 165; continue; };1691 if (yych <= ')') { gotoCase = 218; continue; };1692 { gotoCase = 165; continue; };1693 }1694 } else {1695 if (yych <= '[') {1696 if (yych == '/') { gotoCase = 165; continue; };1697 { gotoCase = 218; continue; };1698 } else {1699 if (yych <= '\\') { gotoCase = 225; continue; };1700 if (yych <= ']') { gotoCase = 223; continue; };1701 { gotoCase = 218; continue; };1702 }1703 }1704case 220:1705 ++cursor;1706 yych = this._charAt(cursor);1707 if (yych <= 'h') {1708 if (yych == 'g') { gotoCase = 220; continue; };1709 } else {1710 if (yych <= 'i') { gotoCase = 220; continue; };1711 if (yych == 'm') { gotoCase = 220; continue; };1712 }1713 { this.tokenType = "javascript-regexp"; return cursor; }1714case 223:1715 ++cursor;1716 yych = this._charAt(cursor);1717 if (yych <= '*') {1718 if (yych <= '\f') {1719 if (yych == '\n') { gotoCase = 165; continue; };1720 { gotoCase = 223; continue; };1721 } else {1722 if (yych <= '\r') { gotoCase = 165; continue; };1723 if (yych <= ')') { gotoCase = 223; continue; };1724 { gotoCase = 197; continue; };1725 }1726 } else {1727 if (yych <= 'Z') {1728 if (yych == '/') { gotoCase = 220; continue; };1729 { gotoCase = 223; continue; };1730 } else {1731 if (yych <= '[') { gotoCase = 218; continue; };1732 if (yych <= '\\') { gotoCase = 226; continue; };1733 { gotoCase = 223; continue; };1734 }1735 }1736case 225:1737 ++cursor;1738 yych = this._charAt(cursor);1739 if (yych == '\n') { gotoCase = 165; continue; };1740 if (yych == '\r') { gotoCase = 165; continue; };1741 { gotoCase = 218; continue; };1742case 226:1743 yyaccept = 3;1744 YYMARKER = ++cursor;1745 yych = this._charAt(cursor);1746 if (yych == '\n') { gotoCase = 217; continue; };1747 if (yych == '\r') { gotoCase = 217; continue; };1748 { gotoCase = 223; continue; };1749case 227:1750 yyaccept = 3;1751 YYMARKER = ++cursor;1752 yych = this._charAt(cursor);1753 if (yych == '\n') { gotoCase = 217; continue; };1754 if (yych == '\r') { gotoCase = 217; continue; };1755 { gotoCase = 197; continue; };1756case 228:1757 ++cursor;1758 yych = this._charAt(cursor);1759 if (yych <= '*') {1760 if (yych <= '\f') {1761 if (yych == '\n') { gotoCase = 165; continue; };1762 { gotoCase = 228; continue; };1763 } else {1764 if (yych <= '\r') { gotoCase = 165; continue; };1765 if (yych <= ')') { gotoCase = 228; continue; };1766 { gotoCase = 165; continue; };1767 }1768 } else {1769 if (yych <= '[') {1770 if (yych == '/') { gotoCase = 165; continue; };1771 { gotoCase = 228; continue; };1772 } else {1773 if (yych <= '\\') { gotoCase = 232; continue; };1774 if (yych >= '^') { gotoCase = 228; continue; };1775 }1776 }1777case 230:1778 ++cursor;1779 yych = this._charAt(cursor);1780 if (yych <= '*') {1781 if (yych <= '\f') {1782 if (yych == '\n') { gotoCase = 165; continue; };1783 { gotoCase = 230; continue; };1784 } else {1785 if (yych <= '\r') { gotoCase = 165; continue; };1786 if (yych <= ')') { gotoCase = 230; continue; };1787 { gotoCase = 197; continue; };1788 }1789 } else {1790 if (yych <= 'Z') {1791 if (yych == '/') { gotoCase = 220; continue; };1792 { gotoCase = 230; continue; };1793 } else {1794 if (yych <= '[') { gotoCase = 228; continue; };1795 if (yych <= '\\') { gotoCase = 233; continue; };1796 { gotoCase = 230; continue; };1797 }1798 }1799case 232:1800 ++cursor;1801 yych = this._charAt(cursor);1802 if (yych == '\n') { gotoCase = 165; continue; };1803 if (yych == '\r') { gotoCase = 165; continue; };1804 { gotoCase = 228; continue; };1805case 233:1806 yyaccept = 3;1807 YYMARKER = ++cursor;1808 yych = this._charAt(cursor);1809 if (yych == '\n') { gotoCase = 217; continue; };1810 if (yych == '\r') { gotoCase = 217; continue; };1811 { gotoCase = 230; continue; };1812case 234:1813 yyaccept = 2;1814 YYMARKER = ++cursor;1815 yych = this._charAt(cursor);1816 if (yych <= 'D') {1817 if (yych <= '/') { gotoCase = 155; continue; };1818 if (yych <= '9') { gotoCase = 234; continue; };1819 { gotoCase = 155; continue; };1820 } else {1821 if (yych <= 'E') { gotoCase = 236; continue; };1822 if (yych != 'e') { gotoCase = 155; continue; };1823 }1824case 236:1825 yych = this._charAt(++cursor);1826 if (yych <= ',') {1827 if (yych != '+') { gotoCase = 165; continue; };1828 } else {1829 if (yych <= '-') { gotoCase = 237; continue; };1830 if (yych <= '/') { gotoCase = 165; continue; };1831 if (yych <= '9') { gotoCase = 238; continue; };1832 { gotoCase = 165; continue; };1833 }1834case 237:1835 yych = this._charAt(++cursor);1836 if (yych <= '/') { gotoCase = 165; continue; };1837 if (yych >= ':') { gotoCase = 165; continue; };1838case 238:1839 ++cursor;1840 yych = this._charAt(cursor);1841 if (yych <= '/') { gotoCase = 155; continue; };1842 if (yych <= '9') { gotoCase = 238; continue; };1843 { gotoCase = 155; continue; };1844case 240:1845 ++cursor;1846 yych = this._charAt(cursor);1847case 241:1848 if (yych <= '\r') {1849 if (yych == '\n') { gotoCase = 165; continue; };1850 if (yych <= '\f') { gotoCase = 240; continue; };1851 { gotoCase = 165; continue; };1852 } else {1853 if (yych <= '\'') {1854 if (yych <= '&') { gotoCase = 240; continue; };1855 { gotoCase = 243; continue; };1856 } else {1857 if (yych != '\\') { gotoCase = 240; continue; };1858 }1859 }1860 ++cursor;1861 yych = this._charAt(cursor);1862 if (yych <= 'a') {1863 if (yych <= '!') {1864 if (yych <= '\n') {1865 if (yych <= '\t') { gotoCase = 165; continue; };1866 { gotoCase = 246; continue; };1867 } else {1868 if (yych == '\r') { gotoCase = 246; continue; };1869 { gotoCase = 165; continue; };1870 }1871 } else {1872 if (yych <= '\'') {1873 if (yych <= '"') { gotoCase = 240; continue; };1874 if (yych <= '&') { gotoCase = 165; continue; };1875 { gotoCase = 240; continue; };1876 } else {1877 if (yych == '\\') { gotoCase = 240; continue; };1878 { gotoCase = 165; continue; };1879 }1880 }1881 } else {1882 if (yych <= 'q') {1883 if (yych <= 'f') {1884 if (yych <= 'b') { gotoCase = 240; continue; };1885 if (yych <= 'e') { gotoCase = 165; continue; };1886 { gotoCase = 240; continue; };1887 } else {1888 if (yych == 'n') { gotoCase = 240; continue; };1889 { gotoCase = 165; continue; };1890 }1891 } else {1892 if (yych <= 't') {1893 if (yych == 's') { gotoCase = 165; continue; };1894 { gotoCase = 240; continue; };1895 } else {1896 if (yych <= 'u') { gotoCase = 245; continue; };1897 if (yych <= 'v') { gotoCase = 240; continue; };1898 { gotoCase = 165; continue; };1899 }1900 }1901 }1902case 243:1903 ++cursor;1904 { this.tokenType = "javascript-string"; return cursor; }1905case 245:1906 ++cursor;1907 yych = this._charAt(cursor);1908 if (yych <= '@') {1909 if (yych <= '/') { gotoCase = 165; continue; };1910 if (yych <= '9') { gotoCase = 248; continue; };1911 { gotoCase = 165; continue; };1912 } else {1913 if (yych <= 'F') { gotoCase = 248; continue; };1914 if (yych <= '`') { gotoCase = 165; continue; };1915 if (yych <= 'f') { gotoCase = 248; continue; };1916 { gotoCase = 165; continue; };1917 }1918case 246:1919 ++cursor;1920 this.setLexCondition(this._lexConditions.SSTRING);1921 { this.tokenType = "javascript-string"; return cursor; }1922case 248:1923 ++cursor;1924 yych = this._charAt(cursor);1925 if (yych <= '@') {1926 if (yych <= '/') { gotoCase = 165; continue; };1927 if (yych >= ':') { gotoCase = 165; continue; };1928 } else {1929 if (yych <= 'F') { gotoCase = 249; continue; };1930 if (yych <= '`') { gotoCase = 165; continue; };1931 if (yych >= 'g') { gotoCase = 165; continue; };1932 }1933case 249:1934 ++cursor;1935 yych = this._charAt(cursor);1936 if (yych <= '@') {1937 if (yych <= '/') { gotoCase = 165; continue; };1938 if (yych >= ':') { gotoCase = 165; continue; };1939 } else {1940 if (yych <= 'F') { gotoCase = 250; continue; };1941 if (yych <= '`') { gotoCase = 165; continue; };1942 if (yych >= 'g') { gotoCase = 165; continue; };1943 }1944case 250:1945 ++cursor;1946 yych = this._charAt(cursor);1947 if (yych <= '@') {1948 if (yych <= '/') { gotoCase = 165; continue; };1949 if (yych <= '9') { gotoCase = 240; continue; };1950 { gotoCase = 165; continue; };1951 } else {1952 if (yych <= 'F') { gotoCase = 240; continue; };1953 if (yych <= '`') { gotoCase = 165; continue; };1954 if (yych <= 'f') { gotoCase = 240; continue; };1955 { gotoCase = 165; continue; };1956 }1957case 251:1958 ++cursor;1959 yych = this._charAt(cursor);1960case 252:1961 if (yych <= '\r') {1962 if (yych == '\n') { gotoCase = 165; continue; };1963 if (yych <= '\f') { gotoCase = 251; continue; };1964 { gotoCase = 165; continue; };1965 } else {1966 if (yych <= '"') {1967 if (yych <= '!') { gotoCase = 251; continue; };1968 { gotoCase = 243; continue; };1969 } else {1970 if (yych != '\\') { gotoCase = 251; continue; };1971 }1972 }1973 ++cursor;1974 yych = this._charAt(cursor);1975 if (yych <= 'a') {1976 if (yych <= '!') {1977 if (yych <= '\n') {1978 if (yych <= '\t') { gotoCase = 165; continue; };1979 { gotoCase = 255; continue; };1980 } else {1981 if (yych == '\r') { gotoCase = 255; continue; };1982 { gotoCase = 165; continue; };1983 }1984 } else {1985 if (yych <= '\'') {1986 if (yych <= '"') { gotoCase = 251; continue; };1987 if (yych <= '&') { gotoCase = 165; continue; };1988 { gotoCase = 251; continue; };1989 } else {1990 if (yych == '\\') { gotoCase = 251; continue; };1991 { gotoCase = 165; continue; };1992 }1993 }1994 } else {1995 if (yych <= 'q') {1996 if (yych <= 'f') {1997 if (yych <= 'b') { gotoCase = 251; continue; };1998 if (yych <= 'e') { gotoCase = 165; continue; };1999 { gotoCase = 251; continue; };2000 } else {2001 if (yych == 'n') { gotoCase = 251; continue; };2002 { gotoCase = 165; continue; };2003 }2004 } else {2005 if (yych <= 't') {2006 if (yych == 's') { gotoCase = 165; continue; };2007 { gotoCase = 251; continue; };2008 } else {2009 if (yych <= 'u') { gotoCase = 254; continue; };2010 if (yych <= 'v') { gotoCase = 251; continue; };2011 { gotoCase = 165; continue; };2012 }2013 }2014 }2015case 254:2016 ++cursor;2017 yych = this._charAt(cursor);2018 if (yych <= '@') {2019 if (yych <= '/') { gotoCase = 165; continue; };2020 if (yych <= '9') { gotoCase = 257; continue; };2021 { gotoCase = 165; continue; };2022 } else {2023 if (yych <= 'F') { gotoCase = 257; continue; };2024 if (yych <= '`') { gotoCase = 165; continue; };2025 if (yych <= 'f') { gotoCase = 257; continue; };2026 { gotoCase = 165; continue; };2027 }2028case 255:2029 ++cursor;2030 this.setLexCondition(this._lexConditions.DSTRING);2031 { this.tokenType = "javascript-string"; return cursor; }2032case 257:2033 ++cursor;2034 yych = this._charAt(cursor);2035 if (yych <= '@') {2036 if (yych <= '/') { gotoCase = 165; continue; };2037 if (yych >= ':') { gotoCase = 165; continue; };2038 } else {2039 if (yych <= 'F') { gotoCase = 258; continue; };2040 if (yych <= '`') { gotoCase = 165; continue; };2041 if (yych >= 'g') { gotoCase = 165; continue; };2042 }2043case 258:2044 ++cursor;2045 yych = this._charAt(cursor);2046 if (yych <= '@') {2047 if (yych <= '/') { gotoCase = 165; continue; };2048 if (yych >= ':') { gotoCase = 165; continue; };2049 } else {2050 if (yych <= 'F') { gotoCase = 259; continue; };2051 if (yych <= '`') { gotoCase = 165; continue; };2052 if (yych >= 'g') { gotoCase = 165; continue; };2053 }2054case 259:2055 ++cursor;2056 yych = this._charAt(cursor);2057 if (yych <= '@') {2058 if (yych <= '/') { gotoCase = 165; continue; };2059 if (yych <= '9') { gotoCase = 251; continue; };2060 { gotoCase = 165; continue; };2061 } else {2062 if (yych <= 'F') { gotoCase = 251; continue; };2063 if (yych <= '`') { gotoCase = 165; continue; };2064 if (yych <= 'f') { gotoCase = 251; continue; };2065 { gotoCase = 165; continue; };2066 }2067case 260:2068 ++cursor;2069 if ((yych = this._charAt(cursor)) == '=') { gotoCase = 163; continue; };2070 { gotoCase = 139; continue; };2071/* *********************************** */2072case this.case_REGEX:2073 yych = this._charAt(cursor);2074 if (yych <= '.') {2075 if (yych <= '\n') {2076 if (yych <= '\t') { gotoCase = 264; continue; };2077 { gotoCase = 265; continue; };2078 } else {2079 if (yych == '\r') { gotoCase = 265; continue; };2080 { gotoCase = 264; continue; };2081 }2082 } else {2083 if (yych <= '[') {2084 if (yych <= '/') { gotoCase = 267; continue; };2085 if (yych <= 'Z') { gotoCase = 264; continue; };2086 { gotoCase = 269; continue; };2087 } else {2088 if (yych <= '\\') { gotoCase = 270; continue; };2089 if (yych <= ']') { gotoCase = 265; continue; };2090 { gotoCase = 264; continue; };2091 }2092 }2093case 263:2094 { this.tokenType = "javascript-regexp"; return cursor; }2095case 264:2096 yyaccept = 0;2097 yych = this._charAt(YYMARKER = ++cursor);2098 { gotoCase = 272; continue; };2099case 265:2100 ++cursor;2101case 266:2102 { this.tokenType = null; return cursor; }2103case 267:2104 ++cursor;2105 yych = this._charAt(cursor);2106 { gotoCase = 278; continue; };2107case 268:2108 this.setLexCondition(this._lexConditions.NODIV);2109 { this.tokenType = "javascript-regexp"; return cursor; }2110case 269:2111 yyaccept = 1;2112 yych = this._charAt(YYMARKER = ++cursor);2113 if (yych <= '\r') {2114 if (yych == '\n') { gotoCase = 266; continue; };2115 if (yych <= '\f') { gotoCase = 276; continue; };2116 { gotoCase = 266; continue; };2117 } else {2118 if (yych <= '*') {2119 if (yych <= ')') { gotoCase = 276; continue; };2120 { gotoCase = 266; continue; };2121 } else {2122 if (yych == '/') { gotoCase = 266; continue; };2123 { gotoCase = 276; continue; };2124 }2125 }2126case 270:2127 yych = this._charAt(++cursor);2128 if (yych == '\n') { gotoCase = 266; continue; };2129 if (yych == '\r') { gotoCase = 266; continue; };2130case 271:2131 yyaccept = 0;2132 YYMARKER = ++cursor;2133 yych = this._charAt(cursor);2134case 272:2135 if (yych <= '.') {2136 if (yych <= '\n') {2137 if (yych <= '\t') { gotoCase = 271; continue; };2138 { gotoCase = 263; continue; };2139 } else {2140 if (yych == '\r') { gotoCase = 263; continue; };2141 { gotoCase = 271; continue; };2142 }2143 } else {2144 if (yych <= '[') {2145 if (yych <= '/') { gotoCase = 277; continue; };2146 if (yych <= 'Z') { gotoCase = 271; continue; };2147 { gotoCase = 275; continue; };2148 } else {2149 if (yych <= '\\') { gotoCase = 273; continue; };2150 if (yych <= ']') { gotoCase = 263; continue; };2151 { gotoCase = 271; continue; };2152 }2153 }2154case 273:2155 ++cursor;2156 yych = this._charAt(cursor);2157 if (yych == '\n') { gotoCase = 274; continue; };2158 if (yych != '\r') { gotoCase = 271; continue; };2159case 274:2160 cursor = YYMARKER;2161 if (yyaccept <= 0) {2162 { gotoCase = 263; continue; };2163 } else {2164 { gotoCase = 266; continue; };2165 }2166case 275:2167 ++cursor;2168 yych = this._charAt(cursor);2169case 276:2170 if (yych <= '*') {2171 if (yych <= '\f') {2172 if (yych == '\n') { gotoCase = 274; continue; };2173 { gotoCase = 275; continue; };2174 } else {2175 if (yych <= '\r') { gotoCase = 274; continue; };2176 if (yych <= ')') { gotoCase = 275; continue; };2177 { gotoCase = 274; continue; };2178 }2179 } else {2180 if (yych <= '[') {2181 if (yych == '/') { gotoCase = 274; continue; };2182 { gotoCase = 275; continue; };2183 } else {2184 if (yych <= '\\') { gotoCase = 281; continue; };2185 if (yych <= ']') { gotoCase = 279; continue; };2186 { gotoCase = 275; continue; };2187 }2188 }2189case 277:2190 ++cursor;2191 yych = this._charAt(cursor);2192case 278:2193 if (yych <= 'h') {2194 if (yych == 'g') { gotoCase = 277; continue; };2195 { gotoCase = 268; continue; };2196 } else {2197 if (yych <= 'i') { gotoCase = 277; continue; };2198 if (yych == 'm') { gotoCase = 277; continue; };2199 { gotoCase = 268; continue; };2200 }2201case 279:2202 yyaccept = 0;2203 YYMARKER = ++cursor;2204 yych = this._charAt(cursor);2205 if (yych <= '*') {2206 if (yych <= '\f') {2207 if (yych == '\n') { gotoCase = 263; continue; };2208 { gotoCase = 279; continue; };2209 } else {2210 if (yych <= '\r') { gotoCase = 263; continue; };2211 if (yych <= ')') { gotoCase = 279; continue; };2212 { gotoCase = 271; continue; };2213 }2214 } else {2215 if (yych <= 'Z') {2216 if (yych == '/') { gotoCase = 277; continue; };2217 { gotoCase = 279; continue; };2218 } else {2219 if (yych <= '[') { gotoCase = 275; continue; };2220 if (yych <= '\\') { gotoCase = 282; continue; };2221 { gotoCase = 279; continue; };2222 }2223 }2224case 281:2225 ++cursor;2226 yych = this._charAt(cursor);2227 if (yych == '\n') { gotoCase = 274; continue; };2228 if (yych == '\r') { gotoCase = 274; continue; };2229 { gotoCase = 275; continue; };2230case 282:2231 ++cursor;2232 yych = this._charAt(cursor);2233 if (yych == '\n') { gotoCase = 274; continue; };2234 if (yych == '\r') { gotoCase = 274; continue; };2235 { gotoCase = 279; continue; };2236/* *********************************** */2237case this.case_SSTRING:2238 yych = this._charAt(cursor);2239 if (yych <= '\r') {2240 if (yych == '\n') { gotoCase = 287; continue; };2241 if (yych <= '\f') { gotoCase = 286; continue; };2242 { gotoCase = 287; continue; };2243 } else {2244 if (yych <= '\'') {2245 if (yych <= '&') { gotoCase = 286; continue; };2246 { gotoCase = 289; continue; };2247 } else {2248 if (yych == '\\') { gotoCase = 291; continue; };2249 { gotoCase = 286; continue; };2250 }2251 }2252case 285:2253 { this.tokenType = "javascript-string"; return cursor; }2254case 286:2255 yyaccept = 0;2256 yych = this._charAt(YYMARKER = ++cursor);2257 { gotoCase = 293; continue; };2258case 287:2259 ++cursor;2260case 288:2261 { this.tokenType = null; return cursor; }2262case 289:2263 ++cursor;2264case 290:2265 this.setLexCondition(this._lexConditions.NODIV);2266 { this.tokenType = "javascript-string"; return cursor; }2267case 291:2268 yyaccept = 1;2269 yych = this._charAt(YYMARKER = ++cursor);2270 if (yych <= 'e') {2271 if (yych <= '\'') {2272 if (yych == '"') { gotoCase = 292; continue; };2273 if (yych <= '&') { gotoCase = 288; continue; };2274 } else {2275 if (yych <= '\\') {2276 if (yych <= '[') { gotoCase = 288; continue; };2277 } else {2278 if (yych != 'b') { gotoCase = 288; continue; };2279 }2280 }2281 } else {2282 if (yych <= 'r') {2283 if (yych <= 'm') {2284 if (yych >= 'g') { gotoCase = 288; continue; };2285 } else {2286 if (yych <= 'n') { gotoCase = 292; continue; };2287 if (yych <= 'q') { gotoCase = 288; continue; };2288 }2289 } else {2290 if (yych <= 't') {2291 if (yych <= 's') { gotoCase = 288; continue; };2292 } else {2293 if (yych <= 'u') { gotoCase = 294; continue; };2294 if (yych >= 'w') { gotoCase = 288; continue; };2295 }2296 }2297 }2298case 292:2299 yyaccept = 0;2300 YYMARKER = ++cursor;2301 yych = this._charAt(cursor);2302case 293:2303 if (yych <= '\r') {2304 if (yych == '\n') { gotoCase = 285; continue; };2305 if (yych <= '\f') { gotoCase = 292; continue; };2306 { gotoCase = 285; continue; };2307 } else {2308 if (yych <= '\'') {2309 if (yych <= '&') { gotoCase = 292; continue; };2310 { gotoCase = 300; continue; };2311 } else {2312 if (yych == '\\') { gotoCase = 299; continue; };2313 { gotoCase = 292; continue; };2314 }2315 }2316case 294:2317 ++cursor;2318 yych = this._charAt(cursor);2319 if (yych <= '@') {2320 if (yych <= '/') { gotoCase = 295; continue; };2321 if (yych <= '9') { gotoCase = 296; continue; };2322 } else {2323 if (yych <= 'F') { gotoCase = 296; continue; };2324 if (yych <= '`') { gotoCase = 295; continue; };2325 if (yych <= 'f') { gotoCase = 296; continue; };2326 }2327case 295:2328 cursor = YYMARKER;2329 if (yyaccept <= 0) {2330 { gotoCase = 285; continue; };2331 } else {2332 { gotoCase = 288; continue; };2333 }2334case 296:2335 ++cursor;2336 yych = this._charAt(cursor);2337 if (yych <= '@') {2338 if (yych <= '/') { gotoCase = 295; continue; };2339 if (yych >= ':') { gotoCase = 295; continue; };2340 } else {2341 if (yych <= 'F') { gotoCase = 297; continue; };2342 if (yych <= '`') { gotoCase = 295; continue; };2343 if (yych >= 'g') { gotoCase = 295; continue; };2344 }2345case 297:2346 ++cursor;2347 yych = this._charAt(cursor);2348 if (yych <= '@') {2349 if (yych <= '/') { gotoCase = 295; continue; };2350 if (yych >= ':') { gotoCase = 295; continue; };2351 } else {2352 if (yych <= 'F') { gotoCase = 298; continue; };2353 if (yych <= '`') { gotoCase = 295; continue; };2354 if (yych >= 'g') { gotoCase = 295; continue; };2355 }2356case 298:2357 ++cursor;2358 yych = this._charAt(cursor);2359 if (yych <= '@') {2360 if (yych <= '/') { gotoCase = 295; continue; };2361 if (yych <= '9') { gotoCase = 292; continue; };2362 { gotoCase = 295; continue; };2363 } else {2364 if (yych <= 'F') { gotoCase = 292; continue; };2365 if (yych <= '`') { gotoCase = 295; continue; };2366 if (yych <= 'f') { gotoCase = 292; continue; };2367 { gotoCase = 295; continue; };2368 }2369case 299:2370 ++cursor;2371 yych = this._charAt(cursor);2372 if (yych <= 'e') {2373 if (yych <= '\'') {2374 if (yych == '"') { gotoCase = 292; continue; };2375 if (yych <= '&') { gotoCase = 295; continue; };2376 { gotoCase = 292; continue; };2377 } else {2378 if (yych <= '\\') {2379 if (yych <= '[') { gotoCase = 295; continue; };2380 { gotoCase = 292; continue; };2381 } else {2382 if (yych == 'b') { gotoCase = 292; continue; };2383 { gotoCase = 295; continue; };2384 }2385 }2386 } else {2387 if (yych <= 'r') {2388 if (yych <= 'm') {2389 if (yych <= 'f') { gotoCase = 292; continue; };2390 { gotoCase = 295; continue; };2391 } else {2392 if (yych <= 'n') { gotoCase = 292; continue; };2393 if (yych <= 'q') { gotoCase = 295; continue; };2394 { gotoCase = 292; continue; };2395 }2396 } else {2397 if (yych <= 't') {2398 if (yych <= 's') { gotoCase = 295; continue; };2399 { gotoCase = 292; continue; };2400 } else {2401 if (yych <= 'u') { gotoCase = 294; continue; };2402 if (yych <= 'v') { gotoCase = 292; continue; };2403 { gotoCase = 295; continue; };2404 }2405 }2406 }2407case 300:2408 ++cursor;2409 yych = this._charAt(cursor);2410 { gotoCase = 290; continue; };2411 }2412 }2413 }2414}...

Full Screen

Full Screen

SourceCSSTokenizer.js

Source:SourceCSSTokenizer.js Github

copy

Full Screen

1/* Generated by re2c 0.13.5 on Mon Dec 19 17:28:29 2011 */2/*3 * Copyright (C) 2009 Google Inc. All rights reserved.4 *5 * Redistribution and use in source and binary forms, with or without6 * modification, are permitted provided that the following conditions are7 * met:8 *9 * * Redistributions of source code must retain the above copyright10 * notice, this list of conditions and the following disclaimer.11 * * Redistributions in binary form must reproduce the above12 * copyright notice, this list of conditions and the following disclaimer13 * in the documentation and/or other materials provided with the14 * distribution.15 * * Neither the name of Google Inc. nor the names of its16 * contributors may be used to endorse or promote products derived from17 * this software without specific prior written permission.18 *19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT23 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.30 */31// Generate js file as follows:32/*33re2c -isc Source/WebCore/inspector/front-end/SourceCSSTokenizer.re2js \34 | sed 's|^yy\([^:]*\)*\:|case \1:|' \35 | sed 's|[*]cursor[+][+]|this._charAt(cursor++)|' \36 | sed 's|[[*][+][+]cursor|this._charAt(++cursor)|' \37 | sed 's|[*]cursor|this._charAt(cursor)|' \38 | sed 's|yych = \*\([^;]*\)|yych = this._charAt\1|' \39 | sed 's|{ gotoCase = \([^; continue; };]*\)|{ gotoCase = \1; continue; }|' \40 | sed 's|unsigned\ int|var|' \41 | sed 's|var\ yych|case 1: case 1: var yych|' > Source/WebCore/inspector/front-end/SourceCSSTokenizer.js42*/43/**44 * @constructor45 * @extends {WebInspector.SourceTokenizer}46 */47WebInspector.SourceCSSTokenizer = function()48{49 WebInspector.SourceTokenizer.call(this);50 this._propertyKeywords = WebInspector.CSSCompletions.cssNameCompletions.keySet();51 this._colorKeywords = WebInspector.CSSKeywordCompletions.colors();52 this._valueKeywords = [53 "above", "absolute", "activeborder", "activecaption", "afar", "after-white-space", "ahead", "alias", "all", "all-scroll",54 "alternate", "always", "amharic", "amharic-abegede", "antialiased", "appworkspace", "arabic-indic", "armenian", "asterisks",55 "auto", "avoid", "background", "backwards", "baseline", "below", "bidi-override", "binary", "bengali", "blink",56 "block", "block-axis", "bold", "bolder", "border", "border-box", "both", "bottom", "break-all", "break-word", "button",57 "button-bevel", "buttonface", "buttonhighlight", "buttonshadow", "buttontext", "cambodian", "capitalize", "caps-lock-indicator",58 "caption", "captiontext", "caret", "cell", "center", "checkbox", "circle", "cjk-earthly-branch", "cjk-heavenly-stem", "cjk-ideographic",59 "clear", "clip", "close-quote", "col-resize", "collapse", "compact", "condensed", "contain", "content", "content-box", "context-menu",60 "continuous", "copy", "cover", "crop", "cross", "crosshair", "currentcolor", "cursive", "dashed", "decimal", "decimal-leading-zero", "default",61 "default-button", "destination-atop", "destination-in", "destination-out", "destination-over", "devanagari", "disc", "discard", "document",62 "dot-dash", "dot-dot-dash", "dotted", "double", "down", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out", "element",63 "ellipsis", "embed", "end", "ethiopic", "ethiopic-abegede", "ethiopic-abegede-am-et", "ethiopic-abegede-gez",64 "ethiopic-abegede-ti-er", "ethiopic-abegede-ti-et", "ethiopic-halehame-aa-er", "ethiopic-halehame-aa-et",65 "ethiopic-halehame-am-et", "ethiopic-halehame-gez", "ethiopic-halehame-om-et", "ethiopic-halehame-sid-et",66 "ethiopic-halehame-so-et", "ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig", "ew-resize", "expanded",67 "extra-condensed", "extra-expanded", "fantasy", "fast", "fill", "fixed", "flat", "footnotes", "forwards", "from", "geometricPrecision",68 "georgian", "graytext", "groove", "gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hebrew", "help",69 "hidden", "hide", "higher", "highlight", "highlighttext", "hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "icon", "ignore",70 "inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite", "infobackground", "infotext", "inherit", "initial", "inline",71 "inline-axis", "inline-block", "inline-table", "inset", "inside", "intrinsic", "invert", "italic", "justify", "kannada", "katakana",72 "katakana-iroha", "khmer", "landscape", "lao", "large", "larger", "left", "level", "lighter", "line-through", "linear", "lines",73 "list-item", "listbox", "listitem", "local", "logical", "loud", "lower", "lower-alpha", "lower-armenian", "lower-greek",74 "lower-hexadecimal", "lower-latin", "lower-norwegian", "lower-roman", "lowercase", "ltr", "malayalam", "match", "media-controls-background",75 "media-current-time-display", "media-fullscreen-button", "media-mute-button", "media-play-button", "media-return-to-realtime-button",76 "media-rewind-button", "media-seek-back-button", "media-seek-forward-button", "media-slider", "media-sliderthumb", "media-time-remaining-display",77 "media-volume-slider", "media-volume-slider-container", "media-volume-sliderthumb", "medium", "menu", "menulist", "menulist-button",78 "menulist-text", "menulist-textfield", "menutext", "message-box", "middle", "min-intrinsic", "mix", "mongolian", "monospace", "move", "multiple",79 "myanmar", "n-resize", "narrower", "navy", "ne-resize", "nesw-resize", "no-close-quote", "no-drop", "no-open-quote", "no-repeat", "none",80 "normal", "not-allowed", "nowrap", "ns-resize", "nw-resize", "nwse-resize", "oblique", "octal", "open-quote", "optimizeLegibility",81 "optimizeSpeed", "oriya", "oromo", "outset", "outside", "overlay", "overline", "padding", "padding-box", "painted", "paused",82 "persian", "plus-darker", "plus-lighter", "pointer", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d", "progress",83 "push-button", "radio", "read-only", "read-write", "read-write-plaintext-only", "relative", "repeat", "repeat-x",84 "repeat-y", "reset", "reverse", "rgb", "rgba", "ridge", "right", "round", "row-resize", "rtl", "run-in", "running", "s-resize", "sans-serif",85 "scroll", "scrollbar", "se-resize", "searchfield", "searchfield-cancel-button", "searchfield-decoration", "searchfield-results-button",86 "searchfield-results-decoration", "semi-condensed", "semi-expanded", "separate", "serif", "show", "sidama", "single",87 "skip-white-space", "slide", "slider-horizontal", "slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow",88 "small", "small-caps", "small-caption", "smaller", "solid", "somali", "source-atop", "source-in", "source-out", "source-over",89 "space", "square", "square-button", "start", "static", "status-bar", "stretch", "stroke", "sub", "subpixel-antialiased", "super",90 "sw-resize", "table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group",91 "table-row", "table-row-group", "telugu", "text", "text-bottom", "text-top", "textarea", "textfield", "thai", "thick", "thin",92 "threeddarkshadow", "threedface", "threedhighlight", "threedlightshadow", "threedshadow", "tibetan", "tigre", "tigrinya-er", "tigrinya-er-abegede",93 "tigrinya-et", "tigrinya-et-abegede", "to", "top", "transparent", "ultra-condensed", "ultra-expanded", "underline", "up", "upper-alpha", "upper-armenian",94 "upper-greek", "upper-hexadecimal", "upper-latin", "upper-norwegian", "upper-roman", "uppercase", "urdu", "url", "vertical", "vertical-text", "visible",95 "visibleFill", "visiblePainted", "visibleStroke", "visual", "w-resize", "wait", "wave", "white", "wider", "window", "windowframe", "windowtext",96 "x-large", "x-small", "xor", "xx-large", "xx-small", "yellow", "-wap-marquee", "-webkit-activelink", "-webkit-auto", "-webkit-baseline-middle",97 "-webkit-body", "-webkit-box", "-webkit-center", "-webkit-control", "-webkit-focus-ring-color", "-webkit-grab", "-webkit-grabbing",98 "-webkit-gradient", "-webkit-inline-box", "-webkit-left", "-webkit-link", "-webkit-marquee", "-webkit-mini-control", "-webkit-nowrap", "-webkit-pictograph",99 "-webkit-right", "-webkit-small-control", "-webkit-text", "-webkit-xxx-large", "-webkit-zoom-in", "-webkit-zoom-out",100 ].keySet();101 this._mediaTypes = ["all", "aural", "braille", "embossed", "handheld", "import", "print", "projection", "screen", "tty", "tv"].keySet();102 this._lexConditions = {103 INITIAL: 0,104 COMMENT: 1,105 DSTRING: 2,106 SSTRING: 3107 };108 this._parseConditions = {109 INITIAL: 0,110 PROPERTY: 1,111 PROPERTY_VALUE: 2,112 AT_RULE: 3,113 AT_MEDIA_RULE: 4114 };115 this.case_INITIAL = 1000;116 this.case_COMMENT = 1002;117 this.case_DSTRING = 1003;118 this.case_SSTRING = 1004;119 this.condition = this.createInitialCondition();120}121WebInspector.SourceCSSTokenizer.prototype = {122 createInitialCondition: function()123 {124 return { lexCondition: this._lexConditions.INITIAL, parseCondition: this._parseConditions.INITIAL };125 },126 /**127 * @param {boolean=} stringEnds128 */129 _stringToken: function(cursor, stringEnds)130 {131 if (this._isPropertyValue())132 this.tokenType = "css-string";133 else134 this.tokenType = null;135 return cursor;136 },137 _isPropertyValue: function()138 {139 return this._condition.parseCondition === this._parseConditions.PROPERTY_VALUE || this._condition.parseCondition === this._parseConditions.AT_RULE;140 },141 nextToken: function(cursor)142 {143 var cursorOnEnter = cursor;144 var gotoCase = 1;145 var YYMARKER;146 while (1) {147 switch (gotoCase)148 // Following comment is replaced with generated state machine.149 150 {151 case 1: var yych;152 var yyaccept = 0;153 if (this.getLexCondition() < 2) {154 if (this.getLexCondition() < 1) {155 { gotoCase = this.case_INITIAL; continue; };156 } else {157 { gotoCase = this.case_COMMENT; continue; };158 }159 } else {160 if (this.getLexCondition() < 3) {161 { gotoCase = this.case_DSTRING; continue; };162 } else {163 { gotoCase = this.case_SSTRING; continue; };164 }165 }166/* *********************************** */167case this.case_COMMENT:168 yych = this._charAt(cursor);169 if (yych <= '\f') {170 if (yych == '\n') { gotoCase = 4; continue; };171 { gotoCase = 3; continue; };172 } else {173 if (yych <= '\r') { gotoCase = 4; continue; };174 if (yych == '*') { gotoCase = 6; continue; };175 { gotoCase = 3; continue; };176 }177case 2:178 { this.tokenType = "css-comment"; return cursor; }179case 3:180 yyaccept = 0;181 yych = this._charAt(YYMARKER = ++cursor);182 { gotoCase = 12; continue; };183case 4:184 ++cursor;185 { this.tokenType = null; return cursor; }186case 6:187 yyaccept = 1;188 yych = this._charAt(YYMARKER = ++cursor);189 if (yych == '*') { gotoCase = 9; continue; };190 if (yych != '/') { gotoCase = 11; continue; };191case 7:192 ++cursor;193 this.setLexCondition(this._lexConditions.INITIAL);194 { this.tokenType = "css-comment"; return cursor; }195case 9:196 ++cursor;197 yych = this._charAt(cursor);198 if (yych == '*') { gotoCase = 9; continue; };199 if (yych == '/') { gotoCase = 7; continue; };200case 11:201 yyaccept = 0;202 YYMARKER = ++cursor;203 yych = this._charAt(cursor);204case 12:205 if (yych <= '\f') {206 if (yych == '\n') { gotoCase = 2; continue; };207 { gotoCase = 11; continue; };208 } else {209 if (yych <= '\r') { gotoCase = 2; continue; };210 if (yych == '*') { gotoCase = 9; continue; };211 { gotoCase = 11; continue; };212 }213/* *********************************** */214case this.case_DSTRING:215 yych = this._charAt(cursor);216 if (yych <= '\r') {217 if (yych == '\n') { gotoCase = 17; continue; };218 if (yych <= '\f') { gotoCase = 16; continue; };219 { gotoCase = 17; continue; };220 } else {221 if (yych <= '"') {222 if (yych <= '!') { gotoCase = 16; continue; };223 { gotoCase = 19; continue; };224 } else {225 if (yych == '\\') { gotoCase = 21; continue; };226 { gotoCase = 16; continue; };227 }228 }229case 15:230 { return this._stringToken(cursor); }231case 16:232 yyaccept = 0;233 yych = this._charAt(YYMARKER = ++cursor);234 { gotoCase = 23; continue; };235case 17:236 ++cursor;237case 18:238 { this.tokenType = null; return cursor; }239case 19:240 ++cursor;241case 20:242 this.setLexCondition(this._lexConditions.INITIAL);243 { return this._stringToken(cursor, true); }244case 21:245 yych = this._charAt(++cursor);246 if (yych <= 'e') {247 if (yych <= '\'') {248 if (yych == '"') { gotoCase = 22; continue; };249 if (yych <= '&') { gotoCase = 18; continue; };250 } else {251 if (yych <= '\\') {252 if (yych <= '[') { gotoCase = 18; continue; };253 } else {254 if (yych != 'b') { gotoCase = 18; continue; };255 }256 }257 } else {258 if (yych <= 'r') {259 if (yych <= 'm') {260 if (yych >= 'g') { gotoCase = 18; continue; };261 } else {262 if (yych <= 'n') { gotoCase = 22; continue; };263 if (yych <= 'q') { gotoCase = 18; continue; };264 }265 } else {266 if (yych <= 't') {267 if (yych <= 's') { gotoCase = 18; continue; };268 } else {269 if (yych != 'v') { gotoCase = 18; continue; };270 }271 }272 }273case 22:274 yyaccept = 0;275 YYMARKER = ++cursor;276 yych = this._charAt(cursor);277case 23:278 if (yych <= '\r') {279 if (yych == '\n') { gotoCase = 15; continue; };280 if (yych <= '\f') { gotoCase = 22; continue; };281 { gotoCase = 15; continue; };282 } else {283 if (yych <= '"') {284 if (yych <= '!') { gotoCase = 22; continue; };285 { gotoCase = 26; continue; };286 } else {287 if (yych != '\\') { gotoCase = 22; continue; };288 }289 }290 ++cursor;291 yych = this._charAt(cursor);292 if (yych <= 'e') {293 if (yych <= '\'') {294 if (yych == '"') { gotoCase = 22; continue; };295 if (yych >= '\'') { gotoCase = 22; continue; };296 } else {297 if (yych <= '\\') {298 if (yych >= '\\') { gotoCase = 22; continue; };299 } else {300 if (yych == 'b') { gotoCase = 22; continue; };301 }302 }303 } else {304 if (yych <= 'r') {305 if (yych <= 'm') {306 if (yych <= 'f') { gotoCase = 22; continue; };307 } else {308 if (yych <= 'n') { gotoCase = 22; continue; };309 if (yych >= 'r') { gotoCase = 22; continue; };310 }311 } else {312 if (yych <= 't') {313 if (yych >= 't') { gotoCase = 22; continue; };314 } else {315 if (yych == 'v') { gotoCase = 22; continue; };316 }317 }318 }319 cursor = YYMARKER;320 { gotoCase = 15; continue; };321case 26:322 ++cursor;323 yych = this._charAt(cursor);324 { gotoCase = 20; continue; };325/* *********************************** */326case this.case_INITIAL:327 yych = this._charAt(cursor);328 if (yych <= ';') {329 if (yych <= '\'') {330 if (yych <= '"') {331 if (yych <= ' ') { gotoCase = 29; continue; };332 if (yych <= '!') { gotoCase = 31; continue; };333 { gotoCase = 33; continue; };334 } else {335 if (yych <= '#') { gotoCase = 34; continue; };336 if (yych <= '$') { gotoCase = 31; continue; };337 if (yych >= '\'') { gotoCase = 35; continue; };338 }339 } else {340 if (yych <= '.') {341 if (yych <= ',') { gotoCase = 29; continue; };342 if (yych <= '-') { gotoCase = 36; continue; };343 { gotoCase = 37; continue; };344 } else {345 if (yych <= '/') { gotoCase = 38; continue; };346 if (yych <= '9') { gotoCase = 39; continue; };347 if (yych <= ':') { gotoCase = 41; continue; };348 { gotoCase = 43; continue; };349 }350 }351 } else {352 if (yych <= '^') {353 if (yych <= '?') {354 if (yych == '=') { gotoCase = 31; continue; };355 } else {356 if (yych == '\\') { gotoCase = 29; continue; };357 if (yych <= ']') { gotoCase = 31; continue; };358 }359 } else {360 if (yych <= 'z') {361 if (yych != '`') { gotoCase = 31; continue; };362 } else {363 if (yych <= '{') { gotoCase = 45; continue; };364 if (yych == '}') { gotoCase = 47; continue; };365 }366 }367 }368case 29:369 ++cursor;370case 30:371 { this.tokenType = null; return cursor; }372case 31:373 ++cursor;374 yych = this._charAt(cursor);375 { gotoCase = 50; continue; };376case 32:377 {378 var token = this._line.substring(cursorOnEnter, cursor);379 if (this._condition.parseCondition === this._parseConditions.INITIAL) {380 if (token === "@media") {381 this.tokenType = "css-at-rule";382 this._condition.parseCondition = this._parseConditions.AT_MEDIA_RULE;383 } else if (token.startsWith("@")) {384 this.tokenType = "css-at-rule";385 this._condition.parseCondition = this._parseConditions.AT_RULE;386 } else387 this.tokenType = "css-selector";388 } else if ((this._condition.parseCondition === this._parseConditions.AT_MEDIA_RULE || this._condition.parseCondition === this._parseConditions.AT_RULE) && token in this._mediaTypes)389 this.tokenType = "css-keyword";390 else if (this._condition.parseCondition === this._parseConditions.PROPERTY && token in this._propertyKeywords)391 this.tokenType = "css-property";392 else if (this._isPropertyValue()) {393 if (token in this._valueKeywords)394 this.tokenType = "css-keyword";395 else if (token in this._colorKeywords) {396 // FIXME: this does not convert tokens toLowerCase() for the sake of speed.397 this.tokenType = "css-color";398 } else if (token === "!important")399 this.tokenType = "css-important";400 } else401 this.tokenType = null;402 return cursor;403 }404case 33:405 yyaccept = 0;406 yych = this._charAt(YYMARKER = ++cursor);407 if (yych <= '-') {408 if (yych <= '!') {409 if (yych <= '\f') {410 if (yych == '\n') { gotoCase = 32; continue; };411 { gotoCase = 128; continue; };412 } else {413 if (yych <= '\r') { gotoCase = 32; continue; };414 if (yych <= ' ') { gotoCase = 128; continue; };415 { gotoCase = 126; continue; };416 }417 } else {418 if (yych <= '$') {419 if (yych <= '"') { gotoCase = 115; continue; };420 if (yych <= '#') { gotoCase = 128; continue; };421 { gotoCase = 126; continue; };422 } else {423 if (yych == '\'') { gotoCase = 126; continue; };424 if (yych <= ',') { gotoCase = 128; continue; };425 { gotoCase = 126; continue; };426 }427 }428 } else {429 if (yych <= '[') {430 if (yych <= '<') {431 if (yych <= '.') { gotoCase = 128; continue; };432 if (yych <= '9') { gotoCase = 126; continue; };433 { gotoCase = 128; continue; };434 } else {435 if (yych <= '=') { gotoCase = 126; continue; };436 if (yych <= '?') { gotoCase = 128; continue; };437 { gotoCase = 126; continue; };438 }439 } else {440 if (yych <= '^') {441 if (yych <= '\\') { gotoCase = 130; continue; };442 if (yych <= ']') { gotoCase = 126; continue; };443 { gotoCase = 128; continue; };444 } else {445 if (yych == '`') { gotoCase = 128; continue; };446 if (yych <= 'z') { gotoCase = 126; continue; };447 { gotoCase = 128; continue; };448 }449 }450 }451case 34:452 yych = this._charAt(++cursor);453 if (yych <= '@') {454 if (yych <= '/') { gotoCase = 30; continue; };455 if (yych <= '9') { gotoCase = 123; continue; };456 { gotoCase = 30; continue; };457 } else {458 if (yych <= 'F') { gotoCase = 123; continue; };459 if (yych <= '`') { gotoCase = 30; continue; };460 if (yych <= 'f') { gotoCase = 123; continue; };461 { gotoCase = 30; continue; };462 }463case 35:464 yyaccept = 0;465 yych = this._charAt(YYMARKER = ++cursor);466 if (yych <= '-') {467 if (yych <= '"') {468 if (yych <= '\f') {469 if (yych == '\n') { gotoCase = 32; continue; };470 { gotoCase = 117; continue; };471 } else {472 if (yych <= '\r') { gotoCase = 32; continue; };473 if (yych <= ' ') { gotoCase = 117; continue; };474 { gotoCase = 113; continue; };475 }476 } else {477 if (yych <= '&') {478 if (yych == '$') { gotoCase = 113; continue; };479 { gotoCase = 117; continue; };480 } else {481 if (yych <= '\'') { gotoCase = 115; continue; };482 if (yych <= ',') { gotoCase = 117; continue; };483 { gotoCase = 113; continue; };484 }485 }486 } else {487 if (yych <= '[') {488 if (yych <= '<') {489 if (yych <= '.') { gotoCase = 117; continue; };490 if (yych <= '9') { gotoCase = 113; continue; };491 { gotoCase = 117; continue; };492 } else {493 if (yych <= '=') { gotoCase = 113; continue; };494 if (yych <= '?') { gotoCase = 117; continue; };495 { gotoCase = 113; continue; };496 }497 } else {498 if (yych <= '^') {499 if (yych <= '\\') { gotoCase = 119; continue; };500 if (yych <= ']') { gotoCase = 113; continue; };501 { gotoCase = 117; continue; };502 } else {503 if (yych == '`') { gotoCase = 117; continue; };504 if (yych <= 'z') { gotoCase = 113; continue; };505 { gotoCase = 117; continue; };506 }507 }508 }509case 36:510 yyaccept = 0;511 yych = this._charAt(YYMARKER = ++cursor);512 if (yych == '.') { gotoCase = 66; continue; };513 if (yych <= '/') { gotoCase = 50; continue; };514 if (yych <= '9') { gotoCase = 51; continue; };515 { gotoCase = 50; continue; };516case 37:517 yych = this._charAt(++cursor);518 if (yych <= '/') { gotoCase = 30; continue; };519 if (yych <= '9') { gotoCase = 69; continue; };520 { gotoCase = 30; continue; };521case 38:522 yyaccept = 0;523 yych = this._charAt(YYMARKER = ++cursor);524 if (yych == '*') { gotoCase = 105; continue; };525 { gotoCase = 50; continue; };526case 39:527 yyaccept = 1;528 yych = this._charAt(YYMARKER = ++cursor);529 switch (yych) {530 case '!':531 case '"':532 case '$':533 case '\'':534 case '-':535 case '/':536 case '=':537 case '@':538 case 'A':539 case 'B':540 case 'C':541 case 'D':542 case 'E':543 case 'F':544 case 'G':545 case 'I':546 case 'J':547 case 'K':548 case 'L':549 case 'M':550 case 'N':551 case 'O':552 case 'P':553 case 'Q':554 case 'R':555 case 'S':556 case 'T':557 case 'U':558 case 'V':559 case 'W':560 case 'X':561 case 'Y':562 case 'Z':563 case '[':564 case ']':565 case 'a':566 case 'b':567 case 'f':568 case 'h':569 case 'j':570 case 'l':571 case 'n':572 case 'o':573 case 'q':574 case 'u':575 case 'v':576 case 'w':577 case 'x':578 case 'y':579 case 'z': { gotoCase = 49; continue; };580 case '%': { gotoCase = 68; continue; };581 case '.': { gotoCase = 66; continue; };582 case '0':583 case '1':584 case '2':585 case '3':586 case '4':587 case '5':588 case '6':589 case '7':590 case '8':591 case '9': { gotoCase = 51; continue; };592 case 'H': { gotoCase = 53; continue; };593 case '_': { gotoCase = 54; continue; };594 case 'c': { gotoCase = 55; continue; };595 case 'd': { gotoCase = 56; continue; };596 case 'e': { gotoCase = 57; continue; };597 case 'g': { gotoCase = 58; continue; };598 case 'i': { gotoCase = 59; continue; };599 case 'k': { gotoCase = 60; continue; };600 case 'm': { gotoCase = 61; continue; };601 case 'p': { gotoCase = 62; continue; };602 case 'r': { gotoCase = 63; continue; };603 case 's': { gotoCase = 64; continue; };604 case 't': { gotoCase = 65; continue; };605 default: { gotoCase = 40; continue; };606 }607case 40:608 {609 if (this._isPropertyValue())610 this.tokenType = "css-number";611 else612 this.tokenType = null;613 return cursor;614 }615case 41:616 ++cursor;617 {618 this.tokenType = null;619 if (this._condition.parseCondition === this._parseConditions.PROPERTY)620 this._condition.parseCondition = this._parseConditions.PROPERTY_VALUE;621 return cursor;622 }623case 43:624 ++cursor;625 {626 this.tokenType = null;627 if (this._condition.parseCondition === this._parseConditions.AT_RULE)628 this._condition.parseCondition = this._parseConditions.INITIAL;629 else630 this._condition.parseCondition = this._parseConditions.PROPERTY;631 return cursor;632 }633case 45:634 ++cursor;635 {636 this.tokenType = null;637 if (this._condition.parseCondition === this._parseConditions.AT_MEDIA_RULE)638 this._condition.parseCondition = this._parseConditions.INITIAL;639 else640 this._condition.parseCondition = this._parseConditions.PROPERTY;641 return cursor;642 }643case 47:644 ++cursor;645 {646 this.tokenType = null;647 this._condition.parseCondition = this._parseConditions.INITIAL;648 return cursor;649 }650case 49:651 ++cursor;652 yych = this._charAt(cursor);653case 50:654 if (yych <= '9') {655 if (yych <= '&') {656 if (yych <= '"') {657 if (yych <= ' ') { gotoCase = 32; continue; };658 { gotoCase = 49; continue; };659 } else {660 if (yych == '$') { gotoCase = 49; continue; };661 { gotoCase = 32; continue; };662 }663 } else {664 if (yych <= ',') {665 if (yych <= '\'') { gotoCase = 49; continue; };666 { gotoCase = 32; continue; };667 } else {668 if (yych == '.') { gotoCase = 32; continue; };669 { gotoCase = 49; continue; };670 }671 }672 } else {673 if (yych <= '\\') {674 if (yych <= '=') {675 if (yych <= '<') { gotoCase = 32; continue; };676 { gotoCase = 49; continue; };677 } else {678 if (yych <= '?') { gotoCase = 32; continue; };679 if (yych <= '[') { gotoCase = 49; continue; };680 { gotoCase = 32; continue; };681 }682 } else {683 if (yych <= '_') {684 if (yych == '^') { gotoCase = 32; continue; };685 { gotoCase = 49; continue; };686 } else {687 if (yych <= '`') { gotoCase = 32; continue; };688 if (yych <= 'z') { gotoCase = 49; continue; };689 { gotoCase = 32; continue; };690 }691 }692 }693case 51:694 yyaccept = 1;695 YYMARKER = ++cursor;696 yych = this._charAt(cursor);697 switch (yych) {698 case '!':699 case '"':700 case '$':701 case '\'':702 case '-':703 case '/':704 case '=':705 case '@':706 case 'A':707 case 'B':708 case 'C':709 case 'D':710 case 'E':711 case 'F':712 case 'G':713 case 'I':714 case 'J':715 case 'K':716 case 'L':717 case 'M':718 case 'N':719 case 'O':720 case 'P':721 case 'Q':722 case 'R':723 case 'S':724 case 'T':725 case 'U':726 case 'V':727 case 'W':728 case 'X':729 case 'Y':730 case 'Z':731 case '[':732 case ']':733 case 'a':734 case 'b':735 case 'f':736 case 'h':737 case 'j':738 case 'l':739 case 'n':740 case 'o':741 case 'q':742 case 'u':743 case 'v':744 case 'w':745 case 'x':746 case 'y':747 case 'z': { gotoCase = 49; continue; };748 case '%': { gotoCase = 68; continue; };749 case '.': { gotoCase = 66; continue; };750 case '0':751 case '1':752 case '2':753 case '3':754 case '4':755 case '5':756 case '6':757 case '7':758 case '8':759 case '9': { gotoCase = 51; continue; };760 case 'H': { gotoCase = 53; continue; };761 case '_': { gotoCase = 54; continue; };762 case 'c': { gotoCase = 55; continue; };763 case 'd': { gotoCase = 56; continue; };764 case 'e': { gotoCase = 57; continue; };765 case 'g': { gotoCase = 58; continue; };766 case 'i': { gotoCase = 59; continue; };767 case 'k': { gotoCase = 60; continue; };768 case 'm': { gotoCase = 61; continue; };769 case 'p': { gotoCase = 62; continue; };770 case 'r': { gotoCase = 63; continue; };771 case 's': { gotoCase = 64; continue; };772 case 't': { gotoCase = 65; continue; };773 default: { gotoCase = 40; continue; };774 }775case 53:776 yych = this._charAt(++cursor);777 if (yych == 'z') { gotoCase = 64; continue; };778 { gotoCase = 50; continue; };779case 54:780 yych = this._charAt(++cursor);781 if (yych == '_') { gotoCase = 102; continue; };782 { gotoCase = 50; continue; };783case 55:784 yych = this._charAt(++cursor);785 if (yych == 'm') { gotoCase = 64; continue; };786 { gotoCase = 50; continue; };787case 56:788 yych = this._charAt(++cursor);789 if (yych == 'e') { gotoCase = 101; continue; };790 { gotoCase = 50; continue; };791case 57:792 yych = this._charAt(++cursor);793 if (yych == 'm') { gotoCase = 64; continue; };794 if (yych == 'x') { gotoCase = 64; continue; };795 { gotoCase = 50; continue; };796case 58:797 yych = this._charAt(++cursor);798 if (yych == 'r') { gotoCase = 99; continue; };799 { gotoCase = 50; continue; };800case 59:801 yych = this._charAt(++cursor);802 if (yych == 'n') { gotoCase = 64; continue; };803 { gotoCase = 50; continue; };804case 60:805 yych = this._charAt(++cursor);806 if (yych == 'H') { gotoCase = 98; continue; };807 { gotoCase = 50; continue; };808case 61:809 yych = this._charAt(++cursor);810 if (yych == 'm') { gotoCase = 64; continue; };811 if (yych == 's') { gotoCase = 64; continue; };812 { gotoCase = 50; continue; };813case 62:814 yych = this._charAt(++cursor);815 if (yych <= 's') {816 if (yych == 'c') { gotoCase = 64; continue; };817 { gotoCase = 50; continue; };818 } else {819 if (yych <= 't') { gotoCase = 64; continue; };820 if (yych == 'x') { gotoCase = 64; continue; };821 { gotoCase = 50; continue; };822 }823case 63:824 yych = this._charAt(++cursor);825 if (yych == 'a') { gotoCase = 96; continue; };826 if (yych == 'e') { gotoCase = 97; continue; };827 { gotoCase = 50; continue; };828case 64:829 yych = this._charAt(++cursor);830 if (yych <= '9') {831 if (yych <= '&') {832 if (yych <= '"') {833 if (yych <= ' ') { gotoCase = 40; continue; };834 { gotoCase = 49; continue; };835 } else {836 if (yych == '$') { gotoCase = 49; continue; };837 { gotoCase = 40; continue; };838 }839 } else {840 if (yych <= ',') {841 if (yych <= '\'') { gotoCase = 49; continue; };842 { gotoCase = 40; continue; };843 } else {844 if (yych == '.') { gotoCase = 40; continue; };845 { gotoCase = 49; continue; };846 }847 }848 } else {849 if (yych <= '\\') {850 if (yych <= '=') {851 if (yych <= '<') { gotoCase = 40; continue; };852 { gotoCase = 49; continue; };853 } else {854 if (yych <= '?') { gotoCase = 40; continue; };855 if (yych <= '[') { gotoCase = 49; continue; };856 { gotoCase = 40; continue; };857 }858 } else {859 if (yych <= '_') {860 if (yych == '^') { gotoCase = 40; continue; };861 { gotoCase = 49; continue; };862 } else {863 if (yych <= '`') { gotoCase = 40; continue; };864 if (yych <= 'z') { gotoCase = 49; continue; };865 { gotoCase = 40; continue; };866 }867 }868 }869case 65:870 yych = this._charAt(++cursor);871 if (yych == 'u') { gotoCase = 94; continue; };872 { gotoCase = 50; continue; };873case 66:874 yych = this._charAt(++cursor);875 if (yych <= '/') { gotoCase = 67; continue; };876 if (yych <= '9') { gotoCase = 69; continue; };877case 67:878 cursor = YYMARKER;879 if (yyaccept <= 0) {880 { gotoCase = 32; continue; };881 } else {882 { gotoCase = 40; continue; };883 }884case 68:885 yych = this._charAt(++cursor);886 { gotoCase = 40; continue; };887case 69:888 yyaccept = 1;889 YYMARKER = ++cursor;890 yych = this._charAt(cursor);891 if (yych <= 'f') {892 if (yych <= 'H') {893 if (yych <= '/') {894 if (yych == '%') { gotoCase = 68; continue; };895 { gotoCase = 40; continue; };896 } else {897 if (yych <= '9') { gotoCase = 69; continue; };898 if (yych <= 'G') { gotoCase = 40; continue; };899 { gotoCase = 81; continue; };900 }901 } else {902 if (yych <= 'b') {903 if (yych == '_') { gotoCase = 73; continue; };904 { gotoCase = 40; continue; };905 } else {906 if (yych <= 'c') { gotoCase = 75; continue; };907 if (yych <= 'd') { gotoCase = 78; continue; };908 if (yych >= 'f') { gotoCase = 40; continue; };909 }910 }911 } else {912 if (yych <= 'm') {913 if (yych <= 'i') {914 if (yych <= 'g') { gotoCase = 79; continue; };915 if (yych <= 'h') { gotoCase = 40; continue; };916 { gotoCase = 77; continue; };917 } else {918 if (yych == 'k') { gotoCase = 82; continue; };919 if (yych <= 'l') { gotoCase = 40; continue; };920 { gotoCase = 76; continue; };921 }922 } else {923 if (yych <= 'q') {924 if (yych == 'p') { gotoCase = 74; continue; };925 { gotoCase = 40; continue; };926 } else {927 if (yych <= 'r') { gotoCase = 72; continue; };928 if (yych <= 's') { gotoCase = 68; continue; };929 if (yych <= 't') { gotoCase = 80; continue; };930 { gotoCase = 40; continue; };931 }932 }933 }934 yych = this._charAt(++cursor);935 if (yych == 'm') { gotoCase = 68; continue; };936 if (yych == 'x') { gotoCase = 68; continue; };937 { gotoCase = 67; continue; };938case 72:939 yych = this._charAt(++cursor);940 if (yych == 'a') { gotoCase = 92; continue; };941 if (yych == 'e') { gotoCase = 93; continue; };942 { gotoCase = 67; continue; };943case 73:944 yych = this._charAt(++cursor);945 if (yych == '_') { gotoCase = 89; continue; };946 { gotoCase = 67; continue; };947case 74:948 yych = this._charAt(++cursor);949 if (yych <= 's') {950 if (yych == 'c') { gotoCase = 68; continue; };951 { gotoCase = 67; continue; };952 } else {953 if (yych <= 't') { gotoCase = 68; continue; };954 if (yych == 'x') { gotoCase = 68; continue; };955 { gotoCase = 67; continue; };956 }957case 75:958 yych = this._charAt(++cursor);959 if (yych == 'm') { gotoCase = 68; continue; };960 { gotoCase = 67; continue; };961case 76:962 yych = this._charAt(++cursor);963 if (yych == 'm') { gotoCase = 68; continue; };964 if (yych == 's') { gotoCase = 68; continue; };965 { gotoCase = 67; continue; };966case 77:967 yych = this._charAt(++cursor);968 if (yych == 'n') { gotoCase = 68; continue; };969 { gotoCase = 67; continue; };970case 78:971 yych = this._charAt(++cursor);972 if (yych == 'e') { gotoCase = 88; continue; };973 { gotoCase = 67; continue; };974case 79:975 yych = this._charAt(++cursor);976 if (yych == 'r') { gotoCase = 86; continue; };977 { gotoCase = 67; continue; };978case 80:979 yych = this._charAt(++cursor);980 if (yych == 'u') { gotoCase = 84; continue; };981 { gotoCase = 67; continue; };982case 81:983 yych = this._charAt(++cursor);984 if (yych == 'z') { gotoCase = 68; continue; };985 { gotoCase = 67; continue; };986case 82:987 yych = this._charAt(++cursor);988 if (yych != 'H') { gotoCase = 67; continue; };989 yych = this._charAt(++cursor);990 if (yych == 'z') { gotoCase = 68; continue; };991 { gotoCase = 67; continue; };992case 84:993 yych = this._charAt(++cursor);994 if (yych != 'r') { gotoCase = 67; continue; };995 yych = this._charAt(++cursor);996 if (yych == 'n') { gotoCase = 68; continue; };997 { gotoCase = 67; continue; };998case 86:999 yych = this._charAt(++cursor);1000 if (yych != 'a') { gotoCase = 67; continue; };1001 yych = this._charAt(++cursor);1002 if (yych == 'd') { gotoCase = 68; continue; };1003 { gotoCase = 67; continue; };1004case 88:1005 yych = this._charAt(++cursor);1006 if (yych == 'g') { gotoCase = 68; continue; };1007 { gotoCase = 67; continue; };1008case 89:1009 yych = this._charAt(++cursor);1010 if (yych != 'q') { gotoCase = 67; continue; };1011 yych = this._charAt(++cursor);1012 if (yych != 'e') { gotoCase = 67; continue; };1013 yych = this._charAt(++cursor);1014 if (yych == 'm') { gotoCase = 68; continue; };1015 { gotoCase = 67; continue; };1016case 92:1017 yych = this._charAt(++cursor);1018 if (yych == 'd') { gotoCase = 68; continue; };1019 { gotoCase = 67; continue; };1020case 93:1021 yych = this._charAt(++cursor);1022 if (yych == 'm') { gotoCase = 68; continue; };1023 { gotoCase = 67; continue; };1024case 94:1025 yych = this._charAt(++cursor);1026 if (yych != 'r') { gotoCase = 50; continue; };1027 yych = this._charAt(++cursor);1028 if (yych == 'n') { gotoCase = 64; continue; };1029 { gotoCase = 50; continue; };1030case 96:1031 yych = this._charAt(++cursor);1032 if (yych == 'd') { gotoCase = 64; continue; };1033 { gotoCase = 50; continue; };1034case 97:1035 yych = this._charAt(++cursor);1036 if (yych == 'm') { gotoCase = 64; continue; };1037 { gotoCase = 50; continue; };1038case 98:1039 yych = this._charAt(++cursor);1040 if (yych == 'z') { gotoCase = 64; continue; };1041 { gotoCase = 50; continue; };1042case 99:1043 yych = this._charAt(++cursor);1044 if (yych != 'a') { gotoCase = 50; continue; };1045 yych = this._charAt(++cursor);1046 if (yych == 'd') { gotoCase = 64; continue; };1047 { gotoCase = 50; continue; };1048case 101:1049 yych = this._charAt(++cursor);1050 if (yych == 'g') { gotoCase = 64; continue; };1051 { gotoCase = 50; continue; };1052case 102:1053 yych = this._charAt(++cursor);1054 if (yych != 'q') { gotoCase = 50; continue; };1055 yych = this._charAt(++cursor);1056 if (yych != 'e') { gotoCase = 50; continue; };1057 yych = this._charAt(++cursor);1058 if (yych == 'm') { gotoCase = 64; continue; };1059 { gotoCase = 50; continue; };1060case 105:1061 ++cursor;1062 yych = this._charAt(cursor);1063 if (yych <= '\f') {1064 if (yych == '\n') { gotoCase = 109; continue; };1065 { gotoCase = 105; continue; };1066 } else {1067 if (yych <= '\r') { gotoCase = 109; continue; };1068 if (yych != '*') { gotoCase = 105; continue; };1069 }1070case 107:1071 ++cursor;1072 yych = this._charAt(cursor);1073 if (yych == '*') { gotoCase = 107; continue; };1074 if (yych == '/') { gotoCase = 111; continue; };1075 { gotoCase = 105; continue; };1076case 109:1077 ++cursor;1078 this.setLexCondition(this._lexConditions.COMMENT);1079 { this.tokenType = "css-comment"; return cursor; }1080case 111:1081 ++cursor;1082 { this.tokenType = "css-comment"; return cursor; }1083case 113:1084 yyaccept = 0;1085 YYMARKER = ++cursor;1086 yych = this._charAt(cursor);1087 if (yych <= '-') {1088 if (yych <= '"') {1089 if (yych <= '\f') {1090 if (yych == '\n') { gotoCase = 32; continue; };1091 { gotoCase = 117; continue; };1092 } else {1093 if (yych <= '\r') { gotoCase = 32; continue; };1094 if (yych <= ' ') { gotoCase = 117; continue; };1095 { gotoCase = 113; continue; };1096 }1097 } else {1098 if (yych <= '&') {1099 if (yych == '$') { gotoCase = 113; continue; };1100 { gotoCase = 117; continue; };1101 } else {1102 if (yych <= '\'') { gotoCase = 115; continue; };1103 if (yych <= ',') { gotoCase = 117; continue; };1104 { gotoCase = 113; continue; };1105 }1106 }1107 } else {1108 if (yych <= '[') {1109 if (yych <= '<') {1110 if (yych <= '.') { gotoCase = 117; continue; };1111 if (yych <= '9') { gotoCase = 113; continue; };1112 { gotoCase = 117; continue; };1113 } else {1114 if (yych <= '=') { gotoCase = 113; continue; };1115 if (yych <= '?') { gotoCase = 117; continue; };1116 { gotoCase = 113; continue; };1117 }1118 } else {1119 if (yych <= '^') {1120 if (yych <= '\\') { gotoCase = 119; continue; };1121 if (yych <= ']') { gotoCase = 113; continue; };1122 { gotoCase = 117; continue; };1123 } else {1124 if (yych == '`') { gotoCase = 117; continue; };1125 if (yych <= 'z') { gotoCase = 113; continue; };1126 { gotoCase = 117; continue; };1127 }1128 }1129 }1130case 115:1131 ++cursor;1132 if ((yych = this._charAt(cursor)) <= '9') {1133 if (yych <= '&') {1134 if (yych <= '"') {1135 if (yych >= '!') { gotoCase = 49; continue; };1136 } else {1137 if (yych == '$') { gotoCase = 49; continue; };1138 }1139 } else {1140 if (yych <= ',') {1141 if (yych <= '\'') { gotoCase = 49; continue; };1142 } else {1143 if (yych != '.') { gotoCase = 49; continue; };1144 }1145 }1146 } else {1147 if (yych <= '\\') {1148 if (yych <= '=') {1149 if (yych >= '=') { gotoCase = 49; continue; };1150 } else {1151 if (yych <= '?') { gotoCase = 116; continue; };1152 if (yych <= '[') { gotoCase = 49; continue; };1153 }1154 } else {1155 if (yych <= '_') {1156 if (yych != '^') { gotoCase = 49; continue; };1157 } else {1158 if (yych <= '`') { gotoCase = 116; continue; };1159 if (yych <= 'z') { gotoCase = 49; continue; };1160 }1161 }1162 }1163case 116:1164 { return this._stringToken(cursor, true); }1165case 117:1166 ++cursor;1167 yych = this._charAt(cursor);1168 if (yych <= '\r') {1169 if (yych == '\n') { gotoCase = 67; continue; };1170 if (yych <= '\f') { gotoCase = 117; continue; };1171 { gotoCase = 67; continue; };1172 } else {1173 if (yych <= '\'') {1174 if (yych <= '&') { gotoCase = 117; continue; };1175 { gotoCase = 122; continue; };1176 } else {1177 if (yych != '\\') { gotoCase = 117; continue; };1178 }1179 }1180case 119:1181 ++cursor;1182 yych = this._charAt(cursor);1183 if (yych <= 'a') {1184 if (yych <= '!') {1185 if (yych <= '\n') {1186 if (yych <= '\t') { gotoCase = 67; continue; };1187 } else {1188 if (yych != '\r') { gotoCase = 67; continue; };1189 }1190 } else {1191 if (yych <= '\'') {1192 if (yych <= '"') { gotoCase = 117; continue; };1193 if (yych <= '&') { gotoCase = 67; continue; };1194 { gotoCase = 117; continue; };1195 } else {1196 if (yych == '\\') { gotoCase = 117; continue; };1197 { gotoCase = 67; continue; };1198 }1199 }1200 } else {1201 if (yych <= 'q') {1202 if (yych <= 'f') {1203 if (yych <= 'b') { gotoCase = 117; continue; };1204 if (yych <= 'e') { gotoCase = 67; continue; };1205 { gotoCase = 117; continue; };1206 } else {1207 if (yych == 'n') { gotoCase = 117; continue; };1208 { gotoCase = 67; continue; };1209 }1210 } else {1211 if (yych <= 't') {1212 if (yych == 's') { gotoCase = 67; continue; };1213 { gotoCase = 117; continue; };1214 } else {1215 if (yych == 'v') { gotoCase = 117; continue; };1216 { gotoCase = 67; continue; };1217 }1218 }1219 }1220 ++cursor;1221 this.setLexCondition(this._lexConditions.SSTRING);1222 { return this._stringToken(cursor); }1223case 122:1224 yych = this._charAt(++cursor);1225 { gotoCase = 116; continue; };1226case 123:1227 ++cursor;1228 yych = this._charAt(cursor);1229 if (yych <= '@') {1230 if (yych <= '/') { gotoCase = 125; continue; };1231 if (yych <= '9') { gotoCase = 123; continue; };1232 } else {1233 if (yych <= 'F') { gotoCase = 123; continue; };1234 if (yych <= '`') { gotoCase = 125; continue; };1235 if (yych <= 'f') { gotoCase = 123; continue; };1236 }1237case 125:1238 {1239 if (this._isPropertyValue())1240 this.tokenType = "css-color";1241 else1242 this.tokenType = null;1243 return cursor;1244 }1245case 126:1246 yyaccept = 0;1247 YYMARKER = ++cursor;1248 yych = this._charAt(cursor);1249 if (yych <= '-') {1250 if (yych <= '!') {1251 if (yych <= '\f') {1252 if (yych == '\n') { gotoCase = 32; continue; };1253 } else {1254 if (yych <= '\r') { gotoCase = 32; continue; };1255 if (yych >= '!') { gotoCase = 126; continue; };1256 }1257 } else {1258 if (yych <= '$') {1259 if (yych <= '"') { gotoCase = 115; continue; };1260 if (yych >= '$') { gotoCase = 126; continue; };1261 } else {1262 if (yych == '\'') { gotoCase = 126; continue; };1263 if (yych >= '-') { gotoCase = 126; continue; };1264 }1265 }1266 } else {1267 if (yych <= '[') {1268 if (yych <= '<') {1269 if (yych <= '.') { gotoCase = 128; continue; };1270 if (yych <= '9') { gotoCase = 126; continue; };1271 } else {1272 if (yych <= '=') { gotoCase = 126; continue; };1273 if (yych >= '@') { gotoCase = 126; continue; };1274 }1275 } else {1276 if (yych <= '^') {1277 if (yych <= '\\') { gotoCase = 130; continue; };1278 if (yych <= ']') { gotoCase = 126; continue; };1279 } else {1280 if (yych == '`') { gotoCase = 128; continue; };1281 if (yych <= 'z') { gotoCase = 126; continue; };1282 }1283 }1284 }1285case 128:1286 ++cursor;1287 yych = this._charAt(cursor);1288 if (yych <= '\r') {1289 if (yych == '\n') { gotoCase = 67; continue; };1290 if (yych <= '\f') { gotoCase = 128; continue; };1291 { gotoCase = 67; continue; };1292 } else {1293 if (yych <= '"') {1294 if (yych <= '!') { gotoCase = 128; continue; };1295 { gotoCase = 122; continue; };1296 } else {1297 if (yych != '\\') { gotoCase = 128; continue; };1298 }1299 }1300case 130:1301 ++cursor;1302 yych = this._charAt(cursor);1303 if (yych <= 'a') {1304 if (yych <= '!') {1305 if (yych <= '\n') {1306 if (yych <= '\t') { gotoCase = 67; continue; };1307 } else {1308 if (yych != '\r') { gotoCase = 67; continue; };1309 }1310 } else {1311 if (yych <= '\'') {1312 if (yych <= '"') { gotoCase = 128; continue; };1313 if (yych <= '&') { gotoCase = 67; continue; };1314 { gotoCase = 128; continue; };1315 } else {1316 if (yych == '\\') { gotoCase = 128; continue; };1317 { gotoCase = 67; continue; };1318 }1319 }1320 } else {1321 if (yych <= 'q') {1322 if (yych <= 'f') {1323 if (yych <= 'b') { gotoCase = 128; continue; };1324 if (yych <= 'e') { gotoCase = 67; continue; };1325 { gotoCase = 128; continue; };1326 } else {1327 if (yych == 'n') { gotoCase = 128; continue; };1328 { gotoCase = 67; continue; };1329 }1330 } else {1331 if (yych <= 't') {1332 if (yych == 's') { gotoCase = 67; continue; };1333 { gotoCase = 128; continue; };1334 } else {1335 if (yych == 'v') { gotoCase = 128; continue; };1336 { gotoCase = 67; continue; };1337 }1338 }1339 }1340 ++cursor;1341 this.setLexCondition(this._lexConditions.DSTRING);1342 { return this._stringToken(cursor); }1343/* *********************************** */1344case this.case_SSTRING:1345 yych = this._charAt(cursor);1346 if (yych <= '\r') {1347 if (yych == '\n') { gotoCase = 137; continue; };1348 if (yych <= '\f') { gotoCase = 136; continue; };1349 { gotoCase = 137; continue; };1350 } else {1351 if (yych <= '\'') {1352 if (yych <= '&') { gotoCase = 136; continue; };1353 { gotoCase = 139; continue; };1354 } else {1355 if (yych == '\\') { gotoCase = 141; continue; };1356 { gotoCase = 136; continue; };1357 }1358 }1359case 135:1360 { return this._stringToken(cursor); }1361case 136:1362 yyaccept = 0;1363 yych = this._charAt(YYMARKER = ++cursor);1364 { gotoCase = 143; continue; };1365case 137:1366 ++cursor;1367case 138:1368 { this.tokenType = null; return cursor; }1369case 139:1370 ++cursor;1371case 140:1372 this.setLexCondition(this._lexConditions.INITIAL);1373 { return this._stringToken(cursor, true); }1374case 141:1375 yych = this._charAt(++cursor);1376 if (yych <= 'e') {1377 if (yych <= '\'') {1378 if (yych == '"') { gotoCase = 142; continue; };1379 if (yych <= '&') { gotoCase = 138; continue; };1380 } else {1381 if (yych <= '\\') {1382 if (yych <= '[') { gotoCase = 138; continue; };1383 } else {1384 if (yych != 'b') { gotoCase = 138; continue; };1385 }1386 }1387 } else {1388 if (yych <= 'r') {1389 if (yych <= 'm') {1390 if (yych >= 'g') { gotoCase = 138; continue; };1391 } else {1392 if (yych <= 'n') { gotoCase = 142; continue; };1393 if (yych <= 'q') { gotoCase = 138; continue; };1394 }1395 } else {1396 if (yych <= 't') {1397 if (yych <= 's') { gotoCase = 138; continue; };1398 } else {1399 if (yych != 'v') { gotoCase = 138; continue; };1400 }1401 }1402 }1403case 142:1404 yyaccept = 0;1405 YYMARKER = ++cursor;1406 yych = this._charAt(cursor);1407case 143:1408 if (yych <= '\r') {1409 if (yych == '\n') { gotoCase = 135; continue; };1410 if (yych <= '\f') { gotoCase = 142; continue; };1411 { gotoCase = 135; continue; };1412 } else {1413 if (yych <= '\'') {1414 if (yych <= '&') { gotoCase = 142; continue; };1415 { gotoCase = 146; continue; };1416 } else {1417 if (yych != '\\') { gotoCase = 142; continue; };1418 }1419 }1420 ++cursor;1421 yych = this._charAt(cursor);1422 if (yych <= 'e') {1423 if (yych <= '\'') {1424 if (yych == '"') { gotoCase = 142; continue; };1425 if (yych >= '\'') { gotoCase = 142; continue; };1426 } else {1427 if (yych <= '\\') {1428 if (yych >= '\\') { gotoCase = 142; continue; };1429 } else {1430 if (yych == 'b') { gotoCase = 142; continue; };1431 }1432 }1433 } else {1434 if (yych <= 'r') {1435 if (yych <= 'm') {1436 if (yych <= 'f') { gotoCase = 142; continue; };1437 } else {1438 if (yych <= 'n') { gotoCase = 142; continue; };1439 if (yych >= 'r') { gotoCase = 142; continue; };1440 }1441 } else {1442 if (yych <= 't') {1443 if (yych >= 't') { gotoCase = 142; continue; };1444 } else {1445 if (yych == 'v') { gotoCase = 142; continue; };1446 }1447 }1448 }1449 cursor = YYMARKER;1450 { gotoCase = 135; continue; };1451case 146:1452 ++cursor;1453 yych = this._charAt(cursor);1454 { gotoCase = 140; continue; };1455 }1456 }1457 }1458}...

Full Screen

Full Screen

SourceHTMLTokenizer.js

Source:SourceHTMLTokenizer.js Github

copy

Full Screen

1/* Generated by re2c 0.13.5 on Fri May 6 13:47:06 2011 */2/*3 * Copyright (C) 2009 Google Inc. All rights reserved.4 *5 * Redistribution and use in source and binary forms, with or without6 * modification, are permitted provided that the following conditions are7 * met:8 *9 * * Redistributions of source code must retain the above copyright10 * notice, this list of conditions and the following disclaimer.11 * * Redistributions in binary form must reproduce the above12 * copyright notice, this list of conditions and the following disclaimer13 * in the documentation and/or other materials provided with the14 * distribution.15 * * Neither the name of Google Inc. nor the names of its16 * contributors may be used to endorse or promote products derived from17 * this software without specific prior written permission.18 *19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT23 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.30 */31// Generate js file as follows:32//33// re2c -isc WebCore/inspector/front-end/SourceHTMLTokenizer.re2js \34// | sed 's|^yy\([^:]*\)*\:|case \1:|' \35// | sed 's|[*]cursor[+][+]|this._charAt(cursor++)|' \36// | sed 's|[[*][+][+]cursor|this._charAt(++cursor)|' \37// | sed 's|[*]cursor|this._charAt(cursor)|' \38// | sed 's|yych = \*\([^;]*\)|yych = this._charAt\1|' \39// | sed 's|{ gotoCase = \([^; continue; };]*\)|{ gotoCase = \1; continue; }|' \40// | sed 's|unsigned\ int|var|' \41// | sed 's|var\ yych|case 1: case 1: var yych|'42/**43 * @constructor44 * @extends {WebInspector.SourceTokenizer}45 */46WebInspector.SourceHTMLTokenizer = function()47{48 WebInspector.SourceTokenizer.call(this);49 // The order is determined by the generated code.50 this._lexConditions = {51 INITIAL: 0,52 COMMENT: 1,53 DOCTYPE: 2,54 TAG: 3,55 DSTRING: 4,56 SSTRING: 557 };58 this.case_INITIAL = 1000;59 this.case_COMMENT = 1001;60 this.case_DOCTYPE = 1002;61 this.case_TAG = 1003;62 this.case_DSTRING = 1004;63 this.case_SSTRING = 1005;64 this._parseConditions = {65 INITIAL: 0,66 ATTRIBUTE: 1,67 ATTRIBUTE_VALUE: 2,68 LINKIFY: 4,69 A_NODE: 8,70 SCRIPT: 16,71 STYLE: 3272 };73 this.condition = this.createInitialCondition();74}75WebInspector.SourceHTMLTokenizer.prototype = {76 createInitialCondition: function()77 {78 return { lexCondition: this._lexConditions.INITIAL, parseCondition: this._parseConditions.INITIAL };79 },80 set line(line) {81 if (this._condition.internalJavaScriptTokenizerCondition) {82 var match = /<\/script/i.exec(line);83 if (match) {84 this._internalJavaScriptTokenizer.line = line.substring(0, match.index);85 } else86 this._internalJavaScriptTokenizer.line = line;87 } else if (this._condition.internalCSSTokenizerCondition) {88 var match = /<\/style/i.exec(line);89 if (match) {90 this._internalCSSTokenizer.line = line.substring(0, match.index);91 } else92 this._internalCSSTokenizer.line = line;93 }94 this._line = line;95 },96 _isExpectingAttribute: function()97 {98 return this._condition.parseCondition & this._parseConditions.ATTRIBUTE;99 },100 _isExpectingAttributeValue: function()101 {102 return this._condition.parseCondition & this._parseConditions.ATTRIBUTE_VALUE;103 },104 _setExpectingAttribute: function()105 {106 if (this._isExpectingAttributeValue())107 this._condition.parseCondition ^= this._parseConditions.ATTRIBUTE_VALUE;108 this._condition.parseCondition |= this._parseConditions.ATTRIBUTE;109 },110 _setExpectingAttributeValue: function()111 {112 if (this._isExpectingAttribute())113 this._condition.parseCondition ^= this._parseConditions.ATTRIBUTE;114 this._condition.parseCondition |= this._parseConditions.ATTRIBUTE_VALUE;115 },116 /**117 * @param {boolean=} stringEnds118 */119 _stringToken: function(cursor, stringEnds)120 {121 if (!this._isExpectingAttributeValue()) {122 this.tokenType = null;123 return cursor;124 }125 this.tokenType = this._attrValueTokenType();126 if (stringEnds)127 this._setExpectingAttribute();128 return cursor;129 },130 _attrValueTokenType: function()131 {132 if (this._condition.parseCondition & this._parseConditions.LINKIFY) {133 if (this._condition.parseCondition & this._parseConditions.A_NODE)134 return "html-external-link";135 return "html-resource-link";136 }137 return "html-attribute-value";138 },139 get _internalJavaScriptTokenizer()140 {141 return WebInspector.SourceTokenizer.Registry.getInstance().getTokenizer("text/javascript");142 },143 get _internalCSSTokenizer()144 {145 return WebInspector.SourceTokenizer.Registry.getInstance().getTokenizer("text/css");146 },147 scriptStarted: function(cursor)148 {149 this._condition.internalJavaScriptTokenizerCondition = this._internalJavaScriptTokenizer.createInitialCondition();150 },151 scriptEnded: function(cursor)152 {153 },154 styleSheetStarted: function(cursor)155 {156 this._condition.internalCSSTokenizerCondition = this._internalCSSTokenizer.createInitialCondition();157 },158 styleSheetEnded: function(cursor)159 {160 },161 nextToken: function(cursor)162 {163 if (this._condition.internalJavaScriptTokenizerCondition) {164 // Re-set line to force </script> detection first.165 this.line = this._line;166 if (cursor !== this._internalJavaScriptTokenizer._line.length) {167 // Tokenizer is stateless, so restore its condition before tokenizing and save it after.168 this._internalJavaScriptTokenizer.condition = this._condition.internalJavaScriptTokenizerCondition;169 var result = this._internalJavaScriptTokenizer.nextToken(cursor);170 this.tokenType = this._internalJavaScriptTokenizer.tokenType;171 this._condition.internalJavaScriptTokenizerCondition = this._internalJavaScriptTokenizer.condition;172 return result;173 } else if (cursor !== this._line.length)174 delete this._condition.internalJavaScriptTokenizerCondition;175 } else if (this._condition.internalCSSTokenizerCondition) {176 // Re-set line to force </style> detection first.177 this.line = this._line;178 if (cursor !== this._internalCSSTokenizer._line.length) {179 // Tokenizer is stateless, so restore its condition before tokenizing and save it after.180 this._internalCSSTokenizer.condition = this._condition.internalCSSTokenizerCondition;181 var result = this._internalCSSTokenizer.nextToken(cursor);182 this.tokenType = this._internalCSSTokenizer.tokenType;183 this._condition.internalCSSTokenizerCondition = this._internalCSSTokenizer.condition;184 return result;185 } else if (cursor !== this._line.length)186 delete this._condition.internalCSSTokenizerCondition;187 }188 var cursorOnEnter = cursor;189 var gotoCase = 1;190 var YYMARKER;191 while (1) {192 switch (gotoCase)193 // Following comment is replaced with generated state machine.194 {195 case 1: var yych;196 var yyaccept = 0;197 if (this.getLexCondition() < 3) {198 if (this.getLexCondition() < 1) {199 { gotoCase = this.case_INITIAL; continue; };200 } else {201 if (this.getLexCondition() < 2) {202 { gotoCase = this.case_COMMENT; continue; };203 } else {204 { gotoCase = this.case_DOCTYPE; continue; };205 }206 }207 } else {208 if (this.getLexCondition() < 4) {209 { gotoCase = this.case_TAG; continue; };210 } else {211 if (this.getLexCondition() < 5) {212 { gotoCase = this.case_DSTRING; continue; };213 } else {214 { gotoCase = this.case_SSTRING; continue; };215 }216 }217 }218/* *********************************** */219case this.case_COMMENT:220 yych = this._charAt(cursor);221 if (yych <= '\f') {222 if (yych == '\n') { gotoCase = 4; continue; };223 { gotoCase = 3; continue; };224 } else {225 if (yych <= '\r') { gotoCase = 4; continue; };226 if (yych == '-') { gotoCase = 6; continue; };227 { gotoCase = 3; continue; };228 }229case 2:230 { this.tokenType = "html-comment"; return cursor; }231case 3:232 yyaccept = 0;233 yych = this._charAt(YYMARKER = ++cursor);234 { gotoCase = 9; continue; };235case 4:236 ++cursor;237case 5:238 { this.tokenType = null; return cursor; }239case 6:240 yyaccept = 1;241 yych = this._charAt(YYMARKER = ++cursor);242 if (yych != '-') { gotoCase = 5; continue; };243case 7:244 ++cursor;245 yych = this._charAt(cursor);246 if (yych == '>') { gotoCase = 10; continue; };247case 8:248 yyaccept = 0;249 YYMARKER = ++cursor;250 yych = this._charAt(cursor);251case 9:252 if (yych <= '\f') {253 if (yych == '\n') { gotoCase = 2; continue; };254 { gotoCase = 8; continue; };255 } else {256 if (yych <= '\r') { gotoCase = 2; continue; };257 if (yych == '-') { gotoCase = 12; continue; };258 { gotoCase = 8; continue; };259 }260case 10:261 ++cursor;262 this.setLexCondition(this._lexConditions.INITIAL);263 { this.tokenType = "html-comment"; return cursor; }264case 12:265 ++cursor;266 yych = this._charAt(cursor);267 if (yych == '-') { gotoCase = 7; continue; };268 cursor = YYMARKER;269 if (yyaccept <= 0) {270 { gotoCase = 2; continue; };271 } else {272 { gotoCase = 5; continue; };273 }274/* *********************************** */275case this.case_DOCTYPE:276 yych = this._charAt(cursor);277 if (yych <= '\f') {278 if (yych == '\n') { gotoCase = 18; continue; };279 { gotoCase = 17; continue; };280 } else {281 if (yych <= '\r') { gotoCase = 18; continue; };282 if (yych == '>') { gotoCase = 20; continue; };283 { gotoCase = 17; continue; };284 }285case 16:286 { this.tokenType = "html-doctype"; return cursor; }287case 17:288 yych = this._charAt(++cursor);289 { gotoCase = 23; continue; };290case 18:291 ++cursor;292 { this.tokenType = null; return cursor; }293case 20:294 ++cursor;295 this.setLexCondition(this._lexConditions.INITIAL);296 { this.tokenType = "html-doctype"; return cursor; }297case 22:298 ++cursor;299 yych = this._charAt(cursor);300case 23:301 if (yych <= '\f') {302 if (yych == '\n') { gotoCase = 16; continue; };303 { gotoCase = 22; continue; };304 } else {305 if (yych <= '\r') { gotoCase = 16; continue; };306 if (yych == '>') { gotoCase = 16; continue; };307 { gotoCase = 22; continue; };308 }309/* *********************************** */310case this.case_DSTRING:311 yych = this._charAt(cursor);312 if (yych <= '\f') {313 if (yych == '\n') { gotoCase = 28; continue; };314 { gotoCase = 27; continue; };315 } else {316 if (yych <= '\r') { gotoCase = 28; continue; };317 if (yych == '"') { gotoCase = 30; continue; };318 { gotoCase = 27; continue; };319 }320case 26:321 { return this._stringToken(cursor); }322case 27:323 yych = this._charAt(++cursor);324 { gotoCase = 34; continue; };325case 28:326 ++cursor;327 { this.tokenType = null; return cursor; }328case 30:329 ++cursor;330case 31:331 this.setLexCondition(this._lexConditions.TAG);332 { return this._stringToken(cursor, true); }333case 32:334 yych = this._charAt(++cursor);335 { gotoCase = 31; continue; };336case 33:337 ++cursor;338 yych = this._charAt(cursor);339case 34:340 if (yych <= '\f') {341 if (yych == '\n') { gotoCase = 26; continue; };342 { gotoCase = 33; continue; };343 } else {344 if (yych <= '\r') { gotoCase = 26; continue; };345 if (yych == '"') { gotoCase = 32; continue; };346 { gotoCase = 33; continue; };347 }348/* *********************************** */349case this.case_INITIAL:350 yych = this._charAt(cursor);351 if (yych == '<') { gotoCase = 39; continue; };352 ++cursor;353 { this.tokenType = null; return cursor; }354case 39:355 yyaccept = 0;356 yych = this._charAt(YYMARKER = ++cursor);357 if (yych <= '/') {358 if (yych == '!') { gotoCase = 44; continue; };359 if (yych >= '/') { gotoCase = 41; continue; };360 } else {361 if (yych <= 'S') {362 if (yych >= 'S') { gotoCase = 42; continue; };363 } else {364 if (yych == 's') { gotoCase = 42; continue; };365 }366 }367case 40:368 this.setLexCondition(this._lexConditions.TAG);369 {370 if (this._condition.parseCondition & (this._parseConditions.SCRIPT | this._parseConditions.STYLE)) {371 // Do not tokenize script and style tag contents, keep lexer state, even though processing "<".372 this.setLexCondition(this._lexConditions.INITIAL);373 this.tokenType = null;374 return cursor;375 }376 this._condition.parseCondition = this._parseConditions.INITIAL;377 this.tokenType = "html-tag";378 return cursor;379 }380case 41:381 yyaccept = 0;382 yych = this._charAt(YYMARKER = ++cursor);383 if (yych == 'S') { gotoCase = 73; continue; };384 if (yych == 's') { gotoCase = 73; continue; };385 { gotoCase = 40; continue; };386case 42:387 yych = this._charAt(++cursor);388 if (yych <= 'T') {389 if (yych == 'C') { gotoCase = 62; continue; };390 if (yych >= 'T') { gotoCase = 63; continue; };391 } else {392 if (yych <= 'c') {393 if (yych >= 'c') { gotoCase = 62; continue; };394 } else {395 if (yych == 't') { gotoCase = 63; continue; };396 }397 }398case 43:399 cursor = YYMARKER;400 { gotoCase = 40; continue; };401case 44:402 yych = this._charAt(++cursor);403 if (yych <= 'C') {404 if (yych != '-') { gotoCase = 43; continue; };405 } else {406 if (yych <= 'D') { gotoCase = 46; continue; };407 if (yych == 'd') { gotoCase = 46; continue; };408 { gotoCase = 43; continue; };409 }410 yych = this._charAt(++cursor);411 if (yych == '-') { gotoCase = 54; continue; };412 { gotoCase = 43; continue; };413case 46:414 yych = this._charAt(++cursor);415 if (yych == 'O') { gotoCase = 47; continue; };416 if (yych != 'o') { gotoCase = 43; continue; };417case 47:418 yych = this._charAt(++cursor);419 if (yych == 'C') { gotoCase = 48; continue; };420 if (yych != 'c') { gotoCase = 43; continue; };421case 48:422 yych = this._charAt(++cursor);423 if (yych == 'T') { gotoCase = 49; continue; };424 if (yych != 't') { gotoCase = 43; continue; };425case 49:426 yych = this._charAt(++cursor);427 if (yych == 'Y') { gotoCase = 50; continue; };428 if (yych != 'y') { gotoCase = 43; continue; };429case 50:430 yych = this._charAt(++cursor);431 if (yych == 'P') { gotoCase = 51; continue; };432 if (yych != 'p') { gotoCase = 43; continue; };433case 51:434 yych = this._charAt(++cursor);435 if (yych == 'E') { gotoCase = 52; continue; };436 if (yych != 'e') { gotoCase = 43; continue; };437case 52:438 ++cursor;439 this.setLexCondition(this._lexConditions.DOCTYPE);440 { this.tokenType = "html-doctype"; return cursor; }441case 54:442 ++cursor;443 yych = this._charAt(cursor);444 if (yych <= '\f') {445 if (yych == '\n') { gotoCase = 57; continue; };446 { gotoCase = 54; continue; };447 } else {448 if (yych <= '\r') { gotoCase = 57; continue; };449 if (yych != '-') { gotoCase = 54; continue; };450 }451 ++cursor;452 yych = this._charAt(cursor);453 if (yych == '-') { gotoCase = 59; continue; };454 { gotoCase = 43; continue; };455case 57:456 ++cursor;457 this.setLexCondition(this._lexConditions.COMMENT);458 { this.tokenType = "html-comment"; return cursor; }459case 59:460 ++cursor;461 yych = this._charAt(cursor);462 if (yych != '>') { gotoCase = 54; continue; };463 ++cursor;464 { this.tokenType = "html-comment"; return cursor; }465case 62:466 yych = this._charAt(++cursor);467 if (yych == 'R') { gotoCase = 68; continue; };468 if (yych == 'r') { gotoCase = 68; continue; };469 { gotoCase = 43; continue; };470case 63:471 yych = this._charAt(++cursor);472 if (yych == 'Y') { gotoCase = 64; continue; };473 if (yych != 'y') { gotoCase = 43; continue; };474case 64:475 yych = this._charAt(++cursor);476 if (yych == 'L') { gotoCase = 65; continue; };477 if (yych != 'l') { gotoCase = 43; continue; };478case 65:479 yych = this._charAt(++cursor);480 if (yych == 'E') { gotoCase = 66; continue; };481 if (yych != 'e') { gotoCase = 43; continue; };482case 66:483 ++cursor;484 this.setLexCondition(this._lexConditions.TAG);485 {486 if (this._condition.parseCondition & this._parseConditions.STYLE) {487 // Do not tokenize style tag contents, keep lexer state, even though processing "<".488 this.setLexCondition(this._lexConditions.INITIAL);489 this.tokenType = null;490 return cursor;491 }492 this.tokenType = "html-tag";493 this._condition.parseCondition = this._parseConditions.STYLE;494 this._setExpectingAttribute();495 return cursor;496 }497case 68:498 yych = this._charAt(++cursor);499 if (yych == 'I') { gotoCase = 69; continue; };500 if (yych != 'i') { gotoCase = 43; continue; };501case 69:502 yych = this._charAt(++cursor);503 if (yych == 'P') { gotoCase = 70; continue; };504 if (yych != 'p') { gotoCase = 43; continue; };505case 70:506 yych = this._charAt(++cursor);507 if (yych == 'T') { gotoCase = 71; continue; };508 if (yych != 't') { gotoCase = 43; continue; };509case 71:510 ++cursor;511 this.setLexCondition(this._lexConditions.TAG);512 {513 if (this._condition.parseCondition & this._parseConditions.SCRIPT) {514 // Do not tokenize script tag contents, keep lexer state, even though processing "<".515 this.setLexCondition(this._lexConditions.INITIAL);516 this.tokenType = null;517 return cursor;518 }519 this.tokenType = "html-tag";520 this._condition.parseCondition = this._parseConditions.SCRIPT;521 this._setExpectingAttribute();522 return cursor;523 }524case 73:525 yych = this._charAt(++cursor);526 if (yych <= 'T') {527 if (yych == 'C') { gotoCase = 75; continue; };528 if (yych <= 'S') { gotoCase = 43; continue; };529 } else {530 if (yych <= 'c') {531 if (yych <= 'b') { gotoCase = 43; continue; };532 { gotoCase = 75; continue; };533 } else {534 if (yych != 't') { gotoCase = 43; continue; };535 }536 }537 yych = this._charAt(++cursor);538 if (yych == 'Y') { gotoCase = 81; continue; };539 if (yych == 'y') { gotoCase = 81; continue; };540 { gotoCase = 43; continue; };541case 75:542 yych = this._charAt(++cursor);543 if (yych == 'R') { gotoCase = 76; continue; };544 if (yych != 'r') { gotoCase = 43; continue; };545case 76:546 yych = this._charAt(++cursor);547 if (yych == 'I') { gotoCase = 77; continue; };548 if (yych != 'i') { gotoCase = 43; continue; };549case 77:550 yych = this._charAt(++cursor);551 if (yych == 'P') { gotoCase = 78; continue; };552 if (yych != 'p') { gotoCase = 43; continue; };553case 78:554 yych = this._charAt(++cursor);555 if (yych == 'T') { gotoCase = 79; continue; };556 if (yych != 't') { gotoCase = 43; continue; };557case 79:558 ++cursor;559 this.setLexCondition(this._lexConditions.TAG);560 {561 this.tokenType = "html-tag";562 this._condition.parseCondition = this._parseConditions.INITIAL;563 this.scriptEnded(cursor - 8);564 return cursor;565 }566case 81:567 yych = this._charAt(++cursor);568 if (yych == 'L') { gotoCase = 82; continue; };569 if (yych != 'l') { gotoCase = 43; continue; };570case 82:571 yych = this._charAt(++cursor);572 if (yych == 'E') { gotoCase = 83; continue; };573 if (yych != 'e') { gotoCase = 43; continue; };574case 83:575 ++cursor;576 this.setLexCondition(this._lexConditions.TAG);577 {578 this.tokenType = "html-tag";579 this._condition.parseCondition = this._parseConditions.INITIAL;580 this.styleSheetEnded(cursor - 7);581 return cursor;582 }583/* *********************************** */584case this.case_SSTRING:585 yych = this._charAt(cursor);586 if (yych <= '\f') {587 if (yych == '\n') { gotoCase = 89; continue; };588 { gotoCase = 88; continue; };589 } else {590 if (yych <= '\r') { gotoCase = 89; continue; };591 if (yych == '\'') { gotoCase = 91; continue; };592 { gotoCase = 88; continue; };593 }594case 87:595 { return this._stringToken(cursor); }596case 88:597 yych = this._charAt(++cursor);598 { gotoCase = 95; continue; };599case 89:600 ++cursor;601 { this.tokenType = null; return cursor; }602case 91:603 ++cursor;604case 92:605 this.setLexCondition(this._lexConditions.TAG);606 { return this._stringToken(cursor, true); }607case 93:608 yych = this._charAt(++cursor);609 { gotoCase = 92; continue; };610case 94:611 ++cursor;612 yych = this._charAt(cursor);613case 95:614 if (yych <= '\f') {615 if (yych == '\n') { gotoCase = 87; continue; };616 { gotoCase = 94; continue; };617 } else {618 if (yych <= '\r') { gotoCase = 87; continue; };619 if (yych == '\'') { gotoCase = 93; continue; };620 { gotoCase = 94; continue; };621 }622/* *********************************** */623case this.case_TAG:624 yych = this._charAt(cursor);625 if (yych <= '&') {626 if (yych <= '\r') {627 if (yych == '\n') { gotoCase = 100; continue; };628 if (yych >= '\r') { gotoCase = 100; continue; };629 } else {630 if (yych <= ' ') {631 if (yych >= ' ') { gotoCase = 100; continue; };632 } else {633 if (yych == '"') { gotoCase = 102; continue; };634 }635 }636 } else {637 if (yych <= '>') {638 if (yych <= ';') {639 if (yych <= '\'') { gotoCase = 103; continue; };640 } else {641 if (yych <= '<') { gotoCase = 100; continue; };642 if (yych <= '=') { gotoCase = 104; continue; };643 { gotoCase = 106; continue; };644 }645 } else {646 if (yych <= '[') {647 if (yych >= '[') { gotoCase = 100; continue; };648 } else {649 if (yych == ']') { gotoCase = 100; continue; };650 }651 }652 }653 ++cursor;654 yych = this._charAt(cursor);655 { gotoCase = 119; continue; };656case 99:657 {658 if (this._condition.parseCondition === this._parseConditions.SCRIPT || this._condition.parseCondition === this._parseConditions.STYLE) {659 // Fall through if expecting attributes.660 this.tokenType = null;661 return cursor;662 }663 if (this._condition.parseCondition === this._parseConditions.INITIAL) {664 this.tokenType = "html-tag";665 this._setExpectingAttribute();666 var token = this._line.substring(cursorOnEnter, cursor);667 if (token === "a")668 this._condition.parseCondition |= this._parseConditions.A_NODE;669 else if (this._condition.parseCondition & this._parseConditions.A_NODE)670 this._condition.parseCondition ^= this._parseConditions.A_NODE;671 } else if (this._isExpectingAttribute()) {672 var token = this._line.substring(cursorOnEnter, cursor);673 if (token === "href" || token === "src")674 this._condition.parseCondition |= this._parseConditions.LINKIFY;675 else if (this._condition.parseCondition |= this._parseConditions.LINKIFY)676 this._condition.parseCondition ^= this._parseConditions.LINKIFY;677 this.tokenType = "html-attribute-name";678 } else if (this._isExpectingAttributeValue())679 this.tokenType = this._attrValueTokenType();680 else681 this.tokenType = null;682 return cursor;683 }684case 100:685 ++cursor;686 { this.tokenType = null; return cursor; }687case 102:688 yyaccept = 0;689 yych = this._charAt(YYMARKER = ++cursor);690 { gotoCase = 115; continue; };691case 103:692 yyaccept = 0;693 yych = this._charAt(YYMARKER = ++cursor);694 { gotoCase = 109; continue; };695case 104:696 ++cursor;697 {698 if (this._isExpectingAttribute())699 this._setExpectingAttributeValue();700 this.tokenType = null;701 return cursor;702 }703case 106:704 ++cursor;705 this.setLexCondition(this._lexConditions.INITIAL);706 {707 this.tokenType = "html-tag";708 if (this._condition.parseCondition & this._parseConditions.SCRIPT) {709 this.scriptStarted(cursor);710 // Do not tokenize script tag contents.711 return cursor;712 }713 if (this._condition.parseCondition & this._parseConditions.STYLE) {714 this.styleSheetStarted(cursor);715 // Do not tokenize style tag contents.716 return cursor;717 }718 this._condition.parseCondition = this._parseConditions.INITIAL;719 return cursor;720 }721case 108:722 ++cursor;723 yych = this._charAt(cursor);724case 109:725 if (yych <= '\f') {726 if (yych != '\n') { gotoCase = 108; continue; };727 } else {728 if (yych <= '\r') { gotoCase = 110; continue; };729 if (yych == '\'') { gotoCase = 112; continue; };730 { gotoCase = 108; continue; };731 }732case 110:733 ++cursor;734 this.setLexCondition(this._lexConditions.SSTRING);735 { return this._stringToken(cursor); }736case 112:737 ++cursor;738 { return this._stringToken(cursor, true); }739case 114:740 ++cursor;741 yych = this._charAt(cursor);742case 115:743 if (yych <= '\f') {744 if (yych != '\n') { gotoCase = 114; continue; };745 } else {746 if (yych <= '\r') { gotoCase = 116; continue; };747 if (yych == '"') { gotoCase = 112; continue; };748 { gotoCase = 114; continue; };749 }750case 116:751 ++cursor;752 this.setLexCondition(this._lexConditions.DSTRING);753 { return this._stringToken(cursor); }754case 118:755 ++cursor;756 yych = this._charAt(cursor);757case 119:758 if (yych <= '"') {759 if (yych <= '\r') {760 if (yych == '\n') { gotoCase = 99; continue; };761 if (yych <= '\f') { gotoCase = 118; continue; };762 { gotoCase = 99; continue; };763 } else {764 if (yych == ' ') { gotoCase = 99; continue; };765 if (yych <= '!') { gotoCase = 118; continue; };766 { gotoCase = 99; continue; };767 }768 } else {769 if (yych <= '>') {770 if (yych == '\'') { gotoCase = 99; continue; };771 if (yych <= ';') { gotoCase = 118; continue; };772 { gotoCase = 99; continue; };773 } else {774 if (yych <= '[') {775 if (yych <= 'Z') { gotoCase = 118; continue; };776 { gotoCase = 99; continue; };777 } else {778 if (yych == ']') { gotoCase = 99; continue; };779 { gotoCase = 118; continue; };780 }781 }782 }783 }784 }785 }786}...

Full Screen

Full Screen

highlight.js

Source:highlight.js Github

copy

Full Screen

1(function () {2 function lookAhead(x, ipos, n) {3 var i, c, text;4 text = "";5 for (i = ipos; i < ipos + n; i++) {6 if (i < x.length) {7 c = x.charAt(i);8 text += c;9 }10 }11 return text.toUpperCase();12 }13 var x, y, z, i, j, c, ch, text, status, ele;14 if (!document.getElementsByClassName) {return;}15 y = document.getElementsByClassName("language-html");16 for (j = 0; j < y.length; j++) {17 z = y[j];18 ele = "";19 text = "";20 script = false;21 status = "TAGW";22 x = z.innerHTML;23 24 for (i = 0; i < x.length; i++) {25 c = x.charAt(i);26 ch = c.charCodeAt(0); 27 if (status == "ANG") {28 if (c == "}") {29 if (lookAhead(x, i, 2) == "}}") {30 text += "}}" + "</span>";31 i++;32 status = "TAGW";33 continue;34 }35 }36 } 37 if (status == "TAGW") {38 if (c == "&") {39 if (lookAhead(x, i, 7) == "&LT;!--") {40 text += "<span style='color:green'>" + c;41 status = "COM";42 continue;43 }44 if (lookAhead(x, i, 4) == "&LT;") {45 if (script == true) {46 if (lookAhead(x, i, 11) != "&LT;/SCRIPT") {47 text += c;48 continue;49 }50 if (lookAhead(x, i, 11) == "&LT;/SCRIPT") {51 script = false;52 }53 }54 text += "<span style='color:blue'>" + c;55 status = "LT";56 continue;57 } 58 }59 if (c == "{") {60 if (lookAhead(x, i, 2) == "{{") {61 text += "<span style='color:red'>" + c;62 status = "ANG";63 continue;64 }65 } 66 } 67 if (status == "ELEW") {68 if (ch != 32 && ch != 10 && ch != 13 && ch != 9) {69 text += "<span style='color:brown'>" + c;70 ele = c;71 status = "ELE";72 if (lookAhead(x, i, 9) == "SCRIPT&GT") {script = true;}73 continue;74 }75 } 76 if (status == "ELE") {77 if (ch == 32 || ch == 10 || ch == 13 || ch == 9) {78 text += "</span>";79 status = "ATTW"; 80 }81 if (c == "&") {82 if (lookAhead(x, i, 4) == "&GT;") {83 text += "</span><span style='color:blue'>" + c;84 status = "GT";85 continue;86 }87 }88 ele += c;89 } 90 if (status == "ATTW") {91 if (c == "&")92 if (lookAhead(x, i, 4) == "&GT;") {93 text += "<span style='color:blue'>" + c;94 status = "GT";95 continue;96 }97 if (ch != 32 && ch != 10 && ch != 13 && ch != 9) {98 text += "<span style='color:red'>" + c;99 status = "ATT";100 continue;101 }102 } 103 if (status == "ATT") {104 if (c == "=") {105 text += c + "</span><span style='color:mediumblue'>";106 status = "VALW";107 continue;108 }109 if (c == "&") {110 if (lookAhead(x, i, 4) == "&GT;") {111 text += "</span><span style='color:blue'>" + c;112 status = "GT";113 continue;114 }115 } 116 }117 if (status == "COM") {118 if (c == "-") {119 if (lookAhead(x, i, 6) == "--&GT;") {120 text += c;121 status = "COMW";122 continue;123 }124 }125 } 126 if (status == "COMW") {127 if (c == "&") {128 if (lookAhead(x, i, 4) == "&GT;") {129 text += c;130 status = "GT";131 continue;132 }133 }134 } 135 if (status == "VALS") {136 if (c == "'") {137 text += c + "</span>";138 status = "ATTW";139 continue;140 }141 }142 if (status == "VALD") {143 if (c == '"') {144 text += c + "</span>";145 status = "ATTW";146 continue;147 }148 }149 if (status == "VALW") {150 if (c == "'") {151 status = "VALS";152 text += c;153 continue;154 }155 if (c == '"') {156 status = "VALD";157 text += c;158 continue;159 } 160 } 161 if (status == "LT") {162 if (c == ";") {163 text += c + "</span>";164 status = "ELEW";165 continue;166 }167 } 168 if (status == "GT") {169 if (c == ";") {170 text += c + "</span>";171 status = "TAGW";172 continue;173 }174 } 175 text += c;176 }177 z.innerHTML = text;178 179 180 }})();181 182 (function () {183 function lookAhead(x, ipos, n) {184 var i, c, text;185 text = "";186 for (i = ipos; i < ipos + n; i++) {187 if (i < x.length) {188 c = x.charAt(i);189 text += c;190 }191 }192 return text.toUpperCase();193 }194 var x, y, z, i, j, c, ch, text, status, temp, span;195 if (!document.getElementsByClassName) {return;}196 y = document.getElementsByClassName("language-html");197 for (j = 0; j < y.length; j++) {198 z = y[j];199 text = "";200 temp = "";201 span = false;202 status = "SELW";203 x = z.innerHTML;204 205 for (i = 0; i < x.length; i++) {206 c = x.charAt(i);207 ch = c.charCodeAt(0); 208 if (c == "<") {209 text += c;210 temp = status;211 status = "TAG";212 continue;213 }214 if (c == "index.html") {215 if (lookAhead(x, i, 2) == "/*") {216 text += "<span style='color:green'>";217 span = true;218 temp = status;219 status = "COM";220 } 221 text += c;222 continue; 223 } 224 if (status == "COM" ) {225 if (c == "*") {226 if (lookAhead(x, i, 2) == "*/") {227 if (span) {228 text += c;229 i++;230 text += x.charAt(i);231 text += "</span>";232 span = false;233 status = temp;234 }235 } else {236 text += c;237 } 238 continue; 239 } 240 } 241 if (status == "MED") {242 if (c == "{") {243 text += "</span>" + c;244 span = false;245 status = "SELW";246 continue;247 }248 } 249 if (status == "SELW") {250 if (c == "@") {251 if (lookAhead(x,i,5) == "@FONT") {252 text += "<span style='color:brown'>" + c;253 span = true;254 status = "SEL";255 continue;256 } else {257 text += "<span style='color:brown'>" + c;258 span = true;259 status = "MED";260 continue;261 }262 }263 if (c == "}") {264 text += c;265 continue;266 }267 if (ch != 32 && ch != 10 && ch != 13 && ch != 9) {268 text += "<span style='color:brown'>" + c;269 span = true;270 status = "SEL";271 continue;272 }273 } 274 if (status == "TAG") {275 text += c;276 if (c == ">") {277 status = temp;278 } 279 continue;280 }281 if (c == "&") {282 text += c;283 if (lookAhead(x, i, 6) == "&NBSP;") {284 temp = status;285 status = "NBSP";286 }287 continue; 288 }289 if (status == "NBSP") {290 text += c;291 if (c == ";") {292 status = temp;293 } 294 continue;295 }296 if (status == "SEL") {297 if (c == "{") {298 if (span) {299 text += "</span>";300 span = false;301 }302 text += c;303 status = "PROW"; 304 continue;305 }306 } 307 if (status == "PROW") {308 if (c == "}") {309 if (span) {310 text += "</span>";311 span = false;312 }313 text += c;314 status = "SELW"; 315 continue;316 } 317 if (ch != 32 && ch != 10 && ch != 13 && ch != 9) {318 text += "<span style='color:red'>" + c;319 span = true;320 status = "VALW"; 321 continue;322 }323 } 324 if (status == "VALW") {325 if (c == ":") {326 text += c; 327 if (span) {328 text += "</span>";329 span = false;330 }331 text += "<span style='color:mediumblue'>";332 span = true;333 status = "VAL"; 334 continue;335 }336 } 337 if (status == "VAL") {338 if (c == "}") {339 if (span) {340 text += "</span>";341 span = false;342 }343 text += c;344 status = "SELW"; 345 continue;346 }347 if (c == ";") {348 text += c;349 if (span) {350 text += "</span>";351 span = false;352 }353 status = "PROW"; 354 continue;355 }356 } 357 text += c;358 }359 360 z.innerHTML = text;361 362 }})();363 364 (function () {365 function lookAhead(x, ipos, n) {366 var i, c, text;367 text = "";368 for (i = ipos; i < ipos + n; i++) {369 if (i < x.length) {370 c = x.charAt(i);371 text += c;372 }373 }374 return text.toUpperCase();375 }376 var x, y, z, i, j, c, ch, text, status;377 if (!document.getElementsByClassName) {return;}378 y = document.getElementsByClassName("language-json");379 for (j = 0; j < y.length; j++) {380 z = y[j];381 text = "";382 status = "";383 x = z.innerHTML;384 385 for (i = 0; i < x.length; i++) {386 c = x.charAt(i);387 ch = c.charCodeAt(0); 388 389 if (status == "") {390 if (c == '"') {391 status = "OBJNAME";392 text += "<span style='color:brown'>" + c;393 continue;394 } 395 if (c == "{") {396 status = "OBJECT";397 text += c;398 continue;399 }400 text += c;401 continue;402 }403 if (status == "OBJECT") {404 if (c == '"') {405 status = "OBJNAME";406 text += "<span style='color:brown'>" + c;407 continue;408 } 409 text += c;410 continue;411 }412 if (status == "OBJNAME") {413 if (c == '"') {414 status = "WAITCOLON";415 text += c + "</span>"416 continue;417 } 418 text += c;419 continue;420 }421 if (status == "WAITCOLON") {422 if (c == ":") {423 status = "COLON";424 text += c;425 continue;426 }427 text += c;428 continue;429 } 430 if (status == "COLON") {431 if (c == '"') {432 status = "VALUE";433 text += "<span style='color:mediumblue'>" + c;434 continue;435 }436 if (ch > 47 && ch < 58) {437 status = "NUMBER";438 text += "<span style='color:mediumblue'>" + c;439 continue;440 }441 if (c == "{") {442 status = "OBJECT";443 text += c;444 continue;445 }446 if (c == "[") {447 status = "ARRAY";448 text += c;449 continue;450 }451 text += c;452 continue;453 }454 if (status == "ARRAY") {455 if (c == ']') {456 status = ""; 457 text += c;458 continue;459 }460 if (c == '{') {461 status = "OBJECT"; 462 text += c;463 continue;464 }465 text += c;466 continue;467 } 468 if (status == "VALUE") {469 if (c == '"') {470 status = "OBJECT"; 471 text += c + "</span>";472 continue;473 }474 text += c;475 continue;476 }477 if (status == "NUMBER") {478 if (ch < 48 || ch > 57) {479 status = ""; 480 text += "</span>" + c;481 continue;482 }483 text += c;484 continue;485 } 486 text += c;487 }488 z.innerHTML = text;489 }})();490 491 (function () {492 function lookAhead(x, ipos, n) {493 var i, c, ch, text;494 text = "";495 for (i = ipos; i < ipos + n; i++) {496 if (i < x.length) {497 c = x.charAt(i);498 ch = c.charCodeAt(0); 499 if (ch == 32 || ch == 10 || ch == 13 || ch == 9 ) {500 text += " "; 501 } else {502 text += c;503 }504 }505 }506 return text;507 }508 function lookWord(x, ipos) {509 var i, c, ch, text;510 text = "";511 for (i = ipos; i < x.length; i++) {512 c = x.charAt(i);513 ch = c.charCodeAt(0); 514 if (ch == 10 || ch == 13 || ch == 9 || ch == 32 || ch == 38 || ch == 40 || ch == 41 || ch == 42 || ch == 43 ||515 ch == 44 || ch == 58 || ch == 47 || ch == 58 || ch == 59 || ch == 60 || ch == 61 || ch == 91 || ch == 93) {516 return text; 517 } else {518 text += c;519 }520 }521 return text;522 }523 var x, y, z, i, j, k, c, ch, text, status, ele, comp, pos;524 jsArr = ["var","boolean","break","case","catch","continue","debugger","default","do","else","finally","for",525 "function","if","in","new","return","switch","throw","try","typeof","while","with"];526 if (!document.getElementsByClassName) {return;}527 y = document.getElementsByClassName("language-js");528 for (j = 0; j < y.length; j++) {529 z = y[j];530 ele = "";531 text = "";532 status = "";533 x = z.innerHTML;534 535 for (i = 0; i < x.length; i++) {536 c = x.charAt(i);537 ch = c.charCodeAt(0);538 if (ch == 32 || ch == 10 || ch == 13 || ch == 9 ) {539 text += c;540 continue;541 }542 if (lookAhead(x, i, 2) == "//") {543 text += "<span style='color:green'>"; 544 pos = x.substr(i).indexOf("<br>");545 if (pos == -1) {546 text += x.substr(i); 547 i = x.length;548 } else {549 text += x.substr(i,pos + 4);550 i += pos + 3;551 } 552 text += "</span>"553 continue;554 }555 if (lookAhead(x, i, 2) == "/*") {556 text += "<span style='color:green'>"; 557 pos = x.substr(i).indexOf("*/");558 if (pos == -1) {559 text += x.substr(i); 560 i = x.length;561 } else {562 text += x.substr(i,pos + 2);563 i += pos + 1;564 } 565 text += "</span>"566 continue;567 }568 if (c == "&") {569 pos = x.substr(i).indexOf(";");570 if (pos == -1) {571 text += x.substr(i); 572 i = x.length;573 } else {574 text += x.substr(i,pos + 1);575 i += pos;576 } 577 continue;578 }579 if (c == "'" || c == '"') {580 text += "<span style='color:mediumblue'>"; 581 pos = x.substr(i+1).indexOf(c);582 if (pos == -1) {583 text += x.substr(i); 584 i = x.length;585 } else {586 text += x.substr(i, pos + 2);587 i += pos + 1;588 } 589 text += "</span>"590 continue;591 }592 if (lookAhead(x, i, 4) == "<br>") {593 i += 3;594 text += "<br>";595 continue596 }597 ele = lookWord(x, i);598 if (ele) {599 if (ele =="true" || ele == "false" || ele == "null" || isNaN(ele) == false) { 600 text += "<span style='color:mediumblue'>" + x.substr(i,ele.length) + "</span>";601 i += ele.length - 1;602 status = "";603 continue;604 }605 for (k = 0; k < jsArr.length; k++) {606 if (ele == jsArr[k]) {607 text += "<span style='color:brown'>" + x.substr(i,ele.length) + "</span>";608 i += ele.length - 1;609 status = "SPW";610 break;611 } 612 }613 if (status == "SPW") {614 status = "";615 continue; 616 } else {617 text += x.substr(i, ele.length);618 i += ele.length - 1;619 continue;620 }621 }622 text += c;623 }624 z.innerHTML = text;625 }})();626 ...

Full Screen

Full Screen

Stemmer.gs

Source:Stemmer.gs Github

copy

Full Screen

1/**2* MIT3* https://github.com/words/lancaster-stemmer/blob/master/LICENSE4*/5var Stemmer = (function (ns) {6 7 var STOP = -1;8 var INTACT = 0;9 var CONTINUE = 1;10 var PROTECT = 2;11 var VOWELS = /[aeiouy]/;12 var rules;13 14 const init = function () {15 16 rules = {17 a: [18 {match: 'ia', replacement: '', type: INTACT},19 {match: 'a', replacement: '', type: INTACT}20 ],21 b: [{match: 'bb', replacement: 'b', type: STOP}],22 c: [23 {match: 'ytic', replacement: 'ys', type: STOP},24 {match: 'ic', replacement: '', type: CONTINUE},25 {match: 'nc', replacement: 'nt', type: CONTINUE}26 ],27 d: [28 {match: 'dd', replacement: 'd', type: STOP},29 {match: 'ied', replacement: 'y', type: CONTINUE},30 {match: 'ceed', replacement: 'cess', type: STOP},31 {match: 'eed', replacement: 'ee', type: STOP},32 {match: 'ed', replacement: '', type: CONTINUE},33 {match: 'hood', replacement: '', type: CONTINUE}34 ],35 e: [{match: 'e', replacement: '', type: CONTINUE}],36 f: [37 {match: 'lief', replacement: 'liev', type: STOP},38 {match: 'if', replacement: '', type: CONTINUE}39 ],40 g: [41 {match: 'ing', replacement: '', type: CONTINUE},42 {match: 'iag', replacement: 'y', type: STOP},43 {match: 'ag', replacement: '', type: CONTINUE},44 {match: 'gg', replacement: 'g', type: STOP}45 ],46 h: [47 {match: 'th', replacement: '', type: INTACT},48 {match: 'guish', replacement: 'ct', type: STOP},49 {match: 'ish', replacement: '', type: CONTINUE}50 ],51 i: [52 {match: 'i', replacement: '', type: INTACT},53 {match: 'i', replacement: 'y', type: CONTINUE}54 ],55 j: [56 {match: 'ij', replacement: 'id', type: STOP},57 {match: 'fuj', replacement: 'fus', type: STOP},58 {match: 'uj', replacement: 'ud', type: STOP},59 {match: 'oj', replacement: 'od', type: STOP},60 {match: 'hej', replacement: 'her', type: STOP},61 {match: 'verj', replacement: 'vert', type: STOP},62 {match: 'misj', replacement: 'mit', type: STOP},63 {match: 'nj', replacement: 'nd', type: STOP},64 {match: 'j', replacement: 's', type: STOP}65 ],66 l: [67 {match: 'ifiabl', replacement: '', type: STOP},68 {match: 'iabl', replacement: 'y', type: STOP},69 {match: 'abl', replacement: '', type: CONTINUE},70 {match: 'ibl', replacement: '', type: STOP},71 {match: 'bil', replacement: 'bl', type: CONTINUE},72 {match: 'cl', replacement: 'c', type: STOP},73 {match: 'iful', replacement: 'y', type: STOP},74 {match: 'ful', replacement: '', type: CONTINUE},75 {match: 'ul', replacement: '', type: STOP},76 {match: 'ial', replacement: '', type: CONTINUE},77 {match: 'ual', replacement: '', type: CONTINUE},78 {match: 'al', replacement: '', type: CONTINUE},79 {match: 'll', replacement: 'l', type: STOP}80 ],81 m: [82 {match: 'ium', replacement: '', type: STOP},83 {match: 'um', replacement: '', type: INTACT},84 {match: 'ism', replacement: '', type: CONTINUE},85 {match: 'mm', replacement: 'm', type: STOP}86 ],87 n: [88 {match: 'sion', replacement: 'j', type: CONTINUE},89 {match: 'xion', replacement: 'ct', type: STOP},90 {match: 'ion', replacement: '', type: CONTINUE},91 {match: 'ian', replacement: '', type: CONTINUE},92 {match: 'an', replacement: '', type: CONTINUE},93 {match: 'een', replacement: '', type: PROTECT},94 {match: 'en', replacement: '', type: CONTINUE},95 {match: 'nn', replacement: 'n', type: STOP}96 ],97 p: [98 {match: 'ship', replacement: '', type: CONTINUE},99 {match: 'pp', replacement: 'p', type: STOP}100 ],101 r: [102 {match: 'er', replacement: '', type: CONTINUE},103 {match: 'ear', replacement: '', type: PROTECT},104 {match: 'ar', replacement: '', type: STOP},105 {match: 'ior', replacement: '', type: CONTINUE},106 {match: 'or', replacement: '', type: CONTINUE},107 {match: 'ur', replacement: '', type: CONTINUE},108 {match: 'rr', replacement: 'r', type: STOP},109 {match: 'tr', replacement: 't', type: CONTINUE},110 {match: 'ier', replacement: 'y', type: CONTINUE}111 ],112 s: [113 {match: 'ies', replacement: 'y', type: CONTINUE},114 {match: 'sis', replacement: 's', type: STOP},115 {match: 'is', replacement: '', type: CONTINUE},116 {match: 'ness', replacement: '', type: CONTINUE},117 {match: 'ss', replacement: '', type: PROTECT},118 {match: 'ous', replacement: '', type: CONTINUE},119 {match: 'us', replacement: '', type: INTACT},120 {match: 's', replacement: '', type: CONTINUE},121 {match: 's', replacement: '', type: STOP}122 ],123 t: [124 {match: 'plicat', replacement: 'ply', type: STOP},125 {match: 'at', replacement: '', type: CONTINUE},126 {match: 'ment', replacement: '', type: CONTINUE},127 {match: 'ent', replacement: '', type: CONTINUE},128 {match: 'ant', replacement: '', type: CONTINUE},129 {match: 'ript', replacement: 'rib', type: STOP},130 {match: 'orpt', replacement: 'orb', type: STOP},131 {match: 'duct', replacement: 'duc', type: STOP},132 {match: 'sumpt', replacement: 'sum', type: STOP},133 {match: 'cept', replacement: 'ceiv', type: STOP},134 {match: 'olut', replacement: 'olv', type: STOP},135 {match: 'sist', replacement: '', type: PROTECT},136 {match: 'ist', replacement: '', type: CONTINUE},137 {match: 'tt', replacement: 't', type: STOP}138 ],139 u: [140 {match: 'iqu', replacement: '', type: STOP},141 {match: 'ogu', replacement: 'og', type: STOP}142 ],143 v: [144 {match: 'siv', replacement: 'j', type: CONTINUE},145 {match: 'eiv', replacement: '', type: PROTECT},146 {match: 'iv', replacement: '', type: CONTINUE}147 ],148 y: [149 {match: 'bly', replacement: 'bl', type: CONTINUE},150 {match: 'ily', replacement: 'y', type: CONTINUE},151 {match: 'ply', replacement: '', type: PROTECT},152 {match: 'ly', replacement: '', type: CONTINUE},153 {match: 'ogy', replacement: 'og', type: STOP},154 {match: 'phy', replacement: 'ph', type: STOP},155 {match: 'omy', replacement: 'om', type: STOP},156 {match: 'opy', replacement: 'op', type: STOP},157 {match: 'ity', replacement: '', type: CONTINUE},158 {match: 'ety', replacement: '', type: CONTINUE},159 {match: 'lty', replacement: 'l', type: STOP},160 {match: 'istry', replacement: '', type: STOP},161 {match: 'ary', replacement: '', type: CONTINUE},162 {match: 'ory', replacement: '', type: CONTINUE},163 {match: 'ify', replacement: '', type: STOP},164 {match: 'ncy', replacement: 'nt', type: CONTINUE},165 {match: 'acy', replacement: '', type: CONTINUE}166 ],167 z: [168 {match: 'iz', replacement: '', type: CONTINUE},169 {match: 'yz', replacement: 'ys', type: STOP}170 ]171 };172 };173 174 ns.getStem = function (value) {175 return applyRules(String(value).toLowerCase(), true);176 }177 178 function applyRules(value, isIntact) {179 // first time used180 if (!rules) init();181 var ruleset = rules[value.charAt(value.length - 1)];182 var breakpoint;183 var index;184 var length;185 var rule;186 var next;187 188 if (!ruleset) {189 return value;190 }191 192 index = -1;193 length = ruleset.length;194 195 while (++index < length) {196 rule = ruleset[index];197 198 if (!isIntact && rule.type === INTACT) {199 continue;200 }201 202 breakpoint = value.length - rule.match.length;203 204 if (breakpoint < 0 || value.substr(breakpoint) !== rule.match) {205 continue;206 }207 208 if (rule.type === PROTECT) {209 return value;210 }211 212 next = value.substr(0, breakpoint) + rule.replacement;213 214 if (!acceptable(next)) {215 continue;216 }217 218 if (rule.type === CONTINUE) {219 return applyRules(next, false);220 }221 222 return next;223 }224 225 return value;226 }227 228 /* Detect if a value is acceptable to return, or should229 * be stemmed further. */230 function acceptable(value) {231 return VOWELS.test(value.charAt(0)) ?232 value.length > 1 : value.length > 2 && VOWELS.test(value);233 }234 return ns;...

Full Screen

Full Screen

cursor-continue-validity.js

Source:cursor-continue-validity.js Github

copy

Full Screen

1if (this.importScripts) {2 importScripts('../../../fast/js/resources/js-test-pre.js');3 importScripts('shared.js');4}5description("Test IndexedDB's IDBCursor.continue() behavior when called beyond normal scope.");6var date = new Date();7// we set this pretty high because we get different behavior depending8// if we're in a pre-fetched state or not9self.testLength = 25;10function test()11{12 removeVendorPrefixes();13 openDatabase();14}15function openDatabase()16{17 result = evalAndLog("indexedDB.open('cursor-continue')");18 result.onsuccess = setVersion;19 result.onerror = unexpectedErrorCallback;20}21function setVersion()22{23 self.db = evalAndLog("db = event.target.result");24 result = evalAndLog("db.setVersion('new version')");25 result.onsuccess = deleteExisting;26 result.onerror = unexpectedErrorCallback;27}28function deleteExisting()29{30 self.trans = evalAndLog("trans = event.target.result");31 shouldBeTrue("trans !== null");32 trans.onabort = unexpectedAbortCallback;33 deleteAllObjectStores(db);34 self.objectStore = evalAndLog("db.createObjectStore('someObjectStore')");35 self.indexObject = evalAndLog("objectStore.createIndex('someIndex', 'x')");36 self.nextToAdd = 0;37 addData();38}39function addData()40{41 for (var i=0; i<self.testLength; i++) {42 evalAndLog("objectStore.add({'x': " + i + " }, " + i + ")");43 }44 evalAndLog("continueTest()");45}46function continueTest()47{48 debug("");49 debug("Checking objectStore");50 debug("====================");51 var request = evalAndLog("indexObject.openCursor(null, 'next')");52 evalAndLog("self.continueValue = 0");53 request.onsuccess = evalAndLogCallback("doubleContinueCallback()");54 request.onerror = unexpectedErrorCallback;55 self.stage = 0;56}57function doubleContinueCallback()58{59 evalAndLog("cursor = event.target.result");60 if (cursor) {61 debug("Checking value at " + self.continueValue);62 // data should be valid before calling continue()63 shouldBe("cursor.key", "" + self.continueValue);64 shouldBe("cursor.value.x", "" + self.continueValue);65 // Data should not change during iteration, even if continue() is called and extra time.66 evalAndLog("cursor.continue()");67 shouldBe("cursor.key", "" + self.continueValue);68 shouldBe("cursor.value.x", "" + self.continueValue);69 // Even if continue is called more than once, the value still shouldn't change.70 evalAndExpectException("cursor.continue()", "DOMException.INVALID_STATE_ERR");71 shouldBe("cursor.key", "" + self.continueValue);72 shouldBe("cursor.value.x", "" + self.continueValue);73 evalAndLog("self.continueValue++;");74 } else {75 evalAndLog("continueIndexTest()");76 }77}78function continueIndexTest()79{80 debug("");81 debug("Checking index");82 debug("==============");83 var request = evalAndLog("indexObject.openCursor(null, 'next')");84 evalAndLog("self.continueValue = 0");85 request.onsuccess = doubleContinueIndexCallback;86 request.onerror = unexpectedErrorCallback;87 self.stage = 0;88}89function doubleContinueIndexCallback()90{91 evalAndLog("cursor = event.target.result");92 if (cursor) {93 debug("Checking value at " + self.continueValue);94 // data should be valid before calling continue()95 shouldBe("cursor.key", "" + self.continueValue);96 shouldBe("cursor.value.x", "" + self.continueValue);97 // Data should not change during iteration, even if continue() is called and extra time.98 evalAndLog("cursor.continue()");99 shouldBe("cursor.key", "" + self.continueValue);100 shouldBe("cursor.value.x", "" + self.continueValue);101 // Even if continue is called more than once, the value still shouldn't change.102 evalAndExpectException("cursor.continue()", "DOMException.INVALID_STATE_ERR");103 shouldBe("cursor.key", "" + self.continueValue);104 shouldBe("cursor.value.x", "" + self.continueValue);105 evalAndLog("self.continueValue++;");106 } else {107 evalAndLog("testModifyContinueOrder()");108 }109}110// Note: This mutates the data111function testModifyContinueOrder()112{113 debug("");114 debug("Checking modification");115 debug("=====================");116 var request = evalAndLog("indexObject.openCursor(null, 'next')");117 evalAndLog("self.continueValue = 0");118 request.onsuccess = modifyContinueOrderCallback;119 request.onerror = unexpectedErrorCallback;120 self.stage = 0;121}122function modifyContinueOrderCallback()123{124 cursor = evalAndLog("cursor = event.target.result");125 self.continueValue++;126 if (cursor) {127 // we sprinkle these checks across the dataset, to sample128 // behavior against pre-fetching. Make sure to use prime129 // numbers for these checks to avoid overlap.130 if (self.continueValue % 2 == 0) {131 // it's ok to call update() and then continue..132 evalAndLog("cursor.update({ x: 100 + self.continueValue })");133 evalAndLog("cursor.continue()");134 } else if (self.continueValue % 3 == 0) {135 // it's ok to call delete() and then continue136 evalAndLog("cursor.delete()");137 evalAndLog("cursor.continue()");138 } else if (self.continueValue % 5 == 0) {139 // it's NOT ok to call continue and then update140 evalAndLog("cursor.continue()");141 evalAndExpectException("cursor.update({ x: 100 + self.continueValue})",142 "DOMException.INVALID_STATE_ERR");143 } else if (self.continueValue % 7 == 0) {144 // it's NOT ok to call continue and then delete145 evalAndLog("cursor.continue()");146 evalAndExpectException("cursor.delete()",147 "DOMException.INVALID_STATE_ERR");148 } else {149 evalAndLog("cursor.continue()");150 }151 } else {152 finishJSTest();153 }154}...

Full Screen

Full Screen

jquery.liveurltitle.js

Source:jquery.liveurltitle.js Github

copy

Full Screen

1/**2 * Mimics ExpressionEngine's Live Url Title function3 * 4 * Most of the code is written by Ellislab Inc. (the string formatting part).5 * We just made the wrapper.6 * 7 * @param mixed target8 * @param object options9 */10(function($){11$.fn.liveUrlTitle = function(target, options) {12 var defaults = {13 separator: 'dash',14 lowercase: true15 };16 17 var options = $.extend(defaults, options);18 var element = this;19 var targetElem = $(target);20 var separator = null;21 22 // Dash or Underscore?23 switch(options.seperator)24 {25 case 'dash':26 separator = '-';27 break;28 case 'underscore':29 separator = '_';30 break;31 default: separator = '-';32 }33 // We need a target element34 if (targetElem.length == 0) return;35 36 return this.each(function() {37 // Target should be a jQuery object..38 var obj = $(this);39 40 obj.keyup(url_title);41 });42 43 function url_title()44 {45 var originalText = jQuery(this).val();46 47 var multiReg = new RegExp(separator + '{2,}', 'g');48 var NewText = originalText;49 50 // Lowercase?51 if (options.lowercase){52 NewText = NewText.toLowerCase();53 }54 /*55 * Foreign Character Attempt56 */57 58 var NewTextTemp = '';59 60 for(var pos=0; pos<NewText.length; pos++)61 {62 var c = NewText.charCodeAt(pos);63 64 if (c >= 32 && c < 128)65 {66 NewTextTemp += NewText.charAt(pos);67 }68 else69 {70 if (c == '223') {NewTextTemp += 'ss'; continue;}71 if (c == '224') {NewTextTemp += 'a'; continue;}72 if (c == '225') {NewTextTemp += 'a'; continue;}73 if (c == '226') {NewTextTemp += 'a'; continue;}74 if (c == '229') {NewTextTemp += 'a'; continue;}75 if (c == '227') {NewTextTemp += 'ae'; continue;}76 if (c == '230') {NewTextTemp += 'ae'; continue;}77 if (c == '228') {NewTextTemp += 'ae'; continue;}78 if (c == '231') {NewTextTemp += 'c'; continue;}79 if (c == '232') {NewTextTemp += 'e'; continue;}80 if (c == '233') {NewTextTemp += 'e'; continue;}81 if (c == '234') {NewTextTemp += 'e'; continue;}82 if (c == '235') {NewTextTemp += 'e'; continue;}83 if (c == '236') {NewTextTemp += 'i'; continue;}84 if (c == '237') {NewTextTemp += 'i'; continue;}85 if (c == '238') {NewTextTemp += 'i'; continue;}86 if (c == '239') {NewTextTemp += 'i'; continue;}87 if (c == '241') {NewTextTemp += 'n'; continue;}88 if (c == '242') {NewTextTemp += 'o'; continue;}89 if (c == '243') {NewTextTemp += 'o'; continue;}90 if (c == '244') {NewTextTemp += 'o'; continue;}91 if (c == '245') {NewTextTemp += 'o'; continue;}92 if (c == '246') {NewTextTemp += 'oe'; continue;}93 if (c == '249') {NewTextTemp += 'u'; continue;}94 if (c == '250') {NewTextTemp += 'u'; continue;}95 if (c == '251') {NewTextTemp += 'u'; continue;}96 if (c == '252') {NewTextTemp += 'ue'; continue;}97 if (c == '255') {NewTextTemp += 'y'; continue;}98 if (c == '257') {NewTextTemp += 'aa'; continue;}99 if (c == '269') {NewTextTemp += 'ch'; continue;}100 if (c == '275') {NewTextTemp += 'ee'; continue;}101 if (c == '291') {NewTextTemp += 'gj'; continue;}102 if (c == '299') {NewTextTemp += 'ii'; continue;}103 if (c == '311') {NewTextTemp += 'kj'; continue;}104 if (c == '316') {NewTextTemp += 'lj'; continue;}105 if (c == '326') {NewTextTemp += 'nj'; continue;}106 if (c == '353') {NewTextTemp += 'sh'; continue;}107 if (c == '363') {NewTextTemp += 'uu'; continue;}108 if (c == '382') {NewTextTemp += 'zh'; continue;}109 if (c == '256') {NewTextTemp += 'aa'; continue;}110 if (c == '268') {NewTextTemp += 'ch'; continue;}111 if (c == '274') {NewTextTemp += 'ee'; continue;}112 if (c == '290') {NewTextTemp += 'gj'; continue;}113 if (c == '298') {NewTextTemp += 'ii'; continue;}114 if (c == '310') {NewTextTemp += 'kj'; continue;}115 if (c == '315') {NewTextTemp += 'lj'; continue;}116 if (c == '325') {NewTextTemp += 'nj'; continue;}117 if (c == '352') {NewTextTemp += 'sh'; continue;}118 if (c == '362') {NewTextTemp += 'uu'; continue;}119 if (c == '381') {NewTextTemp += 'zh'; continue;} 120 }121 }122 NewText = NewTextTemp;123 NewText = NewText.replace('/<(.*?)>/g', '');124 NewText = NewText.replace(/\s+/g, separator);125 NewText = NewText.replace(/\//g, separator);126 NewText = NewText.replace(/[^a-z0-9\-\._]/g,'');127 NewText = NewText.replace(/\+/g, separator);128 NewText = NewText.replace(multiReg, separator);129 NewText = NewText.replace(/-$/g,'');130 NewText = NewText.replace(/_$/g,'');131 NewText = NewText.replace(/^_/g,'');132 NewText = NewText.replace(/^-/g,''); 133 134 // Insert the results135 if ($(targetElem).get(0).tagName != 'INPUT') $(targetElem).html(NewText);136 else $(targetElem).val(NewText);137 }138};...

Full Screen

Full Screen

continue.js

Source:continue.js Github

copy

Full Screen

1/* -*- tab-width: 2; indent-tabs-mode: nil; js-indent-level: 2 -*- */2/* This Source Code Form is subject to the terms of the Mozilla Public3 * License, v. 2.0. If a copy of the MPL was not distributed with this4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */5/**6 Filename: continue.js7 Description: 'Tests the continue statement'8 Author: Nick Lerissa9 Date: March 18, 199810*/11var SECTION = 'As described in Netscape doc "Whats new in JavaScript 1.2"';12var TITLE = 'statements: continue';13writeHeaderToLog("Executing script: continue.js");14writeHeaderToLog( SECTION + " "+ TITLE);15var i,j;16j = 0;17for (i = 0; i < 200; i++)18{19 if (i == 100)20 continue;21 j++;22}23// '"continue" in a "for" loop'24new TestCase ( '"continue" in "for" loop',25 199, j);26j = 0;27out1:28for (i = 0; i < 1000; i++)29{30 if (i == 100)31 {32 out2:33 for (var k = 0; k < 1000; k++)34 {35 if (k == 500) continue out1;36 }37 j = 3000;38 }39 j++;40}41// '"continue" in a "for" loop with a "label"'42new TestCase ( '"continue" in "for" loop with a "label"',43 999, j);44i = 0;45j = 1;46while (i != j)47{48 i++;49 if (i == 100) continue;50 j++;51}52// '"continue" in a "while" loop'53new TestCase ( '"continue" in a "while" loop',54 100, j );55j = 0;56i = 0;57out3:58while (i < 1000)59{60 if (i == 100)61 {62 var k = 0;63 out4:64 while (k < 1000)65 {66 if (k == 500)67 {68 i++;69 continue out3;70 }71 k++;72 }73 j = 3000;74 }75 j++;76 i++;77}78// '"continue" in a "while" loop with a "label"'79new TestCase ( '"continue" in a "while" loop with a "label"',80 999, j);81i = 0;82j = 1;83do84{85 i++;86 if (i == 100) continue;87 j++;88} while (i != j);89// '"continue" in a "do" loop'90new TestCase ( '"continue" in a "do" loop',91 100, j );92j = 0;93i = 0;94out5:95do96{97 if (i == 100)98 {99 var k = 0;100 out6:101 do102 {103 if (k == 500)104 {105 i++;106 continue out5;107 }108 k++;109 }while (k < 1000);110 j = 3000;111 }112 j++;113 i++;114}while (i < 1000);115// '"continue" in a "do" loop with a "label"'116new TestCase ( '"continue" in a "do" loop with a "label"',117 999, j);...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1const { chromium } = require('playwright');2(async () => {3 const browser = await chromium.launch();4 const context = await browser.newContext();5 const page = await context.newPage();6 await page.screenshot({ path: 'google.png' });7 await browser.close();8})();9const { chromium } = require('playwright');10(async () => {11 const browser = await chromium.launch();12 const context = await browser.newContext();13 const page = await context.newPage();14 await page.screenshot({ path: 'google.png' });15 await browser.close();16})();17Your name to display (optional):18Your name to display (optional):19Your name to display (optional):

Full Screen

Using AI Code Generation

copy

Full Screen

1const { devices } = require('playwright');2(async () => {3 const iPhone11 = devices['iPhone 11 Pro'];4 const context = await browser.newContext({5 recordVideo: { dir: './videos/' },6 });7 const page = await context.newPage();8 await page.screenshot({ path: 'example.png' });9 await context.close();10})();11const { devices } = require('playwright');12(async () => {13 const iPhone11 = devices['iPhone 11 Pro'];14 const context = await browser.newContext({15 recordVideo: { dir: './videos/' },16 });17 const page = await context.newPage();18 await page.screenshot({ path: 'example.png' });19 await context.close();20})();21const { devices } = require('playwright');22(async () => {23 const iPhone11 = devices['iPhone 11 Pro'];24 const context = await browser.newContext({25 recordVideo: { dir: './videos/' },26 });27 const page = await context.newPage();28 await page.screenshot({ path: 'example.png' });29 await context.close();30})();31const { devices } = require('playwright');32(async () => {33 const iPhone11 = devices['iPhone 11 Pro'];34 const context = await browser.newContext({35 recordVideo: { dir: './videos/' },36 });37 const page = await context.newPage();38 await page.screenshot({ path: 'example.png' });39 await context.close();40})();41const { devices } = require('playwright');42(async () => {43 const iPhone11 = devices['iPhone 11 Pro'];44 const context = await browser.newContext({45 recordVideo: { dir: './videos/' },46 });

Full Screen

Using AI Code Generation

copy

Full Screen

1const { Continue } = require('playwright/lib/server/chromium/crNetworkManager.js');2const { chromium } = require('playwright');3(async () => {4 const browser = await chromium.launch();5 const context = await browser.newContext();6 const page = await context.newPage();7 await page.route('**', route => {8 route.continue({9 headers: Object.assign({}, route.request().headers(), {10 })11 });12 });13 await browser.close();14})();

Full Screen

Using AI Code Generation

copy

Full Screen

1const { test } = require('@playwright/test');2test('My test', async ({ page }) => {3 await page.click('text=Get started');4 await page.click('text=Docs');5 await page.click('text=API');6 await page.click('text=Locator');7 await page.click('text=Continue');8});9Continue()10const { test } = require('@playwright/test');11test('My test', async ({ page }) => {12 await page.click('text=Get started');13 await page.click('text=Docs');14 await page.click('text=API');15 await page.click('text=Locator');16 await page.click('text=Continue');17});

Full Screen

Using AI Code Generation

copy

Full Screen

1const { chromium } = require('playwright');2(async () => {3 const browser = await chromium.launch({ headless: false });4 const context = await browser.newContext();5 const page = await context.newPage();6 await page.click('text=Sign in');7 await page.waitForSelector('input[type="email"]');8 await page.fill('input[type="email"]', 'testuser');9 await page.fill('input[type="password"]', 'testpassword');10 await page.click('text=Nex

Full Screen

Playwright tutorial

LambdaTest’s Playwright tutorial will give you a broader idea about the Playwright automation framework, its unique features, and use cases with examples to exceed your understanding of Playwright testing. This tutorial will give A to Z guidance, from installing the Playwright framework to some best practices and advanced concepts.

Chapters:

  1. What is Playwright : Playwright is comparatively new but has gained good popularity. Get to know some history of the Playwright with some interesting facts connected with it.
  2. How To Install Playwright : Learn in detail about what basic configuration and dependencies are required for installing Playwright and run a test. Get a step-by-step direction for installing the Playwright automation framework.
  3. Playwright Futuristic Features: Launched in 2020, Playwright gained huge popularity quickly because of some obliging features such as Playwright Test Generator and Inspector, Playwright Reporter, Playwright auto-waiting mechanism and etc. Read up on those features to master Playwright testing.
  4. What is Component Testing: Component testing in Playwright is a unique feature that allows a tester to test a single component of a web application without integrating them with other elements. Learn how to perform Component testing on the Playwright automation framework.
  5. Inputs And Buttons In Playwright: Every website has Input boxes and buttons; learn about testing inputs and buttons with different scenarios and examples.
  6. Functions and Selectors in Playwright: Learn how to launch the Chromium browser with Playwright. Also, gain a better understanding of some important functions like “BrowserContext,” which allows you to run multiple browser sessions, and “newPage” which interacts with a page.
  7. Handling Alerts and Dropdowns in Playwright : Playwright interact with different types of alerts and pop-ups, such as simple, confirmation, and prompt, and different types of dropdowns, such as single selector and multi-selector get your hands-on with handling alerts and dropdown in Playright testing.
  8. Playwright vs Puppeteer: Get to know about the difference between two testing frameworks and how they are different than one another, which browsers they support, and what features they provide.
  9. Run Playwright Tests on LambdaTest: Playwright testing with LambdaTest leverages test performance to the utmost. You can run multiple Playwright tests in Parallel with the LammbdaTest test cloud. Get a step-by-step guide to run your Playwright test on the LambdaTest platform.
  10. Playwright Python Tutorial: Playwright automation framework support all major languages such as Python, JavaScript, TypeScript, .NET and etc. However, there are various advantages to Python end-to-end testing with Playwright because of its versatile utility. Get the hang of Playwright python testing with this chapter.
  11. Playwright End To End Testing Tutorial: Get your hands on with Playwright end-to-end testing and learn to use some exciting features such as TraceViewer, Debugging, Networking, Component testing, Visual testing, and many more.
  12. Playwright Video Tutorial: Watch the video tutorials on Playwright testing from experts and get a consecutive in-depth explanation of Playwright automation testing.

Run Playwright Internal automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful