- Notifications
You must be signed in to change notification settings - Fork28
Commitb6afae7
committed
Use %option bison-bridge in psql/pgbench lexers.
The point of this change is to use %pure-parser in pgbench's exprparse.y.The immediate reason is that it turns out very ancient versions of bisonhave a bug with the combination of a reentrant lexer and non-reentrantparser. We could consider dropping support for such ancient bisons; butconsidering that we might well need exprparse.y to be reentrant some day,it seems better to make it so right now than to move the portabilitygoalposts. (AFAICT there's no particular performance consequence to thischange, either, so there's no good reason not to do it.)Now, %pure-parser assumes that the called lexer is built with %optionbison-bridge. Because we're assuming bitwise compatibility of yyscan_t(yyguts_t) data structures among all the psql/pgbench lexers, thatrequirement propagates back to psql's lexers as well. But it's just afew lines of change on that side too; and if psqlscan.l is to set thebaseline for a possibly-large family of lexers, it should err on theside of including not omitting useful features.1 parent6f1f34c commitb6afae7
File tree
5 files changed
+39
-12
lines changed- src/bin
- pgbench
- psql
5 files changed
+39
-12
lines changedLines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
28 | 28 |
| |
29 | 29 |
| |
30 | 30 |
| |
| 31 | + | |
31 | 32 |
| |
32 | 33 |
| |
33 | 34 |
| |
| |||
263 | 264 |
| |
264 | 265 |
| |
265 | 266 |
| |
| 267 | + | |
| 268 | + | |
266 | 269 |
| |
267 | 270 |
|
Lines changed: 8 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
47 | 47 |
| |
48 | 48 |
| |
49 | 49 |
| |
| 50 | + | |
50 | 51 |
| |
51 | 52 |
| |
52 | 53 |
| |
| |||
117 | 118 |
| |
118 | 119 |
| |
119 | 120 |
| |
120 |
| - | |
| 121 | + | |
121 | 122 |
| |
122 | 123 |
| |
123 | 124 |
| |
124 |
| - | |
| 125 | + | |
125 | 126 |
| |
126 | 127 |
| |
127 | 128 |
| |
128 |
| - | |
| 129 | + | |
129 | 130 |
| |
130 | 131 |
| |
131 | 132 |
| |
| |||
169 | 170 |
| |
170 | 171 |
| |
171 | 172 |
| |
| 173 | + | |
172 | 174 |
| |
173 | 175 |
| |
174 | 176 |
| |
| |||
179 | 181 |
| |
180 | 182 |
| |
181 | 183 |
| |
182 |
| - | |
| 184 | + | |
183 | 185 |
| |
184 | 186 |
| |
185 | 187 |
| |
| |||
210 | 212 |
| |
211 | 213 |
| |
212 | 214 |
| |
| 215 | + | |
213 | 216 |
| |
214 | 217 |
| |
215 | 218 |
| |
| |||
228 | 231 |
| |
229 | 232 |
| |
230 | 233 |
| |
231 |
| - | |
| 234 | + | |
232 | 235 |
| |
233 | 236 |
| |
234 | 237 |
| |
|
Lines changed: 9 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
20 |
| - | |
21 |
| - | |
| 20 | + | |
| 21 | + | |
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
25 | 31 |
| |
26 | 32 |
| |
27 | 33 |
| |
| |||
85 | 91 |
| |
86 | 92 |
| |
87 | 93 |
| |
88 |
| - | |
| 94 | + | |
89 | 95 |
| |
90 | 96 |
| |
91 | 97 |
| |
|
Lines changed: 8 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
38 | 44 |
| |
39 | 45 |
| |
40 | 46 |
| |
| |||
64 | 70 |
| |
65 | 71 |
| |
66 | 72 |
| |
| 73 | + | |
67 | 74 |
| |
68 | 75 |
| |
69 | 76 |
| |
| |||
1002 | 1009 |
| |
1003 | 1010 |
| |
1004 | 1011 |
| |
1005 |
| - | |
| 1012 | + | |
1006 | 1013 |
| |
1007 | 1014 |
| |
1008 | 1015 |
| |
|
Lines changed: 11 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
29 | 35 |
| |
30 | 36 |
| |
31 | 37 |
| |
| |||
62 | 68 |
| |
63 | 69 |
| |
64 | 70 |
| |
| 71 | + | |
65 | 72 |
| |
| 73 | + | |
66 | 74 |
| |
67 | 75 |
| |
68 | 76 |
| |
| |||
447 | 455 |
| |
448 | 456 |
| |
449 | 457 |
| |
450 |
| - | |
| 458 | + | |
451 | 459 |
| |
452 | 460 |
| |
453 | 461 |
| |
| |||
521 | 529 |
| |
522 | 530 |
| |
523 | 531 |
| |
524 |
| - | |
| 532 | + | |
525 | 533 |
| |
526 | 534 |
| |
527 | 535 |
| |
| |||
648 | 656 |
| |
649 | 657 |
| |
650 | 658 |
| |
651 |
| - | |
| 659 | + | |
652 | 660 |
| |
653 | 661 |
| |
654 | 662 |
| |
|
0 commit comments
Comments
(0)