Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.5k
Commit1f24a71
authored
Pgen is the oldest piece of technology in the CPython repository, building it requires various #if[n]def PGEN hacks in other parts of the code and it also depends more and more on CPython internals. This commit removes the old pgen C code and replaces it for a new version implemented in pure Python. This is a modified and adapted version of lib2to3/pgen2 that can generate grammar files compatibles with the current parser.This commit also eliminates all the #ifdef and code branches related to pgen, simplifying the code and making it more maintainable. The regen-grammar step now uses $(PYTHON_FOR_REGEN) that can be any version of the interpreter, so the new pgen code maintains compatibility with older versions of the interpreter (this also allows regenerating the grammar with the current CI solution that uses Python3.5). The new pgen Python module also makes use of the Grammar/Tokens file that holds the token specification, so is always kept in sync and avoids having to maintain duplicate token definitions.
1 parent7eebbbd commit1f24a71
File tree
27 files changed
+1480
-2684
lines changed- Include
- Misc
- NEWS.d/next/Core and Builtins
- PCbuild
- Parser
- pgen
- Python
27 files changed
+1480
-2684
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
78 | 76 | | |
79 | 77 | | |
80 | 78 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | 15 | | |
18 | | - | |
19 | 16 | | |
20 | 17 | | |
21 | 18 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
293 | | - | |
294 | | - | |
295 | 293 | | |
296 | 294 | | |
297 | 295 | | |
298 | 296 | | |
299 | 297 | | |
300 | 298 | | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | 299 | | |
306 | | - | |
307 | 300 | | |
308 | 301 | | |
309 | 302 | | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | 303 | | |
321 | 304 | | |
322 | 305 | | |
323 | 306 | | |
324 | 307 | | |
325 | | - | |
326 | | - | |
327 | 308 | | |
328 | 309 | | |
329 | 310 | | |
| |||
802 | 783 | | |
803 | 784 | | |
804 | 785 | | |
805 | | - | |
806 | | - | |
807 | | - | |
808 | 786 | | |
809 | | - | |
| 787 | + | |
810 | 788 | | |
811 | 789 | | |
812 | 790 | | |
813 | | - | |
| 791 | + | |
| 792 | + | |
814 | 793 | | |
815 | 794 | | |
816 | 795 | | |
817 | 796 | | |
818 | 797 | | |
819 | | - | |
820 | | - | |
821 | | - | |
822 | | - | |
823 | | - | |
824 | | - | |
825 | | - | |
826 | | - | |
827 | | - | |
828 | | - | |
829 | | - | |
830 | 798 | | |
831 | 799 | | |
832 | 800 | | |
| |||
1016 | 984 | | |
1017 | 985 | | |
1018 | 986 | | |
1019 | | - | |
1020 | 987 | | |
1021 | 988 | | |
1022 | 989 | | |
| |||
1028 | 995 | | |
1029 | 996 | | |
1030 | 997 | | |
1031 | | - | |
1032 | 998 | | |
1033 | 999 | | |
1034 | 1000 | | |
| |||
1771 | 1737 | | |
1772 | 1738 | | |
1773 | 1739 | | |
1774 | | - | |
| 1740 | + | |
1775 | 1741 | | |
1776 | 1742 | | |
1777 | 1743 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | 95 | | |
104 | 96 | | |
105 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
165 | 164 | | |
166 | 165 | | |
167 | 166 | | |
| |||
175 | 174 | | |
176 | 175 | | |
177 | 176 | | |
178 | | - | |
179 | 177 | | |
180 | 178 | | |
181 | 179 | | |
| |||
372 | 370 | | |
373 | 371 | | |
374 | 372 | | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | 373 | | |
379 | 374 | | |
380 | | - | |
381 | 375 | | |
382 | 376 | | |
383 | 377 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | 237 | | |
241 | 238 | | |
242 | 239 | | |
| |||
270 | 267 | | |
271 | 268 | | |
272 | 269 | | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | 270 | | |
277 | 271 | | |
278 | 272 | | |
| |||
836 | 830 | | |
837 | 831 | | |
838 | 832 | | |
839 | | - | |
840 | | - | |
841 | | - | |
842 | | - | |
843 | | - | |
844 | | - | |
845 | | - | |
846 | | - | |
847 | | - | |
848 | 833 | | |
849 | 834 | | |
850 | 835 | | |
851 | 836 | | |
852 | 837 | | |
853 | 838 | | |
854 | | - | |
855 | | - | |
856 | | - | |
857 | 839 | | |
858 | 840 | | |
859 | 841 | | |
| |||
This file was deleted.
0 commit comments
Comments
(0)