]> git.proxmox.com Git - mirror_edk2.git/blobdiff - AppPkg/Applications/Python/Python-2.7.10/Parser/grammar1.c
edk2: Remove AppPkg, StdLib, StdLibPrivateInternalFiles
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.10 / Parser / grammar1.c
diff --git a/AppPkg/Applications/Python/Python-2.7.10/Parser/grammar1.c b/AppPkg/Applications/Python/Python-2.7.10/Parser/grammar1.c
deleted file mode 100644 (file)
index 27db22f..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-\r
-/* Grammar subroutines needed by parser */\r
-\r
-#include "Python.h"\r
-#include "pgenheaders.h"\r
-#include "grammar.h"\r
-#include "token.h"\r
-\r
-/* Return the DFA for the given type */\r
-\r
-dfa *\r
-PyGrammar_FindDFA(grammar *g, register int type)\r
-{\r
-    register dfa *d;\r
-#if 1\r
-    /* Massive speed-up */\r
-    d = &g->g_dfa[type - NT_OFFSET];\r
-    assert(d->d_type == type);\r
-    return d;\r
-#else\r
-    /* Old, slow version */\r
-    register int i;\r
-\r
-    for (i = g->g_ndfas, d = g->g_dfa; --i >= 0; d++) {\r
-        if (d->d_type == type)\r
-            return d;\r
-    }\r
-    assert(0);\r
-    /* NOTREACHED */\r
-#endif\r
-}\r
-\r
-char *\r
-PyGrammar_LabelRepr(label *lb)\r
-{\r
-    static char buf[100];\r
-\r
-    if (lb->lb_type == ENDMARKER)\r
-        return "EMPTY";\r
-    else if (ISNONTERMINAL(lb->lb_type)) {\r
-        if (lb->lb_str == NULL) {\r
-            PyOS_snprintf(buf, sizeof(buf), "NT%d", lb->lb_type);\r
-            return buf;\r
-        }\r
-        else\r
-            return lb->lb_str;\r
-    }\r
-    else {\r
-        if (lb->lb_str == NULL)\r
-            return _PyParser_TokenNames[lb->lb_type];\r
-        else {\r
-            PyOS_snprintf(buf, sizeof(buf), "%.32s(%.32s)",\r
-                _PyParser_TokenNames[lb->lb_type], lb->lb_str);\r
-            return buf;\r
-        }\r
-    }\r
-}\r