summaryrefslogtreecommitdiffstats
path: root/util/qlalr/grammar.cpp
blob: 26f8378c897e59a075cc72e588dd4137791097d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QLALR project on Qt Labs.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
** contained in the either Technology Preview License Agreement or the
** Beta Release License Agreement.
**
** GNU Lesser General Public License Usage
** 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.
**
** In addition, as a special exception, Nokia gives you certain
** additional rights. These rights are described in the Nokia Qt LGPL
** Exception version 1.0, 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.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/

#include "grammar_p.h"

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 [] = {
  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[] = {
  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 [] = {
  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, 
  26, 24, 23, 25, 4, 33, 1, 0, 34, 44, 
  35, 42, 39, 40, 0, 31, 44, 40, 43, 0, 
  31, 41, 29, 27, 28, 32, 38, 30, 36, 31, 
  37, 5, 44, 16, 15, 18, 19, 17, 45};

const int 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 [] = {
  -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, 
  -22, -22, 8, -22, -22, -22, 11, -2, -22, -22, 
  -22, -22, -3, 16, 13, 14, -22, 17, -22, 4, 
  14, -22, -22, -22, -22, 14, -22, -22, -22, 14, 
  -22, -22, 0, -22, 12, -22, -22, -22, -22, 

  2, -24, -2, -24, -24, -24, -24, -24, -24, -24, 
  -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, 
  -24, -24, -24, -24, -24, -24, -4, -24, -24, -24, 
  -24, -24, -14, -24, -24, -24, -24, -24, -24, -24, 
  -24, -24, -24, -24, -24, 0, -16, -15, -24, -24, 
  15, -24, -24, -24, -24, -10, -24, -24, -24, 1, 
  -24, -24, -3, -24, -1, -24, -24, -24, -24};

const int 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, 
  46, 0, 0, 53, 54, 0, 0, 0, 0, 0, 
  0, 0, 21, 0, 22, 0, 0, 24, 25, 28, 
  0, 0, 0, 0, 0, 0, 0, 4, 5, 6, 
  8, 0, 9, 0, 11, 0, 0, 0, 0, 12, 
  0, 0, 0, 0, 0, 0, 

  33, 35, 65, 7, 47, 57, 50, 1, 58, 60, 
  67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
  0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 
  0, 0, 0, 0, 0, 0, 0, 0, 0};

const int 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, 
  17, -1, -1, 19, 20, -1, -1, -1, -1, -1, 
  -1, -1, 7, -1, 9, -1, -1, 12, 13, 14, 
  -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, 
  6, -1, 8, -1, 10, -1, -1, -1, -1, 15, 
  -1, -1, -1, -1, -1, -1, 

  14, 5, 5, 5, 20, 15, 21, 5, 8, 8, 
  11, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
  -1, -1, -1, 8, -1, -1, -1, -1, -1, -1, 
  -1, -1, -1, -1, -1, -1, -1, -1, -1};