Commit 3e78a65
authored
Support Structural Tag (#420)
This PR brings the structural tag. See the docs for its details.
It also refactors GrammarCompiler, the printing methods in EarleyParser
and GrammarMatcher, the hashing utils, the exception library.
Although introducing the new structural tag API, the API is still
backward compatible.
Signed-off-by: Ubospica <[email protected]>
---------
Signed-off-by: Ubospica <[email protected]>1 parent b8f42e2 commit 3e78a65
File tree
34 files changed
+4602
-600
lines changed- cpp
- nanobind
- support
- docs
- api/python
- tutorials
- xgrammar_features
- include/xgrammar
- python/xgrammar
- tests/python
34 files changed
+4602
-600
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
156 | 158 | | |
157 | 159 | | |
158 | 160 | | |
| |||
178 | 180 | | |
179 | 181 | | |
180 | 182 | | |
| 183 | + | |
181 | 184 | | |
182 | 185 | | |
183 | 186 | | |
| |||
269 | 272 | | |
270 | 273 | | |
271 | 274 | | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
285 | 278 | | |
286 | 279 | | |
287 | 280 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
| 114 | + | |
118 | 115 | | |
119 | 116 | | |
120 | 117 | | |
| |||
456 | 453 | | |
457 | 454 | | |
458 | 455 | | |
459 | | - | |
| 456 | + | |
| 457 | + | |
460 | 458 | | |
461 | | - | |
| 459 | + | |
462 | 460 | | |
| 461 | + | |
463 | 462 | | |
464 | 463 | | |
465 | 464 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
143 | 131 | | |
144 | 132 | | |
145 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
| 68 | + | |
| 69 | + | |
70 | 70 | | |
71 | | - | |
72 | | - | |
| 71 | + | |
73 | 72 | | |
74 | 73 | | |
75 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
252 | 256 | | |
253 | 257 | | |
254 | 258 | | |
| |||
0 commit comments