Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
a10b9fba
Commit
a10b9fba
authored
Apr 01, 2009
by
Roberto Raggi
Browse files
Regenerated the parser.
parent
31100788
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
src/plugins/qtscripteditor/parser/gen.sh
View file @
a10b9fba
...
...
@@ -30,7 +30,7 @@ sed -f $me/cmd.sed $QTDIR/src/script/qscriptlexer.cpp > javascriptlexer.cpp
sed
-f
$me
/cmd.sed
$QTDIR
/src/script/qscriptmemorypool_p.h
>
javascriptmemorypool_p.h
sed
-f
$me
/cmd.sed
$QTDIR
/src/script/qscriptnodepool_p.h
>
javascriptnodepool_p.h
qlalr
$me
/javascript.g
qlalr
--troll
--no-lines
--no-debug
$me
/javascript.g
chmod
ugo-w javascript.g
chmod
ugo-w javascriptast.cpp
...
...
src/plugins/qtscripteditor/parser/javascriptgrammar.cpp
View file @
a10b9fba
// This file was generated by qlalr - DO NOT EDIT!
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $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 qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
#include "javascriptgrammar_p.h"
const
char
*
const
JavaScriptGrammar
::
spell
[]
=
{
...
...
@@ -10,20 +51,7 @@ const char *const JavaScriptGrammar::spell [] = {
"||"
,
"+"
,
"+="
,
"++"
,
"?"
,
"}"
,
"]"
,
"%"
,
"%="
,
"return"
,
")"
,
";"
,
0
,
"*"
,
"*="
,
"string literal"
,
"switch"
,
"this"
,
"throw"
,
"~"
,
"try"
,
"typeof"
,
"var"
,
"void"
,
"while"
,
"with"
,
"^"
,
"^="
,
"null"
,
"true"
,
"false"
,
"const"
,
"debugger"
,
"reserved word"
,
#ifndef QLALR_NO_JAVASCRIPTGRAMMAR_DEBUG_INFO
"Program"
,
"PrimaryExpression"
,
"ElisionOpt"
,
"ElementList"
,
"PropertyNameAndValueListOpt"
,
"PropertyNameAndValueList"
,
"Expression"
,
"AssignmentExpression"
,
"Elision"
,
"PropertyName"
,
"ReservedIdentifier"
,
"PropertyIdentifier"
,
"MemberExpression"
,
"FunctionExpression"
,
"Arguments"
,
"NewExpression"
,
"CallExpression"
,
"ArgumentList"
,
"LeftHandSideExpression"
,
"PostfixExpression"
,
"UnaryExpression"
,
"MultiplicativeExpression"
,
"AdditiveExpression"
,
"ShiftExpression"
,
"RelationalExpression"
,
"RelationalExpressionNotIn"
,
"EqualityExpression"
,
"EqualityExpressionNotIn"
,
"BitwiseANDExpression"
,
"BitwiseANDExpressionNotIn"
,
"BitwiseXORExpression"
,
"BitwiseXORExpressionNotIn"
,
"BitwiseORExpression"
,
"BitwiseORExpressionNotIn"
,
"LogicalANDExpression"
,
"LogicalANDExpressionNotIn"
,
"LogicalORExpression"
,
"LogicalORExpressionNotIn"
,
"ConditionalExpression"
,
"ConditionalExpressionNotIn"
,
"AssignmentExpressionNotIn"
,
"AssignmentOperator"
,
"ExpressionOpt"
,
"ExpressionNotIn"
,
"ExpressionNotInOpt"
,
"Statement"
,
"Block"
,
"VariableStatement"
,
"EmptyStatement"
,
"ExpressionStatement"
,
"IfStatement"
,
"IterationStatement"
,
"ContinueStatement"
,
"BreakStatement"
,
"ReturnStatement"
,
"WithStatement"
,
"LabelledStatement"
,
"SwitchStatement"
,
"ThrowStatement"
,
"TryStatement"
,
"DebuggerStatement"
,
"StatementListOpt"
,
"StatementList"
,
"VariableDeclarationKind"
,
"VariableDeclarationList"
,
"VariableDeclaration"
,
"VariableDeclarationListNotIn"
,
"VariableDeclarationNotIn"
,
"InitialiserOpt"
,
"InitialiserNotInOpt"
,
"Initialiser"
,
"InitialiserNotIn"
,
"CaseBlock"
,
"CaseClausesOpt"
,
"DefaultClause"
,
"CaseClauses"
,
"CaseClause"
,
"Catch"
,
"Finally"
,
"FunctionDeclaration"
,
"FormalParameterListOpt"
,
"FunctionBodyOpt"
,
"IdentifierOpt"
,
"FormalParameterList"
,
"FunctionBody"
,
"SourceElements"
,
"SourceElement"
,
"$accept"
#endif // QLALR_NO_JAVASCRIPTGRAMMAR_DEBUG_INFO
};
"false"
,
"const"
,
"debugger"
,
"reserved word"
};
const
int
JavaScriptGrammar
::
lhs
[]
=
{
85
,
85
,
85
,
85
,
85
,
85
,
85
,
85
,
85
,
85
,
...
...
@@ -83,309 +111,6 @@ const int JavaScriptGrammar:: rhs[] = {
8
,
8
,
1
,
3
,
0
,
1
,
0
,
1
,
1
,
1
,
1
,
2
,
1
,
1
,
0
,
1
,
0
,
1
,
2
};
#ifndef QLALR_NO_JAVASCRIPTGRAMMAR_DEBUG_INFO
const
int
JavaScriptGrammar
::
rule_info
[]
=
{
85
,
67
,
85
,
29
,
85
,
78
,
85
,
79
,
85
,
80
,
85
,
47
,
85
,
65
,
85
,
12
,
85
,
13
,
85
,
34
,
86
,
56
,
85
,
34
,
87
,
56
,
85
,
34
,
87
,
8
,
86
,
56
,
85
,
33
,
88
,
55
,
85
,
33
,
89
,
8
,
55
,
85
,
36
,
90
,
60
,
87
,
86
,
91
,
87
,
87
,
8
,
86
,
91
,
92
,
8
,
92
,
92
,
8
,
86
,
86
,
92
,
89
,
93
,
7
,
91
,
89
,
89
,
8
,
93
,
7
,
91
,
93
,
29
,
93
,
65
,
93
,
47
,
93
,
94
,
94
,
4
,
94
,
5
,
94
,
6
,
94
,
9
,
94
,
10
,
94
,
11
,
94
,
14
,
94
,
16
,
94
,
80
,
94
,
20
,
94
,
21
,
94
,
22
,
94
,
30
,
94
,
31
,
94
,
32
,
94
,
43
,
94
,
78
,
94
,
59
,
94
,
66
,
94
,
67
,
94
,
68
,
94
,
79
,
94
,
70
,
94
,
71
,
94
,
72
,
94
,
73
,
94
,
74
,
94
,
81
,
94
,
82
,
94
,
83
,
94
,
75
,
95
,
29
,
95
,
94
,
96
,
85
,
96
,
97
,
96
,
96
,
34
,
90
,
56
,
96
,
96
,
15
,
95
,
96
,
43
,
96
,
98
,
99
,
96
,
99
,
43
,
99
,
100
,
96
,
98
,
100
,
100
,
98
,
100
,
100
,
34
,
90
,
56
,
100
,
100
,
15
,
95
,
98
,
36
,
60
,
98
,
36
,
101
,
60
,
101
,
91
,
101
,
101
,
8
,
91
,
102
,
99
,
102
,
100
,
103
,
102
,
103
,
102
,
53
,
103
,
102
,
42
,
104
,
103
,
104
,
11
,
104
,
104
,
73
,
104
,
104
,
71
,
104
,
104
,
53
,
104
,
104
,
42
,
104
,
104
,
51
,
104
,
104
,
40
,
104
,
104
,
69
,
104
,
104
,
44
,
104
,
105
,
104
,
105
,
105
,
63
,
104
,
105
,
105
,
12
,
104
,
105
,
105
,
57
,
104
,
106
,
105
,
106
,
106
,
51
,
105
,
106
,
106
,
40
,
105
,
107
,
106
,
107
,
107
,
38
,
106
,
107
,
107
,
25
,
106
,
107
,
107
,
27
,
106
,
108
,
107
,
108
,
108
,
37
,
107
,
108
,
108
,
24
,
107
,
108
,
108
,
35
,
107
,
108
,
108
,
23
,
107
,
108
,
108
,
32
,
107
,
108
,
108
,
31
,
107
,
109
,
107
,
109
,
109
,
37
,
107
,
109
,
109
,
24
,
107
,
109
,
109
,
35
,
107
,
109
,
109
,
23
,
107
,
109
,
109
,
32
,
107
,
110
,
108
,
110
,
110
,
18
,
108
,
110
,
110
,
45
,
108
,
110
,
110
,
19
,
108
,
110
,
110
,
46
,
108
,
111
,
109
,
111
,
111
,
18
,
109
,
111
,
111
,
45
,
109
,
111
,
111
,
19
,
109
,
111
,
111
,
46
,
109
,
112
,
110
,
112
,
112
,
1
,
110
,
113
,
111
,
113
,
113
,
1
,
111
,
114
,
112
,
114
,
114
,
76
,
112
,
115
,
113
,
115
,
115
,
76
,
113
,
116
,
114
,
116
,
116
,
48
,
114
,
117
,
115
,
117
,
117
,
48
,
115
,
118
,
116
,
118
,
118
,
2
,
116
,
119
,
117
,
119
,
119
,
2
,
117
,
120
,
118
,
120
,
120
,
50
,
118
,
121
,
119
,
121
,
121
,
50
,
119
,
122
,
120
,
122
,
120
,
54
,
91
,
7
,
91
,
123
,
121
,
123
,
121
,
54
,
124
,
7
,
124
,
91
,
122
,
91
,
102
,
125
,
91
,
124
,
123
,
124
,
102
,
125
,
124
,
125
,
17
,
125
,
64
,
125
,
13
,
125
,
58
,
125
,
52
,
125
,
41
,
125
,
39
,
125
,
26
,
125
,
28
,
125
,
3
,
125
,
77
,
125
,
49
,
90
,
91
,
90
,
90
,
8
,
91
,
126
,
126
,
90
,
127
,
124
,
127
,
127
,
8
,
124
,
128
,
128
,
127
,
129
,
130
,
129
,
131
,
129
,
132
,
129
,
133
,
129
,
134
,
129
,
135
,
129
,
136
,
129
,
137
,
129
,
138
,
129
,
139
,
129
,
140
,
129
,
141
,
129
,
142
,
129
,
143
,
129
,
144
,
130
,
33
,
145
,
55
,
146
,
129
,
146
,
146
,
129
,
145
,
145
,
146
,
131
,
147
,
148
,
62
,
131
,
147
,
148
,
61
,
147
,
81
,
147
,
72
,
148
,
149
,
148
,
148
,
8
,
149
,
150
,
151
,
150
,
150
,
8
,
151
,
149
,
29
,
152
,
151
,
29
,
153
,
154
,
17
,
91
,
152
,
152
,
154
,
155
,
17
,
124
,
153
,
153
,
155
,
132
,
61
,
133
,
90
,
62
,
133
,
90
,
61
,
134
,
30
,
36
,
90
,
60
,
129
,
16
,
129
,
134
,
30
,
36
,
90
,
60
,
129
,
135
,
14
,
129
,
74
,
36
,
90
,
60
,
62
,
135
,
14
,
129
,
74
,
36
,
90
,
60
,
61
,
135
,
74
,
36
,
90
,
60
,
129
,
135
,
21
,
36
,
128
,
61
,
126
,
61
,
126
,
60
,
129
,
135
,
21
,
36
,
72
,
150
,
61
,
126
,
61
,
126
,
60
,
129
,
135
,
21
,
36
,
102
,
31
,
90
,
60
,
129
,
135
,
21
,
36
,
72
,
151
,
31
,
90
,
60
,
129
,
136
,
9
,
62
,
136
,
9
,
61
,
136
,
9
,
29
,
62
,
136
,
9
,
29
,
61
,
137
,
4
,
62
,
137
,
4
,
61
,
137
,
4
,
29
,
62
,
137
,
4
,
29
,
61
,
138
,
59
,
126
,
62
,
138
,
59
,
126
,
61
,
139
,
75
,
36
,
90
,
60
,
129
,
141
,
66
,
36
,
90
,
60
,
156
,
156
,
33
,
157
,
55
,
156
,
33
,
157
,
158
,
157
,
55
,
159
,
160
,
159
,
159
,
160
,
157
,
157
,
159
,
160
,
5
,
90
,
7
,
145
,
158
,
10
,
7
,
145
,
140
,
29
,
7
,
129
,
142
,
68
,
90
,
62
,
142
,
68
,
90
,
61
,
143
,
70
,
130
,
161
,
143
,
70
,
130
,
162
,
143
,
70
,
130
,
161
,
162
,
161
,
6
,
36
,
29
,
60
,
130
,
162
,
20
,
130
,
144
,
82
,
62
,
144
,
82
,
61
,
163
,
22
,
29
,
36
,
164
,
60
,
33
,
165
,
55
,
97
,
22
,
166
,
36
,
164
,
60
,
33
,
165
,
55
,
167
,
29
,
167
,
167
,
8
,
29
,
164
,
164
,
167
,
165
,
165
,
168
,
168
,
169
,
84
,
169
,
169
,
170
,
169
,
169
,
170
,
170
,
129
,
170
,
163
,
166
,
166
,
29
,
88
,
88
,
89
,
171
,
84
,
0
};
const
int
JavaScriptGrammar
::
rule_index
[]
=
{
0
,
2
,
4
,
6
,
8
,
10
,
12
,
14
,
16
,
18
,
22
,
26
,
32
,
36
,
41
,
45
,
48
,
53
,
55
,
58
,
59
,
61
,
65
,
71
,
73
,
75
,
77
,
79
,
81
,
83
,
85
,
87
,
89
,
91
,
93
,
95
,
97
,
99
,
101
,
103
,
105
,
107
,
109
,
111
,
113
,
115
,
117
,
119
,
121
,
123
,
125
,
127
,
129
,
131
,
133
,
135
,
137
,
139
,
141
,
143
,
145
,
147
,
149
,
154
,
158
,
162
,
164
,
167
,
170
,
173
,
178
,
182
,
185
,
189
,
191
,
195
,
197
,
199
,
201
,
204
,
207
,
209
,
212
,
215
,
218
,
221
,
224
,
227
,
230
,
233
,
236
,
238
,
242
,
246
,
250
,
252
,
256
,
260
,
262
,
266
,
270
,
274
,
276
,
280
,
284
,
288
,
292
,
296
,
300
,
302
,
306
,
310
,
314
,
318
,
322
,
324
,
328
,
332
,
336
,
340
,
342
,
346
,
350
,
354
,
358
,
360
,
364
,
366
,
370
,
372
,
376
,
378
,
382
,
384
,
388
,
390
,
394
,
396
,
400
,
402
,
406
,
408
,
412
,
414
,
418
,
420
,
426
,
428
,
434
,
436
,
440
,
442
,
446
,
448
,
450
,
452
,
454
,
456
,
458
,
460
,
462
,
464
,
466
,
468
,
470
,
472
,
476
,
477
,
479
,
481
,
485
,
486
,
488
,
490
,
492
,
494
,
496
,
498
,
500
,
502
,
504
,
506
,
508
,
510
,
512
,
514
,
516
,
518
,
522
,
524
,
527
,
528
,
530
,
534
,
538
,
540
,
542
,
544
,
548
,
550
,
554
,
557
,
560
,
563
,
564
,
566
,
569
,
570
,
572
,
574
,
577
,
580
,
588
,
594
,
602
,
610
,
616
,
626
,
637
,
645
,
654
,
657
,
660
,
664
,
668
,
671
,
674
,
678
,
682
,
686
,
690
,
696
,
702
,
706
,
712
,
714
,
717
,
718
,
720
,
725
,
729
,
733
,
737
,
741
,
745
,
749
,
754
,
760
,
763
,
766
,
769
,
778
,
787
,
789
,
793
,
794
,
796
,
797
,
799
,
801
,
803
,
805
,
808
,
810
,
812
,
813
,
815
,
816
,
818
};
#endif // QLALR_NO_JAVASCRIPTGRAMMAR_DEBUG_INFO
const
int
JavaScriptGrammar
::
action_default
[]
=
{
0
,
98
,
165
,
129
,
137
,
133
,
173
,
180
,
77
,
149
,
179
,
187
,
175
,
125
,
0
,
176
,
264
,
62
,
177
,
178
,
...
...
src/plugins/qtscripteditor/parser/javascriptgrammar_p.h
View file @
a10b9fba
// This file was generated by qlalr - DO NOT EDIT!
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $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 qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
//
// 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.
//
#ifndef JAVASCRIPTGRAMMAR_P_H
#define JAVASCRIPTGRAMMAR_P_H
...
...
@@ -105,12 +157,6 @@ public:
static
const
char
*
const
spell
[];
static
const
int
lhs
[];
static
const
int
rhs
[];
#ifndef QLALR_NO_JAVASCRIPTGRAMMAR_DEBUG_INFO
static
const
int
rule_index
[];
static
const
int
rule_info
[];
#endif // QLALR_NO_JAVASCRIPTGRAMMAR_DEBUG_INFO
static
const
int
goto_default
[];
static
const
int
action_default
[];
static
const
int
action_index
[];
...
...
src/plugins/qtscripteditor/parser/javascriptparser.cpp
View file @
a10b9fba
This diff is collapsed.
Click to expand it.
src/plugins/qtscripteditor/parser/javascriptparser_p.h
View file @
a10b9fba
// This file was generated by qlalr - DO NOT EDIT!
#line 151 "./javascript.g"
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
...
...
@@ -204,16 +202,10 @@ inline void JavaScriptParser::reallocateStack()
}
#line 510 "./javascript.g"
#define J_SCRIPT_REGEXPLITERAL_RULE1 7
#line 527 "./javascript.g"
#define J_SCRIPT_REGEXPLITERAL_RULE2 8
#line 2190 "./javascript.g"
QT_END_NAMESPACE
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment