summaryrefslogtreecommitdiffstats
path: root/src/script/parser/qscriptgrammar_p.h
diff options
context:
space:
mode:
authorPeter Hartmann <peter.hartmann@nokia.com>2009-10-29 13:15:59 (GMT)
committerPeter Hartmann <peter.hartmann@nokia.com>2009-11-11 10:12:12 (GMT)
commit1502df3ddedc5a4365e12bce570d946744259785 (patch)
tree977757c93743bce8df23a180e64a08f749935ba7 /src/script/parser/qscriptgrammar_p.h
parentc412b5f144ea99ea70f4df291678631e13900962 (diff)
downloadQt-1502df3ddedc5a4365e12bce570d946744259785.zip
Qt-1502df3ddedc5a4365e12bce570d946744259785.tar.gz
Qt-1502df3ddedc5a4365e12bce570d946744259785.tar.bz2
utils/qlalr generator: adapt changes to xmlstream and script files
some changes were made to qxmlstream_p.h and script files directly; however, those files are generated automatically by src/corelib/xml/make-parser.sh and src/script/parser/make-parser.sh, respectively, so the generator would overwrite the manual changes to the files the next time it is run. This patch integrates those changes into the generator rather than into the files directly. Reviewed-by: Roberto Raggi Reviewed-by: Olivier Goffart
Diffstat (limited to 'src/script/parser/qscriptgrammar_p.h')
-rw-r--r--src/script/parser/qscriptgrammar_p.h39
1 files changed, 17 insertions, 22 deletions
diff --git a/src/script/parser/qscriptgrammar_p.h b/src/script/parser/qscriptgrammar_p.h
index 9e0f4f8..0cb6d22 100644
--- a/src/script/parser/qscriptgrammar_p.h
+++ b/src/script/parser/qscriptgrammar_p.h
@@ -39,11 +39,6 @@
**
****************************************************************************/
-// This file was generated by qlalr - DO NOT EDIT!
-
-#ifndef QSCRIPTGRAMMAR_P_H
-#define QSCRIPTGRAMMAR_P_H
-
//
// W A R N I N G
// -------------
@@ -55,6 +50,10 @@
// We mean it.
//
+// This file was generated by qlalr - DO NOT EDIT!
+#ifndef QSCRIPTGRAMMAR_P_H
+#define QSCRIPTGRAMMAR_P_H
+
#include <QtCore/qglobal.h>
QT_BEGIN_NAMESPACE
@@ -159,33 +158,28 @@ public:
GOTO_CHECK_OFFSET = 1562
};
- static const char *const spell [];
- static const int lhs [];
- static const int rhs [];
+ static const char *const spell [];
+ static const short lhs [];
+ static const short rhs [];
#ifndef QLALR_NO_QSCRIPTGRAMMAR_DEBUG_INFO
static const int rule_index [];
static const int rule_info [];
#endif // QLALR_NO_QSCRIPTGRAMMAR_DEBUG_INFO
- 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 short goto_default [];
+ static const short action_default [];
+ static const short action_index [];
+ static const short action_info [];
+ static const short action_check [];
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];
}
static inline int t_action (int state, int token)
@@ -199,6 +193,7 @@ public:
}
};
-QT_END_NAMESPACE
+QT_END_NAMESPACE
#endif // QSCRIPTGRAMMAR_P_H
+