diff options
author | Erik Verbruggen <erik.verbruggen@me.com> | 2013-08-09 12:09:39 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@digia.com> | 2013-08-11 22:28:26 +0200 |
commit | a803a5c2142cd93a33ab5d3e549d794b1096bf0a (patch) | |
tree | ddc6c72749976ef287a4a6fb27acd9613e3dcaf8 | |
parent | 3609aae024abd8eae9bb38614f7aa1acaaf5e050 (diff) |
Fix copyright year and regenerated the parser.
Change-Id: Idb30a6b567d36f21d4d35bac51c0241742c42c44
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
-rw-r--r-- | src/compress.cpp | 2 | ||||
-rw-r--r-- | src/compress.h | 2 | ||||
-rw-r--r-- | src/cppgenerator.cpp | 4 | ||||
-rw-r--r-- | src/cppgenerator.h | 2 | ||||
-rw-r--r-- | src/dotgraph.cpp | 2 | ||||
-rw-r--r-- | src/dotgraph.h | 2 | ||||
-rw-r--r-- | src/grammar.cpp | 22 | ||||
-rw-r--r-- | src/grammar_p.h | 54 | ||||
-rw-r--r-- | src/lalr.cpp | 2 | ||||
-rw-r--r-- | src/lalr.g | 26 | ||||
-rw-r--r-- | src/lalr.h | 2 | ||||
-rw-r--r-- | src/main.cpp | 2 | ||||
-rw-r--r-- | src/parsetable.cpp | 2 | ||||
-rw-r--r-- | src/parsetable.h | 2 | ||||
-rw-r--r-- | src/recognizer.cpp | 17 | ||||
-rw-r--r-- | src/recognizer.h | 13 | ||||
-rw-r--r-- | src/src.pro | 2 |
17 files changed, 89 insertions, 69 deletions
diff --git a/src/compress.cpp b/src/compress.cpp index ce0fd62..bd35b17 100644 --- a/src/compress.cpp +++ b/src/compress.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the test suite module of the Qt Toolkit. diff --git a/src/compress.h b/src/compress.h index 03f770e..64c2bba 100644 --- a/src/compress.h +++ b/src/compress.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the utils of the Qt Toolkit. diff --git a/src/cppgenerator.cpp b/src/cppgenerator.cpp index df3501b..e8bf7ba 100644 --- a/src/cppgenerator.cpp +++ b/src/cppgenerator.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QLALR module of the Qt Toolkit. @@ -51,7 +51,7 @@ QString CppGenerator::copyrightHeader() const return QLatin1String( "/****************************************************************************\n" "**\n" - "** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).\n" + "** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).\n" "** Contact: http://www.qt-project.org/legal\n" "**\n" "** This file is part of the Qt Toolkit.\n" diff --git a/src/cppgenerator.h b/src/cppgenerator.h index 0153ea3..3ee5dc9 100644 --- a/src/cppgenerator.h +++ b/src/cppgenerator.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QLALR module of the Qt Toolkit. diff --git a/src/dotgraph.cpp b/src/dotgraph.cpp index ee615dd..de3ff83 100644 --- a/src/dotgraph.cpp +++ b/src/dotgraph.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the utils of the Qt Toolkit. diff --git a/src/dotgraph.h b/src/dotgraph.h index 30149e9..587817d 100644 --- a/src/dotgraph.h +++ b/src/dotgraph.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the utils of the Qt Toolkit. diff --git a/src/grammar.cpp b/src/grammar.cpp index 3e7ddd1..f1c32ad 100644 --- a/src/grammar.cpp +++ b/src/grammar.cpp @@ -1,9 +1,9 @@ /**************************************************************************** ** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the utils of the Qt Toolkit. +** This file is part of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage @@ -39,28 +39,31 @@ ** ****************************************************************************/ +// This file was generated by qlalr - DO NOT EDIT! #include "grammar_p.h" +QT_BEGIN_NAMESPACE + const char *const grammar::spell [] = { "end of file", "identifier", "string literal", "%decl", "%expect", "%expect-lr", "%impl", "%left", "%merged_output", "%nonassoc", "%parser", "%prec", "%right", "%start", "%token", "%token_prefix", ":", "|", ";", 0, 0, 0}; -const int grammar::lhs [] = { +const short grammar::lhs [] = { 22, 23, 23, 29, 25, 28, 28, 28, 28, 28, 28, 28, 24, 24, 31, 32, 32, 33, 33, 34, 34, 34, 31, 35, 35, 36, 37, 37, 38, 38, 30, 30, 26, 26, 40, 39, 41, 41, 44, 43, 43, 42, 42, 27, 45}; -const int grammar:: rhs[] = { +const short grammar::rhs [] = { 4, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 0, 1, 1, 2, 2, 4, 3, 6, 0, 0, 2, 1, 2, 0, 2}; -const int grammar::action_default [] = { +const short grammar::action_default [] = { 44, 2, 44, 0, 0, 0, 0, 13, 0, 0, 3, 0, 0, 0, 8, 10, 11, 9, 7, 6, 12, 20, 22, 0, 21, 0, 44, 31, 0, 14, @@ -69,12 +72,12 @@ const int grammar::action_default [] = { 31, 41, 29, 27, 28, 32, 38, 30, 36, 31, 37, 5, 44, 16, 15, 18, 19, 17, 45}; -const int grammar::goto_default [] = { +const short grammar::goto_default [] = { 3, 2, 13, 26, 36, 41, 10, 27, 61, 29, 64, 63, 23, 32, 31, 52, 55, 38, 39, 42, 43, 59, 44, 0}; -const int grammar::action_index [] = { +const short grammar::action_index [] = { -22, -22, 54, 1, 5, 15, 20, -22, -1, 6, -22, 3, 2, 35, -22, -22, -22, -22, -22, -22, -22, -22, -22, 10, -22, 7, -22, 14, 9, -22, @@ -91,7 +94,7 @@ const int grammar::action_index [] = { 15, -24, -24, -24, -24, -10, -24, -24, -24, 1, -24, -24, -3, -24, -1, -24, -24, -24, -24}; -const int grammar::action_info [] = { +const short grammar::action_info [] = { 17, 68, 66, 20, 19, 51, 14, 18, 34, 30, 62, 30, 37, 62, 40, 45, 15, 48, 48, 0, 0, 16, 0, 0, 0, 0, 0, 49, 49, 0, @@ -106,7 +109,7 @@ const int grammar::action_info [] = { 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; -const int grammar::action_check [] = { +const short grammar::action_check [] = { 1, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 18, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, -1, 11, 11, -1, @@ -121,3 +124,4 @@ const int grammar::action_check [] = { -1, -1, -1, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; +QT_END_NAMESPACE diff --git a/src/grammar_p.h b/src/grammar_p.h index dde75a7..e2f294e 100644 --- a/src/grammar_p.h +++ b/src/grammar_p.h @@ -1,9 +1,9 @@ /**************************************************************************** ** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the utils of the Qt Toolkit. +** This file is part of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage @@ -39,13 +39,29 @@ ** ****************************************************************************/ +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +// This file was generated by qlalr - DO NOT EDIT! #ifndef GRAMMAR_P_H #define GRAMMAR_P_H +#include <QtCore/qglobal.h> + +QT_BEGIN_NAMESPACE + class grammar { public: - enum { + enum VariousConstants { EOF_SYMBOL = 0, COLON = 16, DECL = 19, @@ -80,30 +96,25 @@ public: GOTO_CHECK_OFFSET = 76 }; - static const char *const spell []; - static const int lhs []; - static const int rhs []; - static const int goto_default []; - static const int action_default []; - static const int action_index []; - static const int action_info []; - static const int action_check []; + static const char *const spell []; + static const short lhs []; + static const short rhs []; + static const short goto_default []; + static const short action_default []; + static const short action_index []; + static const short action_info []; + static const short action_check []; - inline int nt_action (int state, int nt) const + static inline int nt_action (int state, int nt) { - const int *const goto_index = &action_index [GOTO_INDEX_OFFSET]; - const int *const goto_check = &action_check [GOTO_CHECK_OFFSET]; - - const int yyn = goto_index [state] + nt; - - if (yyn < 0 || goto_check [yyn] != nt) + const int yyn = action_index [GOTO_INDEX_OFFSET + state] + nt; + if (yyn < 0 || action_check [GOTO_CHECK_OFFSET + yyn] != nt) return goto_default [nt]; - const int *const goto_info = &action_info [GOTO_INFO_OFFSET]; - return goto_info [yyn]; + return action_info [GOTO_INFO_OFFSET + yyn]; } - inline int t_action (int state, int token) const + static inline int t_action (int state, int token) { const int yyn = action_index [state] + token; @@ -115,5 +126,6 @@ public: }; +QT_END_NAMESPACE #endif // GRAMMAR_P_H diff --git a/src/lalr.cpp b/src/lalr.cpp index d8e399b..6a14c0d 100644 --- a/src/lalr.cpp +++ b/src/lalr.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the utils of the Qt Toolkit. @@ -1,6 +1,6 @@ ----------------------------------------------------------------------------- -- --- Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +-- Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -- Contact: http://www.qt-project.org/legal -- -- This file is part of the QLALR project on Qt Labs. @@ -77,7 +77,7 @@ /: /**************************************************************************** ** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QLALR project on Qt Labs. @@ -150,10 +150,10 @@ protected: // scanner { if (_M_currentChar != _M_lastChar) { - ch = *_M_currentChar++; - - if (ch == QLatin1Char('\n')) - ++_M_line; + ch = *_M_currentChar++; + + if (ch == QLatin1Char('\n')) + ++_M_line; } else ch = QChar(); @@ -191,7 +191,7 @@ protected: /. /**************************************************************************** ** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QLALR project on Qt Labs. @@ -274,7 +274,7 @@ int Recognizer::nextToken() Lagain: while (ch.isSpace ()) inp (); - + if (ch.isNull ()) return EOF_SYMBOL; @@ -407,8 +407,8 @@ int Recognizer::nextToken() _M_current_value = text; return (token = DECL); } - else - text += QLatin1String (":/"); + else + text += QLatin1String (":/"); } } @@ -445,8 +445,8 @@ int Recognizer::nextToken() _M_current_value = text; return (token = IMPL); } - else - text += QLatin1String ("./"); + else + text += QLatin1String ("./"); } } @@ -786,7 +786,7 @@ case $rule_number: { state_stack [tos] = nt_action (act, lhs [r] - TERMINAL_COUNT); } - + else { break; @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the utils of the Qt Toolkit. diff --git a/src/main.cpp b/src/main.cpp index f130db2..8e42b4e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the utils of the Qt Toolkit. diff --git a/src/parsetable.cpp b/src/parsetable.cpp index aab018f..25c7f8f 100644 --- a/src/parsetable.cpp +++ b/src/parsetable.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the utils of the Qt Toolkit. diff --git a/src/parsetable.h b/src/parsetable.h index 99ab245..75922ab 100644 --- a/src/parsetable.h +++ b/src/parsetable.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the utils of the Qt Toolkit. diff --git a/src/recognizer.cpp b/src/recognizer.cpp index 5e4d7d2..d68d6fb 100644 --- a/src/recognizer.cpp +++ b/src/recognizer.cpp @@ -1,9 +1,10 @@ + /**************************************************************************** ** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the utils of the Qt Toolkit. +** This file is part of the QLALR project on Qt Labs. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage @@ -83,7 +84,7 @@ int Recognizer::nextToken() Lagain: while (ch.isSpace ()) inp (); - + if (ch.isNull ()) return EOF_SYMBOL; @@ -216,8 +217,8 @@ int Recognizer::nextToken() _M_current_value = text; return (token = DECL); } - else - text += QLatin1String (":/"); + else + text += QLatin1String (":/"); } } @@ -254,8 +255,8 @@ int Recognizer::nextToken() _M_current_value = text; return (token = IMPL); } - else - text += QLatin1String (""); + else + text += QLatin1String (""); } } @@ -475,7 +476,7 @@ case 43: { state_stack [tos] = nt_action (act, lhs [r] - TERMINAL_COUNT); } - + else { break; diff --git a/src/recognizer.h b/src/recognizer.h index c89cc1d..9c64fac 100644 --- a/src/recognizer.h +++ b/src/recognizer.h @@ -1,9 +1,10 @@ + /**************************************************************************** ** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the utils of the Qt Toolkit. +** This file is part of the QLALR project on Qt Labs. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage @@ -73,10 +74,10 @@ protected: // scanner { if (_M_currentChar != _M_lastChar) { - ch = *_M_currentChar++; - - if (ch == QLatin1Char('\n')) - ++_M_line; + ch = *_M_currentChar++; + + if (ch == QLatin1Char('\n')) + ++_M_line; } else ch = QChar(); diff --git a/src/src.pro b/src/src.pro index 1994a73..2d61752 100644 --- a/src/src.pro +++ b/src/src.pro @@ -20,3 +20,5 @@ HEADERS += compress.h \ lalr.h \ parsetable.h \ grammar_p.h + +OTHER_FILES = lalr.g |