forked from qt-creator/qt-creator
Fixed fix for QTCREATORBUG-509.
This commit is contained in:
@@ -167,6 +167,7 @@
|
|||||||
//
|
//
|
||||||
// This file is automatically generated from javascript.g.
|
// This file is automatically generated from javascript.g.
|
||||||
// Changes will be lost.
|
// Changes will be lost.
|
||||||
|
// To re-generate, run: qlalr --no-debug --no-lines --qt javascript.g
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifndef JAVASCRIPTPARSER_P_H
|
#ifndef JAVASCRIPTPARSER_P_H
|
||||||
@@ -327,6 +328,7 @@ inline void JavaScriptParser::reallocateStack()
|
|||||||
//
|
//
|
||||||
// This file is automatically generated from javascript.g.
|
// This file is automatically generated from javascript.g.
|
||||||
// Changes will be lost.
|
// Changes will be lost.
|
||||||
|
// To re-generate, run: qlalr --no-debug --no-lines --qt javascript.g
|
||||||
//
|
//
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
@@ -2159,11 +2161,13 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString msg = QString::fromUtf8("Unexpected token");
|
QString msg = QString::fromUtf8("Unexpected token");
|
||||||
|
if (token_buffer[0].token >= 0 && token_buffer[0].token < TERMINAL_COUNT) {
|
||||||
if (const char *tokenSpell = spell[token_buffer[0].token]) {
|
if (const char *tokenSpell = spell[token_buffer[0].token]) {
|
||||||
msg += QLatin1String(": `");
|
msg += QLatin1String(": `");
|
||||||
msg += QLatin1String(tokenSpell);
|
msg += QLatin1String(tokenSpell);
|
||||||
msg += QLatin1Char('\'');
|
msg += QLatin1Char('\'');
|
||||||
}
|
}
|
||||||
|
} // ### FIXME: at this point, we should give more information than just "Unexpected token". However, we need more error recovery support from qlalr.
|
||||||
|
|
||||||
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error,
|
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error,
|
||||||
token_buffer[0].loc.startLine, token_buffer[0].loc.startColumn, msg));
|
token_buffer[0].loc.startLine, token_buffer[0].loc.startColumn, msg));
|
||||||
|
@@ -41,7 +41,7 @@ const char *const JavaScriptGrammar::spell [] = {
|
|||||||
"try", "typeof", "var", "void", "while", "with", "^", "^=", "null", "true",
|
"try", "typeof", "var", "void", "while", "with", "^", "^=", "null", "true",
|
||||||
"false", "const", "debugger", "reserved word"};
|
"false", "const", "debugger", "reserved word"};
|
||||||
|
|
||||||
const int JavaScriptGrammar::lhs [] = {
|
const short JavaScriptGrammar::lhs [] = {
|
||||||
85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
|
85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
|
||||||
85, 85, 85, 85, 85, 87, 87, 92, 92, 86,
|
85, 85, 85, 85, 85, 87, 87, 92, 92, 86,
|
||||||
86, 89, 89, 93, 93, 93, 93, 94, 94, 94,
|
86, 89, 89, 93, 93, 93, 93, 94, 94, 94,
|
||||||
@@ -70,7 +70,7 @@ const int JavaScriptGrammar::lhs [] = {
|
|||||||
163, 97, 167, 167, 164, 164, 165, 165, 168, 84,
|
163, 97, 167, 167, 164, 164, 165, 165, 168, 84,
|
||||||
169, 169, 170, 170, 166, 166, 88, 88, 171};
|
169, 169, 170, 170, 166, 166, 88, 88, 171};
|
||||||
|
|
||||||
const int JavaScriptGrammar:: rhs[] = {
|
const short JavaScriptGrammar::rhs [] = {
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
|
||||||
3, 5, 3, 4, 3, 2, 4, 1, 2, 0,
|
3, 5, 3, 4, 3, 2, 4, 1, 2, 0,
|
||||||
1, 3, 5, 1, 1, 1, 1, 1, 1, 1,
|
1, 3, 5, 1, 1, 1, 1, 1, 1, 1,
|
||||||
@@ -99,7 +99,7 @@ const int JavaScriptGrammar:: rhs[] = {
|
|||||||
8, 8, 1, 3, 0, 1, 0, 1, 1, 1,
|
8, 8, 1, 3, 0, 1, 0, 1, 1, 1,
|
||||||
1, 2, 1, 1, 0, 1, 0, 1, 2};
|
1, 2, 1, 1, 0, 1, 0, 1, 2};
|
||||||
|
|
||||||
const int JavaScriptGrammar::action_default [] = {
|
const short JavaScriptGrammar::action_default [] = {
|
||||||
0, 98, 165, 129, 137, 133, 173, 180, 77, 149,
|
0, 98, 165, 129, 137, 133, 173, 180, 77, 149,
|
||||||
179, 187, 175, 125, 0, 176, 264, 62, 177, 178,
|
179, 187, 175, 125, 0, 176, 264, 62, 177, 178,
|
||||||
183, 78, 141, 145, 66, 95, 76, 81, 61, 0,
|
183, 78, 141, 145, 66, 95, 76, 81, 61, 0,
|
||||||
@@ -148,7 +148,7 @@ const int JavaScriptGrammar::action_default [] = {
|
|||||||
15, 88, 86, 90, 87, 85, 89, 204, 197, 0,
|
15, 88, 86, 90, 87, 85, 89, 204, 197, 0,
|
||||||
205, 201, 0, 203, 193, 0, 194, 198};
|
205, 201, 0, 203, 193, 0, 194, 198};
|
||||||
|
|
||||||
const int JavaScriptGrammar::goto_default [] = {
|
const short JavaScriptGrammar::goto_default [] = {
|
||||||
29, 28, 439, 437, 113, 112, 14, 2, 438, 111,
|
29, 28, 439, 437, 113, 112, 14, 2, 438, 111,
|
||||||
114, 194, 24, 17, 190, 26, 8, 201, 21, 27,
|
114, 194, 24, 17, 190, 26, 8, 201, 21, 27,
|
||||||
77, 25, 1, 32, 30, 270, 13, 264, 3, 260,
|
77, 25, 1, 32, 30, 270, 13, 264, 3, 260,
|
||||||
@@ -159,7 +159,7 @@ const int JavaScriptGrammar::goto_default [] = {
|
|||||||
460, 324, 395, 399, 402, 398, 397, 417, 418, 16,
|
460, 324, 395, 399, 402, 398, 397, 417, 418, 16,
|
||||||
100, 107, 96, 99, 106, 108, 33, 0};
|
100, 107, 96, 99, 106, 108, 33, 0};
|
||||||
|
|
||||||
const int JavaScriptGrammar::action_index [] = {
|
const short JavaScriptGrammar::action_index [] = {
|
||||||
1318, 79, -84, 56, 39, -17, -84, -84, 169, -84,
|
1318, 79, -84, 56, 39, -17, -84, -84, 169, -84,
|
||||||
-84, -84, -84, 216, 149, -84, -84, -84, -84, -84,
|
-84, -84, -84, 216, 149, -84, -84, -84, -84, -84,
|
||||||
-84, 475, 68, 100, 180, 184, -84, -84, -84, 99,
|
-84, 475, 68, 100, 180, 184, -84, -84, -84, 99,
|
||||||
@@ -256,7 +256,7 @@ const int JavaScriptGrammar::action_index [] = {
|
|||||||
-88, -88, -88, -88, -88, -88, -88, -88, -88, -88,
|
-88, -88, -88, -88, -88, -88, -88, -88, -88, -88,
|
||||||
-88, -88, 5, -88, -88, -56, -88, -88};
|
-88, -88, 5, -88, -88, -56, -88, -88};
|
||||||
|
|
||||||
const int JavaScriptGrammar::action_info [] = {
|
const short JavaScriptGrammar::action_info [] = {
|
||||||
305, 307, 109, 400, 400, 400, 273, 105, 416, 302,
|
305, 307, 109, 400, 400, 400, 273, 105, 416, 302,
|
||||||
297, 295, 293, 423, 273, 151, 313, 321, 406, 407,
|
297, 295, 293, 423, 273, 151, 313, 321, 406, 407,
|
||||||
424, 295, 422, 198, 420, 149, 313, 353, -47, 396,
|
424, 295, 422, 198, 420, 149, 313, 353, -47, 396,
|
||||||
@@ -447,7 +447,7 @@ const int JavaScriptGrammar::action_info [] = {
|
|||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0};
|
0, 0, 0, 0, 0, 0, 0, 0};
|
||||||
|
|
||||||
const int JavaScriptGrammar::action_check [] = {
|
const short JavaScriptGrammar::action_check [] = {
|
||||||
61, 60, 55, 5, 5, 5, 1, 33, 33, 61,
|
61, 60, 55, 5, 5, 5, 1, 33, 33, 61,
|
||||||
8, 76, 48, 29, 1, 8, 2, 29, 55, 7,
|
8, 76, 48, 29, 1, 8, 2, 29, 55, 7,
|
||||||
60, 76, 36, 8, 20, 7, 2, 16, 7, 33,
|
60, 76, 36, 8, 20, 7, 2, 16, 7, 33,
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
// This file was generated by qlalr - DO NOT EDIT!
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
**
|
**
|
||||||
** This file is part of Qt Creator
|
** This file is part of Qt Creator
|
||||||
@@ -142,26 +143,21 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const char *const spell [];
|
static const char *const spell [];
|
||||||
static const int lhs [];
|
static const short lhs [];
|
||||||
static const int rhs [];
|
static const short rhs [];
|
||||||
static const int goto_default [];
|
static const short goto_default [];
|
||||||
static const int action_default [];
|
static const short action_default [];
|
||||||
static const int action_index [];
|
static const short action_index [];
|
||||||
static const int action_info [];
|
static const short action_info [];
|
||||||
static const int action_check [];
|
static const short action_check [];
|
||||||
|
|
||||||
static inline int nt_action (int state, int nt)
|
static inline int nt_action (int state, int nt)
|
||||||
{
|
{
|
||||||
const int *const goto_index = &action_index [GOTO_INDEX_OFFSET];
|
const int yyn = action_index [GOTO_INDEX_OFFSET + state] + nt;
|
||||||
const int *const goto_check = &action_check [GOTO_CHECK_OFFSET];
|
if (yyn < 0 || action_check [GOTO_CHECK_OFFSET + yyn] != nt)
|
||||||
|
|
||||||
const int yyn = goto_index [state] + nt;
|
|
||||||
|
|
||||||
if (yyn < 0 || goto_check [yyn] != nt)
|
|
||||||
return goto_default [nt];
|
return goto_default [nt];
|
||||||
|
|
||||||
const int *const goto_info = &action_info [GOTO_INFO_OFFSET];
|
return action_info [GOTO_INFO_OFFSET + yyn];
|
||||||
return goto_info [yyn];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int t_action (int state, int token)
|
static inline int t_action (int state, int token)
|
||||||
|
@@ -48,6 +48,7 @@
|
|||||||
//
|
//
|
||||||
// This file is automatically generated from javascript.g.
|
// This file is automatically generated from javascript.g.
|
||||||
// Changes will be lost.
|
// Changes will be lost.
|
||||||
|
// To re-generate, run: qlalr --no-debug --no-lines --qt javascript.g
|
||||||
//
|
//
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
@@ -1180,13 +1181,13 @@ case 266: {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString msg = QString::fromUtf8("Unexpected token");
|
QString msg = QString::fromUtf8("Unexpected token");
|
||||||
if (token_buffer[0].token >= 0 && token_buffer[0].token < TERMINAL_COUNT) { // ### FIXME: band-aid, see QTCREATORBUG-509.
|
if (token_buffer[0].token >= 0 && token_buffer[0].token < TERMINAL_COUNT) {
|
||||||
if (const char *tokenSpell = spell[token_buffer[0].token]) {
|
if (const char *tokenSpell = spell[token_buffer[0].token]) {
|
||||||
msg += QLatin1String(": `");
|
msg += QLatin1String(": `");
|
||||||
msg += QLatin1String(tokenSpell);
|
msg += QLatin1String(tokenSpell);
|
||||||
msg += QLatin1Char('\'');
|
msg += QLatin1Char('\'');
|
||||||
}
|
}
|
||||||
}
|
} // ### FIXME: at this point, we should give more information than just "Unexpected token". However, we need more error recovery support from qlalr.
|
||||||
|
|
||||||
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error,
|
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error,
|
||||||
token_buffer[0].loc.startLine, token_buffer[0].loc.startColumn, msg));
|
token_buffer[0].loc.startLine, token_buffer[0].loc.startColumn, msg));
|
||||||
|
@@ -43,15 +43,13 @@
|
|||||||
//
|
//
|
||||||
// This file is automatically generated from javascript.g.
|
// This file is automatically generated from javascript.g.
|
||||||
// Changes will be lost.
|
// Changes will be lost.
|
||||||
|
// To re-generate, run: qlalr --no-debug --no-lines --qt javascript.g
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifndef JAVASCRIPTPARSER_P_H
|
#ifndef JAVASCRIPTPARSER_P_H
|
||||||
#define JAVASCRIPTPARSER_P_H
|
#define JAVASCRIPTPARSER_P_H
|
||||||
|
|
||||||
#include "javascriptgrammar_p.h"
|
#include "javascriptgrammar_p.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "javascriptastfwd_p.h"
|
#include "javascriptastfwd_p.h"
|
||||||
#include <QtCore/QList>
|
#include <QtCore/QList>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user