forked from qt-creator/qt-creator
Revert "qmljs/parser: update to latest qt5 parser"
error 'QmlJS::Engine' does not have any field named 'directives to be fixed This reverts commit 7d76f9040a933981ed44b2b4f0a6edcff034be6a Change-Id: I24dbe6829ed3920af0f53f2ec31eba82ebdf749f Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
committed by
Erik Verbruggen
parent
77c606917b
commit
7b166ccc09
@@ -1,29 +1,37 @@
|
||||
----------------------------------------------------------------------------
|
||||
-----------------------------------------------------------------------------
|
||||
--
|
||||
-- Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
|
||||
-- Contact: http://www.qt-project.org/legal
|
||||
--
|
||||
-- This file is part of the QtQml module of the Qt Toolkit.
|
||||
-- This file is part of Qt Creator.
|
||||
--
|
||||
-- Commercial License Usage
|
||||
-- Licensees holding valid commercial Qt licenses may use this file in
|
||||
-- accordance with the commercial license agreement provided with the
|
||||
-- Software or, alternatively, in accordance with the terms contained in
|
||||
-- a written agreement between you and Digia. For licensing terms and
|
||||
-- conditions see http://qt.digia.com/licensing. For further information
|
||||
-- use the contact form at http://qt.digia.com/contact-us.
|
||||
--
|
||||
-- $QT_BEGIN_LICENSE:LGPL-ONLY$
|
||||
-- GNU Lesser General Public License Usage
|
||||
-- This file may be used under the terms of the GNU Lesser
|
||||
-- Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
-- General Public License version 2.1 as published by the Free Software
|
||||
-- Foundation and appearing in the file LICENSE.LGPL included in the
|
||||
-- packaging of this file. Please review the following information to
|
||||
-- ensure the GNU Lesser General Public License version 2.1 requirements
|
||||
-- will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
--
|
||||
-- If you have questions regarding the use of this file, please contact
|
||||
-- us via http://www.qt-project.org/.
|
||||
-- In addition, as a special exception, Digia gives you certain additional
|
||||
-- rights. These rights are described in the Digia Qt LGPL Exception
|
||||
-- version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
--
|
||||
-- $QT_END_LICENSE$
|
||||
--
|
||||
----------------------------------------------------------------------------
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
%parser QmlJSGrammar
|
||||
%decl qmljsparser_p.h
|
||||
%impl qmljsparser.cpp
|
||||
%impl qdeclarativejsparser.cpp
|
||||
%expect 2
|
||||
%expect-rr 2
|
||||
|
||||
@@ -60,7 +68,6 @@
|
||||
%token T_RESERVED_WORD "reserved word"
|
||||
%token T_MULTILINE_STRING_LITERAL "multiline string literal"
|
||||
%token T_COMMENT "comment"
|
||||
%token T_COMPATIBILITY_SEMICOLON
|
||||
|
||||
--- context keywords.
|
||||
%token T_PUBLIC "public"
|
||||
@@ -89,9 +96,8 @@
|
||||
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the QtQml module of the Qt Toolkit.
|
||||
** This file is part of Qt Creator.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
@@ -112,20 +118,10 @@
|
||||
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU General Public License version 3.0 requirements will be
|
||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtCore/QtDebug>
|
||||
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QCoreApplication>
|
||||
|
||||
#include <string.h>
|
||||
@@ -142,9 +138,8 @@
|
||||
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the QtQml module of the Qt Toolkit.
|
||||
** This file is part of Qt Creator.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
@@ -165,20 +160,10 @@
|
||||
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU General Public License version 3.0 requirements will be
|
||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
@@ -190,16 +175,9 @@
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is automatically generated from qmljs.g.
|
||||
// Changes should be made to that file, not here. Any change to this file will
|
||||
// be lost!
|
||||
//
|
||||
// To regenerate this file, run:
|
||||
// qlalr --no-debug --no-lines --qt qmljs.g
|
||||
// Changes will be lost.
|
||||
//
|
||||
|
||||
#ifndef QMLJSPARSER_P_H
|
||||
@@ -390,16 +368,9 @@ protected:
|
||||
#include "qmljsparser_p.h"
|
||||
#include <QVarLengthArray>
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is automatically generated from qmljs.g.
|
||||
// Changes should be made to that file, not here. Any change to this file will
|
||||
// be lost!
|
||||
//
|
||||
// To regenerate this file, run:
|
||||
// qlalr --no-debug --no-lines --qt qmljs.g
|
||||
// Changes will be lost.
|
||||
//
|
||||
|
||||
using namespace QmlJS;
|
||||
@@ -2440,7 +2411,6 @@ case $rule_number: {
|
||||
|
||||
|
||||
IterationStatement: T_DO Statement T_WHILE T_LPAREN Expression T_RPAREN T_AUTOMATIC_SEMICOLON ; -- automatic semicolon
|
||||
IterationStatement: T_DO Statement T_WHILE T_LPAREN Expression T_RPAREN T_COMPATIBILITY_SEMICOLON ; -- for JSC/V8 compatibility
|
||||
IterationStatement: T_DO Statement T_WHILE T_LPAREN Expression T_RPAREN T_SEMICOLON ;
|
||||
/.
|
||||
case $rule_number: {
|
||||
@@ -2905,8 +2875,7 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
|
||||
const int errorState = state_stack[tos];
|
||||
|
||||
// automatic insertion of `;'
|
||||
if (yytoken != -1 && ((t_action(errorState, T_AUTOMATIC_SEMICOLON) && lexer->canInsertAutomaticSemicolon(yytoken))
|
||||
|| t_action(errorState, T_COMPATIBILITY_SEMICOLON))) {
|
||||
if (yytoken != -1 && t_action(errorState, T_AUTOMATIC_SEMICOLON) && lexer->canInsertAutomaticSemicolon(yytoken)) {
|
||||
SavedToken &tk = token_buffer[0];
|
||||
tk.token = yytoken;
|
||||
tk.dval = yylval;
|
||||
@@ -2918,7 +2887,7 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
|
||||
yylloc.startColumn += yylloc.length;
|
||||
yylloc.length = 0;
|
||||
|
||||
//const QString msg = qApp->translate("QmlParser", "Missing `;'");
|
||||
//const QString msg = qApp->translate("QQmlParser", "Missing `;'");
|
||||
//diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning, yylloc, msg));
|
||||
|
||||
first_token = &token_buffer[0];
|
||||
@@ -2948,9 +2917,9 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
|
||||
QString msg;
|
||||
int token = token_buffer[0].token;
|
||||
if (token < 0 || token >= TERMINAL_COUNT)
|
||||
msg = qApp->translate("QmlParser", "Syntax error");
|
||||
msg = qApp->translate("QQmlParser", "Syntax error");
|
||||
else
|
||||
msg = qApp->translate("QmlParser", "Unexpected token `%1'").arg(QLatin1String(spell[token]));
|
||||
msg = qApp->translate("QQmlParser", "Unexpected token `%1'").arg(QLatin1String(spell[token]));
|
||||
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
|
||||
|
||||
action = errorState;
|
||||
@@ -2978,7 +2947,7 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
|
||||
for (int *tk = tokens; *tk != EOF_SYMBOL; ++tk) {
|
||||
int a = t_action(errorState, *tk);
|
||||
if (a > 0 && t_action(a, yytoken)) {
|
||||
const QString msg = qApp->translate("QmlParser", "Expected token `%1'").arg(QLatin1String(spell[*tk]));
|
||||
const QString msg = qApp->translate("QQmlParser", "Expected token `%1'").arg(QLatin1String(spell[*tk]));
|
||||
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
|
||||
|
||||
yytoken = *tk;
|
||||
@@ -3002,7 +2971,7 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
|
||||
|
||||
int a = t_action(errorState, tk);
|
||||
if (a > 0 && t_action(a, yytoken)) {
|
||||
const QString msg = qApp->translate("QmlParser", "Expected token `%1'").arg(QLatin1String(spell[tk]));
|
||||
const QString msg = qApp->translate("QQmlParser", "Expected token `%1'").arg(QLatin1String(spell[tk]));
|
||||
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
|
||||
|
||||
yytoken = tk;
|
||||
@@ -3015,7 +2984,7 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
|
||||
}
|
||||
}
|
||||
|
||||
const QString msg = qApp->translate("QmlParser", "Syntax error");
|
||||
const QString msg = qApp->translate("QQmlParser", "Syntax error");
|
||||
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user