Bug #1627575: Added _open() method to FileHandler which can be used to reopen files...
[python.git] / Parser / metagrammar.c
blobb61bc6d66b8501c3237f345f9283fbe87b37ffc9
2 #include "pgenheaders.h"
3 #include "metagrammar.h"
4 #include "grammar.h"
5 #include "pgen.h"
6 static arc arcs_0_0[3] = {
7 {2, 0},
8 {3, 0},
9 {4, 1},
11 static arc arcs_0_1[1] = {
12 {0, 1},
14 static state states_0[2] = {
15 {3, arcs_0_0},
16 {1, arcs_0_1},
18 static arc arcs_1_0[1] = {
19 {5, 1},
21 static arc arcs_1_1[1] = {
22 {6, 2},
24 static arc arcs_1_2[1] = {
25 {7, 3},
27 static arc arcs_1_3[1] = {
28 {3, 4},
30 static arc arcs_1_4[1] = {
31 {0, 4},
33 static state states_1[5] = {
34 {1, arcs_1_0},
35 {1, arcs_1_1},
36 {1, arcs_1_2},
37 {1, arcs_1_3},
38 {1, arcs_1_4},
40 static arc arcs_2_0[1] = {
41 {8, 1},
43 static arc arcs_2_1[2] = {
44 {9, 0},
45 {0, 1},
47 static state states_2[2] = {
48 {1, arcs_2_0},
49 {2, arcs_2_1},
51 static arc arcs_3_0[1] = {
52 {10, 1},
54 static arc arcs_3_1[2] = {
55 {10, 1},
56 {0, 1},
58 static state states_3[2] = {
59 {1, arcs_3_0},
60 {2, arcs_3_1},
62 static arc arcs_4_0[2] = {
63 {11, 1},
64 {13, 2},
66 static arc arcs_4_1[1] = {
67 {7, 3},
69 static arc arcs_4_2[3] = {
70 {14, 4},
71 {15, 4},
72 {0, 2},
74 static arc arcs_4_3[1] = {
75 {12, 4},
77 static arc arcs_4_4[1] = {
78 {0, 4},
80 static state states_4[5] = {
81 {2, arcs_4_0},
82 {1, arcs_4_1},
83 {3, arcs_4_2},
84 {1, arcs_4_3},
85 {1, arcs_4_4},
87 static arc arcs_5_0[3] = {
88 {5, 1},
89 {16, 1},
90 {17, 2},
92 static arc arcs_5_1[1] = {
93 {0, 1},
95 static arc arcs_5_2[1] = {
96 {7, 3},
98 static arc arcs_5_3[1] = {
99 {18, 1},
101 static state states_5[4] = {
102 {3, arcs_5_0},
103 {1, arcs_5_1},
104 {1, arcs_5_2},
105 {1, arcs_5_3},
107 static dfa dfas[6] = {
108 {256, "MSTART", 0, 2, states_0,
109 "\070\000\000"},
110 {257, "RULE", 0, 5, states_1,
111 "\040\000\000"},
112 {258, "RHS", 0, 2, states_2,
113 "\040\010\003"},
114 {259, "ALT", 0, 2, states_3,
115 "\040\010\003"},
116 {260, "ITEM", 0, 5, states_4,
117 "\040\010\003"},
118 {261, "ATOM", 0, 4, states_5,
119 "\040\000\003"},
121 static label labels[19] = {
122 {0, "EMPTY"},
123 {256, 0},
124 {257, 0},
125 {4, 0},
126 {0, 0},
127 {1, 0},
128 {11, 0},
129 {258, 0},
130 {259, 0},
131 {18, 0},
132 {260, 0},
133 {9, 0},
134 {10, 0},
135 {261, 0},
136 {16, 0},
137 {14, 0},
138 {3, 0},
139 {7, 0},
140 {8, 0},
142 static grammar _PyParser_Grammar = {
144 dfas,
145 {19, labels},
149 grammar *
150 meta_grammar(void)
152 return &_PyParser_Grammar;
155 grammar *
156 Py_meta_grammar(void)
158 return meta_grammar();