Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(10)

Unified Diff: Parser/acceler.c

Issue 3353: make built-in tokenizer available via Python C API
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Modules/parsermodule.c ('k') | Parser/firstsets.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Parser/acceler.c
+++ b/Parser/acceler.c
@@ -84,10 +84,10 @@ fixstate(grammar *g, state *s)
printf("XXX too many states!\n");
continue;
}
- if (ISNONTERMINAL(type)) {
+ if (PYTOK_ISNONTERMINAL(type)) {
dfa *d1 = PyGrammar_FindDFA(g, type);
int ibit;
- if (type - NT_OFFSET >= (1 << 7)) {
+ if (type - PYTOK_NT_OFFSET >= (1 << 7)) {
printf("XXX too high nonterminal number!\n");
continue;
}
@@ -96,7 +96,7 @@ fixstate(grammar *g, state *s)
if (accel[ibit] != -1)
printf("XXX ambiguity!\n");
accel[ibit] = a->a_arrow | (1 << 7) |
- ((type - NT_OFFSET) << 8);
+ ((type - PYTOK_NT_OFFSET) << 8);
}
}
}
« no previous file with comments | « Modules/parsermodule.c ('k') | Parser/firstsets.c » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+