[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.18-1-697-g2f78b87
pfeldman at chromium.org
pfeldman at chromium.org
Wed Jan 20 22:17:15 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit 968fa3ca17c4a8efacb37872c6cd29437902d780
Author: pfeldman at chromium.org <pfeldman at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jan 8 11:50:25 2010 +0000
2010-01-08 Pavel Feldman <pfeldman at chromium.org>
Reviewed by Timothy Hatcher.
Web Inspector: Regex-based syntax highlighting is slow.
https://bugs.webkit.org/show_bug.cgi?id=33330
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/front-end/JavaScriptHighlighterScheme.js: Removed.
* inspector/front-end/JavaScriptTokenizer.js: Added.
(WebInspector.JavaScriptTokenizer):
(WebInspector.JavaScriptTokenizer.prototype.set line):
(WebInspector.JavaScriptTokenizer.prototype.getCondition):
(WebInspector.JavaScriptTokenizer.prototype.setCondition):
(WebInspector.JavaScriptTokenizer.prototype._charAt):
(WebInspector.JavaScriptTokenizer.prototype.nextToken):
* inspector/front-end/JavaScriptTokenizer.re2js: Added.
* inspector/front-end/TextEditorHighlighter.js:
(WebInspector.TextEditorHighlighter):
(WebInspector.TextEditorHighlighter.prototype.highlight):
(WebInspector.TextEditorHighlighter.prototype._lex):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.html:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 6827408..8a18dae 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,29 @@
+2010-01-08 Pavel Feldman <pfeldman at chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Regex-based syntax highlighting is slow.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33330
+
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/front-end/JavaScriptHighlighterScheme.js: Removed.
+ * inspector/front-end/JavaScriptTokenizer.js: Added.
+ (WebInspector.JavaScriptTokenizer):
+ (WebInspector.JavaScriptTokenizer.prototype.set line):
+ (WebInspector.JavaScriptTokenizer.prototype.getCondition):
+ (WebInspector.JavaScriptTokenizer.prototype.setCondition):
+ (WebInspector.JavaScriptTokenizer.prototype._charAt):
+ (WebInspector.JavaScriptTokenizer.prototype.nextToken):
+ * inspector/front-end/JavaScriptTokenizer.re2js: Added.
+ * inspector/front-end/TextEditorHighlighter.js:
+ (WebInspector.TextEditorHighlighter):
+ (WebInspector.TextEditorHighlighter.prototype.highlight):
+ (WebInspector.TextEditorHighlighter.prototype._lex):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.html:
+
2010-01-07 Mike Belshe <mbelshe at chromium.org>
Reviewed by Darin Adler.
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index a5f5ea1..4c1d15d 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -3695,8 +3695,8 @@
'inspector/front-end/InjectedScript.js',
'inspector/front-end/InjectedScriptAccess.js',
'inspector/front-end/inspector.js',
- 'inspector/front-end/JavaScriptHighlighterScheme.js',
'inspector/front-end/JavaScriptSourceSyntaxHighlighter.js',
+ 'inspector/front-end/JavaScriptTokenizer.js',
'inspector/front-end/KeyboardShortcut.js',
'inspector/front-end/MetricsSidebarPane.js',
'inspector/front-end/Object.js',
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index 91d2f6e..4bc15f7 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -42864,11 +42864,11 @@
>
</File>
<File
- RelativePath="..\inspector\front-end\JavaScriptHighlighterScheme.js"
+ RelativePath="..\inspector\front-end\JavaScriptSourceSyntaxHighlighter.js"
>
</File>
<File
- RelativePath="..\inspector\front-end\JavaScriptSourceSyntaxHighlighter.js"
+ RelativePath="..\inspector\front-end\JavaScriptTokenizer.js"
>
</File>
<File
diff --git a/WebCore/inspector/front-end/JavaScriptHighlighterScheme.js b/WebCore/inspector/front-end/JavaScriptHighlighterScheme.js
deleted file mode 100644
index 03bf049..0000000
--- a/WebCore/inspector/front-end/JavaScriptHighlighterScheme.js
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Copyright (C) 2009 Apple Inc. All Rights Reserved.
- * Copyright (C) 2009 Google Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-WebInspector.JavaScriptHighlighterScheme = function() {
- this.LexState = {
- Initial: 1,
- DivisionAllowed: 2
- };
- this.ContinueState = {
- None: 0,
- Comment: 1,
- SingleQuoteString: 2,
- DoubleQuoteString: 3,
- RegExp: 4
- };
-
- var keywords = [
- "null", "true", "false", "break", "case", "catch", "const", "default", "finally", "for",
- "instanceof", "new", "var", "continue", "function", "return", "void", "delete", "if",
- "this", "do", "while", "else", "in", "switch", "throw", "try", "typeof", "debugger",
- "class", "enum", "export", "extends", "import", "super", "get", "set"
- ].keySet();
-
- var tokenTypes = WebInspector.TextEditorHighlighter.TokenType;
-
- this.rules = [{
- name: "singleLineCommentAction",
- pattern: /^(?:\/\/.*)/,
- type: tokenTypes.Comment
- }, {
- name: "multiLineSingleLineCommentAction",
- pattern: /^(?:\/\*(?:[^\*]|\*[^\/])*\*+\/)/,
- type: tokenTypes.Comment
- }, {
- name: "multiLineCommentStartAction",
- pattern: /^(?:\/\*(?:[^\*]|\*[^\/])*)/,
- type: tokenTypes.Comment,
- postContinueState: this.ContinueState.Comment
- }, {
- name: "multiLineCommentEndAction",
- pattern: /^(?:(?:[^\*]|\*[^\/])*\*+\/)/,
- type: tokenTypes.Comment,
- preContinueState: this.ContinueState.Comment,
- postContinueState: this.ContinueState.None
- }, {
- name: "multiLineCommentMiddleAction",
- pattern: /^.*/,
- type: tokenTypes.Comment,
- preContinueState: this.ContinueState.Comment
- }, {
- name: "numericLiteralAction",
- pattern: /^(?:(?:0|[1-9]\d*)\.\d+?(?:[eE](?:\d+|\+\d+|-\d+))?|\.\d+(?:[eE](?:\d+|\+\d+|-\d+))?|(?:0|[1-9]\d*)(?:[eE](?:\d+|\+\d+|-\d+))?|0x[0-9a-fA-F]+|0X[0-9a-fA-F]+)\s*/,
- type: tokenTypes.Number,
- postLexState: this.LexState.DivisionAllowed
- }, {
- name: "stringLiteralAction",
- pattern: /^(?:"(?:[^"\\]|\\(?:['"\bfnrtv]|[^'"\bfnrtv0-9xu]|0|x[0-9a-fA-F][0-9a-fA-F]|(?:u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])))*"|'(?:[^'\\]|\\(?:['"\bfnrtv]|[^'"\bfnrtv0-9xu]|0|x[0-9a-fA-F][0-9a-fA-F]|(?:u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])))*')/,
- type: tokenTypes.String,
- postLexState: this.LexState.Initial
- }, {
- name: "singleQuoteStringStartAction",
- pattern: /^(?:'(?:[^'\\]|\\(?:['"\bfnrtv]|[^'"\bfnrtv0-9xu]|0|x[0-9a-fA-F][0-9a-fA-F]|(?:u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])))*)\\$/,
- type: tokenTypes.String,
- postContinueState: this.ContinueState.SingleQuoteString
- }, {
- name: "singleQuoteStringEndAction",
- pattern: /^(?:(?:[^'\\]|\\(?:['"\bfnrtv]|[^'"\bfnrtv0-9xu]|0|x[0-9a-fA-F][0-9a-fA-F]|(?:u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])))*')/,
- type: tokenTypes.String,
- preContinueState: this.ContinueState.SingleQuoteString,
- postContinueState: this.ContinueState.None
- }, {
- name: "singleQuoteStringMiddleAction",
- pattern: /^(?:(?:[^'\\]|\\(?:['"\bfnrtv]|[^'"\bfnrtv0-9xu]|0|x[0-9a-fA-F][0-9a-fA-F]|(?:u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])))*)\\$/,
- type: tokenTypes.String,
- preContinueState: this.ContinueState.SingleQuoteString
- }, {
- name: "doubleQuoteStringStartAction",
- pattern: /^(?:"(?:[^"\\]|\\(?:['"\bfnrtv]|[^'"\bfnrtv0-9xu]|0|x[0-9a-fA-F][0-9a-fA-F]|(?:u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])))*)\\$/,
- type: tokenTypes.String,
- postContinueState: this.ContinueState.DoubleQuoteString
- }, {
- name: "doubleQuoteStringEndAction",
- pattern: /^(?:(?:[^"\\]|\\(?:['"\bfnrtv]|[^'"\bfnrtv0-9xu]|0|x[0-9a-fA-F][0-9a-fA-F]|(?:u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])))*")/,
- type: tokenTypes.String,
- preContinueState: this.ContinueState.DoubleQuoteString,
- postContinueState: this.ContinueState.None
- }, {
- name: "doubleQuoteStringMiddleAction",
- pattern: /^(?:(?:[^"\\]|\\(?:['"\bfnrtv]|[^'"\bfnrtv0-9xu]|0|x[0-9a-fA-F][0-9a-fA-F]|(?:u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])))*)\\$/,
- type: tokenTypes.String,
- preContinueState: this.ContinueState.DoubleQuoteString
- }, {
- name: "keywordAction",
- pattern: /^(?:(?:[a-zA-Z]|[$_]|\\(?:u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]))(?:(?:[a-zA-Z]|[$_]|\\(?:u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]))|[0-9])*)/,
- keywords: keywords,
- type: tokenTypes.Keyword,
- postLexState: this.LexState.Initial
- }, {
- name: "identAction",
- pattern: /^(?:(?:[a-zA-Z]|[$_]|\\(?:u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]))(?:(?:[a-zA-Z]|[$_]|\\(?:u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]))|[0-9])*)\s*/,
- postLexState: this.LexState.DivisionAllowed
- }, {
- name: "rightParenAction",
- pattern: /^\)\s*/,
- postLexState: this.LexState.DivisionAllowed
- }, {
- name: "punctuatorAction",
- pattern: /^(?:<=|>=|===|==|!=|!==|\+\+|\-\-|<<|>>|>>>|&&|\|\||\+=|\-=|\*=|%=|<<=|>>=|>>>=|&=|\|=|^=|[\s{}\(\[\]\.;,<>\+\-\*%&\|\^!~\?:=])/,
- postLexState: this.LexState.Initial
- }, {
- name: "divPunctuatorAction",
- pattern: /^(?:\/=?)/,
- preLexState: this.LexState.DivisionAllowed,
- postLexState: this.LexState.Initial
- }, {
- name: "regExpLiteralAction",
- pattern: /^(?:\/(?:(?:\\.)|[^\\*\/])(?:(?:\\.)|[^\\\/])*\/(?:(?:[a-zA-Z]|[$_]|\\(?:u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]))|[0-9])*)/,
- type: tokenTypes.String,
- postLexState: this.LexState.Initial
- }, {
- name: "regExpStartAction",
- pattern: /^(?:\/(?:(?:\\.)|[^\\*\/])(?:(?:\\.)|[^\\\/])*)\\$/,
- type: tokenTypes.String,
- postContinueState: this.ContinueState.RegExp
- }, {
- name: "regExpEndAction",
- pattern: /^(?:(?:(?:\\.)|[^\\\/])*\/(?:(?:[a-zA-Z]|[$_]|\\(?:u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]))|[0-9])*)/,
- type: tokenTypes.String,
- preContinueState: this.ContinueState.RegExp,
- postContinueState: this.ContinueState.None
- }, {
- name: "regExpMiddleAction",
- pattern: /^(?:(?:(?:\\.)|[^\\\/])*)\\$/,
- type: tokenTypes.String,
- preContinueState: this.ContinueState.RegExp
- }, {
- name: "whitespace",
- pattern: /^\s+$/
- }];
-}
-
-WebInspector.JavaScriptHighlighterScheme.prototype = {
- reset: function(highlighter)
- {
- highlighter.lexState = this.LexState.Initial;
- highlighter.continueState = this.ContinueState.None;
- }
-}
diff --git a/WebCore/inspector/front-end/JavaScriptTokenizer.js b/WebCore/inspector/front-end/JavaScriptTokenizer.js
new file mode 100644
index 0000000..a178a10
--- /dev/null
+++ b/WebCore/inspector/front-end/JavaScriptTokenizer.js
@@ -0,0 +1,2434 @@
+/* Generated by re2c 0.13.5 on Fri Jan 8 14:49:18 2010 */
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// Generate js file as follows:
+//
+// re2c -isc WebCore/inspector/front-end/JavaScriptTokenizer.re2js \
+// | sed 's|^yy\([^:]*\)*\:|case \1:|' \
+// | sed 's|[*]cursor[+][+]|this._charAt(cursor++)|' \
+// | sed 's|[[*][+][+]cursor|this._charAt(++cursor)|' \
+// | sed 's|[*]cursor|this._charAt(cursor)|' \
+// | sed 's|yych = \*\([^;]*\)|yych = this._charAt\1|' \
+// | sed 's|{ gotoCase = \([^; continue; };]*\)|{ gotoCase = \1; continue; }|' \
+// | sed 's|unsigned\ int|var|' \
+// | sed 's|var\ yych|case 1: case 1: var yych|'
+
+WebInspector.JavaScriptTokenizer = function()
+{
+ this._tokens = [];
+ this._keywords = [
+ "null", "true", "false", "break", "case", "catch", "const", "default", "finally", "for",
+ "instanceof", "new", "var", "continue", "function", "return", "void", "delete", "if",
+ "this", "do", "while", "else", "in", "switch", "throw", "try", "typeof", "debugger",
+ "class", "enum", "export", "extends", "import", "super", "get", "set"
+ ].keySet();
+
+ this._conditions = {
+ DIV: 0,
+ NODIV: 1,
+ COMMENT: 2,
+ DSTRING: 3,
+ SSTRING: 4,
+ REGEX: 5
+ };
+
+ this.case_DIV = 1000;
+ this.case_NODIV = 1001;
+ this.case_COMMENT = 1002;
+ this.case_DSTRING = 1003;
+ this.case_SSTRING = 1004;
+ this.case_REGEX = 1005;
+
+ this.initialCondition = this._conditions.NODIV;
+ this.condition = this.initialCondition;
+}
+
+WebInspector.JavaScriptTokenizer.prototype = {
+
+ set line(line) {
+ this._line = line;
+ },
+
+ getCondition: function()
+ {
+ return this.condition;
+ },
+
+ setCondition: function(condition)
+ {
+ this.condition = condition;
+ },
+
+ _charAt: function(cursor)
+ {
+ return cursor < this._line.length ? this._line.charAt(cursor) : "\n";
+ },
+
+ nextToken: function(cursor)
+ {
+ var cursorOnEnter = cursor;
+ var gotoCase = 1;
+ while (1) {
+ switch (gotoCase)
+ // Following comment is replaced with generated state machine.
+
+ {
+ case 1: var yych;
+ var yyaccept = 0;
+ if (this.getCondition() < 3) {
+ if (this.getCondition() < 1) {
+ { gotoCase = this.case_DIV; continue; };
+ } else {
+ if (this.getCondition() < 2) {
+ { gotoCase = this.case_NODIV; continue; };
+ } else {
+ { gotoCase = this.case_COMMENT; continue; };
+ }
+ }
+ } else {
+ if (this.getCondition() < 4) {
+ { gotoCase = this.case_DSTRING; continue; };
+ } else {
+ if (this.getCondition() < 5) {
+ { gotoCase = this.case_SSTRING; continue; };
+ } else {
+ { gotoCase = this.case_REGEX; continue; };
+ }
+ }
+ }
+/* *********************************** */
+case this.case_COMMENT:
+
+ yych = this._charAt(cursor);
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 4; continue; };
+ { gotoCase = 3; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 4; continue; };
+ if (yych == '*') { gotoCase = 6; continue; };
+ { gotoCase = 3; continue; };
+ }
+case 2:
+ { this.tokenType = "comment"; return cursor; }
+case 3:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ { gotoCase = 12; continue; };
+case 4:
+ ++cursor;
+ { this.tokenType = null; return cursor; }
+case 6:
+ yyaccept = 1;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych == '*') { gotoCase = 9; continue; };
+ if (yych != '/') { gotoCase = 11; continue; };
+case 7:
+ ++cursor;
+ this.setCondition(this._conditions.NODIV);
+ { this.tokenType = "comment"; return cursor; }
+case 9:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '*') { gotoCase = 9; continue; };
+ if (yych == '/') { gotoCase = 7; continue; };
+case 11:
+ yyaccept = 0;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+case 12:
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 2; continue; };
+ { gotoCase = 11; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 2; continue; };
+ if (yych == '*') { gotoCase = 9; continue; };
+ { gotoCase = 11; continue; };
+ }
+/* *********************************** */
+case this.case_DIV:
+ yych = this._charAt(cursor);
+ if (yych <= '9') {
+ if (yych <= '(') {
+ if (yych <= '#') {
+ if (yych <= ' ') { gotoCase = 15; continue; };
+ if (yych <= '!') { gotoCase = 17; continue; };
+ if (yych <= '"') { gotoCase = 19; continue; };
+ } else {
+ if (yych <= '%') {
+ if (yych <= '$') { gotoCase = 20; continue; };
+ { gotoCase = 22; continue; };
+ } else {
+ if (yych <= '&') { gotoCase = 23; continue; };
+ if (yych <= '\'') { gotoCase = 24; continue; };
+ { gotoCase = 25; continue; };
+ }
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= ')') { gotoCase = 26; continue; };
+ if (yych <= '*') { gotoCase = 28; continue; };
+ if (yych <= '+') { gotoCase = 29; continue; };
+ { gotoCase = 25; continue; };
+ } else {
+ if (yych <= '.') {
+ if (yych <= '-') { gotoCase = 30; continue; };
+ { gotoCase = 31; continue; };
+ } else {
+ if (yych <= '/') { gotoCase = 32; continue; };
+ if (yych <= '0') { gotoCase = 34; continue; };
+ { gotoCase = 36; continue; };
+ }
+ }
+ }
+ } else {
+ if (yych <= '\\') {
+ if (yych <= '>') {
+ if (yych <= ';') { gotoCase = 25; continue; };
+ if (yych <= '<') { gotoCase = 37; continue; };
+ if (yych <= '=') { gotoCase = 38; continue; };
+ { gotoCase = 39; continue; };
+ } else {
+ if (yych <= '@') {
+ if (yych <= '?') { gotoCase = 25; continue; };
+ } else {
+ if (yych <= 'Z') { gotoCase = 20; continue; };
+ if (yych <= '[') { gotoCase = 25; continue; };
+ { gotoCase = 40; continue; };
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '^') {
+ if (yych <= ']') { gotoCase = 25; continue; };
+ { gotoCase = 41; continue; };
+ } else {
+ if (yych != '`') { gotoCase = 20; continue; };
+ }
+ } else {
+ if (yych <= '|') {
+ if (yych <= '{') { gotoCase = 25; continue; };
+ { gotoCase = 42; continue; };
+ } else {
+ if (yych <= '~') { gotoCase = 25; continue; };
+ if (yych >= 0x80) { gotoCase = 20; continue; };
+ }
+ }
+ }
+ }
+case 15:
+ ++cursor;
+case 16:
+ { this.tokenType = null; return cursor; }
+case 17:
+ ++cursor;
+ if ((yych = this._charAt(cursor)) == '=') { gotoCase = 115; continue; };
+case 18:
+ this.setCondition(this._conditions.NODIV);
+ { this.tokenType = null; return cursor; }
+case 19:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych == '\n') { gotoCase = 16; continue; };
+ if (yych == '\r') { gotoCase = 16; continue; };
+ { gotoCase = 107; continue; };
+case 20:
+ yyaccept = 1;
+ yych = this._charAt(YYMARKER = ++cursor);
+ { gotoCase = 50; continue; };
+case 21:
+ {
+ var token = this._line.substring(cursorOnEnter, cursor);
+ if (token in this._keywords)
+ this.tokenType = "keyword";
+ else
+ this.tokenType = null;
+ return cursor;
+ }
+case 22:
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 43; continue; };
+ { gotoCase = 18; continue; };
+case 23:
+ yych = this._charAt(++cursor);
+ if (yych == '&') { gotoCase = 43; continue; };
+ if (yych == '=') { gotoCase = 43; continue; };
+ { gotoCase = 18; continue; };
+case 24:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych == '\n') { gotoCase = 16; continue; };
+ if (yych == '\r') { gotoCase = 16; continue; };
+ { gotoCase = 96; continue; };
+case 25:
+ yych = this._charAt(++cursor);
+ { gotoCase = 18; continue; };
+case 26:
+ ++cursor;
+ { this.tokenType = null; return cursor; }
+case 28:
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 43; continue; };
+ { gotoCase = 18; continue; };
+case 29:
+ yych = this._charAt(++cursor);
+ if (yych == '+') { gotoCase = 43; continue; };
+ if (yych == '=') { gotoCase = 43; continue; };
+ { gotoCase = 18; continue; };
+case 30:
+ yych = this._charAt(++cursor);
+ if (yych == '-') { gotoCase = 43; continue; };
+ if (yych == '=') { gotoCase = 43; continue; };
+ { gotoCase = 18; continue; };
+case 31:
+ yych = this._charAt(++cursor);
+ if (yych <= '/') { gotoCase = 18; continue; };
+ if (yych <= '9') { gotoCase = 89; continue; };
+ { gotoCase = 18; continue; };
+case 32:
+ yyaccept = 2;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych <= '.') {
+ if (yych == '*') { gotoCase = 78; continue; };
+ } else {
+ if (yych <= '/') { gotoCase = 80; continue; };
+ if (yych == '=') { gotoCase = 77; continue; };
+ }
+case 33:
+ this.setCondition(this._conditions.NODIV);
+ { this.tokenType = null; return cursor; }
+case 34:
+ yyaccept = 3;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych <= 'E') {
+ if (yych <= '/') {
+ if (yych == '.') { gotoCase = 63; continue; };
+ } else {
+ if (yych <= '7') { gotoCase = 72; continue; };
+ if (yych >= 'E') { gotoCase = 62; continue; };
+ }
+ } else {
+ if (yych <= 'd') {
+ if (yych == 'X') { gotoCase = 74; continue; };
+ } else {
+ if (yych <= 'e') { gotoCase = 62; continue; };
+ if (yych == 'x') { gotoCase = 74; continue; };
+ }
+ }
+case 35:
+ { this.tokenType = "number"; return cursor; }
+case 36:
+ yyaccept = 3;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych <= '9') {
+ if (yych == '.') { gotoCase = 63; continue; };
+ if (yych <= '/') { gotoCase = 35; continue; };
+ { gotoCase = 60; continue; };
+ } else {
+ if (yych <= 'E') {
+ if (yych <= 'D') { gotoCase = 35; continue; };
+ { gotoCase = 62; continue; };
+ } else {
+ if (yych == 'e') { gotoCase = 62; continue; };
+ { gotoCase = 35; continue; };
+ }
+ }
+case 37:
+ yych = this._charAt(++cursor);
+ if (yych <= ';') { gotoCase = 18; continue; };
+ if (yych <= '<') { gotoCase = 59; continue; };
+ if (yych <= '=') { gotoCase = 43; continue; };
+ { gotoCase = 18; continue; };
+case 38:
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 58; continue; };
+ { gotoCase = 18; continue; };
+case 39:
+ yych = this._charAt(++cursor);
+ if (yych <= '<') { gotoCase = 18; continue; };
+ if (yych <= '=') { gotoCase = 43; continue; };
+ if (yych <= '>') { gotoCase = 56; continue; };
+ { gotoCase = 18; continue; };
+case 40:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych == 'u') { gotoCase = 44; continue; };
+ { gotoCase = 16; continue; };
+case 41:
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 43; continue; };
+ { gotoCase = 18; continue; };
+case 42:
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 43; continue; };
+ if (yych != '|') { gotoCase = 18; continue; };
+case 43:
+ yych = this._charAt(++cursor);
+ { gotoCase = 18; continue; };
+case 44:
+ yych = this._charAt(++cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych <= '9') { gotoCase = 46; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 46; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych <= 'f') { gotoCase = 46; continue; };
+ }
+case 45:
+ cursor = YYMARKER;
+ if (yyaccept <= 1) {
+ if (yyaccept <= 0) {
+ { gotoCase = 16; continue; };
+ } else {
+ { gotoCase = 21; continue; };
+ }
+ } else {
+ if (yyaccept <= 2) {
+ { gotoCase = 33; continue; };
+ } else {
+ { gotoCase = 35; continue; };
+ }
+ }
+case 46:
+ yych = this._charAt(++cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych >= ':') { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 47; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych >= 'g') { gotoCase = 45; continue; };
+ }
+case 47:
+ yych = this._charAt(++cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych >= ':') { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 48; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych >= 'g') { gotoCase = 45; continue; };
+ }
+case 48:
+ yych = this._charAt(++cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych >= ':') { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 49; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych >= 'g') { gotoCase = 45; continue; };
+ }
+case 49:
+ yyaccept = 1;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+case 50:
+ if (yych <= '[') {
+ if (yych <= '/') {
+ if (yych == '$') { gotoCase = 49; continue; };
+ { gotoCase = 21; continue; };
+ } else {
+ if (yych <= '9') { gotoCase = 49; continue; };
+ if (yych <= '@') { gotoCase = 21; continue; };
+ if (yych <= 'Z') { gotoCase = 49; continue; };
+ { gotoCase = 21; continue; };
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= '\\') { gotoCase = 51; continue; };
+ if (yych <= '^') { gotoCase = 21; continue; };
+ { gotoCase = 49; continue; };
+ } else {
+ if (yych <= '`') { gotoCase = 21; continue; };
+ if (yych <= 'z') { gotoCase = 49; continue; };
+ if (yych <= 0x7F) { gotoCase = 21; continue; };
+ { gotoCase = 49; continue; };
+ }
+ }
+case 51:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych != 'u') { gotoCase = 45; continue; };
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych >= ':') { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 53; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych >= 'g') { gotoCase = 45; continue; };
+ }
+case 53:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych >= ':') { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 54; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych >= 'g') { gotoCase = 45; continue; };
+ }
+case 54:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych >= ':') { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 55; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych >= 'g') { gotoCase = 45; continue; };
+ }
+case 55:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych <= '9') { gotoCase = 49; continue; };
+ { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 49; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych <= 'f') { gotoCase = 49; continue; };
+ { gotoCase = 45; continue; };
+ }
+case 56:
+ yych = this._charAt(++cursor);
+ if (yych <= '<') { gotoCase = 18; continue; };
+ if (yych <= '=') { gotoCase = 43; continue; };
+ if (yych >= '?') { gotoCase = 18; continue; };
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 43; continue; };
+ { gotoCase = 18; continue; };
+case 58:
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 43; continue; };
+ { gotoCase = 18; continue; };
+case 59:
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 43; continue; };
+ { gotoCase = 18; continue; };
+case 60:
+ yyaccept = 3;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '9') {
+ if (yych == '.') { gotoCase = 63; continue; };
+ if (yych <= '/') { gotoCase = 35; continue; };
+ { gotoCase = 60; continue; };
+ } else {
+ if (yych <= 'E') {
+ if (yych <= 'D') { gotoCase = 35; continue; };
+ } else {
+ if (yych != 'e') { gotoCase = 35; continue; };
+ }
+ }
+case 62:
+ yych = this._charAt(++cursor);
+ if (yych <= ',') {
+ if (yych == '+') { gotoCase = 69; continue; };
+ { gotoCase = 45; continue; };
+ } else {
+ if (yych <= '-') { gotoCase = 69; continue; };
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych <= '9') { gotoCase = 70; continue; };
+ { gotoCase = 45; continue; };
+ }
+case 63:
+ yyaccept = 3;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= 'D') {
+ if (yych <= '/') { gotoCase = 35; continue; };
+ if (yych <= '9') { gotoCase = 63; continue; };
+ { gotoCase = 35; continue; };
+ } else {
+ if (yych <= 'E') { gotoCase = 65; continue; };
+ if (yych != 'e') { gotoCase = 35; continue; };
+ }
+case 65:
+ yych = this._charAt(++cursor);
+ if (yych <= ',') {
+ if (yych != '+') { gotoCase = 45; continue; };
+ } else {
+ if (yych <= '-') { gotoCase = 66; continue; };
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych <= '9') { gotoCase = 67; continue; };
+ { gotoCase = 45; continue; };
+ }
+case 66:
+ yych = this._charAt(++cursor);
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych >= ':') { gotoCase = 45; continue; };
+case 67:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '/') { gotoCase = 35; continue; };
+ if (yych <= '9') { gotoCase = 67; continue; };
+ { gotoCase = 35; continue; };
+case 69:
+ yych = this._charAt(++cursor);
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych >= ':') { gotoCase = 45; continue; };
+case 70:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '/') { gotoCase = 35; continue; };
+ if (yych <= '9') { gotoCase = 70; continue; };
+ { gotoCase = 35; continue; };
+case 72:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '/') { gotoCase = 35; continue; };
+ if (yych <= '7') { gotoCase = 72; continue; };
+ { gotoCase = 35; continue; };
+case 74:
+ yych = this._charAt(++cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych >= ':') { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 75; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych >= 'g') { gotoCase = 45; continue; };
+ }
+case 75:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 35; continue; };
+ if (yych <= '9') { gotoCase = 75; continue; };
+ { gotoCase = 35; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 75; continue; };
+ if (yych <= '`') { gotoCase = 35; continue; };
+ if (yych <= 'f') { gotoCase = 75; continue; };
+ { gotoCase = 35; continue; };
+ }
+case 77:
+ yych = this._charAt(++cursor);
+ { gotoCase = 33; continue; };
+case 78:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 85; continue; };
+ { gotoCase = 78; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 85; continue; };
+ if (yych == '*') { gotoCase = 83; continue; };
+ { gotoCase = 78; continue; };
+ }
+case 80:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '\n') { gotoCase = 82; continue; };
+ if (yych != '\r') { gotoCase = 80; continue; };
+case 82:
+ { this.tokenType = "comment"; return cursor; }
+case 83:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '*') { gotoCase = 83; continue; };
+ if (yych == '/') { gotoCase = 87; continue; };
+ { gotoCase = 78; continue; };
+case 85:
+ ++cursor;
+ this.setCondition(this._conditions.COMMENT);
+ { this.tokenType = "comment"; return cursor; }
+case 87:
+ ++cursor;
+ { this.tokenType = "comment"; return cursor; }
+case 89:
+ yyaccept = 3;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= 'D') {
+ if (yych <= '/') { gotoCase = 35; continue; };
+ if (yych <= '9') { gotoCase = 89; continue; };
+ { gotoCase = 35; continue; };
+ } else {
+ if (yych <= 'E') { gotoCase = 91; continue; };
+ if (yych != 'e') { gotoCase = 35; continue; };
+ }
+case 91:
+ yych = this._charAt(++cursor);
+ if (yych <= ',') {
+ if (yych != '+') { gotoCase = 45; continue; };
+ } else {
+ if (yych <= '-') { gotoCase = 92; continue; };
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych <= '9') { gotoCase = 93; continue; };
+ { gotoCase = 45; continue; };
+ }
+case 92:
+ yych = this._charAt(++cursor);
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych >= ':') { gotoCase = 45; continue; };
+case 93:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '/') { gotoCase = 35; continue; };
+ if (yych <= '9') { gotoCase = 93; continue; };
+ { gotoCase = 35; continue; };
+case 95:
+ ++cursor;
+ yych = this._charAt(cursor);
+case 96:
+ if (yych <= '\r') {
+ if (yych == '\n') { gotoCase = 45; continue; };
+ if (yych <= '\f') { gotoCase = 95; continue; };
+ { gotoCase = 45; continue; };
+ } else {
+ if (yych <= '\'') {
+ if (yych <= '&') { gotoCase = 95; continue; };
+ { gotoCase = 98; continue; };
+ } else {
+ if (yych != '\\') { gotoCase = 95; continue; };
+ }
+ }
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= 'a') {
+ if (yych <= '!') {
+ if (yych <= '\n') {
+ if (yych <= '\t') { gotoCase = 45; continue; };
+ { gotoCase = 101; continue; };
+ } else {
+ if (yych == '\r') { gotoCase = 101; continue; };
+ { gotoCase = 45; continue; };
+ }
+ } else {
+ if (yych <= '\'') {
+ if (yych <= '"') { gotoCase = 95; continue; };
+ if (yych <= '&') { gotoCase = 45; continue; };
+ { gotoCase = 95; continue; };
+ } else {
+ if (yych == '\\') { gotoCase = 95; continue; };
+ { gotoCase = 45; continue; };
+ }
+ }
+ } else {
+ if (yych <= 'q') {
+ if (yych <= 'f') {
+ if (yych <= 'b') { gotoCase = 95; continue; };
+ if (yych <= 'e') { gotoCase = 45; continue; };
+ { gotoCase = 95; continue; };
+ } else {
+ if (yych == 'n') { gotoCase = 95; continue; };
+ { gotoCase = 45; continue; };
+ }
+ } else {
+ if (yych <= 't') {
+ if (yych == 's') { gotoCase = 45; continue; };
+ { gotoCase = 95; continue; };
+ } else {
+ if (yych <= 'u') { gotoCase = 100; continue; };
+ if (yych <= 'v') { gotoCase = 95; continue; };
+ { gotoCase = 45; continue; };
+ }
+ }
+ }
+case 98:
+ ++cursor;
+ { this.tokenType = "string"; return cursor; }
+case 100:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych <= '9') { gotoCase = 103; continue; };
+ { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 103; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych <= 'f') { gotoCase = 103; continue; };
+ { gotoCase = 45; continue; };
+ }
+case 101:
+ ++cursor;
+ this.setCondition(this._conditions.SSTRING);
+ { this.tokenType = "string"; return cursor; }
+case 103:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych >= ':') { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 104; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych >= 'g') { gotoCase = 45; continue; };
+ }
+case 104:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych >= ':') { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 105; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych >= 'g') { gotoCase = 45; continue; };
+ }
+case 105:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych <= '9') { gotoCase = 95; continue; };
+ { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 95; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych <= 'f') { gotoCase = 95; continue; };
+ { gotoCase = 45; continue; };
+ }
+case 106:
+ ++cursor;
+ yych = this._charAt(cursor);
+case 107:
+ if (yych <= '\r') {
+ if (yych == '\n') { gotoCase = 45; continue; };
+ if (yych <= '\f') { gotoCase = 106; continue; };
+ { gotoCase = 45; continue; };
+ } else {
+ if (yych <= '"') {
+ if (yych <= '!') { gotoCase = 106; continue; };
+ { gotoCase = 98; continue; };
+ } else {
+ if (yych != '\\') { gotoCase = 106; continue; };
+ }
+ }
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= 'a') {
+ if (yych <= '!') {
+ if (yych <= '\n') {
+ if (yych <= '\t') { gotoCase = 45; continue; };
+ { gotoCase = 110; continue; };
+ } else {
+ if (yych == '\r') { gotoCase = 110; continue; };
+ { gotoCase = 45; continue; };
+ }
+ } else {
+ if (yych <= '\'') {
+ if (yych <= '"') { gotoCase = 106; continue; };
+ if (yych <= '&') { gotoCase = 45; continue; };
+ { gotoCase = 106; continue; };
+ } else {
+ if (yych == '\\') { gotoCase = 106; continue; };
+ { gotoCase = 45; continue; };
+ }
+ }
+ } else {
+ if (yych <= 'q') {
+ if (yych <= 'f') {
+ if (yych <= 'b') { gotoCase = 106; continue; };
+ if (yych <= 'e') { gotoCase = 45; continue; };
+ { gotoCase = 106; continue; };
+ } else {
+ if (yych == 'n') { gotoCase = 106; continue; };
+ { gotoCase = 45; continue; };
+ }
+ } else {
+ if (yych <= 't') {
+ if (yych == 's') { gotoCase = 45; continue; };
+ { gotoCase = 106; continue; };
+ } else {
+ if (yych <= 'u') { gotoCase = 109; continue; };
+ if (yych <= 'v') { gotoCase = 106; continue; };
+ { gotoCase = 45; continue; };
+ }
+ }
+ }
+case 109:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych <= '9') { gotoCase = 112; continue; };
+ { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 112; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych <= 'f') { gotoCase = 112; continue; };
+ { gotoCase = 45; continue; };
+ }
+case 110:
+ ++cursor;
+ this.setCondition(this._conditions.DSTRING);
+ { this.tokenType = "string"; return cursor; }
+case 112:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych >= ':') { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 113; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych >= 'g') { gotoCase = 45; continue; };
+ }
+case 113:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych >= ':') { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 114; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych >= 'g') { gotoCase = 45; continue; };
+ }
+case 114:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 45; continue; };
+ if (yych <= '9') { gotoCase = 106; continue; };
+ { gotoCase = 45; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 106; continue; };
+ if (yych <= '`') { gotoCase = 45; continue; };
+ if (yych <= 'f') { gotoCase = 106; continue; };
+ { gotoCase = 45; continue; };
+ }
+case 115:
+ ++cursor;
+ if ((yych = this._charAt(cursor)) == '=') { gotoCase = 43; continue; };
+ { gotoCase = 18; continue; };
+/* *********************************** */
+case this.case_DSTRING:
+ yych = this._charAt(cursor);
+ if (yych <= '\r') {
+ if (yych == '\n') { gotoCase = 120; continue; };
+ if (yych <= '\f') { gotoCase = 119; continue; };
+ { gotoCase = 120; continue; };
+ } else {
+ if (yych <= '"') {
+ if (yych <= '!') { gotoCase = 119; continue; };
+ { gotoCase = 122; continue; };
+ } else {
+ if (yych == '\\') { gotoCase = 124; continue; };
+ { gotoCase = 119; continue; };
+ }
+ }
+case 118:
+ { this.tokenType = "string"; return cursor; }
+case 119:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ { gotoCase = 126; continue; };
+case 120:
+ ++cursor;
+case 121:
+ { this.tokenType = null; return cursor; }
+case 122:
+ ++cursor;
+case 123:
+ this.setCondition(this._conditions.NODIV);
+ { this.tokenType = "string"; return cursor; }
+case 124:
+ yyaccept = 1;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych <= 'e') {
+ if (yych <= '\'') {
+ if (yych == '"') { gotoCase = 125; continue; };
+ if (yych <= '&') { gotoCase = 121; continue; };
+ } else {
+ if (yych <= '\\') {
+ if (yych <= '[') { gotoCase = 121; continue; };
+ } else {
+ if (yych != 'b') { gotoCase = 121; continue; };
+ }
+ }
+ } else {
+ if (yych <= 'r') {
+ if (yych <= 'm') {
+ if (yych >= 'g') { gotoCase = 121; continue; };
+ } else {
+ if (yych <= 'n') { gotoCase = 125; continue; };
+ if (yych <= 'q') { gotoCase = 121; continue; };
+ }
+ } else {
+ if (yych <= 't') {
+ if (yych <= 's') { gotoCase = 121; continue; };
+ } else {
+ if (yych <= 'u') { gotoCase = 127; continue; };
+ if (yych >= 'w') { gotoCase = 121; continue; };
+ }
+ }
+ }
+case 125:
+ yyaccept = 0;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+case 126:
+ if (yych <= '\r') {
+ if (yych == '\n') { gotoCase = 118; continue; };
+ if (yych <= '\f') { gotoCase = 125; continue; };
+ { gotoCase = 118; continue; };
+ } else {
+ if (yych <= '"') {
+ if (yych <= '!') { gotoCase = 125; continue; };
+ { gotoCase = 133; continue; };
+ } else {
+ if (yych == '\\') { gotoCase = 132; continue; };
+ { gotoCase = 125; continue; };
+ }
+ }
+case 127:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 128; continue; };
+ if (yych <= '9') { gotoCase = 129; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 129; continue; };
+ if (yych <= '`') { gotoCase = 128; continue; };
+ if (yych <= 'f') { gotoCase = 129; continue; };
+ }
+case 128:
+ cursor = YYMARKER;
+ if (yyaccept <= 0) {
+ { gotoCase = 118; continue; };
+ } else {
+ { gotoCase = 121; continue; };
+ }
+case 129:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 128; continue; };
+ if (yych >= ':') { gotoCase = 128; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 130; continue; };
+ if (yych <= '`') { gotoCase = 128; continue; };
+ if (yych >= 'g') { gotoCase = 128; continue; };
+ }
+case 130:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 128; continue; };
+ if (yych >= ':') { gotoCase = 128; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 131; continue; };
+ if (yych <= '`') { gotoCase = 128; continue; };
+ if (yych >= 'g') { gotoCase = 128; continue; };
+ }
+case 131:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 128; continue; };
+ if (yych <= '9') { gotoCase = 125; continue; };
+ { gotoCase = 128; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 125; continue; };
+ if (yych <= '`') { gotoCase = 128; continue; };
+ if (yych <= 'f') { gotoCase = 125; continue; };
+ { gotoCase = 128; continue; };
+ }
+case 132:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= 'e') {
+ if (yych <= '\'') {
+ if (yych == '"') { gotoCase = 125; continue; };
+ if (yych <= '&') { gotoCase = 128; continue; };
+ { gotoCase = 125; continue; };
+ } else {
+ if (yych <= '\\') {
+ if (yych <= '[') { gotoCase = 128; continue; };
+ { gotoCase = 125; continue; };
+ } else {
+ if (yych == 'b') { gotoCase = 125; continue; };
+ { gotoCase = 128; continue; };
+ }
+ }
+ } else {
+ if (yych <= 'r') {
+ if (yych <= 'm') {
+ if (yych <= 'f') { gotoCase = 125; continue; };
+ { gotoCase = 128; continue; };
+ } else {
+ if (yych <= 'n') { gotoCase = 125; continue; };
+ if (yych <= 'q') { gotoCase = 128; continue; };
+ { gotoCase = 125; continue; };
+ }
+ } else {
+ if (yych <= 't') {
+ if (yych <= 's') { gotoCase = 128; continue; };
+ { gotoCase = 125; continue; };
+ } else {
+ if (yych <= 'u') { gotoCase = 127; continue; };
+ if (yych <= 'v') { gotoCase = 125; continue; };
+ { gotoCase = 128; continue; };
+ }
+ }
+ }
+case 133:
+ ++cursor;
+ yych = this._charAt(cursor);
+ { gotoCase = 123; continue; };
+/* *********************************** */
+case this.case_NODIV:
+ yych = this._charAt(cursor);
+ if (yych <= '9') {
+ if (yych <= '(') {
+ if (yych <= '#') {
+ if (yych <= ' ') { gotoCase = 136; continue; };
+ if (yych <= '!') { gotoCase = 138; continue; };
+ if (yych <= '"') { gotoCase = 140; continue; };
+ } else {
+ if (yych <= '%') {
+ if (yych <= '$') { gotoCase = 141; continue; };
+ { gotoCase = 143; continue; };
+ } else {
+ if (yych <= '&') { gotoCase = 144; continue; };
+ if (yych <= '\'') { gotoCase = 145; continue; };
+ { gotoCase = 146; continue; };
+ }
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= ')') { gotoCase = 147; continue; };
+ if (yych <= '*') { gotoCase = 149; continue; };
+ if (yych <= '+') { gotoCase = 150; continue; };
+ { gotoCase = 146; continue; };
+ } else {
+ if (yych <= '.') {
+ if (yych <= '-') { gotoCase = 151; continue; };
+ { gotoCase = 152; continue; };
+ } else {
+ if (yych <= '/') { gotoCase = 153; continue; };
+ if (yych <= '0') { gotoCase = 154; continue; };
+ { gotoCase = 156; continue; };
+ }
+ }
+ }
+ } else {
+ if (yych <= '\\') {
+ if (yych <= '>') {
+ if (yych <= ';') { gotoCase = 146; continue; };
+ if (yych <= '<') { gotoCase = 157; continue; };
+ if (yych <= '=') { gotoCase = 158; continue; };
+ { gotoCase = 159; continue; };
+ } else {
+ if (yych <= '@') {
+ if (yych <= '?') { gotoCase = 146; continue; };
+ } else {
+ if (yych <= 'Z') { gotoCase = 141; continue; };
+ if (yych <= '[') { gotoCase = 146; continue; };
+ { gotoCase = 160; continue; };
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '^') {
+ if (yych <= ']') { gotoCase = 146; continue; };
+ { gotoCase = 161; continue; };
+ } else {
+ if (yych != '`') { gotoCase = 141; continue; };
+ }
+ } else {
+ if (yych <= '|') {
+ if (yych <= '{') { gotoCase = 146; continue; };
+ { gotoCase = 162; continue; };
+ } else {
+ if (yych <= '~') { gotoCase = 146; continue; };
+ if (yych >= 0x80) { gotoCase = 141; continue; };
+ }
+ }
+ }
+ }
+case 136:
+ ++cursor;
+case 137:
+ { this.tokenType = null; return cursor; }
+case 138:
+ ++cursor;
+ if ((yych = this._charAt(cursor)) == '=') { gotoCase = 260; continue; };
+case 139:
+ { this.tokenType = null; return cursor; }
+case 140:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych == '\n') { gotoCase = 137; continue; };
+ if (yych == '\r') { gotoCase = 137; continue; };
+ { gotoCase = 252; continue; };
+case 141:
+ yyaccept = 1;
+ yych = this._charAt(YYMARKER = ++cursor);
+ { gotoCase = 170; continue; };
+case 142:
+ this.setCondition(this._conditions.DIV);
+ {
+ var token = this._line.substring(cursorOnEnter, cursor);
+ if (token in this._keywords)
+ this.tokenType = "keyword";
+ else
+ this.tokenType = null;
+ return cursor;
+ }
+case 143:
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 163; continue; };
+ { gotoCase = 139; continue; };
+case 144:
+ yych = this._charAt(++cursor);
+ if (yych == '&') { gotoCase = 163; continue; };
+ if (yych == '=') { gotoCase = 163; continue; };
+ { gotoCase = 139; continue; };
+case 145:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych == '\n') { gotoCase = 137; continue; };
+ if (yych == '\r') { gotoCase = 137; continue; };
+ { gotoCase = 241; continue; };
+case 146:
+ yych = this._charAt(++cursor);
+ { gotoCase = 139; continue; };
+case 147:
+ ++cursor;
+ this.setCondition(this._conditions.DIV);
+ { this.tokenType = null; return cursor; }
+case 149:
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 163; continue; };
+ { gotoCase = 139; continue; };
+case 150:
+ yych = this._charAt(++cursor);
+ if (yych == '+') { gotoCase = 163; continue; };
+ if (yych == '=') { gotoCase = 163; continue; };
+ { gotoCase = 139; continue; };
+case 151:
+ yych = this._charAt(++cursor);
+ if (yych == '-') { gotoCase = 163; continue; };
+ if (yych == '=') { gotoCase = 163; continue; };
+ { gotoCase = 139; continue; };
+case 152:
+ yych = this._charAt(++cursor);
+ if (yych <= '/') { gotoCase = 139; continue; };
+ if (yych <= '9') { gotoCase = 234; continue; };
+ { gotoCase = 139; continue; };
+case 153:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych <= '*') {
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 137; continue; };
+ { gotoCase = 197; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 137; continue; };
+ if (yych <= ')') { gotoCase = 197; continue; };
+ { gotoCase = 202; continue; };
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych == '/') { gotoCase = 204; continue; };
+ { gotoCase = 197; continue; };
+ } else {
+ if (yych <= '[') { gotoCase = 200; continue; };
+ if (yych <= '\\') { gotoCase = 199; continue; };
+ if (yych <= ']') { gotoCase = 137; continue; };
+ { gotoCase = 197; continue; };
+ }
+ }
+case 154:
+ yyaccept = 2;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych <= 'E') {
+ if (yych <= '/') {
+ if (yych == '.') { gotoCase = 183; continue; };
+ } else {
+ if (yych <= '7') { gotoCase = 192; continue; };
+ if (yych >= 'E') { gotoCase = 182; continue; };
+ }
+ } else {
+ if (yych <= 'd') {
+ if (yych == 'X') { gotoCase = 194; continue; };
+ } else {
+ if (yych <= 'e') { gotoCase = 182; continue; };
+ if (yych == 'x') { gotoCase = 194; continue; };
+ }
+ }
+case 155:
+ this.setCondition(this._conditions.DIV);
+ { this.tokenType = "number"; return cursor; }
+case 156:
+ yyaccept = 2;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych <= '9') {
+ if (yych == '.') { gotoCase = 183; continue; };
+ if (yych <= '/') { gotoCase = 155; continue; };
+ { gotoCase = 180; continue; };
+ } else {
+ if (yych <= 'E') {
+ if (yych <= 'D') { gotoCase = 155; continue; };
+ { gotoCase = 182; continue; };
+ } else {
+ if (yych == 'e') { gotoCase = 182; continue; };
+ { gotoCase = 155; continue; };
+ }
+ }
+case 157:
+ yych = this._charAt(++cursor);
+ if (yych <= ';') { gotoCase = 139; continue; };
+ if (yych <= '<') { gotoCase = 179; continue; };
+ if (yych <= '=') { gotoCase = 163; continue; };
+ { gotoCase = 139; continue; };
+case 158:
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 178; continue; };
+ { gotoCase = 139; continue; };
+case 159:
+ yych = this._charAt(++cursor);
+ if (yych <= '<') { gotoCase = 139; continue; };
+ if (yych <= '=') { gotoCase = 163; continue; };
+ if (yych <= '>') { gotoCase = 176; continue; };
+ { gotoCase = 139; continue; };
+case 160:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych == 'u') { gotoCase = 164; continue; };
+ { gotoCase = 137; continue; };
+case 161:
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 163; continue; };
+ { gotoCase = 139; continue; };
+case 162:
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 163; continue; };
+ if (yych != '|') { gotoCase = 139; continue; };
+case 163:
+ yych = this._charAt(++cursor);
+ { gotoCase = 139; continue; };
+case 164:
+ yych = this._charAt(++cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych <= '9') { gotoCase = 166; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 166; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych <= 'f') { gotoCase = 166; continue; };
+ }
+case 165:
+ cursor = YYMARKER;
+ if (yyaccept <= 1) {
+ if (yyaccept <= 0) {
+ { gotoCase = 137; continue; };
+ } else {
+ { gotoCase = 142; continue; };
+ }
+ } else {
+ if (yyaccept <= 2) {
+ { gotoCase = 155; continue; };
+ } else {
+ { gotoCase = 217; continue; };
+ }
+ }
+case 166:
+ yych = this._charAt(++cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych >= ':') { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 167; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych >= 'g') { gotoCase = 165; continue; };
+ }
+case 167:
+ yych = this._charAt(++cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych >= ':') { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 168; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych >= 'g') { gotoCase = 165; continue; };
+ }
+case 168:
+ yych = this._charAt(++cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych >= ':') { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 169; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych >= 'g') { gotoCase = 165; continue; };
+ }
+case 169:
+ yyaccept = 1;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+case 170:
+ if (yych <= '[') {
+ if (yych <= '/') {
+ if (yych == '$') { gotoCase = 169; continue; };
+ { gotoCase = 142; continue; };
+ } else {
+ if (yych <= '9') { gotoCase = 169; continue; };
+ if (yych <= '@') { gotoCase = 142; continue; };
+ if (yych <= 'Z') { gotoCase = 169; continue; };
+ { gotoCase = 142; continue; };
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= '\\') { gotoCase = 171; continue; };
+ if (yych <= '^') { gotoCase = 142; continue; };
+ { gotoCase = 169; continue; };
+ } else {
+ if (yych <= '`') { gotoCase = 142; continue; };
+ if (yych <= 'z') { gotoCase = 169; continue; };
+ if (yych <= 0x7F) { gotoCase = 142; continue; };
+ { gotoCase = 169; continue; };
+ }
+ }
+case 171:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych != 'u') { gotoCase = 165; continue; };
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych >= ':') { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 173; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych >= 'g') { gotoCase = 165; continue; };
+ }
+case 173:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych >= ':') { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 174; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych >= 'g') { gotoCase = 165; continue; };
+ }
+case 174:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych >= ':') { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 175; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych >= 'g') { gotoCase = 165; continue; };
+ }
+case 175:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych <= '9') { gotoCase = 169; continue; };
+ { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 169; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych <= 'f') { gotoCase = 169; continue; };
+ { gotoCase = 165; continue; };
+ }
+case 176:
+ yych = this._charAt(++cursor);
+ if (yych <= '<') { gotoCase = 139; continue; };
+ if (yych <= '=') { gotoCase = 163; continue; };
+ if (yych >= '?') { gotoCase = 139; continue; };
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 163; continue; };
+ { gotoCase = 139; continue; };
+case 178:
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 163; continue; };
+ { gotoCase = 139; continue; };
+case 179:
+ yych = this._charAt(++cursor);
+ if (yych == '=') { gotoCase = 163; continue; };
+ { gotoCase = 139; continue; };
+case 180:
+ yyaccept = 2;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '9') {
+ if (yych == '.') { gotoCase = 183; continue; };
+ if (yych <= '/') { gotoCase = 155; continue; };
+ { gotoCase = 180; continue; };
+ } else {
+ if (yych <= 'E') {
+ if (yych <= 'D') { gotoCase = 155; continue; };
+ } else {
+ if (yych != 'e') { gotoCase = 155; continue; };
+ }
+ }
+case 182:
+ yych = this._charAt(++cursor);
+ if (yych <= ',') {
+ if (yych == '+') { gotoCase = 189; continue; };
+ { gotoCase = 165; continue; };
+ } else {
+ if (yych <= '-') { gotoCase = 189; continue; };
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych <= '9') { gotoCase = 190; continue; };
+ { gotoCase = 165; continue; };
+ }
+case 183:
+ yyaccept = 2;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= 'D') {
+ if (yych <= '/') { gotoCase = 155; continue; };
+ if (yych <= '9') { gotoCase = 183; continue; };
+ { gotoCase = 155; continue; };
+ } else {
+ if (yych <= 'E') { gotoCase = 185; continue; };
+ if (yych != 'e') { gotoCase = 155; continue; };
+ }
+case 185:
+ yych = this._charAt(++cursor);
+ if (yych <= ',') {
+ if (yych != '+') { gotoCase = 165; continue; };
+ } else {
+ if (yych <= '-') { gotoCase = 186; continue; };
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych <= '9') { gotoCase = 187; continue; };
+ { gotoCase = 165; continue; };
+ }
+case 186:
+ yych = this._charAt(++cursor);
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych >= ':') { gotoCase = 165; continue; };
+case 187:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '/') { gotoCase = 155; continue; };
+ if (yych <= '9') { gotoCase = 187; continue; };
+ { gotoCase = 155; continue; };
+case 189:
+ yych = this._charAt(++cursor);
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych >= ':') { gotoCase = 165; continue; };
+case 190:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '/') { gotoCase = 155; continue; };
+ if (yych <= '9') { gotoCase = 190; continue; };
+ { gotoCase = 155; continue; };
+case 192:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '/') { gotoCase = 155; continue; };
+ if (yych <= '7') { gotoCase = 192; continue; };
+ { gotoCase = 155; continue; };
+case 194:
+ yych = this._charAt(++cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych >= ':') { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 195; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych >= 'g') { gotoCase = 165; continue; };
+ }
+case 195:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 155; continue; };
+ if (yych <= '9') { gotoCase = 195; continue; };
+ { gotoCase = 155; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 195; continue; };
+ if (yych <= '`') { gotoCase = 155; continue; };
+ if (yych <= 'f') { gotoCase = 195; continue; };
+ { gotoCase = 155; continue; };
+ }
+case 197:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '.') {
+ if (yych <= '\n') {
+ if (yych <= '\t') { gotoCase = 197; continue; };
+ { gotoCase = 165; continue; };
+ } else {
+ if (yych == '\r') { gotoCase = 165; continue; };
+ { gotoCase = 197; continue; };
+ }
+ } else {
+ if (yych <= '[') {
+ if (yych <= '/') { gotoCase = 220; continue; };
+ if (yych <= 'Z') { gotoCase = 197; continue; };
+ { gotoCase = 228; continue; };
+ } else {
+ if (yych <= '\\') { gotoCase = 227; continue; };
+ if (yych <= ']') { gotoCase = 165; continue; };
+ { gotoCase = 197; continue; };
+ }
+ }
+case 199:
+ yych = this._charAt(++cursor);
+ if (yych == '\n') { gotoCase = 165; continue; };
+ if (yych == '\r') { gotoCase = 165; continue; };
+ { gotoCase = 197; continue; };
+case 200:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '*') {
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 165; continue; };
+ { gotoCase = 200; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 165; continue; };
+ if (yych <= ')') { gotoCase = 200; continue; };
+ { gotoCase = 165; continue; };
+ }
+ } else {
+ if (yych <= '[') {
+ if (yych == '/') { gotoCase = 165; continue; };
+ { gotoCase = 200; continue; };
+ } else {
+ if (yych <= '\\') { gotoCase = 215; continue; };
+ if (yych <= ']') { gotoCase = 213; continue; };
+ { gotoCase = 200; continue; };
+ }
+ }
+case 202:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 209; continue; };
+ { gotoCase = 202; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 209; continue; };
+ if (yych == '*') { gotoCase = 207; continue; };
+ { gotoCase = 202; continue; };
+ }
+case 204:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '\n') { gotoCase = 206; continue; };
+ if (yych != '\r') { gotoCase = 204; continue; };
+case 206:
+ { this.tokenType = "comment"; return cursor; }
+case 207:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '*') { gotoCase = 207; continue; };
+ if (yych == '/') { gotoCase = 211; continue; };
+ { gotoCase = 202; continue; };
+case 209:
+ ++cursor;
+ this.setCondition(this._conditions.COMMENT);
+ { this.tokenType = "comment"; return cursor; }
+case 211:
+ ++cursor;
+ { this.tokenType = "comment"; return cursor; }
+case 213:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '*') {
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 165; continue; };
+ { gotoCase = 213; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 165; continue; };
+ if (yych <= ')') { gotoCase = 213; continue; };
+ { gotoCase = 197; continue; };
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych == '/') { gotoCase = 220; continue; };
+ { gotoCase = 213; continue; };
+ } else {
+ if (yych <= '[') { gotoCase = 218; continue; };
+ if (yych <= '\\') { gotoCase = 216; continue; };
+ { gotoCase = 213; continue; };
+ }
+ }
+case 215:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '\n') { gotoCase = 165; continue; };
+ if (yych == '\r') { gotoCase = 165; continue; };
+ { gotoCase = 200; continue; };
+case 216:
+ yyaccept = 3;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '\n') { gotoCase = 217; continue; };
+ if (yych != '\r') { gotoCase = 213; continue; };
+case 217:
+ this.setCondition(this._conditions.REGEX);
+ { this.tokenType = "regex"; return cursor; }
+case 218:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '*') {
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 165; continue; };
+ { gotoCase = 218; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 165; continue; };
+ if (yych <= ')') { gotoCase = 218; continue; };
+ { gotoCase = 165; continue; };
+ }
+ } else {
+ if (yych <= '[') {
+ if (yych == '/') { gotoCase = 165; continue; };
+ { gotoCase = 218; continue; };
+ } else {
+ if (yych <= '\\') { gotoCase = 225; continue; };
+ if (yych <= ']') { gotoCase = 223; continue; };
+ { gotoCase = 218; continue; };
+ }
+ }
+case 220:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= 'h') {
+ if (yych == 'g') { gotoCase = 220; continue; };
+ } else {
+ if (yych <= 'i') { gotoCase = 220; continue; };
+ if (yych == 'm') { gotoCase = 220; continue; };
+ }
+ { this.tokenType = "regex"; return cursor; }
+case 223:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '*') {
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 165; continue; };
+ { gotoCase = 223; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 165; continue; };
+ if (yych <= ')') { gotoCase = 223; continue; };
+ { gotoCase = 197; continue; };
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych == '/') { gotoCase = 220; continue; };
+ { gotoCase = 223; continue; };
+ } else {
+ if (yych <= '[') { gotoCase = 218; continue; };
+ if (yych <= '\\') { gotoCase = 226; continue; };
+ { gotoCase = 223; continue; };
+ }
+ }
+case 225:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '\n') { gotoCase = 165; continue; };
+ if (yych == '\r') { gotoCase = 165; continue; };
+ { gotoCase = 218; continue; };
+case 226:
+ yyaccept = 3;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '\n') { gotoCase = 217; continue; };
+ if (yych == '\r') { gotoCase = 217; continue; };
+ { gotoCase = 223; continue; };
+case 227:
+ yyaccept = 3;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '\n') { gotoCase = 217; continue; };
+ if (yych == '\r') { gotoCase = 217; continue; };
+ { gotoCase = 197; continue; };
+case 228:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '*') {
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 165; continue; };
+ { gotoCase = 228; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 165; continue; };
+ if (yych <= ')') { gotoCase = 228; continue; };
+ { gotoCase = 165; continue; };
+ }
+ } else {
+ if (yych <= '[') {
+ if (yych == '/') { gotoCase = 165; continue; };
+ { gotoCase = 228; continue; };
+ } else {
+ if (yych <= '\\') { gotoCase = 232; continue; };
+ if (yych >= '^') { gotoCase = 228; continue; };
+ }
+ }
+case 230:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '*') {
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 165; continue; };
+ { gotoCase = 230; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 165; continue; };
+ if (yych <= ')') { gotoCase = 230; continue; };
+ { gotoCase = 197; continue; };
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych == '/') { gotoCase = 220; continue; };
+ { gotoCase = 230; continue; };
+ } else {
+ if (yych <= '[') { gotoCase = 228; continue; };
+ if (yych <= '\\') { gotoCase = 233; continue; };
+ { gotoCase = 230; continue; };
+ }
+ }
+case 232:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '\n') { gotoCase = 165; continue; };
+ if (yych == '\r') { gotoCase = 165; continue; };
+ { gotoCase = 228; continue; };
+case 233:
+ yyaccept = 3;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '\n') { gotoCase = 217; continue; };
+ if (yych == '\r') { gotoCase = 217; continue; };
+ { gotoCase = 230; continue; };
+case 234:
+ yyaccept = 2;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= 'D') {
+ if (yych <= '/') { gotoCase = 155; continue; };
+ if (yych <= '9') { gotoCase = 234; continue; };
+ { gotoCase = 155; continue; };
+ } else {
+ if (yych <= 'E') { gotoCase = 236; continue; };
+ if (yych != 'e') { gotoCase = 155; continue; };
+ }
+case 236:
+ yych = this._charAt(++cursor);
+ if (yych <= ',') {
+ if (yych != '+') { gotoCase = 165; continue; };
+ } else {
+ if (yych <= '-') { gotoCase = 237; continue; };
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych <= '9') { gotoCase = 238; continue; };
+ { gotoCase = 165; continue; };
+ }
+case 237:
+ yych = this._charAt(++cursor);
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych >= ':') { gotoCase = 165; continue; };
+case 238:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '/') { gotoCase = 155; continue; };
+ if (yych <= '9') { gotoCase = 238; continue; };
+ { gotoCase = 155; continue; };
+case 240:
+ ++cursor;
+ yych = this._charAt(cursor);
+case 241:
+ if (yych <= '\r') {
+ if (yych == '\n') { gotoCase = 165; continue; };
+ if (yych <= '\f') { gotoCase = 240; continue; };
+ { gotoCase = 165; continue; };
+ } else {
+ if (yych <= '\'') {
+ if (yych <= '&') { gotoCase = 240; continue; };
+ { gotoCase = 243; continue; };
+ } else {
+ if (yych != '\\') { gotoCase = 240; continue; };
+ }
+ }
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= 'a') {
+ if (yych <= '!') {
+ if (yych <= '\n') {
+ if (yych <= '\t') { gotoCase = 165; continue; };
+ { gotoCase = 246; continue; };
+ } else {
+ if (yych == '\r') { gotoCase = 246; continue; };
+ { gotoCase = 165; continue; };
+ }
+ } else {
+ if (yych <= '\'') {
+ if (yych <= '"') { gotoCase = 240; continue; };
+ if (yych <= '&') { gotoCase = 165; continue; };
+ { gotoCase = 240; continue; };
+ } else {
+ if (yych == '\\') { gotoCase = 240; continue; };
+ { gotoCase = 165; continue; };
+ }
+ }
+ } else {
+ if (yych <= 'q') {
+ if (yych <= 'f') {
+ if (yych <= 'b') { gotoCase = 240; continue; };
+ if (yych <= 'e') { gotoCase = 165; continue; };
+ { gotoCase = 240; continue; };
+ } else {
+ if (yych == 'n') { gotoCase = 240; continue; };
+ { gotoCase = 165; continue; };
+ }
+ } else {
+ if (yych <= 't') {
+ if (yych == 's') { gotoCase = 165; continue; };
+ { gotoCase = 240; continue; };
+ } else {
+ if (yych <= 'u') { gotoCase = 245; continue; };
+ if (yych <= 'v') { gotoCase = 240; continue; };
+ { gotoCase = 165; continue; };
+ }
+ }
+ }
+case 243:
+ ++cursor;
+ { this.tokenType = "string"; return cursor; }
+case 245:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych <= '9') { gotoCase = 248; continue; };
+ { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 248; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych <= 'f') { gotoCase = 248; continue; };
+ { gotoCase = 165; continue; };
+ }
+case 246:
+ ++cursor;
+ this.setCondition(this._conditions.SSTRING);
+ { this.tokenType = "string"; return cursor; }
+case 248:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych >= ':') { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 249; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych >= 'g') { gotoCase = 165; continue; };
+ }
+case 249:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych >= ':') { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 250; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych >= 'g') { gotoCase = 165; continue; };
+ }
+case 250:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych <= '9') { gotoCase = 240; continue; };
+ { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 240; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych <= 'f') { gotoCase = 240; continue; };
+ { gotoCase = 165; continue; };
+ }
+case 251:
+ ++cursor;
+ yych = this._charAt(cursor);
+case 252:
+ if (yych <= '\r') {
+ if (yych == '\n') { gotoCase = 165; continue; };
+ if (yych <= '\f') { gotoCase = 251; continue; };
+ { gotoCase = 165; continue; };
+ } else {
+ if (yych <= '"') {
+ if (yych <= '!') { gotoCase = 251; continue; };
+ { gotoCase = 243; continue; };
+ } else {
+ if (yych != '\\') { gotoCase = 251; continue; };
+ }
+ }
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= 'a') {
+ if (yych <= '!') {
+ if (yych <= '\n') {
+ if (yych <= '\t') { gotoCase = 165; continue; };
+ { gotoCase = 255; continue; };
+ } else {
+ if (yych == '\r') { gotoCase = 255; continue; };
+ { gotoCase = 165; continue; };
+ }
+ } else {
+ if (yych <= '\'') {
+ if (yych <= '"') { gotoCase = 251; continue; };
+ if (yych <= '&') { gotoCase = 165; continue; };
+ { gotoCase = 251; continue; };
+ } else {
+ if (yych == '\\') { gotoCase = 251; continue; };
+ { gotoCase = 165; continue; };
+ }
+ }
+ } else {
+ if (yych <= 'q') {
+ if (yych <= 'f') {
+ if (yych <= 'b') { gotoCase = 251; continue; };
+ if (yych <= 'e') { gotoCase = 165; continue; };
+ { gotoCase = 251; continue; };
+ } else {
+ if (yych == 'n') { gotoCase = 251; continue; };
+ { gotoCase = 165; continue; };
+ }
+ } else {
+ if (yych <= 't') {
+ if (yych == 's') { gotoCase = 165; continue; };
+ { gotoCase = 251; continue; };
+ } else {
+ if (yych <= 'u') { gotoCase = 254; continue; };
+ if (yych <= 'v') { gotoCase = 251; continue; };
+ { gotoCase = 165; continue; };
+ }
+ }
+ }
+case 254:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych <= '9') { gotoCase = 257; continue; };
+ { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 257; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych <= 'f') { gotoCase = 257; continue; };
+ { gotoCase = 165; continue; };
+ }
+case 255:
+ ++cursor;
+ this.setCondition(this._conditions.DSTRING);
+ { this.tokenType = "string"; return cursor; }
+case 257:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych >= ':') { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 258; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych >= 'g') { gotoCase = 165; continue; };
+ }
+case 258:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych >= ':') { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 259; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych >= 'g') { gotoCase = 165; continue; };
+ }
+case 259:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 165; continue; };
+ if (yych <= '9') { gotoCase = 251; continue; };
+ { gotoCase = 165; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 251; continue; };
+ if (yych <= '`') { gotoCase = 165; continue; };
+ if (yych <= 'f') { gotoCase = 251; continue; };
+ { gotoCase = 165; continue; };
+ }
+case 260:
+ ++cursor;
+ if ((yych = this._charAt(cursor)) == '=') { gotoCase = 163; continue; };
+ { gotoCase = 139; continue; };
+/* *********************************** */
+case this.case_REGEX:
+ yych = this._charAt(cursor);
+ if (yych <= '.') {
+ if (yych <= '\n') {
+ if (yych <= '\t') { gotoCase = 264; continue; };
+ { gotoCase = 265; continue; };
+ } else {
+ if (yych == '\r') { gotoCase = 265; continue; };
+ { gotoCase = 264; continue; };
+ }
+ } else {
+ if (yych <= '[') {
+ if (yych <= '/') { gotoCase = 267; continue; };
+ if (yych <= 'Z') { gotoCase = 264; continue; };
+ { gotoCase = 269; continue; };
+ } else {
+ if (yych <= '\\') { gotoCase = 270; continue; };
+ if (yych <= ']') { gotoCase = 265; continue; };
+ { gotoCase = 264; continue; };
+ }
+ }
+case 263:
+ { this.tokenType = "regex"; return cursor; }
+case 264:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ { gotoCase = 272; continue; };
+case 265:
+ ++cursor;
+case 266:
+ { this.tokenType = null; return cursor; }
+case 267:
+ ++cursor;
+ yych = this._charAt(cursor);
+ { gotoCase = 278; continue; };
+case 268:
+ this.setCondition(this._conditions.NODIV);
+ { this.tokenType = "regex"; return cursor; }
+case 269:
+ yyaccept = 1;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych <= '\r') {
+ if (yych == '\n') { gotoCase = 266; continue; };
+ if (yych <= '\f') { gotoCase = 276; continue; };
+ { gotoCase = 266; continue; };
+ } else {
+ if (yych <= '*') {
+ if (yych <= ')') { gotoCase = 276; continue; };
+ { gotoCase = 266; continue; };
+ } else {
+ if (yych == '/') { gotoCase = 266; continue; };
+ { gotoCase = 276; continue; };
+ }
+ }
+case 270:
+ yych = this._charAt(++cursor);
+ if (yych == '\n') { gotoCase = 266; continue; };
+ if (yych == '\r') { gotoCase = 266; continue; };
+case 271:
+ yyaccept = 0;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+case 272:
+ if (yych <= '.') {
+ if (yych <= '\n') {
+ if (yych <= '\t') { gotoCase = 271; continue; };
+ { gotoCase = 263; continue; };
+ } else {
+ if (yych == '\r') { gotoCase = 263; continue; };
+ { gotoCase = 271; continue; };
+ }
+ } else {
+ if (yych <= '[') {
+ if (yych <= '/') { gotoCase = 277; continue; };
+ if (yych <= 'Z') { gotoCase = 271; continue; };
+ { gotoCase = 275; continue; };
+ } else {
+ if (yych <= '\\') { gotoCase = 273; continue; };
+ if (yych <= ']') { gotoCase = 263; continue; };
+ { gotoCase = 271; continue; };
+ }
+ }
+case 273:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '\n') { gotoCase = 274; continue; };
+ if (yych != '\r') { gotoCase = 271; continue; };
+case 274:
+ cursor = YYMARKER;
+ if (yyaccept <= 0) {
+ { gotoCase = 263; continue; };
+ } else {
+ { gotoCase = 266; continue; };
+ }
+case 275:
+ ++cursor;
+ yych = this._charAt(cursor);
+case 276:
+ if (yych <= '*') {
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 274; continue; };
+ { gotoCase = 275; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 274; continue; };
+ if (yych <= ')') { gotoCase = 275; continue; };
+ { gotoCase = 274; continue; };
+ }
+ } else {
+ if (yych <= '[') {
+ if (yych == '/') { gotoCase = 274; continue; };
+ { gotoCase = 275; continue; };
+ } else {
+ if (yych <= '\\') { gotoCase = 281; continue; };
+ if (yych <= ']') { gotoCase = 279; continue; };
+ { gotoCase = 275; continue; };
+ }
+ }
+case 277:
+ ++cursor;
+ yych = this._charAt(cursor);
+case 278:
+ if (yych <= 'h') {
+ if (yych == 'g') { gotoCase = 277; continue; };
+ { gotoCase = 268; continue; };
+ } else {
+ if (yych <= 'i') { gotoCase = 277; continue; };
+ if (yych == 'm') { gotoCase = 277; continue; };
+ { gotoCase = 268; continue; };
+ }
+case 279:
+ yyaccept = 0;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '*') {
+ if (yych <= '\f') {
+ if (yych == '\n') { gotoCase = 263; continue; };
+ { gotoCase = 279; continue; };
+ } else {
+ if (yych <= '\r') { gotoCase = 263; continue; };
+ if (yych <= ')') { gotoCase = 279; continue; };
+ { gotoCase = 271; continue; };
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych == '/') { gotoCase = 277; continue; };
+ { gotoCase = 279; continue; };
+ } else {
+ if (yych <= '[') { gotoCase = 275; continue; };
+ if (yych <= '\\') { gotoCase = 282; continue; };
+ { gotoCase = 279; continue; };
+ }
+ }
+case 281:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '\n') { gotoCase = 274; continue; };
+ if (yych == '\r') { gotoCase = 274; continue; };
+ { gotoCase = 275; continue; };
+case 282:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych == '\n') { gotoCase = 274; continue; };
+ if (yych == '\r') { gotoCase = 274; continue; };
+ { gotoCase = 279; continue; };
+/* *********************************** */
+case this.case_SSTRING:
+ yych = this._charAt(cursor);
+ if (yych <= '\r') {
+ if (yych == '\n') { gotoCase = 287; continue; };
+ if (yych <= '\f') { gotoCase = 286; continue; };
+ { gotoCase = 287; continue; };
+ } else {
+ if (yych <= '\'') {
+ if (yych <= '&') { gotoCase = 286; continue; };
+ { gotoCase = 289; continue; };
+ } else {
+ if (yych == '\\') { gotoCase = 291; continue; };
+ { gotoCase = 286; continue; };
+ }
+ }
+case 285:
+ { this.tokenType = "string"; return cursor; }
+case 286:
+ yyaccept = 0;
+ yych = this._charAt(YYMARKER = ++cursor);
+ { gotoCase = 293; continue; };
+case 287:
+ ++cursor;
+case 288:
+ { this.tokenType = null; return cursor; }
+case 289:
+ ++cursor;
+case 290:
+ this.setCondition(this._conditions.NODIV);
+ { this.tokenType = "string"; return cursor; }
+case 291:
+ yyaccept = 1;
+ yych = this._charAt(YYMARKER = ++cursor);
+ if (yych <= 'e') {
+ if (yych <= '\'') {
+ if (yych == '"') { gotoCase = 292; continue; };
+ if (yych <= '&') { gotoCase = 288; continue; };
+ } else {
+ if (yych <= '\\') {
+ if (yych <= '[') { gotoCase = 288; continue; };
+ } else {
+ if (yych != 'b') { gotoCase = 288; continue; };
+ }
+ }
+ } else {
+ if (yych <= 'r') {
+ if (yych <= 'm') {
+ if (yych >= 'g') { gotoCase = 288; continue; };
+ } else {
+ if (yych <= 'n') { gotoCase = 292; continue; };
+ if (yych <= 'q') { gotoCase = 288; continue; };
+ }
+ } else {
+ if (yych <= 't') {
+ if (yych <= 's') { gotoCase = 288; continue; };
+ } else {
+ if (yych <= 'u') { gotoCase = 294; continue; };
+ if (yych >= 'w') { gotoCase = 288; continue; };
+ }
+ }
+ }
+case 292:
+ yyaccept = 0;
+ YYMARKER = ++cursor;
+ yych = this._charAt(cursor);
+case 293:
+ if (yych <= '\r') {
+ if (yych == '\n') { gotoCase = 285; continue; };
+ if (yych <= '\f') { gotoCase = 292; continue; };
+ { gotoCase = 285; continue; };
+ } else {
+ if (yych <= '\'') {
+ if (yych <= '&') { gotoCase = 292; continue; };
+ { gotoCase = 300; continue; };
+ } else {
+ if (yych == '\\') { gotoCase = 299; continue; };
+ { gotoCase = 292; continue; };
+ }
+ }
+case 294:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 295; continue; };
+ if (yych <= '9') { gotoCase = 296; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 296; continue; };
+ if (yych <= '`') { gotoCase = 295; continue; };
+ if (yych <= 'f') { gotoCase = 296; continue; };
+ }
+case 295:
+ cursor = YYMARKER;
+ if (yyaccept <= 0) {
+ { gotoCase = 285; continue; };
+ } else {
+ { gotoCase = 288; continue; };
+ }
+case 296:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 295; continue; };
+ if (yych >= ':') { gotoCase = 295; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 297; continue; };
+ if (yych <= '`') { gotoCase = 295; continue; };
+ if (yych >= 'g') { gotoCase = 295; continue; };
+ }
+case 297:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 295; continue; };
+ if (yych >= ':') { gotoCase = 295; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 298; continue; };
+ if (yych <= '`') { gotoCase = 295; continue; };
+ if (yych >= 'g') { gotoCase = 295; continue; };
+ }
+case 298:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= '@') {
+ if (yych <= '/') { gotoCase = 295; continue; };
+ if (yych <= '9') { gotoCase = 292; continue; };
+ { gotoCase = 295; continue; };
+ } else {
+ if (yych <= 'F') { gotoCase = 292; continue; };
+ if (yych <= '`') { gotoCase = 295; continue; };
+ if (yych <= 'f') { gotoCase = 292; continue; };
+ { gotoCase = 295; continue; };
+ }
+case 299:
+ ++cursor;
+ yych = this._charAt(cursor);
+ if (yych <= 'e') {
+ if (yych <= '\'') {
+ if (yych == '"') { gotoCase = 292; continue; };
+ if (yych <= '&') { gotoCase = 295; continue; };
+ { gotoCase = 292; continue; };
+ } else {
+ if (yych <= '\\') {
+ if (yych <= '[') { gotoCase = 295; continue; };
+ { gotoCase = 292; continue; };
+ } else {
+ if (yych == 'b') { gotoCase = 292; continue; };
+ { gotoCase = 295; continue; };
+ }
+ }
+ } else {
+ if (yych <= 'r') {
+ if (yych <= 'm') {
+ if (yych <= 'f') { gotoCase = 292; continue; };
+ { gotoCase = 295; continue; };
+ } else {
+ if (yych <= 'n') { gotoCase = 292; continue; };
+ if (yych <= 'q') { gotoCase = 295; continue; };
+ { gotoCase = 292; continue; };
+ }
+ } else {
+ if (yych <= 't') {
+ if (yych <= 's') { gotoCase = 295; continue; };
+ { gotoCase = 292; continue; };
+ } else {
+ if (yych <= 'u') { gotoCase = 294; continue; };
+ if (yych <= 'v') { gotoCase = 292; continue; };
+ { gotoCase = 295; continue; };
+ }
+ }
+ }
+case 300:
+ ++cursor;
+ yych = this._charAt(cursor);
+ { gotoCase = 290; continue; };
+ }
+
+ }
+ }
+}
diff --git a/WebCore/inspector/front-end/JavaScriptTokenizer.re2js b/WebCore/inspector/front-end/JavaScriptTokenizer.re2js
new file mode 100644
index 0000000..c4e486a
--- /dev/null
+++ b/WebCore/inspector/front-end/JavaScriptTokenizer.re2js
@@ -0,0 +1,195 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// Generate js file as follows:
+//
+// re2c -isc WebCore/inspector/front-end/JavaScriptTokenizer.re2js \
+// | sed 's|^yy\([^:]*\)*\:|case \1:|' \
+// | sed 's|[*]cursor[+][+]|this._charAt(cursor++)|' \
+// | sed 's|[[*][+][+]cursor|this._charAt(++cursor)|' \
+// | sed 's|[*]cursor|this._charAt(cursor)|' \
+// | sed 's|yych = \*\([^;]*\)|yych = this._charAt\1|' \
+// | sed 's|goto case \([^;]*\)|{ gotoCase = \1; continue; }|' \
+// | sed 's|unsigned\ int|var|' \
+// | sed 's|var\ yych|case 1: var yych|'
+
+WebInspector.JavaScriptTokenizer = function()
+{
+ this._tokens = [];
+ this._keywords = [
+ "null", "true", "false", "break", "case", "catch", "const", "default", "finally", "for",
+ "instanceof", "new", "var", "continue", "function", "return", "void", "delete", "if",
+ "this", "do", "while", "else", "in", "switch", "throw", "try", "typeof", "debugger",
+ "class", "enum", "export", "extends", "import", "super", "get", "set"
+ ].keySet();
+
+ this._conditions = {
+ DIV: 0,
+ NODIV: 1,
+ COMMENT: 2,
+ DSTRING: 3,
+ SSTRING: 4,
+ REGEX: 5
+ };
+
+ this.case_DIV = 1000;
+ this.case_NODIV = 1001;
+ this.case_COMMENT = 1002;
+ this.case_DSTRING = 1003;
+ this.case_SSTRING = 1004;
+ this.case_REGEX = 1005;
+
+ this.initialCondition = this._conditions.NODIV;
+ this.condition = this.initialCondition;
+}
+
+WebInspector.JavaScriptTokenizer.prototype = {
+
+ set line(line) {
+ this._line = line;
+ },
+
+ getCondition: function()
+ {
+ return this.condition;
+ },
+
+ setCondition: function(condition)
+ {
+ this.condition = condition;
+ },
+
+ _charAt: function(cursor)
+ {
+ return cursor < this._line.length ? this._line.charAt(cursor) : "\n";
+ },
+
+ nextToken: function(cursor)
+ {
+ var cursorOnEnter = cursor;
+ var gotoCase = 1;
+ while (1) {
+ switch (gotoCase)
+ // Following comment is replaced with generated state machine.
+ /*!re2c
+ re2c:define:YYCTYPE = "var";
+ re2c:define:YYCURSOR = cursor;
+ re2c:define:YYGETCONDITION = "this.getCondition";
+ re2c:define:YYSETCONDITION = "this.setCondition";
+ re2c:condprefix = "case this.case_";
+ re2c:condenumprefix = "this._conditions.";
+ re2c:yyfill:enable = 0;
+ re2c:labelprefix = "case ";
+ re2c:indent:top = 2;
+ re2c:indent:string = " ";
+
+ LineComment = "//" [^\r\n]*;
+ CommentContent = ([^*\r\n] | ("*"+[^/*]))*;
+ Comment = "/*" CommentContent "*"+ "/";
+ CommentStart = "/*" CommentContent [\r\n];
+ CommentEnd = CommentContent "*"+ "/";
+
+ DecimalDigit = [0-9];
+ NonZeroDigit = [1-9];
+ OctalDigit = [0-7];
+ HexDigit = [0-9a-fA-F];
+ SignedInteger = ("+"|"-")? DecimalDigit+;
+ ExponentPart = ("e" | "E") SignedInteger;
+ DecimalIntegerLiteral = "0" | NonZeroDigit DecimalDigit*;
+ DecimalLiteral = DecimalIntegerLiteral "." DecimalDigit* ExponentPart? | "." DecimalDigit+ ExponentPart? | DecimalIntegerLiteral ExponentPart?;
+ HexIntegerLiteral = "0" ("x"|"X") HexDigit+;
+ OctalIntegerLiteral = "0" OctalDigit+;
+ NumericLiteral = DecimalLiteral | HexIntegerLiteral | OctalIntegerLiteral;
+
+ Punctuation = [\!\%\&\(\*\+\,\-\.\:\;\<\=\>\?\[\]\^\{\|\}\~] | "!=" | "!==" | "%=" | "&&" | "&=" | "*=" | "++" | "+=" | "--" | "-=" | "<<" | "<<=" | "<=" | "==" | "===" | ">=" | ">>" | ">>=" | ">>>" | ">>>=" | "^=" | "|=" | "||";
+ Division = "/" | "/=";
+ RightParen = ")";
+
+ Letter = [a-zA-Z\x80-\xFF];
+ UnicodeEscapeSequence = "\\u" HexDigit HexDigit HexDigit HexDigit;
+
+ IdentifierStart = Letter | "_" | "$" | UnicodeEscapeSequence;
+ IdentifierPart = IdentifierStart | DecimalDigit;
+ Identifier = IdentifierStart IdentifierPart *;
+
+ DoubleStringContent = ([^\r\n\"\\] | UnicodeEscapeSequence | "\\" ['"\\bfnrtv])*;
+ SingleStringContent = ([^\r\n\'\\] | UnicodeEscapeSequence | "\\" ['"\\bfnrtv])*;
+ StringLiteral = "\"" DoubleStringContent "\"" | "'" SingleStringContent "'";
+ DoubleStringStart = "\"" DoubleStringContent "\\" [\r\n];
+ DoubleStringEnd = DoubleStringContent "\"";
+ SingleStringStart = "\'" SingleStringContent "\\" [\r\n];
+ SingleStringEnd = SingleStringContent "\'";
+
+ BackslashSequence = "\\" [^\r\n];
+ RegexSet = "[" ([^\r\n*\\/] | BackslashSequence)* "]";
+ RegexFirstChar = [^\r\n*\\/\[\]] | BackslashSequence | RegexSet;
+ RegexChar = [^\r\n\\/\[\]] | BackslashSequence | RegexSet;
+ RegexContent = RegexChar*;
+ Regex = "/" RegexFirstChar RegexContent "/" [igm]*;
+ RegexStart = "/" RegexFirstChar RegexContent "\\";
+ RegexEnd = RegexContent "/" [igm]*;
+
+ <DIV,NODIV> LineComment { this.tokenType = "comment"; return cursor; }
+ <DIV,NODIV> Comment { this.tokenType = "comment"; return cursor; }
+ <DIV,NODIV> CommentStart => COMMENT { this.tokenType = "comment"; return cursor; }
+ <COMMENT> CommentContent => COMMENT { this.tokenType = "comment"; return cursor; }
+ <COMMENT> CommentEnd => NODIV { this.tokenType = "comment"; return cursor; }
+
+ <DIV,NODIV> StringLiteral { this.tokenType = "string"; return cursor; }
+ <DIV,NODIV> DoubleStringStart => DSTRING { this.tokenType = "string"; return cursor; }
+ <DSTRING> DoubleStringContent => DSTRING { this.tokenType = "string"; return cursor; }
+ <DSTRING> DoubleStringEnd => NODIV { this.tokenType = "string"; return cursor; }
+ <DIV,NODIV> SingleStringStart => SSTRING { this.tokenType = "string"; return cursor; }
+ <SSTRING> SingleStringContent => SSTRING { this.tokenType = "string"; return cursor; }
+ <SSTRING> SingleStringEnd => NODIV { this.tokenType = "string"; return cursor; }
+
+ <NODIV> Regex { this.tokenType = "regex"; return cursor; }
+ <NODIV> RegexStart => REGEX { this.tokenType = "regex"; return cursor; }
+ <REGEX> RegexContent => REGEX { this.tokenType = "regex"; return cursor; }
+ <REGEX> RegexEnd => NODIV { this.tokenType = "regex"; return cursor; }
+
+ <DIV,NODIV> NumericLiteral => DIV { this.tokenType = "number"; return cursor; }
+ <DIV,NODIV> Identifier => DIV
+ {
+ var token = this._line.substring(cursorOnEnter, cursor);
+ if (token in this._keywords)
+ this.tokenType = "keyword";
+ else
+ this.tokenType = null;
+ return cursor;
+ }
+ <DIV,NODIV> RightParen => DIV { this.tokenType = null; return cursor; }
+ <DIV,NODIV> Punctuation => NODIV { this.tokenType = null; return cursor; }
+ <DIV> Division => NODIV { this.tokenType = null; return cursor; }
+ <*> [^] { this.tokenType = null; return cursor; }
+ */
+ }
+ }
+}
diff --git a/WebCore/inspector/front-end/TextEditorHighlighter.js b/WebCore/inspector/front-end/TextEditorHighlighter.js
index e1d2bd6..48dcfc9 100644
--- a/WebCore/inspector/front-end/TextEditorHighlighter.js
+++ b/WebCore/inspector/front-end/TextEditorHighlighter.js
@@ -32,100 +32,71 @@
WebInspector.TextEditorHighlighter = function(textModel)
{
this._textModel = textModel;
- this._highlighterScheme = new WebInspector.JavaScriptHighlighterScheme();
+ this._tokenizer = new WebInspector.JavaScriptTokenizer();
this._styles = [];
- this._styles[WebInspector.TextEditorHighlighter.TokenType.Comment] = "rgb(0, 116, 0)";
- this._styles[WebInspector.TextEditorHighlighter.TokenType.String] = "rgb(196, 26, 22)";
- this._styles[WebInspector.TextEditorHighlighter.TokenType.Keyword] = "rgb(170, 13, 145)";
- this._styles[WebInspector.TextEditorHighlighter.TokenType.Number] = "rgb(28, 0, 207)";
-}
-
-WebInspector.TextEditorHighlighter.TokenType = {
- Comment: 0,
- String: 1,
- Keyword: 2,
- Number: 3
+ this._styles["comment"] = "rgb(0, 116, 0)";
+ this._styles["string"] = "rgb(196, 26, 22)";
+ this._styles["regex"] = "rgb(196, 26, 22)";
+ this._styles["keyword"] = "rgb(170, 13, 145)";
+ this._styles["number"] = "rgb(28, 0, 207)";
}
WebInspector.TextEditorHighlighter.prototype = {
highlight: function(startLine, endLine)
{
- this._highlighterScheme.reset(this);
// Rewind to the last highlighted line to gain proper highlighter context.
while (startLine > 0 && !this._textModel.getAttribute(startLine - 1, 0, "highlighter-state"))
startLine--;
// Restore highlighter context taken from previous line.
var state = this._textModel.getAttribute(startLine - 1, 0, "highlighter-state");
- if (state) {
- this.continueState = state.postContinueState;
- this.lexState = state.postLexState;
- }
-
+ if (state)
+ this._tokenizer.condition = state.postCondition;
+ else
+ this._tokenizer.condition = this._tokenizer.initialCondition;
// Each line has associated state attribute with pre- and post-highlighter conditions.
// Highlight lines from range until we find line precondition matching highlighter state.
var damage = {};
for (var i = startLine; i < endLine; ++i) {
state = this._textModel.getAttribute(i, 0, "highlighter-state");
- if (state && state.preContinueState === this.continueState && state.preLexState === this.lexState) {
+ if (state && state.preCondition === this._tokenizer.condition) {
// Following lines are up to date, no need re-highlight.
- this.continueState = state.postContinueState;
- this.lexState = state.postLexState;
+ this._tokenizer.condition = state.postCondition;
continue;
}
damage[i] = true;
state = {};
- state.preContinueState = this.continueState;
- state.preLexState = this.lexState;
+ state.preCondition = this._tokenizer.condition;
this._textModel.removeAttributes(i, "highlight");
- var line = this._textModel.line(i);
- for (var j = 0; j < line.length;)
- j += this._lex(line.substring(j), i, j);
+ this._lex(this._textModel.line(i), i);
- state.postContinueState = this.continueState;
- state.postLexState = this.lexState;
+ state.postCondition = this._tokenizer.condition;
this._textModel.addAttribute(i, 0, "highlighter-state", state);
}
state = this._textModel.getAttribute(endLine, 0, "highlighter-state");
- if (state && (state.preContinueState !== this.continueState || state.preLexState !== this.lexState)) {
+ if (state && state.preCondition !== this._tokenizer.condition) {
// Requested highlight range is over, but we did not recover. Invalidate tail highlighting.
for (var i = endLine; i < this._textModel.linesCount; ++i)
this._textModel.removeAttributes(i, "highlighter-state");
}
-
return damage;
},
- _lex: function(codeFragment, line, column) {
- var token = null;
- for (var i = 0; i < this._highlighterScheme.rules.length; i++) {
- var rule = this._highlighterScheme.rules[i];
- var ruleContinueStateCondition = typeof rule.preContinueState !== "undefined" ? rule.preContinueState : this._highlighterScheme.ContinueState.None;
- if (this.continueState !== ruleContinueStateCondition)
- continue;
- if (typeof rule.preLexState !== "undefined" && this.lexState !== rule.preLexState)
- continue;
-
- var match = rule.pattern.exec(codeFragment);
- if (match) {
- token = match[0];
- if (token && (!rule.keywords || (token in rule.keywords))) {
- if (typeof rule.type === "number")
- this._textModel.addAttribute(line, column, "highlight", { length: token.length, style: this._styles[rule.type] });
- if (typeof rule.postLexState !== "undefined")
- this.lexState = rule.postLexState;
- if (typeof rule.postContinueState !== "undefined")
- this.continueState = rule.postContinueState;
- return token.length;
- }
- }
- }
- return 1;
+ _lex: function(line, lineNumber) {
+ this._tokenizer.line = line;
+ var column = 0;
+ do {
+ var newColumn = this._tokenizer.nextToken(column);
+ var tokenType = this._tokenizer.tokenType;
+ if (tokenType)
+ this._textModel.addAttribute(lineNumber, column, "highlight", { length: newColumn - column, style: this._styles[tokenType] });
+ column = newColumn;
+ } while (column < line.length)
}
}
diff --git a/WebCore/inspector/front-end/WebKit.qrc b/WebCore/inspector/front-end/WebKit.qrc
index 85dbc6b..7686f62 100644
--- a/WebCore/inspector/front-end/WebKit.qrc
+++ b/WebCore/inspector/front-end/WebKit.qrc
@@ -35,8 +35,8 @@
<file>inspector.js</file>
<file>InspectorBackendStub.js</file>
<file>InspectorFrontendHostStub.js</file>
- <file>JavaScriptHighlighterScheme.js</file>
<file>JavaScriptSourceSyntaxHighlighter.js</file>
+ <file>JavaScriptTokenizer.js</file>
<file>KeyboardShortcut.js</file>
<file>MetricsSidebarPane.js</file>
<file>Object.js</file>
diff --git a/WebCore/inspector/front-end/inspector.html b/WebCore/inspector/front-end/inspector.html
index 128f2e8..6e074ba 100644
--- a/WebCore/inspector/front-end/inspector.html
+++ b/WebCore/inspector/front-end/inspector.html
@@ -97,7 +97,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<script type="text/javascript" src="TextEditorModel.js"></script>
<script type="text/javascript" src="TextEditor.js"></script>
<script type="text/javascript" src="TextEditorHighlighter.js"></script>
- <script type="text/javascript" src="JavaScriptHighlighterScheme.js"></script>
+ <script type="text/javascript" src="JavaScriptTokenizer.js"></script>
<script type="text/javascript" src="SourceView.js"></script>
<script type="text/javascript" src="FontView.js"></script>
<script type="text/javascript" src="ImageView.js"></script>
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list