Commit ec937d0
committed
Align ECPG lexer more closely with the core and psql lexers.
Make a bunch of basically-cosmetic changes to reduce the diffs between
the flex rules in scan.l, psqlscan.l, and pgc.l. Reorder some code,
adjust a lot of whitespace, sync some comments, make use of flex start
condition scopes to do that.
There are a few non-cosmetic changes in the ECPG lexer:
* Bring over the decimalfail rule (and support function
process_integer_literal) so that ECPG will lex "1..10" into
the same tokens as the backend would. I'm not sure this makes any
visible difference to users, but I'm not sure it doesn't, either.
* <xdc><<EOF>> gets its own rule so as to produce a more on-point
error message.
* Remove duplicate <SQL>{xdstart} rule.
John Naylor, with a few additional changes by me
Discussion: https://postgr.es/m/CAJVSVGWGqY9YBs2EwtRUkbNv=hXkN8yRPOoD1wxE6COgvvrz5g@mail.gmail.com1 parent d20dcea commit ec937d0
File tree
3 files changed
+594
-442
lines changed- src
- backend/parser
- fe_utils
- interfaces/ecpg/preproc
3 files changed
+594
-442
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
171 | | - | |
172 | 172 | | |
| 173 | + | |
173 | 174 | | |
174 | 175 | | |
175 | 176 | | |
| |||
192 | 193 | | |
193 | 194 | | |
194 | 195 | | |
195 | | - | |
| 196 | + | |
196 | 197 | | |
197 | 198 | | |
198 | 199 | | |
| |||
417 | 418 | | |
418 | 419 | | |
419 | 420 | | |
420 | | - | |
| 421 | + | |
| 422 | + | |
421 | 423 | | |
422 | 424 | | |
423 | 425 | | |
424 | 426 | | |
425 | 427 | | |
426 | | - | |
| 428 | + | |
427 | 429 | | |
428 | 430 | | |
429 | 431 | | |
430 | 432 | | |
431 | 433 | | |
432 | 434 | | |
433 | | - | |
| 435 | + | |
434 | 436 | | |
435 | 437 | | |
436 | 438 | | |
437 | | - | |
| 439 | + | |
438 | 440 | | |
439 | 441 | | |
440 | 442 | | |
441 | | - | |
| 443 | + | |
442 | 444 | | |
443 | 445 | | |
444 | 446 | | |
445 | | - | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
446 | 451 | | |
447 | 452 | | |
448 | 453 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
| |||
71 | 75 | | |
72 | 76 | | |
73 | 77 | | |
74 | | - | |
75 | | - | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| |||
128 | 130 | | |
129 | 131 | | |
130 | 132 | | |
131 | | - | |
132 | 133 | | |
| 134 | + | |
133 | 135 | | |
134 | 136 | | |
135 | 137 | | |
| |||
151 | 153 | | |
152 | 154 | | |
153 | 155 | | |
154 | | - | |
| 156 | + | |
155 | 157 | | |
156 | 158 | | |
157 | 159 | | |
| |||
402 | 404 | | |
403 | 405 | | |
404 | 406 | | |
405 | | - | |
| 407 | + | |
| 408 | + | |
406 | 409 | | |
407 | 410 | | |
408 | 411 | | |
409 | 412 | | |
410 | 413 | | |
411 | 414 | | |
412 | | - | |
| 415 | + | |
413 | 416 | | |
414 | 417 | | |
415 | 418 | | |
416 | 419 | | |
417 | 420 | | |
418 | 421 | | |
419 | 422 | | |
420 | | - | |
| 423 | + | |
421 | 424 | | |
422 | 425 | | |
423 | 426 | | |
424 | | - | |
| 427 | + | |
425 | 428 | | |
426 | 429 | | |
427 | 430 | | |
428 | | - | |
| 431 | + | |
429 | 432 | | |
430 | 433 | | |
| 434 | + | |
431 | 435 | | |
432 | 436 | | |
433 | 437 | | |
| |||
0 commit comments