/* Generated by Cython 0.29.5 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "name": "DHParser.ebnf",
        "sources": [
            "DHParser/ebnf.py"
        ]
    },
    "module_name": "DHParser.ebnf"
}
END: Cython Metadata */

#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    #error Cython requires Python 2.6+ or Python 3.3+.
#else
#define CYTHON_ABI "0_29_5"
#define CYTHON_HEX_VERSION 0x001D05F0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
  #if PY_VERSION_HEX >= 0x02070000
    #define HAVE_LONG_LONG
  #endif
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
#elif defined(PYSTON_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 0
  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  #endif
  #ifndef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
  #endif
  #ifndef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
  #undef SHIFT
  #undef BASE
  #undef MASK
  #ifdef SIZEOF_VOID_P
    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  #endif
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
           typedef unsigned char     uint8_t;
           typedef unsigned int      uint32_t;
        #else
           typedef unsigned __int8   uint8_t;
           typedef unsigned __int32  uint32_t;
        #endif
    #endif
#else
   #include <stdint.h>
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus) && __cplusplus >= 201103L
    #if __has_cpp_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH [[fallthrough]]
    #elif __has_cpp_attribute(clang::fallthrough)
      #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
    #elif __has_cpp_attribute(gnu::fallthrough)
      #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__ ) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif

#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #elif defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif

#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_FAST_PYCCALL
#define __Pyx_PyFastCFunction_Check(func)\
    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
#else
#define __Pyx_PyFastCFunction_Check(func) 0
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
  #define PyMem_RawMalloc(n)           PyMem_Malloc(n)
  #define PyMem_RawRealloc(p, n)       PyMem_Realloc(p, n)
  #define PyMem_RawFree(p)             PyMem_Free(p)
#endif
#if CYTHON_COMPILING_IN_PYSTON
  #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  *key = PyThread_create_key();
  return 0;
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  *key = Py_tss_NEEDS_INIT;
  return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  PyThread_delete_key(*key);
  *key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  return PyThread_get_key_value(*key);
}
#endif
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStr(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
#else
#define __Pyx_PyDict_GetItemStr(dict, name)  PyDict_GetItem(dict, name)
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
  #define PyObject_Unicode             PyObject_Str
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
#else
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
#endif

#if defined(WIN32) || defined(MS_WINDOWS)
  #define _USE_MATH_DEFINES
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif


#define __PYX_ERR(f_index, lineno, Ln_error) \
{ \
  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
}

#ifndef __PYX_EXTERN_C
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#define __PYX_HAVE__DHParser__ebnf
#define __PYX_HAVE_API__DHParser__ebnf
/* Early includes */
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif

typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyObject_AsWritableString(s)    ((char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
#if CYTHON_ASSUME_SAFE_MACROS
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }

static PyObject *__pyx_m = NULL;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_cython_runtime = NULL;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static PyObject *__pyx_empty_unicode;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;


static const char *__pyx_f[] = {
  "DHParser/ebnf.py",
};

/*--- Type declarations ---*/
struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct__assemble_parser;
struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_1_on_directive;
struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_2_on_factor;
struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered;
struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_4_genexpr;
struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_5_genexpr;
struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_6_on_literal;
struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_7_genexpr;
struct __pyx_defaults;
typedef struct __pyx_defaults __pyx_defaults;
struct __pyx_defaults {
  PyObject *__pyx_arg_custom_args;
};

/* "DHParser/ebnf.py":692
 * 
 * 
 *     def assemble_parser(self, definitions: List[Tuple[str, str]], root_node: Node) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Creates the Python code for the parser after compilation of
 */
struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct__assemble_parser {
  PyObject_HEAD
  PyObject *__pyx_v_defined_symbols;
  PyObject *__pyx_v_remove_connections;
  PyObject *__pyx_v_self;
};


/* "DHParser/ebnf.py":922
 * 
 * 
 *     def on_directive(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         key = node.children[0].content
 *         assert key not in self.directives.tokens
 */
struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_1_on_directive {
  PyObject_HEAD
  PyObject *__pyx_v_key;
  PyObject *__pyx_v_node;
  PyObject *__pyx_v_self;
};


/* "DHParser/ebnf.py":1099
 * 
 * 
 *     def on_factor(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         assert node.children
 *         assert len(node.children) >= 2, node.as_sxpr()
 */
struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_2_on_factor {
  PyObject_HEAD
  PyObject *__pyx_v_check;
  PyObject *__pyx_v_node;
  PyObject *__pyx_v_self;
};


/* "DHParser/ebnf.py":1170
 *                                 "AST transformation!")
 * 
 *     def on_unordered(self, node) -> str:             # <<<<<<<<<<<<<<
 *         # return self.non_terminal(node, 'Unordered')
 *         assert len(node.children) == 1
 */
struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered {
  PyObject_HEAD
  PyObject *__pyx_v_nd;
  PyObject *__pyx_v_self;
};


/* "DHParser/ebnf.py":1179
 *             return self.non_terminal(mock_node, 'AllOf', custom_args)
 *         elif nd.tag_name == "expression":
 *             if any(c.tag_name == TOKEN_PTYPE and nd.content == '' for c in nd.children):             # <<<<<<<<<<<<<<
 *                 self.tree.new_error(node, "No mandatory items  allowed in SomeOf-operator!")
 *             args = ', '.join(self.compile(child) for child in nd.children)
 */
struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_4_genexpr {
  PyObject_HEAD
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered *__pyx_outer_scope;
  PyObject *__pyx_v_c;
};


/* "DHParser/ebnf.py":1181
 *             if any(c.tag_name == TOKEN_PTYPE and nd.content == '' for c in nd.children):
 *                 self.tree.new_error(node, "No mandatory items  allowed in SomeOf-operator!")
 *             args = ', '.join(self.compile(child) for child in nd.children)             # <<<<<<<<<<<<<<
 *             return "SomeOf(" + args + ")"
 *         else:
 */
struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_5_genexpr {
  PyObject_HEAD
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered *__pyx_outer_scope;
  PyObject *__pyx_v_child;
};


/* "DHParser/ebnf.py":1217
 *         return 'wsp__'
 * 
 *     def on_literal(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         center = self.TOKEN_PARSER() + node.content.replace('\\', r'\\') + ')'
 *         left = self.WSPC_PARSER() if 'left' in self.directives.literalws else ''
 */
struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_6_on_literal {
  PyObject_HEAD
  PyObject *__pyx_v_center;
  PyObject *__pyx_v_left;
  PyObject *__pyx_v_right;
};


/* "DHParser/ebnf.py":1222
 *         right = self.WSPC_PARSER() if 'right' in self.directives.literalws else ''
 *         if left or right:
 *             return 'Series(' + ", ".join(item for item in (left, center, right) if item) + ')'             # <<<<<<<<<<<<<<
 *         return center
 * 
 */
struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_7_genexpr {
  PyObject_HEAD
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_6_on_literal *__pyx_outer_scope;
  PyObject *__pyx_v_item;
};


/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          if (acquire_gil) {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
              PyGILState_Release(__pyx_gilstate_save);\
          } else {\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
  #define __Pyx_RefNannyFinishContext()\
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif
#define __Pyx_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_XDECREF(tmp);\
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_DECREF(tmp);\
    } while (0)
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

/* PyObjectGetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);

/* PyDictVersioning.proto */
#if CYTHON_USE_DICT_VERSIONS
#define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
#define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
    (version_var) = __PYX_GET_DICT_VERSION(dict);\
    (cache_var) = (value);
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
        (VAR) = __pyx_dict_cached_value;\
    } else {\
        (VAR) = __pyx_dict_cached_value = (LOOKUP);\
        __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
    }\
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
#else
#define __PYX_GET_DICT_VERSION(dict)  (0)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
#endif

/* GetModuleGlobalName.proto */
#if CYTHON_USE_DICT_VERSIONS
#define __Pyx_GetModuleGlobalName(var, name)  {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
        (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
        __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
}
#define __Pyx_GetModuleGlobalNameUncached(var, name)  {\
    PY_UINT64_T __pyx_dict_version;\
    PyObject *__pyx_dict_cached_value;\
    (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
}
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
#else
#define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
#endif

/* RaiseArgTupleInvalid.proto */
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);

/* RaiseDoubleKeywords.proto */
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);

/* ParseKeywords.proto */
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
    const char* function_name);

/* ArgTypeTest.proto */
#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
        __Pyx__ArgTypeTest(obj, type, name, exact))
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);

/* PyCFunctionFastCall.proto */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
#else
#define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)
#endif

/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
#else
#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
#endif
#define __Pyx_BUILD_ASSERT_EXPR(cond)\
    (sizeof(char [1 - 2*!(cond)]) - 1)
#ifndef Py_MEMBER_SIZE
#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
#endif
  static size_t __pyx_pyframe_localsplus_offset = 0;
  #include "frameobject.h"
  #define __Pxy_PyFrame_Initialize_Offsets()\
    ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
     (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
  #define __Pyx_PyFrame_GetLocalsplus(frame)\
    (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
#endif

/* PyObjectCall.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

/* PyObjectCall2Args.proto */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);

/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

/* PyObjectLookupSpecial.proto */
#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) {
    PyObject *res;
    PyTypeObject *tp = Py_TYPE(obj);
#if PY_MAJOR_VERSION < 3
    if (unlikely(PyInstance_Check(obj)))
        return __Pyx_PyObject_GetAttrStr(obj, attr_name);
#endif
    res = _PyType_Lookup(tp, attr_name);
    if (likely(res)) {
        descrgetfunc f = Py_TYPE(res)->tp_descr_get;
        if (!f) {
            Py_INCREF(res);
        } else {
            res = f(res, obj, (PyObject *)tp);
        }
    } else {
        PyErr_SetObject(PyExc_AttributeError, attr_name);
    }
    return res;
}
#else
#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
#endif

/* PyObjectCallNoArg.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
#else
#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
#endif

/* GetTopmostException.proto */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif

/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  PyErr_Occurred()
#endif

/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
#endif

/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* PyErrFetchRestore.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
#else
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#endif
#else
#define __Pyx_PyErr_Clear() PyErr_Clear()
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
#endif

/* None.proto */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);

/* GetItemInt.proto */
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck);

/* SliceObject.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
        int has_cstart, int has_cstop, int wraparound);

/* PyErrExceptionMatches.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
#endif

/* PyObjectSetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
#else
#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif

/* DictGetItem.proto */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
#define __Pyx_PyObject_Dict_GetItem(obj, name)\
    (likely(PyDict_CheckExact(obj)) ?\
     __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
#else
#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#define __Pyx_PyObject_Dict_GetItem(obj, name)  PyObject_GetItem(obj, name)
#endif

/* GetAttr.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);

/* HasAttr.proto */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

/* IncludeStringH.proto */
#include <string.h>

/* BytesEquals.proto */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);

/* UnicodeEquals.proto */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);

/* RaiseException.proto */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);

/* ListAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

/* PySequenceContains.proto */
static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
    int result = PySequence_Contains(seq, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* PyObjectFormatAndDecref.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f);
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f);

/* JoinPyUnicode.proto */
static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      Py_UCS4 max_char);

/* PyUnicode_Unicode.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj);

/* SwapException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* None.proto */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);

/* ObjectGetItem.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
#else
#define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
#endif

/* SetItemInt.proto */
#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
               __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
                                               int is_list, int wraparound, int boundscheck);

/* PyObjectGetMethod.proto */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);

/* PyObjectCallMethod1.proto */
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);

/* append.proto */
static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);

/* IterFinish.proto */
static CYTHON_INLINE int __Pyx_IterFinish(void);

/* PyObjectCallMethod0.proto */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);

/* RaiseNeedMoreValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

/* RaiseTooManyValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

/* UnpackItemEndCheck.proto */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);

/* RaiseNoneIterError.proto */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);

/* UnpackTupleError.proto */
static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index);

/* UnpackTuple2.proto */
#define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\
    (likely(is_tuple || PyTuple_Check(tuple)) ?\
        (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\
            __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\
            (__Pyx_UnpackTupleError(tuple, 2), -1)) :\
        __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple))
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
    PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple);
static int __Pyx_unpack_tuple2_generic(
    PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple);

/* dict_iter.proto */
static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_is_dict);
static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
                                              PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);

/* PyUnicodeContains.proto */
static CYTHON_INLINE int __Pyx_PyUnicode_ContainsTF(PyObject* substring, PyObject* text, int eq) {
    int result = PyUnicode_Contains(text, substring);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* ListCompAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len)) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif

/* SliceTupleAndList.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop);
static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop);
#else
#define __Pyx_PyList_GetSlice(seq, start, stop)   PySequence_GetSlice(seq, start, stop)
#define __Pyx_PyTuple_GetSlice(seq, start, stop)  PySequence_GetSlice(seq, start, stop)
#endif

/* FetchCommonType.proto */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);

/* CythonFunction.proto */
#define __Pyx_CyFunction_USED 1
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CyFunction_GetClosure(f)\
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#define __Pyx_CyFunction_GetClassObj(f)\
    (((__pyx_CyFunctionObject *) (f))->func_classobj)
#define __Pyx_CyFunction_Defaults(type, f)\
    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
    PyCFunctionObject func;
#if PY_VERSION_HEX < 0x030500A0
    PyObject *func_weakreflist;
#endif
    PyObject *func_dict;
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
    PyObject *func_classobj;
    void *defaults;
    int defaults_pyobjects;
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
} __pyx_CyFunctionObject;
static PyTypeObject *__pyx_CyFunctionType = 0;
#define __Pyx_CyFunction_Check(obj)  (__Pyx_TypeCheck(obj, __pyx_CyFunctionType))
#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\
    __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *self,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
                                                         size_t size,
                                                         int pyobjects);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __pyx_CyFunction_init(void);

/* Import.proto */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);

/* ImportFrom.proto */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);

/* pyfrozenset_new.proto */
static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it);

/* PySetContains.proto */
static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq);

/* IterNext.proto */
#define __Pyx_PyIter_Next(obj) __Pyx_PyIter_Next2(obj, NULL)
static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject *, PyObject *);

/* PyObject_GenericGetAttrNoDict.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
#endif

/* CalculateMetaclass.proto */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);

/* SetNameInClass.proto */
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
#define __Pyx_SetNameInClass(ns, name, value)\
    (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value))
#elif CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_SetNameInClass(ns, name, value)\
    (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value))
#else
#define __Pyx_SetNameInClass(ns, name, value)  PyObject_SetItem(ns, name, value)
#endif

/* Py3ClassCreate.proto */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
                                           PyObject *mkw, PyObject *modname, PyObject *doc);
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
                                      PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);

/* CLineInTraceback.proto */
#ifdef CYTHON_CLINE_IN_TRACEBACK
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#else
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#endif

/* CodeObjectCache.proto */
typedef struct {
    PyCodeObject* code_object;
    int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);

/* AddTraceback.proto */
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
#endif
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)

/* CoroutineBase.proto */
typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
#if CYTHON_USE_EXC_INFO_STACK
#define __Pyx_ExcInfoStruct  _PyErr_StackItem
#else
typedef struct {
    PyObject *exc_type;
    PyObject *exc_value;
    PyObject *exc_traceback;
} __Pyx_ExcInfoStruct;
#endif
typedef struct {
    PyObject_HEAD
    __pyx_coroutine_body_t body;
    PyObject *closure;
    __Pyx_ExcInfoStruct gi_exc_state;
    PyObject *gi_weakreflist;
    PyObject *classobj;
    PyObject *yieldfrom;
    PyObject *gi_name;
    PyObject *gi_qualname;
    PyObject *gi_modulename;
    PyObject *gi_code;
    int resume_label;
    char is_running;
} __pyx_CoroutineObject;
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
    PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
    PyObject *name, PyObject *qualname, PyObject *module_name);
static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
            __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name);
static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self);
static int __Pyx_Coroutine_clear(PyObject *self);
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
static PyObject *__Pyx_Coroutine_Close(PyObject *self);
static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
#if CYTHON_USE_EXC_INFO_STACK
#define __Pyx_Coroutine_SwapException(self)
#define __Pyx_Coroutine_ResetAndClearException(self)  __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state)
#else
#define __Pyx_Coroutine_SwapException(self) {\
    __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\
    __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\
    }
#define __Pyx_Coroutine_ResetAndClearException(self) {\
    __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\
    (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\
    }
#endif
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
    __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
#else
#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
#endif
static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);

/* PatchModuleWithCoroutine.proto */
static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);

/* PatchGeneratorABC.proto */
static int __Pyx_patch_abc(void);

/* Generator.proto */
#define __Pyx_Generator_USED
static PyTypeObject *__pyx_GeneratorType = 0;
#define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
#define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
    __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
static PyObject *__Pyx_Generator_Next(PyObject *self);
static int __pyx_Generator_init(void);

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(void);

/* InitStrings.proto */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);


/* Module declarations from 'DHParser.ebnf' */
static PyTypeObject *__pyx_ptype_8DHParser_4ebnf___pyx_scope_struct__assemble_parser = 0;
static PyTypeObject *__pyx_ptype_8DHParser_4ebnf___pyx_scope_struct_1_on_directive = 0;
static PyTypeObject *__pyx_ptype_8DHParser_4ebnf___pyx_scope_struct_2_on_factor = 0;
static PyTypeObject *__pyx_ptype_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered = 0;
static PyTypeObject *__pyx_ptype_8DHParser_4ebnf___pyx_scope_struct_4_genexpr = 0;
static PyTypeObject *__pyx_ptype_8DHParser_4ebnf___pyx_scope_struct_5_genexpr = 0;
static PyTypeObject *__pyx_ptype_8DHParser_4ebnf___pyx_scope_struct_6_on_literal = 0;
static PyTypeObject *__pyx_ptype_8DHParser_4ebnf___pyx_scope_struct_7_genexpr = 0;
#define __Pyx_MODULE_NAME "DHParser.ebnf"
extern int __pyx_module_is_main_DHParser__ebnf;
int __pyx_module_is_main_DHParser__ebnf = 0;

/* Implementation of 'DHParser.ebnf' */
static PyObject *__pyx_builtin_property;
static PyObject *__pyx_builtin_open;
static PyObject *__pyx_builtin_AttributeError;
static PyObject *__pyx_builtin_super;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_IndexError;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_NameError;
static PyObject *__pyx_builtin_reversed;
static PyObject *__pyx_builtin_KeyError;
static const char __pyx_k_a[] = "a ";
static const char __pyx_k_f[] = "f";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_m[] = "m";
static const char __pyx_k_n[] = "n";
static const char __pyx_k_r[] = "r";
static const char __pyx_k_s[] = "\": %s,";
static const char __pyx_k_t[] = "[\\t ]*";
static const char __pyx_k_w[] = "[\\w/:\\\\]+";
static const char __pyx_k_x[] = "x";
static const char __pyx_k_ID[] = "ID";
static const char __pyx_k__2[] = "";
static const char __pyx_k__3[] = " = {";
  static const char __pyx_k__4[] = "[]";
  static const char __pyx_k__5[] = "    \"";
static const char __pyx_k__6[] = "}";
static const char __pyx_k__7[] = "\n";
static const char __pyx_k__8[] = "    \"\"\"";
static const char __pyx_k__9[] = "*";
static const char __pyx_k_an[] = "an ";
static const char __pyx_k_nd[] = "nd";
static const char __pyx_k_no[] = "no";
static const char __pyx_k_os[] = "os";
static const char __pyx_k_re[] = "re";
static const char __pyx_k_rx[] = "rx";
static const char __pyx_k_tk[] = "tk";
static const char __pyx_k_Any[] = "Any";
static const char __pyx_k_DSL[] = "DSL";
static const char __pyx_k_EOF[] = "EOF";
static const char __pyx_k_Pop[] = "Pop";
static const char __pyx_k_Set[] = "Set";
static const char __pyx_k__10[] = "<";
static const char __pyx_k__11[] = ">";
static const char __pyx_k__12[] = "~";
static const char __pyx_k__13[] = ":";
static const char __pyx_k__14[] = "(?";
static const char __pyx_k__15[] = ")";
static const char __pyx_k__16[] = ": ";
static const char __pyx_k__17[] = "\"\"";
static const char __pyx_k__18[] = "''";
static const char __pyx_k__20[] = "//";
static const char __pyx_k__21[] = "\"";
static const char __pyx_k__22[] = "'";
static const char __pyx_k__25[] = ".";
static const char __pyx_k__27[] = "\"\"\"";
static const char __pyx_k__28[] = " = ";
static const char __pyx_k__31[] = "\" !";
static const char __pyx_k__32[] = "\n    ";
static const char __pyx_k__33[] = "(";
static const char __pyx_k__34[] = "; ";
static const char __pyx_k__35[] = ")\n";
static const char __pyx_k__39[] = "\".";
static const char __pyx_k__40[] = ", ";
static const char __pyx_k__44[] = " .)";
static const char __pyx_k__45[] = "\302\247";
static const char __pyx_k__47[] = "/";
static const char __pyx_k__49[] = "::";
static const char __pyx_k__51[] = "-";
static const char __pyx_k__54[] = "\")";
static const char __pyx_k__55[] = "\\";
static const char __pyx_k__56[] = "\\\\";
static const char __pyx_k__58[] = "\\\"";
static const char __pyx_k__60[] = "\\/";
static const char __pyx_k__64[] = "/(?:\\\\/|[^/])*?/";
static const char __pyx_k__65[] = "`(?:[^\"]|\\\\\")*?`";
static const char __pyx_k__66[] = "\"(?:[^\"]|\\\\\")*?\"";
static const char __pyx_k__67[] = "'(?:[^']|\\\\')*?'";
static const char __pyx_k__68[] = "[";
static const char __pyx_k__69[] = "]";
static const char __pyx_k__70[] = "{";
static const char __pyx_k__71[] = "}+";
static const char __pyx_k__72[] = "!";
static const char __pyx_k__73[] = "&";
static const char __pyx_k__74[] = "-!";
static const char __pyx_k__75[] = "-&";
static const char __pyx_k__76[] = "=";
static const char __pyx_k__77[] = "|";
static const char __pyx_k__78[] = "@";
static const char __pyx_k__79[] = ",";
static const char __pyx_k_add[] = "add";
static const char __pyx_k_all[] = "__all__";
static const char __pyx_k_arg[] = "arg";
static const char __pyx_k_d_w[] = "(?!\\d)\\w+";
static const char __pyx_k_def[] = "    def ";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_get[] = "get";
static const char __pyx_k_int[] = "int";
static const char __pyx_k_key[] = "key";
static const char __pyx_k_md5[] = "md5";
static const char __pyx_k_n_2[] = "#.*(?:\\n|$)";
static const char __pyx_k_n_3[] = "(?!\302\247)(?:.|\\n)*";
static const char __pyx_k_off[] = "off";
static const char __pyx_k_r_2[] = "r'{}'";
static const char __pyx_k_rpl[] = "rpl";
static const char __pyx_k_s_2[] = "s";
static const char __pyx_k_s_3[] = "\"%s\"";
static const char __pyx_k_s_4[] = "\\s*";
static const char __pyx_k_set[] = ".set(";
static const char __pyx_k_w_Z[] = "\\w+\\Z";
static const char __pyx_k_wsp[] = "wsp__";
static const char __pyx_k_Dict[] = "Dict";
static const char __pyx_k_List[] = "List";
static const char __pyx_k_NAME[] = "NAME";
static const char __pyx_k_Node[] = "Node";
static const char __pyx_k_None[] = "None";
static const char __pyx_k_Rule[] = "Rule \"";
static const char __pyx_k_args[] = "args";
static const char __pyx_k_both[] = "both";
static const char __pyx_k_cast[] = "cast";
static const char __pyx_k_code[] = "code";
static const char __pyx_k_copy[] = "copy";
static const char __pyx_k_defn[] = "defn";
static const char __pyx_k_dict[] = "__dict__";
static const char __pyx_k_drop[] = "drop";
static const char __pyx_k_dwsp[] = "dwsp__";
static const char __pyx_k_exit[] = "__exit__";
static const char __pyx_k_find[] = "find";
static const char __pyx_k_init[] = "__init__";
static const char __pyx_k_keys[] = "keys";
static const char __pyx_k_left[] = "left";
static const char __pyx_k_line[] = "line";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_node[] = "node";
static const char __pyx_k_none[] = "none";
static const char __pyx_k_open[] = "open";
static const char __pyx_k_path[] = "path";
static const char __pyx_k_read[] = "read";
static const char __pyx_k_root[] = "root__";
static const char __pyx_k_rule[] = "rule";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_send[] = "send";
static const char __pyx_k_skip[] = "skip";
static const char __pyx_k_span[] = "span";
static const char __pyx_k_task[] = "task";
static const char __pyx_k_term[] = "term";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_tree[] = "tree";
static const char __pyx_k_utf8[] = "utf8";
static const char __pyx_k_AllOf[] = "AllOf";
static const char __pyx_k_Error[] = "Error";
static const char __pyx_k_Token[] = "Token(";
static const char __pyx_k_Tuple[] = "Tuple";
static const char __pyx_k_Union[] = "Union";
static const char __pyx_k_Value[] = "Value \"";
static const char __pyx_k_check[] = "check";
static const char __pyx_k_child[] = "child";
static const char __pyx_k_class[] = "class ";
static const char __pyx_k_close[] = "close";
static const char __pyx_k_def_2[] = "    # def ";
static const char __pyx_k_enter[] = "__enter__";
static const char __pyx_k_entry[] = "entry";
static const char __pyx_k_error[] = "error";
static const char __pyx_k_false[] = "false";
static const char __pyx_k_first[] = "first";
static const char __pyx_k_flags[] = "flags";
static const char __pyx_k_group[] = "group";
static const char __pyx_k_items[] = "items";
static const char __pyx_k_lower[] = "lower";
static const char __pyx_k_match[] = "match";
static const char __pyx_k_nodes[] = "nodes";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_reset[] = "_reset";
static const char __pyx_k_right[] = "right";
static const char __pyx_k_rules[] = "rules";
static const char __pyx_k_set_2[] = "set";
static const char __pyx_k_slots[] = "__slots__";
static const char __pyx_k_split[] = "split";
static const char __pyx_k_strip[] = "strip";
static const char __pyx_k_super[] = "super";
static const char __pyx_k_throw[] = "throw";
static const char __pyx_k_token[] = "token";
static const char __pyx_k_trace[] = "trace";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_wsp_2[] = "wsp";
static const char __pyx_k_Option[] = "Option";
static const char __pyx_k_RegExp[] = "RegExp(";
static const char __pyx_k_Series[] = "Series";
static const char __pyx_k_SomeOf[] = "SomeOf(";
static const char __pyx_k_Symbol[] = "Symbol \"";
static const char __pyx_k_WSP_RE[] = "WSP_RE__";
static const char __pyx_k_append[] = "append";
static const char __pyx_k_center[] = "center";
static const char __pyx_k_chksum[] = "chksum";
static const char __pyx_k_errmsg[] = "errmsg";
static const char __pyx_k_errors[] = "errors";
static const char __pyx_k_factor[] = "factor";
static const char __pyx_k_filter[] = "filter";
static const char __pyx_k_forbid[] = "forbid";
static const char __pyx_k_format[] = "format";
static const char __pyx_k_groups[] = "groups";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_module[] = "__module__";
static const char __pyx_k_name_2[] = "name";
static const char __pyx_k_option[] = "option";
static const char __pyx_k_parser[] = "parser";
static const char __pyx_k_prefix[] = "prefix";
static const char __pyx_k_pycode[] = "pycode";
static const char __pyx_k_regexp[] = "regexp";
static const char __pyx_k_remove[] = "remove";
static const char __pyx_k_result[] = "_result";
static const char __pyx_k_resume[] = "resume";
static const char __pyx_k_return[] = "return";
static const char __pyx_k_root_2[] = "root__ = ";
static const char __pyx_k_search[] = "search";
static const char __pyx_k_skip_2[] = "_skip";
static const char __pyx_k_skip_3[] = "skip=";
static const char __pyx_k_skip_4[] = "_skip__";
static const char __pyx_k_symbol[] = "symbol";
static const char __pyx_k_syntax[] = "syntax";
static const char __pyx_k_tokens[] = "tokens";
static const char __pyx_k_typing[] = "typing";
static const char __pyx_k_unrepr[] = "unrepr";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_values[] = "values";
static const char __pyx_k_COMMENT[] = "COMMENT__";
static const char __pyx_k_Forward[] = " = Forward()";
static const char __pyx_k_GLOBALS[] = "GLOBALS";
static const char __pyx_k_Grammar[] = ". Grammar:";
static const char __pyx_k_Token_2[] = "Token";
static const char __pyx_k_WARNING[] = "WARNING";
static const char __pyx_k_article[] = "article";
static const char __pyx_k_as_sxpr[] = "as_sxpr";
static const char __pyx_k_comment[] = "comment";
static const char __pyx_k_compile[] = "compile";
static const char __pyx_k_content[] = "content";
static const char __pyx_k_context[] = "context";
static const char __pyx_k_err_msg[] = "_err_msg__";
static const char __pyx_k_error_2[] = ":error";
static const char __pyx_k_error_3[] = "_error";
static const char __pyx_k_flatten[] = "flatten";
static const char __pyx_k_genexpr[] = "genexpr";
static const char __pyx_k_getitem[] = "__getitem__";
static const char __pyx_k_grammar[] = "-grammar";
static const char __pyx_k_keyword[] = "keyword";
static const char __pyx_k_literal[] = "literal";
static const char __pyx_k_message[] = "message";
static const char __pyx_k_on_term[] = "on_term";
static const char __pyx_k_partial[] = "partial";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_refined[] = "refined";
static const char __pyx_k_related[] = "related";
static const char __pyx_k_replace[] = "replace";
static const char __pyx_k_reverse[] = "reverse";
static const char __pyx_k_setitem[] = "__setitem__";
static const char __pyx_k_super_2[] = "        super(";
static const char __pyx_k_symbols[] = "symbols";
static const char __pyx_k_symlist[] = "symlist";
static const char __pyx_k_tt_name[] = "tt_name";
static const char __pyx_k_unicode[] = "unicode";
static const char __pyx_k_version[] = "__version__";
static const char __pyx_k_Callable[] = "Callable";
static const char __pyx_k_Compiler[] = "Compiler";
static const char __pyx_k_KeyError[] = "KeyError";
static const char __pyx_k_Optional[] = "Optional";
static const char __pyx_k_RegExp_2[] = "RegExp";
static const char __pyx_k_RegExp_s[] = "RegExp(%s)";
static const char __pyx_k_ReprType[] = "ReprType";
static const char __pyx_k_Required[] = "Required";
static const char __pyx_k_Retrieve[] = "Retrieve";
static const char __pyx_k_Sequence[] = "Sequence";
static const char __pyx_k_Series_2[] = "Series(";
static const char __pyx_k_basename[] = "basename";
static const char __pyx_k_branding[] = "branding";
static const char __pyx_k_check_rx[] = "_check_rx";
static const char __pyx_k_children[] = "children";
static const char __pyx_k_compiler[] = "compiler";
static const char __pyx_k_def_node[] = "def_node";
static const char __pyx_k_encoding[] = "encoding";
static const char __pyx_k_endswith[] = "endswith";
static const char __pyx_k_err_msgs[] = "err_msgs=";
static const char __pyx_k_filter_2[] = "_filter";
static const char __pyx_k_leftover[] = "leftover";
static const char __pyx_k_linefeed[] = "linefeed";
static const char __pyx_k_messages[] = "messages";
static const char __pyx_k_on_group[] = "on_group";
static const char __pyx_k_property[] = "property";
static const char __pyx_k_qualname[] = "__qualname__";
static const char __pyx_k_re_error[] = "re_error";
static const char __pyx_k_re_flags[] = "re_flags";
static const char __pyx_k_result_2[] = "result";
static const char __pyx_k_resume_2[] = "_resume";
static const char __pyx_k_reversed[] = "reversed";
static const char __pyx_k_splitext[] = "splitext";
static const char __pyx_k_tag_name[] = "tag_name";
static const char __pyx_k_traverse[] = "traverse";
static const char __pyx_k_vertical[] = "vertical";
static const char __pyx_k_AST_ERROR[] = "AST_ERROR";
static const char __pyx_k_Capture_s[] = "Capture(%s)";
static const char __pyx_k_DROP_WSPC[] = "DROP_WSPC";
static const char __pyx_k_DropToken[] = "DropToken(";
static const char __pyx_k_Forward_2[] = "Forward";
static const char __pyx_k_Grammar_2[] = "Grammar";
static const char __pyx_k_Lookahead[] = "Lookahead";
static const char __pyx_k_NameError[] = "NameError";
static const char __pyx_k_OneOrMore[] = "OneOrMore";
static const char __pyx_k_Synonym_s[] = "Synonym(%s)";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_arguments[] = "arguments";
static const char __pyx_k_comment_2[] = ", comment=";
static const char __pyx_k_directive[] = "directive";
static const char __pyx_k_escape_re[] = "escape_re";
static const char __pyx_k_fullmatch[] = "fullmatch";
static const char __pyx_k_functools[] = "functools";
static const char __pyx_k_grammar_2[] = "grammar";
static const char __pyx_k_iskeyword[] = "iskeyword";
static const char __pyx_k_literalws[] = "literalws";
static const char __pyx_k_mandatory[] = "mandatory";
static const char __pyx_k_metaclass[] = "__metaclass__";
static const char __pyx_k_mock_node[] = "mock_node";
static const char __pyx_k_new_error[] = "new_error";
static const char __pyx_k_node_type[] = "node_type";
static const char __pyx_k_on_factor[] = "on_factor";
static const char __pyx_k_on_option[] = "on_option";
static const char __pyx_k_on_regexp[] = "on_regexp";
static const char __pyx_k_on_symbol[] = "on_symbol";
static const char __pyx_k_on_syntax[] = "on_syntax";
static const char __pyx_k_oneormore[] = "oneormore";
static const char __pyx_k_plaintext[] = "plaintext";
static const char __pyx_k_raw_rules[] = "raw_rules";
static const char __pyx_k_recursive[] = "recursive";
static const char __pyx_k_rfilter_s[] = "rfilter=%s";
static const char __pyx_k_root_node[] = "root_node";
static const char __pyx_k_self_node[] = "(self, node):";
static const char __pyx_k_statement[] = "statement";
static const char __pyx_k_t_n_s_n_t[] = "[ \\t]*\\n?(?!\\s*\\n)[ \\t]*";
static const char __pyx_k_traceback[] = "traceback";
static const char __pyx_k_unordered[] = "unordered";
static const char __pyx_k_variables[] = "variables";
static const char __pyx_k_AaEeIiOoUu[] = "AaEeIiOoUu";
static const char __pyx_k_DROP_TOKEN[] = "DROP_TOKEN";
static const char __pyx_k_IndexError[] = "IndexError";
static const char __pyx_k_Lookbehind[] = "Lookbehind";
static const char __pyx_k_WHITESPACE[] = "WHITESPACE__";
static const char __pyx_k_Whitespace[] = "Whitespace";
static const char __pyx_k_ZeroOrMore[] = "ZeroOrMore";
static const char __pyx_k_definition[] = "definition";
static const char __pyx_k_directives[] = "directives";
static const char __pyx_k_dirty_flag[] = "_dirty_flag";
static const char __pyx_k_err_msgs_2[] = "err_msgs";
static const char __pyx_k_error_msgs[] = "error_msgs";
static const char __pyx_k_expression[] = "expression";
static const char __pyx_k_extract_tb[] = "extract_tb";
static const char __pyx_k_flowmarker[] = "flowmarker";
static const char __pyx_k_grammar_id[] = "grammar_id";
static const char __pyx_k_horizontal[] = "horizontal";
static const char __pyx_k_ignorecase[] = "ignorecase";
static const char __pyx_k_on_literal[] = "on_literal";
static const char __pyx_k_redeclared[] = "redeclared";
static const char __pyx_k_repetition[] = "repetition";
static const char __pyx_k_retrieveop[] = "retrieveop";
static const char __pyx_k_skip_rules[] = "skip_rules";
static const char __pyx_k_startswith[] = "startswith";
static const char __pyx_k_transtable[] = "transtable";
static const char __pyx_k_whitespace[] = "whitespace";
static const char __pyx_k_Alternative[] = "Alternative";
static const char __pyx_k_DROP_VALUES[] = "DROP_VALUES";
static const char __pyx_k_EBNFGrammar[] = "EBNFGrammar";
static const char __pyx_k_OrderedDict[] = "OrderedDict";
static const char __pyx_k_TOKEN_PTYPE[] = "TOKEN_PTYPE";
static const char __pyx_k_TypeError_2[] = " (TypeError: ";
static const char __pyx_k_WSPC_PARSER[] = "WSPC_PARSER";
static const char __pyx_k_collections[] = "collections";
static const char __pyx_k_custom_args[] = "custom_args";
static const char __pyx_k_definitions[] = "definitions";
static const char __pyx_k_ebnf_source[] = "ebnf_source";
static const char __pyx_k_mandatory_i[] = "mandatory=%i";
static const char __pyx_k_method_name[] = "method_name";
static const char __pyx_k_return_node[] = "    #     return node";
static const char __pyx_k_root_symbol[] = "root_symbol";
static const char __pyx_k_search_list[] = "search_list";
static const char __pyx_k_show_source[] = "show_source";
static const char __pyx_k_source_file[] = " source file.";
static const char __pyx_k_source_hash[] = "source_hash__";
static const char __pyx_k_traceback_2[] = "__traceback__";
static const char __pyx_k_transformer[] = "transformer";
static const char __pyx_k_EBNFCompiler[] = "EBNFCompiler";
static const char __pyx_k_PREFIX_TABLE[] = "PREFIX_TABLE";
static const char __pyx_k_Preprocessor[] = "Preprocessor";
static const char __pyx_k_TOKEN_PARSER[] = "TOKEN_PARSER";
static const char __pyx_k_Whitespace_s[] = "Whitespace(%s)";
static const char __pyx_k_check_argnum[] = "check_argnum";
static const char __pyx_k_compile_ebnf[] = "compile_ebnf";
static const char __pyx_k_declarations[] = "declarations";
static const char __pyx_k_expand_table[] = "expand_table";
static const char __pyx_k_grammar_name[] = "grammar_name";
static const char __pyx_k_is_anonymous[] = "is_anonymous";
static const char __pyx_k_isidentifier[] = "isidentifier";
static const char __pyx_k_load_if_file[] = "load_if_file";
static const char __pyx_k_non_terminal[] = "non_terminal";
static const char __pyx_k_on_directive[] = "on_directive";
static const char __pyx_k_on_oneormore[] = "on_oneormore";
static const char __pyx_k_on_plaintext[] = "on_plaintext";
static const char __pyx_k_on_unordered[] = "on_unordered";
static const char __pyx_k_parser_class[] = "parser_class";
static const char __pyx_k_r_Parser_for[] = "r\"\"\"Parser for ";
static const char __pyx_k_resume_rules[] = "resume_rules__";
static const char __pyx_k_super__reset[] = "        super()._reset()";
static const char __pyx_k_visitor_name[] = "visitor_name";
static const char __pyx_k_CONFIG_PRESET[] = "CONFIG_PRESET";
static const char __pyx_k_CompilerError[] = "CompilerError";
static const char __pyx_k_DHParser_ebnf[] = "DHParser.ebnf";
static const char __pyx_k_EBNFTransform[] = "EBNFTransform";
static const char __pyx_k_custom_errors[] = "custom_errors";
static const char __pyx_k_extract_regex[] = "_extract_regex";
static const char __pyx_k_grammar_class[] = "grammar_class";
static const char __pyx_k_mixin_comment[] = "mixin_comment";
static const char __pyx_k_on_definition[] = "on_definition";
static const char __pyx_k_on_expression[] = "on_expression";
static const char __pyx_k_on_repetition[] = "on_repetition";
static const char __pyx_k_on_whitespace[] = "on_whitespace";
static const char __pyx_k_refined_rules[] = "refined_rules";
static const char __pyx_k_remove_tokens[] = "remove_tokens";
static const char __pyx_k_source_file_2[] = " source file";
static const char __pyx_k_table_entries[] = "table_entries";
static const char __pyx_k_AttributeError[] = "AttributeError";
static const char __pyx_k_DHParser_error[] = "DHParser.error";
static const char __pyx_k_DHParser_parse[] = "DHParser.parse";
static const char __pyx_k_EBNFDirectives[] = "EBNFDirectives";
static const char __pyx_k_ERR_MSG_SUFFIX[] = "ERR_MSG_SUFFIX";
static const char __pyx_k_Known_ones_are[] = " ! (Known ones are ";
static const char __pyx_k_RAW_WS_KEYWORD[] = "RAW_WS_KEYWORD";
static const char __pyx_k_assert_content[] = "assert_content";
static const char __pyx_k_compile_source[] = "compile_source";
static const char __pyx_k_current_symbol[] = "current_symbol";
static const char __pyx_k_deferred_tasks[] = "deferred_tasks";
static const char __pyx_k_grammar_source[] = "grammar_source";
static const char __pyx_k_re_compile_r_s[] = "re.compile(r'%s')";
static const char __pyx_k_resume_rules_2[] = "resume_rules";
static const char __pyx_k_COMMENT_KEYWORD[] = "COMMENT_KEYWORD";
static const char __pyx_k_GRAMMAR_FACTORY[] = "GRAMMAR_FACTORY";
static const char __pyx_k_Grammar_Grammar[] = "Grammar(Grammar):";
static const char __pyx_k_assemble_parser[] = "assemble_parser";
static const char __pyx_k_class_w_Grammar[] = "class \\w*\\(Grammar\\)";
static const char __pyx_k_current_symbols[] = "current_symbols";
static const char __pyx_k_def__reset_self[] = "    def _reset(self):";
static const char __pyx_k_defined_symbols[] = "defined_symbols";
static const char __pyx_k_filtered_result[] = "filtered_result";
static const char __pyx_k_gen_search_list[] = "_gen_search_list";
static const char __pyx_k_gen_search_rule[] = "_gen_search_rule";
static const char __pyx_k_grammar_changed[] = "grammar_changed";
static const char __pyx_k_remove_brackets[] = "remove_brackets";
static const char __pyx_k_transformations[] = "transformations";
static const char __pyx_k_verify_compiler[] = "verify_compiler";
static const char __pyx_k_AttributeError_2[] = " (AttributeError: ";
static const char __pyx_k_COMPILER_FACTORY[] = "COMPILER_FACTORY";
static const char __pyx_k_DHParser_compile[] = "DHParser.compile";
static const char __pyx_k_DHParser_ebnf_py[] = "DHParser/ebnf.py";
static const char __pyx_k_DHParser_toolkit[] = "DHParser.toolkit";
static const char __pyx_k_DropWhitespace_s[] = "DropWhitespace(%s)";
static const char __pyx_k_PreprocessorFunc[] = "PreprocessorFunc";
static const char __pyx_k_RESERVED_SYMBOLS[] = "RESERVED_SYMBOLS";
static const char __pyx_k_Unknown_prefix_s[] = "Unknown prefix \"%s\".";
static const char __pyx_k_WHITESPACE_PTYPE[] = "WHITESPACE_PTYPE";
static const char __pyx_k_WHITESPACE_TYPES[] = "WHITESPACE_TYPES";
static const char __pyx_k_get_config_value[] = "get_config_value";
static const char __pyx_k_get_ebnf_grammar[] = "get_ebnf_grammar";
static const char __pyx_k_mandatory_marker[] = "mandatory_marker";
static const char __pyx_k_nil_preprocessor[] = "nil_preprocessor";
static const char __pyx_k_processing_table[] = "processing_table";
static const char __pyx_k_sane_parser_name[] = "sane_parser_name";
static const char __pyx_k_set_grammar_name[] = "set_grammar_name";
static const char __pyx_k_Compiler_Compiler[] = "Compiler(Compiler):";
static const char __pyx_k_EBNFCompilerError[] = "EBNFCompilerError";
static const char __pyx_k_NegativeLookahead[] = "NegativeLookahead";
static const char __pyx_k_ParserFactoryFunc[] = "ParserFactoryFunc";
static const char __pyx_k_PreprocessorToken[] = "PreprocessorToken(\"";
static const char __pyx_k_Retrieve_Operator[] = "Retrieve Operator \"";
static const char __pyx_k_SKIP_RULES_SUFFIX[] = "SKIP_RULES_SUFFIX";
static const char __pyx_k_Unknown_directive[] = "Unknown directive ";
static const char __pyx_k_def___init___self[] = "    def __init__(self):";
static const char __pyx_k_difference_update[] = "difference_update";
static const char __pyx_k_filtered_children[] = "filtered_children";
static const char __pyx_k_get_ebnf_compiler[] = "get_ebnf_compiler";
static const char __pyx_k_DHParser_transform[] = "DHParser.transform";
static const char __pyx_k_NegativeLookbehind[] = "NegativeLookbehind";
static const char __pyx_k_TransformationFunc[] = "TransformationFunc";
static const char __pyx_k_WHITESPACE_KEYWORD[] = "WHITESPACE_KEYWORD";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_defined_directives[] = "defined_directives";
static const char __pyx_k_remove_connections[] = "remove_connections";
static const char __pyx_k_remove_expendables[] = "remove_expendables";
static const char __pyx_k_upon_instantiation[] = "[\"upon instantiation\"]";
static const char __pyx_k_CompilerFactoryFunc[] = "CompilerFactoryFunc";
static const char __pyx_k_DHParser_preprocess[] = "DHParser.preprocess";
static const char __pyx_k_DHParser_syntaxtree[] = "DHParser.syntaxtree";
static const char __pyx_k_EBNFCompiler___init[] = "EBNFCompiler.__init__";
static const char __pyx_k_EBNFCompiler__reset[] = "EBNFCompiler._reset";
static const char __pyx_k_EBNFCompiler_result[] = "EBNFCompiler.result";
static const char __pyx_k_EBNFDirectives_keys[] = "EBNFDirectives.keys";
static const char __pyx_k_REDEFINED_DIRECTIVE[] = "REDEFINED_DIRECTIVE";
static const char __pyx_k_TRANSFORMER_FACTORY[] = "TRANSFORMER_FACTORY";
static const char __pyx_k_consumed_skip_rules[] = "consumed_skip_rules";
static const char __pyx_k_error_customization[] = "_error_customization";
static const char __pyx_k_preprocessor_tokens[] = "preprocessor_tokens";
static const char __pyx_k_reduce_single_child[] = "reduce_single_child";
static const char __pyx_k_Compiler_self___init[] = "Compiler, self).__init__()";
static const char __pyx_k_EBNFCompiler_on_term[] = "EBNFCompiler.on_term";
static const char __pyx_k_PREPROCESSOR_FACTORY[] = "PREPROCESSOR_FACTORY";
static const char __pyx_k_RESUME_RULES_KEYWORD[] = "RESUME_RULES_KEYWORD";
static const char __pyx_k_directive_definition[] = "directive, definition";
static const char __pyx_k_get_ebnf_transformer[] = "get_ebnf_transformer";
static const char __pyx_k_source_hash___a_z0_9[] = "    source_hash__ *= *\"([a-z0-9]*)\"";
static const char __pyx_k_upon_instantiation_2[] = "upon instantiation";
static const char __pyx_k_EBNFCompiler_on_group[] = "EBNFCompiler.on_group";
static const char __pyx_k_EBNFDirectives___init[] = "EBNFDirectives.__init__";
static const char __pyx_k_REPEATABLE_DIRECTIVES[] = "REPEATABLE_DIRECTIVES";
static const char __pyx_k_gen_compiler_skeleton[] = "gen_compiler_skeleton";
static const char __pyx_k_get_ebnf_preprocessor[] = "get_ebnf_preprocessor";
static const char __pyx_k_parser_initialization[] = "parser_initialization__";
static const char __pyx_k_symbol_literal_regexp[] = "symbol, literal, regexp";
static const char __pyx_k_DHParser_versionnumber[] = "DHParser.versionnumber";
static const char __pyx_k_EBNFCompiler__check_rx[] = "EBNFCompiler._check_rx";
static const char __pyx_k_EBNFCompiler_on_factor[] = "EBNFCompiler.on_factor";
static const char __pyx_k_EBNFCompiler_on_option[] = "EBNFCompiler.on_option";
static const char __pyx_k_EBNFCompiler_on_regexp[] = "EBNFCompiler.on_regexp";
static const char __pyx_k_EBNFCompiler_on_symbol[] = "EBNFCompiler.on_symbol";
static const char __pyx_k_EBNFCompiler_on_syntax[] = "EBNFCompiler.on_syntax";
static const char __pyx_k_TransformerFactoryFunc[] = "TransformerFactoryFunc";
static const char __pyx_k_consumed_custom_errors[] = "consumed_custom_errors";
static const char __pyx_k_ebnf_grammar_singleton[] = "ebnf_grammar_singleton";
static const char __pyx_k_EBNFCompiler_on_literal[] = "EBNFCompiler.on_literal";
static const char __pyx_k_PreprocessorFactoryFunc[] = "PreprocessorFactoryFunc";
static const char __pyx_k_ebnf_compiler_singleton[] = "ebnf_compiler_singleton";
static const char __pyx_k_flatten_anonymous_nodes[] = "    \"<\": flatten_anonymous_nodes,";
static const char __pyx_k_replace_by_single_child[] = "    \"*\": replace_by_single_child";
static const char __pyx_k_AMBIGUOUS_ERROR_HANDLING[] = "AMBIGUOUS_ERROR_HANDLING";
static const char __pyx_k_AST_transformation_table[] = "_AST_transformation_table";
static const char __pyx_k_EBNFCompiler_WSPC_PARSER[] = "EBNFCompiler.WSPC_PARSER";
static const char __pyx_k_EBNFDirectives___getitem[] = "EBNFDirectives.__getitem__";
static const char __pyx_k_EBNFDirectives___setitem[] = "EBNFDirectives.__setitem__";
static const char __pyx_k_REDECLARED_TOKEN_WARNING[] = "REDECLARED_TOKEN_WARNING";
static const char __pyx_k_gen_transformer_skeleton[] = "gen_transformer_skeleton";
static const char __pyx_k_mixin_comment_whitespace[] = "mixin_comment(whitespace=";
static const char __pyx_k_EBNFCompiler_TOKEN_PARSER[] = "EBNFCompiler.TOKEN_PARSER";
static const char __pyx_k_EBNFCompiler_non_terminal[] = "EBNFCompiler.non_terminal";
static const char __pyx_k_EBNFCompiler_on_directive[] = "EBNFCompiler.on_directive";
static const char __pyx_k_EBNFCompiler_on_oneormore[] = "EBNFCompiler.on_oneormore";
static const char __pyx_k_EBNFCompiler_on_plaintext[] = "EBNFCompiler.on_plaintext";
static const char __pyx_k_EBNFCompiler_on_unordered[] = "EBNFCompiler.on_unordered";
static const char __pyx_k_WHITESPACE_PARSER_KEYWORD[] = "WHITESPACE_PARSER_KEYWORD";
static const char __pyx_k_gen_preprocessor_skeleton[] = "gen_preprocessor_skeleton";
static const char __pyx_k_is_not_defined_in_grammar[] = "\" is not defined in grammar ";
static const char __pyx_k_not_allowed_for_directive[] = "\" not allowed for directive \"";
static const char __pyx_k_replace_by_single_child_2[] = "replace_by_single_child";
static const char __pyx_k_EBNFCompiler_on_definition[] = "EBNFCompiler.on_definition";
static const char __pyx_k_EBNFCompiler_on_expression[] = "EBNFCompiler.on_expression";
static const char __pyx_k_EBNFCompiler_on_repetition[] = "EBNFCompiler.on_repetition";
static const char __pyx_k_EBNFCompiler_on_whitespace[] = "EBNFCompiler.on_whitespace";
static const char __pyx_k_EBNF_transformer_singleton[] = "EBNF_transformer_singleton";
static const char __pyx_k_AST_Transformations_for_the[] = "    # AST Transformations for the ";
static const char __pyx_k_EBNFCompiler__extract_regex[] = "EBNFCompiler._extract_regex";
static const char __pyx_k_oneormore_repetition_option[] = "oneormore, repetition, option";
static const char __pyx_k_requires_a_symbol_and_not_a[] = "\" requires a symbol, and not a ";
static const char __pyx_k_verify_transformation_table[] = "verify_transformation_table";
static const char __pyx_k_EBNFCompiler_assemble_parser[] = "EBNFCompiler.assemble_parser";
static const char __pyx_k_EBNFCompiler_verify_compiler[] = "EBNFCompiler.verify_compiler";
static const char __pyx_k_factor_flowmarker_retrieveop[] = "factor, flowmarker, retrieveop";
static const char __pyx_k_malformed_regular_expression[] = "malformed regular expression ";
static const char __pyx_k_EBNFCompiler__gen_search_list[] = "EBNFCompiler._gen_search_list";
static const char __pyx_k_EBNFCompiler__gen_search_rule[] = "EBNFCompiler._gen_search_rule";
static const char __pyx_k_EBNFCompiler_set_grammar_name[] = "EBNFCompiler.set_grammar_name";
static const char __pyx_k_EBNF_AST_transformation_table[] = "EBNF_AST_transformation_table";
static const char __pyx_k_Symbol_s_is_a_reserved_symbol[] = "Symbol \"%s\" is a reserved symbol.";
static const char __pyx_k_This_may_change_in_the_future[] = "(This may change in the future.)";
static const char __pyx_k_UNUSED_ERROR_HANDLING_WARNING[] = "UNUSED_ERROR_HANDLING_WARNING";
static const char __pyx_k_DROP_WHITESPACE_PARSER_KEYWORD[] = "DROP_WHITESPACE_PARSER_KEYWORD";
static const char __pyx_k_Parser_for_an_EBNF_source_file[] = "\n    Parser for an EBNF source file, with this grammar:\n\n    @ comment    = /#.*(?:\\n|$)/                    # comments start with '#' and eat all chars up to and including '\\n'\n    @ whitespace = /\\s*/                            # whitespace includes linefeed\n    @ literalws  = right                            # trailing whitespace of literals will be ignored tacitly\n\n    syntax     = [~//] { definition | directive } \302\247EOF\n    definition = symbol \302\247\"=\" expression\n    directive  = \"@\" \302\247symbol \"=\" (regexp | literal | symbol) { \",\" (regexp | literal | symbol) }\n\n    expression = term { \"|\" term }\n    term       = { [\"\302\247\"] factor }+                       # \"\302\247\" means all following factors mandatory\n    factor     = [flowmarker] [retrieveop] symbol !\"=\"   # negative lookahead to be sure it's not a definition\n               | [flowmarker] literal\n               | [flowmarker] plaintext\n               | [flowmarker] regexp\n               | [flowmarker] whitespace\n               | [flowmarker] oneormore\n               | [flowmarker] group\n               | [flowmarker] unordered\n               | repetition\n               | option\n\n    flowmarker = \"!\"  | \"&\"                         # '!' negative lookahead, '&' positive lookahead\n               | \"-!\" | \"-&\"                        # '-' negative lookbehind, '-&' positive lookbehind\n    retrieveop = \"::\" | \":\"                         # '::' pop, ':' retrieve\n\n    group      = \"(\" \302\247expression \")\"\n    unordered  = \"<\" \302\247expression \">\"                # elements of expression in arbitrary order\n    oneormore  = \"{\" expression \"}+\"\n    repetition = \"{\" \302\247expression \"}\"\n    option     = \"[\" \302\247expression \"]\"\n\n    symbol     = /(?!\\d)\\w+/~                       # e.g. expression, factor, parameter_list\n    literal    = /\"(?:[^\"]|\\\\\")*?\"/~                # e.g. \"(\", '+', 'while'\n    ""           | /'(?:[^']|\\\\')*?'/~                # whitespace following literals will be ignored tacitly.\n    plaintext  = /`(?:[^\"]|\\\\\")*?`/~                # like literal but does not eat whitespace\n    regexp     = /\\/(?:\\\\\\/|[^\\/])*?\\//~            # e.g. /\\w+/, ~/#.*(?:\\n|$)/~\n    whitespace = /~/~                               # insignificant whitespace\n\n    EOF = !/./\n    ";
static const char __pyx_k_def_get_compiler_NAME_Compiler[] = "\ndef get_compiler() -> {NAME}Compiler:\n    try:\n        compiler = GLOBALS.{NAME}_{ID:08d}_compiler_singleton\n    except AttributeError:\n        GLOBALS.{NAME}_{ID:08d}_compiler_singleton = {NAME}Compiler()\n        compiler = GLOBALS.{NAME}_{ID:08d}_compiler_singleton\n    return compiler\n";
static const char __pyx_k_initialize_your_variables_here[] = "        # initialize your variables here, not in the constructor!";
static const char __pyx_k_A_Record_that_keeps_information[] = "\n    A Record that keeps information about compiler directives\n    during the compilation process.\n\n    Attributes:\n        whitespace:  the regular expression string for (insignificant)\n                whitespace\n\n        comment:  the regular expression string for comments\n\n        literalws:  automatic whitespace eating next to literals. Can\n                be either 'left', 'right', 'none', 'both'\n\n        tokens:  set of the names of preprocessor tokens\n        filter:  mapping of symbols to python filter functions that\n                will be called on any retrieve / pop - operations on\n                these symbols\n\n        error:  mapping of symbols to tuples of match conditions and\n                customized error messages. A match condition can be\n                either a string or a regular expression. The first\n                error message where the search condition matches will\n                be displayed. An empty string '' as search condition\n                always matches, so in case of multiple error messages,\n                this condition should be placed at the end.\n\n        skip:  mapping of symbols to a list of search expressions. A\n                search expressions can be either a string ot a regular\n                expression. The closest match is the point of reentry\n                for the series-parser when a mandatory item failed to\n                match the following text.\n\n        resume:  mapping of symbols to a list of search expressions. A\n                search expressions can be either a string ot a regular\n                expression. The closest match is the point of reentry\n                for after a parsing error has error occurred. Other\n                than the skip field, this configures resuming after\n                the failing parser has returned.\n    ";
static const char __pyx_k_Compiler_for_the_abstract_synta[] = "    \"\"\"Compiler for the abstract-syntax-tree of a ";
static const char __pyx_k_Custom_error_message_for_symbol[] = "Custom error message for symbol \"%s\"";
static const char __pyx_k_Directive_literalws_allows_only[] = "Directive \"literalws\" allows only `left`, `right`, `both` or `none`, not `%s`";
static const char __pyx_k_Generates_a_Parser_from_an_abst[] = "\n    Generates a Parser from an abstract syntax tree of a grammar specified\n    in EBNF-Notation.\n\n    Instances of this class must be called with the root-node of the\n    abstract syntax tree from an EBNF-specification of a formal language.\n    The returned value is the Python-source-code of a Grammar class for\n    this language that can be used to parse texts in this language.\n    See classes `parser.Compiler` and `parser.Grammar` for more information.\n\n    Additionally, class EBNFCompiler provides helper methods to generate\n    code-skeletons for a preprocessor, AST-transformation and full\n    compilation of the formal language. These method's names start with\n    the prefix `gen_`.\n\n    Attributes:\n        current_symbols:  During compilation, a list containing the root\n                node of the currently compiled definition as first element\n                and then the nodes of the symbols that are referred to in\n                the currently compiled definition.\n\n        rules:  Dictionary that maps rule names to a list of Nodes that\n                contain symbol-references in the definition of the rule.\n                The first item in the list is the node of the rule-\n                definition itself. Example:\n\n                           `alternative = a | b`\n\n                Now `[node.content for node in self.rules['alternative']]`\n                yields `['alternative = a | b', 'a', 'b']`\n\n        symbols:  A mapping of symbol names to their first usage (not\n                their definition!) in the EBNF source.\n\n        variables:  A set of symbols names that are used with the\n                Pop or Retrieve operator. Because the values of these\n                symbols need to be captured they are called variables.\n                See `test_parser.TestPopRetrieve` for an example.\n\n        recursive:  A set of symbols that are used recursively and\n                therefore require a `Forward`-operator.\n\n     ""   definitions:  A dictionary of definitions. Other than `rules`\n                this maps the symbols to their compiled definienda.\n\n        deferred_tasks:  A list of callables that is filled during\n                compilatation, but that will be executed only after\n                compilation has finished. Typically, it contains\n                sementatic checks that require information that\n                is only available upon completion of compilation.\n\n        root_symbol: The name of the root symbol.\n\n        directives:  A record of all directives and their default values.\n\n        defined_directives:  A set of all directives that have already been\n                defined. With the exception of those directives contained\n                in EBNFCompiler.REPEATABLE_DIRECTIVES, directives must only\n                be defined once.\n\n        consumed_custom_errors:  A set of symbols for which a custom error\n                has been defined and(!) consumed during compilation. This\n                allows to add a compiler error in those cases where (i) an\n                error message has been defined but will never used or (ii)\n                an error message is accidently used twice. For examples, see\n                `test_ebnf.TestErrorCustomization`.\n\n        consumed_skip_rules: The same as `consumed_custom_errors` only for\n                in-series-resume-rules (aka 'skip-rules') for Series-parsers.\n\n        re_flags:  A set of regular expression flags to be added to all\n                regular expressions found in the current parsing process\n\n        grammar_name:  The name of the grammar to be compiled\n\n        grammar_source:  The source code of the grammar to be compiled.\n\n        grammar_id: a unique id for every compiled grammar. (Required for\n                disambiguation of of thread local variables storing\n                compiled texts.)\n    ";
static const char __pyx_k_Missing_definition_for_symbol_s[] = "Missing definition for symbol '%s'";
static const char __pyx_k_Module_ebnf_provides_a_self_hos[] = "\nModule ``ebnf`` provides a self-hosting parser for EBNF-Grammars as\nwell as an EBNF-compiler that compiles an EBNF-Grammar into a\nDHParser based Grammar class that can be executed to parse source text\nconforming to this grammar into contrete syntax trees.\n";
static const char __pyx_k_One_mandatory_marker_sufficient[] = "One mandatory marker (\302\247) sufficient to declare the rest of the elements as mandatory.";
static const char __pyx_k_Skip_rules_for_symbol_will_neve[] = "\"Skip-rules\" for symbol \"{}\" will never be used, because the mandatory marker \"\302\247\" appears nowhere in its definiendum!";
static const char __pyx_k_but_appears_in_the_transformati[] = " but appears in the transformation table!";
static const char __pyx_k_def_NAME_Transform_Transformati[] = "\ndef {NAME}Transform() -> TransformationDict:\n    return partial(traverse, processing_table={NAME}_AST_transformation_table.copy())\n\ndef get_transformer() -> TransformationFunc:\n    try:\n        transformer = GLOBALS.{NAME}_{ID:08d}_transformer_singleton\n    except AttributeError:\n        GLOBALS.{NAME}_{ID:08d}_transformer_singleton = {NAME}Transform()\n        transformer = GLOBALS.{NAME}_{ID:08d}_transformer_singleton\n    return transformer\n";
static const char __pyx_k_def_get_grammar_NAME_Grammar_gl[] = "\ndef get_grammar() -> {NAME}Grammar:\n    global GLOBALS\n    try:\n        grammar = GLOBALS.{NAME}_{ID:08d}_grammar_singleton\n    except AttributeError:\n        GLOBALS.{NAME}_{ID:08d}_grammar_singleton = {NAME}Grammar()\n        if hasattr(get_grammar, 'python_src__'):\n            GLOBALS.{NAME}_{ID:08d}_grammar_singleton.python_src__ = get_grammar.python_src__\n        grammar = GLOBALS.{NAME}_{ID:08d}_grammar_singleton\n    return grammar\n";
static const char __pyx_k_def_get_preprocessor_Preprocess[] = "\ndef get_preprocessor() -> PreprocessorFunc:\n    return {NAME}Preprocessor\n";
static const char __pyx_k_def_s_text_return_text_lambda_i[] = "def %s(text):\n    return text, lambda i: i\n";
static const char __pyx_k_is_not_connected_to_parser_root[] = "\" is not connected to parser root \"";
static const char __pyx_k_regular_expression_or_search_st[] = "(regular expression or search string, message string) as argument!";
static const char __pyx_k_return_self_fallback_compiler_n[] = "        return self.fallback_compiler(node)";
static const char __pyx_k_82a7c668f86b83f86515078e6c9093ed[] = "82a7c668f86b83f86515078e6c9093ed";
static const char __pyx_k_A_rule_s_has_already_been_define[] = "A rule \"%s\" has already been defined earlier.";
static const char __pyx_k_Badly_structured_syntax_tree_Pot[] = "Badly structured syntax tree. Potentially due to erroneous AST transformation.";
static const char __pyx_k_Cannot_apply_customized_error_me[] = "Cannot apply customized error messages unambigiously, because symbol {} contains more than one parser with a mandatory marker '\302\247' in its definiens.";
static const char __pyx_k_Cannot_apply_skip_rules_unambigi[] = "Cannot apply 'skip-rules' unambigiously, because symbol {} contains more than one parser with a mandatory marker '\302\247' in its definiens.";
static const char __pyx_k_Compiler_has_not_been_run_before[] = "Compiler has not been run before calling \"gen_Compiler_Skeleton()\"!";
static const char __pyx_k_Compiler_must_be_run_before_call[] = "Compiler must be run before calling \"gen_transformer_Skeleton()\"!";
static const char __pyx_k_Customized_error_message_for_sym[] = "Customized error message for symbol \"{}\" will never be used, because the mandatory marker \"\302\247\" appears nowhere in its definiendum!";
static const char __pyx_k_Directive_s_allows_at_most_two_p[] = "Directive \"%s\" allows at most two parameters";
static const char __pyx_k_Directive_s_can_have_at_most_i_v[] = "Directive \"%s\" can have at most %i values.";
static const char __pyx_k_Directive_s_has_already_been_def[] = "Directive \"%s\" has already been defined earlier. ";
static const char __pyx_k_Directive_s_requires_message_str[] = "Directive \"%s\" requires message string or a a pair ";
static const char __pyx_k_EBNFCompiler__error_customizatio[] = "EBNFCompiler._error_customization";
static const char __pyx_k_EBNFCompiler_assemble_parser_loc[] = "EBNFCompiler.assemble_parser.<locals>.remove_connections";
static const char __pyx_k_EBNFCompiler_gen_compiler_skelet[] = "EBNFCompiler.gen_compiler_skeleton";
static const char __pyx_k_EBNFCompiler_gen_preprocessor_sk[] = "EBNFCompiler.gen_preprocessor_skeleton";
static const char __pyx_k_EBNFCompiler_gen_transformer_ske[] = "EBNFCompiler.gen_transformer_skeleton";
static const char __pyx_k_EBNFCompiler_on_directive_locals[] = "EBNFCompiler.on_directive.<locals>.check_argnum";
static const char __pyx_k_EBNFCompiler_on_factor_locals_ch[] = "EBNFCompiler.on_factor.<locals>.check";
static const char __pyx_k_EBNFCompiler_on_factor_locals_la[] = "EBNFCompiler.on_factor.<locals>.<lambda>";
static const char __pyx_k_EBNFCompiler_on_literal_locals_g[] = "EBNFCompiler.on_literal.<locals>.genexpr";
static const char __pyx_k_EBNFCompiler_on_unordered_locals[] = "EBNFCompiler.on_unordered.<locals>.genexpr";
static const char __pyx_k_EBNFCompiler_verify_transformati[] = "EBNFCompiler.verify_transformation_table";
static const char __pyx_k_Error_raised_by_EBNFCompiler_cla[] = "Error raised by `EBNFCompiler` class. (Not compilation errors\n    in the strict sense, see `CompilationError` in module ``dsl.py``)";
static const char __pyx_k_First_definition_of_rule_s_follo[] = "First definition of rule \"%s\" followed by illegal redefinitions.";
static const char __pyx_k_Group_nodes_should_have_been_eli[] = "Group nodes should have been eliminated by AST transformation!";
static const char __pyx_k_Illegal_symbol_s_Symbols_must_no[] = "Illegal symbol \"%s\". Symbols must not start or  end with a doube underscore \"__\".";
static const char __pyx_k_Implicit_whitespace_should_alway[] = "Implicit whitespace should always match the empty string, /%s/ does not.";
static const char __pyx_k_Later_declaration_will_be_ignore[] = "Later declaration will be ignored";
static const char __pyx_k_Later_definition_will_be_ignored[] = "Later definition will be ignored!";
static const char __pyx_k_Lookbehind_parser_can_only_be_us[] = "Lookbehind-parser can only be used with RegExp-parsers, not: ";
static const char __pyx_k_No_mandatory_items_allowed_in_So[] = "No mandatory items \302\247 allowed in SomeOf-operator!";
static const char __pyx_k_Python_keyword_s_may_not_be_used[] = "Python keyword \"%s\" may not be used as a symbol. ";
static const char __pyx_k_Skip_list_for_resuming_in_series[] = "Skip list for resuming in series for symbol \"{}\"must be defined before the symbol!";
static const char __pyx_k_Symbol_s_cannot_be_used_in_resum[] = "Symbol \"%s\" cannot be used in resume rule, since it represents neither literal nor regexp!";
static const char __pyx_k_Symbol_s_has_already_been_define[] = "Symbol \"%s\" has already been defined as a preprocessor token.";
static const char __pyx_k_Tokens_s_have_already_been_decla[] = "Tokens %s have already been declared earlier. ";
static const char __pyx_k_UNDEFINED_SYMBOL_IN_TRANSTABLE_W[] = "UNDEFINED_SYMBOL_IN_TRANSTABLE_WARNING";
static const char __pyx_k_Unordered_sequence_or_alternativ[] = "Unordered sequence or alternative requires at least two elements.";
static const char __pyx_k_add_grammar_source_to_parser_doc[] = "add_grammar_source_to_parser_docstring";
static const char __pyx_k_must_be_defined_before_the_symbo[] = "must be defined before the symbol!";
static PyObject *__pyx_kp_u_82a7c668f86b83f86515078e6c9093ed;
static PyObject *__pyx_n_s_AMBIGUOUS_ERROR_HANDLING;
static PyObject *__pyx_n_s_AST_ERROR;
static PyObject *__pyx_kp_u_AST_Transformations_for_the;
static PyObject *__pyx_n_u_AST_transformation_table;
static PyObject *__pyx_kp_s_A_Record_that_keeps_information;
static PyObject *__pyx_kp_u_A_rule_s_has_already_been_define;
static PyObject *__pyx_n_u_AaEeIiOoUu;
static PyObject *__pyx_n_u_AllOf;
static PyObject *__pyx_n_s_Alternative;
static PyObject *__pyx_n_u_Alternative;
static PyObject *__pyx_n_s_Any;
static PyObject *__pyx_n_s_AttributeError;
static PyObject *__pyx_kp_u_AttributeError_2;
static PyObject *__pyx_kp_u_Badly_structured_syntax_tree_Pot;
static PyObject *__pyx_n_s_COMMENT;
static PyObject *__pyx_n_u_COMMENT;
static PyObject *__pyx_n_s_COMMENT_KEYWORD;
static PyObject *__pyx_n_s_COMPILER_FACTORY;
static PyObject *__pyx_n_s_CONFIG_PRESET;
static PyObject *__pyx_n_s_Callable;
static PyObject *__pyx_kp_u_Cannot_apply_customized_error_me;
static PyObject *__pyx_kp_u_Cannot_apply_skip_rules_unambigi;
static PyObject *__pyx_kp_u_Capture_s;
static PyObject *__pyx_n_s_Compiler;
static PyObject *__pyx_n_s_CompilerError;
static PyObject *__pyx_n_s_CompilerFactoryFunc;
static PyObject *__pyx_n_u_CompilerFactoryFunc;
static PyObject *__pyx_kp_u_Compiler_Compiler;
static PyObject *__pyx_kp_u_Compiler_for_the_abstract_synta;
static PyObject *__pyx_kp_u_Compiler_has_not_been_run_before;
static PyObject *__pyx_kp_u_Compiler_must_be_run_before_call;
static PyObject *__pyx_kp_u_Compiler_self___init;
static PyObject *__pyx_kp_u_Custom_error_message_for_symbol;
static PyObject *__pyx_kp_u_Customized_error_message_for_sym;
static PyObject *__pyx_n_s_DHParser_compile;
static PyObject *__pyx_n_s_DHParser_ebnf;
static PyObject *__pyx_kp_s_DHParser_ebnf_py;
static PyObject *__pyx_n_s_DHParser_error;
static PyObject *__pyx_n_s_DHParser_parse;
static PyObject *__pyx_n_s_DHParser_preprocess;
static PyObject *__pyx_n_s_DHParser_syntaxtree;
static PyObject *__pyx_n_s_DHParser_toolkit;
static PyObject *__pyx_n_s_DHParser_transform;
static PyObject *__pyx_n_s_DHParser_versionnumber;
static PyObject *__pyx_n_s_DROP_TOKEN;
static PyObject *__pyx_n_s_DROP_VALUES;
static PyObject *__pyx_n_s_DROP_WHITESPACE_PARSER_KEYWORD;
static PyObject *__pyx_n_s_DROP_WSPC;
static PyObject *__pyx_n_u_DSL;
static PyObject *__pyx_n_s_Dict;
static PyObject *__pyx_kp_u_Directive_literalws_allows_only;
static PyObject *__pyx_kp_u_Directive_s_allows_at_most_two_p;
static PyObject *__pyx_kp_u_Directive_s_can_have_at_most_i_v;
static PyObject *__pyx_kp_u_Directive_s_has_already_been_def;
static PyObject *__pyx_kp_u_Directive_s_requires_message_str;
static PyObject *__pyx_kp_u_DropToken;
static PyObject *__pyx_kp_u_DropWhitespace_s;
static PyObject *__pyx_n_s_EBNFCompiler;
static PyObject *__pyx_n_u_EBNFCompiler;
static PyObject *__pyx_n_s_EBNFCompilerError;
static PyObject *__pyx_n_u_EBNFCompilerError;
static PyObject *__pyx_n_s_EBNFCompiler_TOKEN_PARSER;
static PyObject *__pyx_n_s_EBNFCompiler_WSPC_PARSER;
static PyObject *__pyx_n_s_EBNFCompiler___init;
static PyObject *__pyx_n_s_EBNFCompiler__check_rx;
static PyObject *__pyx_n_s_EBNFCompiler__error_customizatio;
static PyObject *__pyx_n_s_EBNFCompiler__extract_regex;
static PyObject *__pyx_n_s_EBNFCompiler__gen_search_list;
static PyObject *__pyx_n_s_EBNFCompiler__gen_search_rule;
static PyObject *__pyx_n_s_EBNFCompiler__reset;
static PyObject *__pyx_n_s_EBNFCompiler_assemble_parser;
static PyObject *__pyx_n_s_EBNFCompiler_assemble_parser_loc;
static PyObject *__pyx_n_s_EBNFCompiler_gen_compiler_skelet;
static PyObject *__pyx_n_s_EBNFCompiler_gen_preprocessor_sk;
static PyObject *__pyx_n_s_EBNFCompiler_gen_transformer_ske;
static PyObject *__pyx_n_s_EBNFCompiler_non_terminal;
static PyObject *__pyx_n_s_EBNFCompiler_on_definition;
static PyObject *__pyx_n_s_EBNFCompiler_on_directive;
static PyObject *__pyx_n_s_EBNFCompiler_on_directive_locals;
static PyObject *__pyx_n_s_EBNFCompiler_on_expression;
static PyObject *__pyx_n_s_EBNFCompiler_on_factor;
static PyObject *__pyx_n_s_EBNFCompiler_on_factor_locals_ch;
static PyObject *__pyx_n_s_EBNFCompiler_on_factor_locals_la;
static PyObject *__pyx_n_s_EBNFCompiler_on_group;
static PyObject *__pyx_n_s_EBNFCompiler_on_literal;
static PyObject *__pyx_n_s_EBNFCompiler_on_literal_locals_g;
static PyObject *__pyx_n_s_EBNFCompiler_on_oneormore;
static PyObject *__pyx_n_s_EBNFCompiler_on_option;
static PyObject *__pyx_n_s_EBNFCompiler_on_plaintext;
static PyObject *__pyx_n_s_EBNFCompiler_on_regexp;
static PyObject *__pyx_n_s_EBNFCompiler_on_repetition;
static PyObject *__pyx_n_s_EBNFCompiler_on_symbol;
static PyObject *__pyx_n_s_EBNFCompiler_on_syntax;
static PyObject *__pyx_n_s_EBNFCompiler_on_term;
static PyObject *__pyx_n_s_EBNFCompiler_on_unordered;
static PyObject *__pyx_n_s_EBNFCompiler_on_unordered_locals;
static PyObject *__pyx_n_s_EBNFCompiler_on_whitespace;
static PyObject *__pyx_n_s_EBNFCompiler_result;
static PyObject *__pyx_n_s_EBNFCompiler_set_grammar_name;
static PyObject *__pyx_n_s_EBNFCompiler_verify_compiler;
static PyObject *__pyx_n_s_EBNFCompiler_verify_transformati;
static PyObject *__pyx_n_s_EBNFDirectives;
static PyObject *__pyx_n_s_EBNFDirectives___getitem;
static PyObject *__pyx_n_s_EBNFDirectives___init;
static PyObject *__pyx_n_s_EBNFDirectives___setitem;
static PyObject *__pyx_n_s_EBNFDirectives_keys;
static PyObject *__pyx_n_s_EBNFGrammar;
static PyObject *__pyx_n_u_EBNFGrammar;
static PyObject *__pyx_n_s_EBNFTransform;
static PyObject *__pyx_n_u_EBNFTransform;
static PyObject *__pyx_n_s_EBNF_AST_transformation_table;
static PyObject *__pyx_n_s_EBNF_transformer_singleton;
static PyObject *__pyx_n_s_EOF;
static PyObject *__pyx_n_s_ERR_MSG_SUFFIX;
static PyObject *__pyx_n_s_Error;
static PyObject *__pyx_kp_s_Error_raised_by_EBNFCompiler_cla;
static PyObject *__pyx_kp_u_First_definition_of_rule_s_follo;
static PyObject *__pyx_kp_u_Forward;
static PyObject *__pyx_n_s_Forward_2;
static PyObject *__pyx_n_s_GLOBALS;
static PyObject *__pyx_n_s_GRAMMAR_FACTORY;
static PyObject *__pyx_kp_s_Generates_a_Parser_from_an_abst;
static PyObject *__pyx_kp_u_Grammar;
static PyObject *__pyx_n_s_Grammar_2;
static PyObject *__pyx_kp_u_Grammar_Grammar;
static PyObject *__pyx_kp_u_Group_nodes_should_have_been_eli;
static PyObject *__pyx_n_s_ID;
static PyObject *__pyx_kp_u_Illegal_symbol_s_Symbols_must_no;
static PyObject *__pyx_kp_u_Implicit_whitespace_should_alway;
static PyObject *__pyx_n_s_IndexError;
static PyObject *__pyx_n_s_KeyError;
static PyObject *__pyx_kp_u_Known_ones_are;
static PyObject *__pyx_kp_u_Later_declaration_will_be_ignore;
static PyObject *__pyx_kp_u_Later_definition_will_be_ignored;
static PyObject *__pyx_n_s_List;
static PyObject *__pyx_n_u_Lookahead;
static PyObject *__pyx_n_u_Lookbehind;
static PyObject *__pyx_kp_u_Lookbehind_parser_can_only_be_us;
static PyObject *__pyx_kp_u_Missing_definition_for_symbol_s;
static PyObject *__pyx_n_s_NAME;
static PyObject *__pyx_n_s_NameError;
static PyObject *__pyx_n_s_NegativeLookahead;
static PyObject *__pyx_n_u_NegativeLookahead;
static PyObject *__pyx_n_u_NegativeLookbehind;
static PyObject *__pyx_kp_u_No_mandatory_items_allowed_in_So;
static PyObject *__pyx_n_s_Node;
static PyObject *__pyx_kp_u_None;
static PyObject *__pyx_n_s_OneOrMore;
static PyObject *__pyx_n_u_OneOrMore;
static PyObject *__pyx_kp_u_One_mandatory_marker_sufficient;
static PyObject *__pyx_n_s_Option;
static PyObject *__pyx_n_u_Option;
static PyObject *__pyx_n_s_Optional;
static PyObject *__pyx_n_s_OrderedDict;
static PyObject *__pyx_n_s_PREFIX_TABLE;
static PyObject *__pyx_n_s_PREPROCESSOR_FACTORY;
static PyObject *__pyx_n_s_ParserFactoryFunc;
static PyObject *__pyx_n_u_ParserFactoryFunc;
static PyObject *__pyx_kp_s_Parser_for_an_EBNF_source_file;
static PyObject *__pyx_n_u_Pop;
static PyObject *__pyx_n_u_Preprocessor;
static PyObject *__pyx_n_s_PreprocessorFactoryFunc;
static PyObject *__pyx_n_u_PreprocessorFactoryFunc;
static PyObject *__pyx_n_s_PreprocessorFunc;
static PyObject *__pyx_kp_u_PreprocessorToken;
static PyObject *__pyx_kp_u_Python_keyword_s_may_not_be_used;
static PyObject *__pyx_n_s_RAW_WS_KEYWORD;
static PyObject *__pyx_n_s_REDECLARED_TOKEN_WARNING;
static PyObject *__pyx_n_s_REDEFINED_DIRECTIVE;
static PyObject *__pyx_n_s_REPEATABLE_DIRECTIVES;
static PyObject *__pyx_n_s_RESERVED_SYMBOLS;
static PyObject *__pyx_n_s_RESUME_RULES_KEYWORD;
static PyObject *__pyx_kp_u_RegExp;
static PyObject *__pyx_n_s_RegExp_2;
static PyObject *__pyx_kp_u_RegExp_s;
static PyObject *__pyx_n_s_ReprType;
static PyObject *__pyx_n_u_Required;
static PyObject *__pyx_n_u_Retrieve;
static PyObject *__pyx_kp_u_Retrieve_Operator;
static PyObject *__pyx_kp_u_Rule;
static PyObject *__pyx_n_s_SKIP_RULES_SUFFIX;
static PyObject *__pyx_n_s_Sequence;
static PyObject *__pyx_n_s_Series;
static PyObject *__pyx_n_u_Series;
static PyObject *__pyx_kp_u_Series_2;
static PyObject *__pyx_n_s_Set;
static PyObject *__pyx_kp_u_Skip_list_for_resuming_in_series;
static PyObject *__pyx_kp_u_Skip_rules_for_symbol_will_neve;
static PyObject *__pyx_kp_u_SomeOf;
static PyObject *__pyx_kp_u_Symbol;
static PyObject *__pyx_kp_u_Symbol_s_cannot_be_used_in_resum;
static PyObject *__pyx_kp_u_Symbol_s_has_already_been_define;
static PyObject *__pyx_kp_u_Symbol_s_is_a_reserved_symbol;
static PyObject *__pyx_kp_u_Synonym_s;
static PyObject *__pyx_n_s_TOKEN_PARSER;
static PyObject *__pyx_n_s_TOKEN_PTYPE;
static PyObject *__pyx_n_s_TRANSFORMER_FACTORY;
static PyObject *__pyx_kp_u_This_may_change_in_the_future;
static PyObject *__pyx_kp_u_Token;
static PyObject *__pyx_n_s_Token_2;
static PyObject *__pyx_kp_u_Tokens_s_have_already_been_decla;
static PyObject *__pyx_n_s_TransformationFunc;
static PyObject *__pyx_n_s_TransformerFactoryFunc;
static PyObject *__pyx_n_u_TransformerFactoryFunc;
static PyObject *__pyx_n_s_Tuple;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_kp_u_TypeError_2;
static PyObject *__pyx_n_s_UNDEFINED_SYMBOL_IN_TRANSTABLE_W;
static PyObject *__pyx_n_s_UNUSED_ERROR_HANDLING_WARNING;
static PyObject *__pyx_n_s_Union;
static PyObject *__pyx_kp_u_Unknown_directive;
static PyObject *__pyx_kp_u_Unknown_prefix_s;
static PyObject *__pyx_kp_u_Unordered_sequence_or_alternativ;
static PyObject *__pyx_kp_u_Value;
static PyObject *__pyx_n_s_WARNING;
static PyObject *__pyx_n_s_WHITESPACE;
static PyObject *__pyx_n_u_WHITESPACE;
static PyObject *__pyx_n_s_WHITESPACE_KEYWORD;
static PyObject *__pyx_n_s_WHITESPACE_PARSER_KEYWORD;
static PyObject *__pyx_n_s_WHITESPACE_PTYPE;
static PyObject *__pyx_n_s_WHITESPACE_TYPES;
static PyObject *__pyx_n_s_WSPC_PARSER;
static PyObject *__pyx_n_s_WSP_RE;
static PyObject *__pyx_n_u_WSP_RE;
static PyObject *__pyx_n_s_Whitespace;
static PyObject *__pyx_kp_u_Whitespace_s;
static PyObject *__pyx_n_s_ZeroOrMore;
static PyObject *__pyx_n_u_ZeroOrMore;
static PyObject *__pyx_kp_u__10;
static PyObject *__pyx_kp_u__11;
static PyObject *__pyx_kp_u__12;
static PyObject *__pyx_kp_u__13;
static PyObject *__pyx_kp_u__14;
static PyObject *__pyx_kp_u__15;
static PyObject *__pyx_kp_u__16;
static PyObject *__pyx_kp_u__17;
static PyObject *__pyx_kp_u__18;
static PyObject *__pyx_kp_u__2;
static PyObject *__pyx_kp_u__20;
static PyObject *__pyx_kp_u__21;
static PyObject *__pyx_kp_u__22;
static PyObject *__pyx_kp_u__25;
static PyObject *__pyx_kp_u__27;
static PyObject *__pyx_kp_u__28;
static PyObject *__pyx_kp_u__3;
static PyObject *__pyx_kp_u__31;
static PyObject *__pyx_kp_u__32;
static PyObject *__pyx_kp_u__33;
static PyObject *__pyx_kp_u__34;
static PyObject *__pyx_kp_u__35;
static PyObject *__pyx_kp_u__39;
static PyObject *__pyx_kp_u__4;
static PyObject *__pyx_kp_u__40;
static PyObject *__pyx_kp_u__44;
static PyObject *__pyx_kp_u__45;
static PyObject *__pyx_kp_u__47;
static PyObject *__pyx_kp_u__49;
static PyObject *__pyx_kp_u__5;
static PyObject *__pyx_kp_u__51;
static PyObject *__pyx_kp_u__54;
static PyObject *__pyx_kp_u__55;
static PyObject *__pyx_kp_u__56;
static PyObject *__pyx_kp_u__58;
static PyObject *__pyx_kp_u__6;
static PyObject *__pyx_kp_u__60;
static PyObject *__pyx_kp_u__64;
static PyObject *__pyx_kp_u__65;
static PyObject *__pyx_kp_u__66;
static PyObject *__pyx_kp_u__67;
static PyObject *__pyx_kp_u__68;
static PyObject *__pyx_kp_u__69;
static PyObject *__pyx_kp_u__7;
static PyObject *__pyx_kp_u__70;
static PyObject *__pyx_kp_u__71;
static PyObject *__pyx_kp_u__72;
static PyObject *__pyx_kp_u__73;
static PyObject *__pyx_kp_u__74;
static PyObject *__pyx_kp_u__75;
static PyObject *__pyx_kp_u__76;
static PyObject *__pyx_kp_u__77;
static PyObject *__pyx_kp_u__78;
static PyObject *__pyx_kp_u__79;
static PyObject *__pyx_kp_u__8;
static PyObject *__pyx_kp_u__9;
static PyObject *__pyx_kp_u_a;
static PyObject *__pyx_n_s_add;
static PyObject *__pyx_n_u_add_grammar_source_to_parser_doc;
static PyObject *__pyx_n_s_all;
static PyObject *__pyx_kp_u_an;
static PyObject *__pyx_n_s_append;
static PyObject *__pyx_n_s_arg;
static PyObject *__pyx_n_s_args;
static PyObject *__pyx_n_s_arguments;
static PyObject *__pyx_n_s_article;
static PyObject *__pyx_n_s_as_sxpr;
static PyObject *__pyx_n_s_assemble_parser;
static PyObject *__pyx_n_s_assert_content;
static PyObject *__pyx_n_s_basename;
static PyObject *__pyx_n_u_both;
static PyObject *__pyx_n_s_branding;
static PyObject *__pyx_kp_u_but_appears_in_the_transformati;
static PyObject *__pyx_n_s_cast;
static PyObject *__pyx_n_s_center;
static PyObject *__pyx_n_s_check;
static PyObject *__pyx_n_s_check_argnum;
static PyObject *__pyx_n_s_check_rx;
static PyObject *__pyx_n_s_child;
static PyObject *__pyx_n_s_children;
static PyObject *__pyx_n_s_chksum;
static PyObject *__pyx_kp_u_class;
static PyObject *__pyx_kp_u_class_w_Grammar;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_close;
static PyObject *__pyx_n_s_code;
static PyObject *__pyx_n_s_collections;
static PyObject *__pyx_n_s_comment;
static PyObject *__pyx_n_u_comment;
static PyObject *__pyx_kp_u_comment_2;
static PyObject *__pyx_n_s_compile;
static PyObject *__pyx_n_s_compile_ebnf;
static PyObject *__pyx_n_u_compile_ebnf;
static PyObject *__pyx_n_s_compile_source;
static PyObject *__pyx_n_s_compiler;
static PyObject *__pyx_n_s_consumed_custom_errors;
static PyObject *__pyx_n_s_consumed_skip_rules;
static PyObject *__pyx_n_s_content;
static PyObject *__pyx_n_s_context;
static PyObject *__pyx_n_s_copy;
static PyObject *__pyx_n_s_current_symbol;
static PyObject *__pyx_n_s_current_symbols;
static PyObject *__pyx_n_s_custom_args;
static PyObject *__pyx_n_s_custom_errors;
static PyObject *__pyx_kp_u_d_w;
static PyObject *__pyx_n_s_declarations;
static PyObject *__pyx_kp_u_def;
static PyObject *__pyx_kp_u_def_2;
static PyObject *__pyx_kp_u_def_NAME_Transform_Transformati;
static PyObject *__pyx_kp_u_def___init___self;
static PyObject *__pyx_kp_u_def__reset_self;
static PyObject *__pyx_kp_u_def_get_compiler_NAME_Compiler;
static PyObject *__pyx_kp_u_def_get_grammar_NAME_Grammar_gl;
static PyObject *__pyx_kp_u_def_get_preprocessor_Preprocess;
static PyObject *__pyx_n_s_def_node;
static PyObject *__pyx_kp_u_def_s_text_return_text_lambda_i;
static PyObject *__pyx_n_s_deferred_tasks;
static PyObject *__pyx_n_s_defined_directives;
static PyObject *__pyx_n_s_defined_symbols;
static PyObject *__pyx_n_s_definition;
static PyObject *__pyx_n_u_definition;
static PyObject *__pyx_n_s_definitions;
static PyObject *__pyx_n_s_defn;
static PyObject *__pyx_n_s_dict;
static PyObject *__pyx_n_s_difference_update;
static PyObject *__pyx_n_s_directive;
static PyObject *__pyx_n_u_directive;
static PyObject *__pyx_kp_u_directive_definition;
static PyObject *__pyx_n_s_directives;
static PyObject *__pyx_n_s_dirty_flag;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_n_s_drop;
static PyObject *__pyx_n_u_drop;
static PyObject *__pyx_n_u_dwsp;
static PyObject *__pyx_n_s_ebnf_compiler_singleton;
static PyObject *__pyx_n_s_ebnf_grammar_singleton;
static PyObject *__pyx_n_s_ebnf_source;
static PyObject *__pyx_n_s_encoding;
static PyObject *__pyx_n_s_endswith;
static PyObject *__pyx_n_s_enter;
static PyObject *__pyx_n_s_entry;
static PyObject *__pyx_n_u_err_msg;
static PyObject *__pyx_kp_u_err_msgs;
static PyObject *__pyx_n_s_err_msgs_2;
static PyObject *__pyx_n_s_errmsg;
static PyObject *__pyx_n_s_error;
static PyObject *__pyx_n_u_error;
static PyObject *__pyx_kp_u_error_2;
static PyObject *__pyx_n_u_error_3;
static PyObject *__pyx_n_s_error_customization;
static PyObject *__pyx_n_s_error_msgs;
static PyObject *__pyx_n_s_errors;
static PyObject *__pyx_n_s_escape_re;
static PyObject *__pyx_n_s_exit;
static PyObject *__pyx_n_s_expand_table;
static PyObject *__pyx_n_s_expression;
static PyObject *__pyx_n_u_expression;
static PyObject *__pyx_n_s_extract_regex;
static PyObject *__pyx_n_s_extract_tb;
static PyObject *__pyx_n_s_f;
static PyObject *__pyx_n_s_factor;
static PyObject *__pyx_kp_u_factor_flowmarker_retrieveop;
static PyObject *__pyx_n_u_false;
static PyObject *__pyx_n_s_filter;
static PyObject *__pyx_n_u_filter;
static PyObject *__pyx_n_u_filter_2;
static PyObject *__pyx_n_s_filtered_children;
static PyObject *__pyx_n_s_filtered_result;
static PyObject *__pyx_n_s_find;
static PyObject *__pyx_n_s_first;
static PyObject *__pyx_n_s_flags;
static PyObject *__pyx_n_s_flatten;
static PyObject *__pyx_kp_u_flatten_anonymous_nodes;
static PyObject *__pyx_n_s_flowmarker;
static PyObject *__pyx_n_s_forbid;
static PyObject *__pyx_n_s_format;
static PyObject *__pyx_n_s_fullmatch;
static PyObject *__pyx_n_s_functools;
static PyObject *__pyx_n_s_gen_compiler_skeleton;
static PyObject *__pyx_n_s_gen_preprocessor_skeleton;
static PyObject *__pyx_n_s_gen_search_list;
static PyObject *__pyx_n_s_gen_search_rule;
static PyObject *__pyx_n_s_gen_transformer_skeleton;
static PyObject *__pyx_n_s_genexpr;
static PyObject *__pyx_n_s_get;
static PyObject *__pyx_n_s_get_config_value;
static PyObject *__pyx_n_s_get_ebnf_compiler;
static PyObject *__pyx_n_u_get_ebnf_compiler;
static PyObject *__pyx_n_s_get_ebnf_grammar;
static PyObject *__pyx_n_u_get_ebnf_grammar;
static PyObject *__pyx_n_s_get_ebnf_preprocessor;
static PyObject *__pyx_n_u_get_ebnf_preprocessor;
static PyObject *__pyx_n_s_get_ebnf_transformer;
static PyObject *__pyx_n_u_get_ebnf_transformer;
static PyObject *__pyx_n_s_getitem;
static PyObject *__pyx_kp_u_grammar;
static PyObject *__pyx_n_s_grammar_2;
static PyObject *__pyx_n_s_grammar_changed;
static PyObject *__pyx_n_u_grammar_changed;
static PyObject *__pyx_n_s_grammar_class;
static PyObject *__pyx_n_s_grammar_id;
static PyObject *__pyx_n_s_grammar_name;
static PyObject *__pyx_n_s_grammar_source;
static PyObject *__pyx_n_s_group;
static PyObject *__pyx_n_u_group;
static PyObject *__pyx_n_s_groups;
static PyObject *__pyx_n_u_horizontal;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_n_u_i;
static PyObject *__pyx_n_u_ignorecase;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_init;
static PyObject *__pyx_kp_u_initialize_your_variables_here;
static PyObject *__pyx_n_u_int;
static PyObject *__pyx_n_s_is_anonymous;
static PyObject *__pyx_kp_u_is_not_connected_to_parser_root;
static PyObject *__pyx_kp_u_is_not_defined_in_grammar;
static PyObject *__pyx_n_s_isidentifier;
static PyObject *__pyx_n_s_iskeyword;
static PyObject *__pyx_n_s_items;
static PyObject *__pyx_n_s_key;
static PyObject *__pyx_n_s_keys;
static PyObject *__pyx_n_s_keyword;
static PyObject *__pyx_n_s_left;
static PyObject *__pyx_n_u_left;
static PyObject *__pyx_n_s_leftover;
static PyObject *__pyx_n_s_line;
static PyObject *__pyx_n_u_linefeed;
static PyObject *__pyx_n_s_literal;
static PyObject *__pyx_n_u_literal;
static PyObject *__pyx_n_s_literalws;
static PyObject *__pyx_n_u_literalws;
static PyObject *__pyx_n_s_load_if_file;
static PyObject *__pyx_n_s_lower;
static PyObject *__pyx_n_s_m;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_kp_u_malformed_regular_expression;
static PyObject *__pyx_n_s_mandatory;
static PyObject *__pyx_kp_u_mandatory_i;
static PyObject *__pyx_n_s_mandatory_marker;
static PyObject *__pyx_n_s_match;
static PyObject *__pyx_n_s_md5;
static PyObject *__pyx_n_s_message;
static PyObject *__pyx_n_s_messages;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_s_method_name;
static PyObject *__pyx_n_s_mixin_comment;
static PyObject *__pyx_kp_u_mixin_comment_whitespace;
static PyObject *__pyx_n_s_mock_node;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_kp_u_must_be_defined_before_the_symbo;
static PyObject *__pyx_n_s_n;
static PyObject *__pyx_kp_u_n_2;
static PyObject *__pyx_kp_u_n_3;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_name_2;
static PyObject *__pyx_n_s_nd;
static PyObject *__pyx_n_s_new_error;
static PyObject *__pyx_n_s_nil_preprocessor;
static PyObject *__pyx_n_u_no;
static PyObject *__pyx_n_s_node;
static PyObject *__pyx_n_s_node_type;
static PyObject *__pyx_n_s_nodes;
static PyObject *__pyx_n_s_non_terminal;
static PyObject *__pyx_n_u_none;
static PyObject *__pyx_kp_u_not_allowed_for_directive;
static PyObject *__pyx_n_u_off;
static PyObject *__pyx_n_s_on_definition;
static PyObject *__pyx_n_s_on_directive;
static PyObject *__pyx_n_s_on_expression;
static PyObject *__pyx_n_s_on_factor;
static PyObject *__pyx_n_s_on_group;
static PyObject *__pyx_n_s_on_literal;
static PyObject *__pyx_n_s_on_oneormore;
static PyObject *__pyx_n_s_on_option;
static PyObject *__pyx_n_s_on_plaintext;
static PyObject *__pyx_n_s_on_regexp;
static PyObject *__pyx_n_s_on_repetition;
static PyObject *__pyx_n_s_on_symbol;
static PyObject *__pyx_n_s_on_syntax;
static PyObject *__pyx_n_s_on_term;
static PyObject *__pyx_n_s_on_unordered;
static PyObject *__pyx_n_s_on_whitespace;
static PyObject *__pyx_n_s_oneormore;
static PyObject *__pyx_n_u_oneormore;
static PyObject *__pyx_kp_u_oneormore_repetition_option;
static PyObject *__pyx_n_s_open;
static PyObject *__pyx_n_s_option;
static PyObject *__pyx_n_u_option;
static PyObject *__pyx_n_s_os;
static PyObject *__pyx_n_s_parser;
static PyObject *__pyx_n_s_parser_class;
static PyObject *__pyx_n_s_parser_initialization;
static PyObject *__pyx_n_u_parser_initialization;
static PyObject *__pyx_n_s_partial;
static PyObject *__pyx_n_s_path;
static PyObject *__pyx_n_s_plaintext;
static PyObject *__pyx_n_s_prefix;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_u_preprocessor_tokens;
static PyObject *__pyx_n_s_processing_table;
static PyObject *__pyx_n_s_property;
static PyObject *__pyx_n_s_pycode;
static PyObject *__pyx_n_s_qualname;
static PyObject *__pyx_n_s_r;
static PyObject *__pyx_n_u_r;
static PyObject *__pyx_kp_u_r_2;
static PyObject *__pyx_kp_u_r_Parser_for;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_raw_rules;
static PyObject *__pyx_n_s_re;
static PyObject *__pyx_kp_u_re_compile_r_s;
static PyObject *__pyx_n_s_re_error;
static PyObject *__pyx_n_s_re_flags;
static PyObject *__pyx_n_s_read;
static PyObject *__pyx_n_s_recursive;
static PyObject *__pyx_n_s_redeclared;
static PyObject *__pyx_n_s_reduce_single_child;
static PyObject *__pyx_n_s_refined;
static PyObject *__pyx_n_s_refined_rules;
static PyObject *__pyx_n_s_regexp;
static PyObject *__pyx_n_u_regexp;
static PyObject *__pyx_kp_u_regular_expression_or_search_st;
static PyObject *__pyx_n_s_related;
static PyObject *__pyx_n_s_remove;
static PyObject *__pyx_n_s_remove_brackets;
static PyObject *__pyx_n_s_remove_connections;
static PyObject *__pyx_n_s_remove_expendables;
static PyObject *__pyx_n_s_remove_tokens;
static PyObject *__pyx_n_s_repetition;
static PyObject *__pyx_n_u_repetition;
static PyObject *__pyx_n_s_replace;
static PyObject *__pyx_kp_u_replace_by_single_child;
static PyObject *__pyx_n_s_replace_by_single_child_2;
static PyObject *__pyx_kp_u_requires_a_symbol_and_not_a;
static PyObject *__pyx_n_s_reset;
static PyObject *__pyx_n_s_result;
static PyObject *__pyx_n_s_result_2;
static PyObject *__pyx_n_s_resume;
static PyObject *__pyx_n_u_resume;
static PyObject *__pyx_n_u_resume_2;
static PyObject *__pyx_n_u_resume_rules;
static PyObject *__pyx_n_s_resume_rules_2;
static PyObject *__pyx_n_s_retrieveop;
static PyObject *__pyx_n_s_return;
static PyObject *__pyx_kp_u_return_node;
static PyObject *__pyx_kp_u_return_self_fallback_compiler_n;
static PyObject *__pyx_n_s_reverse;
static PyObject *__pyx_n_s_reversed;
static PyObject *__pyx_kp_u_rfilter_s;
static PyObject *__pyx_n_s_right;
static PyObject *__pyx_n_u_right;
static PyObject *__pyx_n_s_root;
static PyObject *__pyx_n_u_root;
static PyObject *__pyx_kp_u_root_2;
static PyObject *__pyx_n_s_root_node;
static PyObject *__pyx_n_s_root_symbol;
static PyObject *__pyx_n_s_rpl;
static PyObject *__pyx_n_s_rule;
static PyObject *__pyx_n_s_rules;
static PyObject *__pyx_n_s_rx;
static PyObject *__pyx_kp_u_s;
static PyObject *__pyx_n_s_s_2;
static PyObject *__pyx_kp_u_s_3;
static PyObject *__pyx_kp_u_s_4;
static PyObject *__pyx_n_s_sane_parser_name;
static PyObject *__pyx_n_s_search;
static PyObject *__pyx_n_s_search_list;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_kp_u_self_node;
static PyObject *__pyx_n_s_send;
static PyObject *__pyx_kp_u_set;
static PyObject *__pyx_n_s_set_2;
static PyObject *__pyx_n_s_set_grammar_name;
static PyObject *__pyx_n_s_setitem;
static PyObject *__pyx_n_s_show_source;
static PyObject *__pyx_n_s_skip;
static PyObject *__pyx_n_u_skip;
static PyObject *__pyx_n_u_skip_2;
static PyObject *__pyx_kp_u_skip_3;
static PyObject *__pyx_n_u_skip_4;
static PyObject *__pyx_n_s_skip_rules;
static PyObject *__pyx_n_s_slots;
static PyObject *__pyx_kp_u_source_file;
static PyObject *__pyx_kp_u_source_file_2;
static PyObject *__pyx_n_s_source_hash;
static PyObject *__pyx_n_u_source_hash;
static PyObject *__pyx_kp_u_source_hash___a_z0_9;
static PyObject *__pyx_n_s_span;
static PyObject *__pyx_n_s_split;
static PyObject *__pyx_n_s_splitext;
static PyObject *__pyx_n_s_startswith;
static PyObject *__pyx_n_s_statement;
static PyObject *__pyx_n_s_strip;
static PyObject *__pyx_n_s_super;
static PyObject *__pyx_kp_u_super_2;
static PyObject *__pyx_kp_u_super__reset;
static PyObject *__pyx_n_s_symbol;
static PyObject *__pyx_n_u_symbol;
static PyObject *__pyx_kp_u_symbol_literal_regexp;
static PyObject *__pyx_n_s_symbols;
static PyObject *__pyx_n_s_symlist;
static PyObject *__pyx_n_s_syntax;
static PyObject *__pyx_n_u_syntax;
static PyObject *__pyx_kp_u_t;
static PyObject *__pyx_kp_u_t_n_s_n_t;
static PyObject *__pyx_n_s_table_entries;
static PyObject *__pyx_n_s_tag_name;
static PyObject *__pyx_n_s_task;
static PyObject *__pyx_n_s_term;
static PyObject *__pyx_n_u_term;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_throw;
static PyObject *__pyx_n_s_tk;
static PyObject *__pyx_n_u_token;
static PyObject *__pyx_n_s_tokens;
static PyObject *__pyx_n_u_tokens;
static PyObject *__pyx_n_s_trace;
static PyObject *__pyx_n_s_traceback;
static PyObject *__pyx_n_s_traceback_2;
static PyObject *__pyx_n_s_transformations;
static PyObject *__pyx_n_s_transformer;
static PyObject *__pyx_n_s_transtable;
static PyObject *__pyx_n_s_traverse;
static PyObject *__pyx_n_s_tree;
static PyObject *__pyx_n_s_tt_name;
static PyObject *__pyx_n_s_typing;
static PyObject *__pyx_n_u_unicode;
static PyObject *__pyx_n_s_unordered;
static PyObject *__pyx_n_u_unordered;
static PyObject *__pyx_n_s_unrepr;
static PyObject *__pyx_n_s_update;
static PyObject *__pyx_kp_u_upon_instantiation;
static PyObject *__pyx_kp_u_upon_instantiation_2;
static PyObject *__pyx_n_u_utf8;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_values;
static PyObject *__pyx_n_s_variables;
static PyObject *__pyx_n_s_verify_compiler;
static PyObject *__pyx_n_s_verify_transformation_table;
static PyObject *__pyx_n_s_version;
static PyObject *__pyx_n_u_vertical;
static PyObject *__pyx_n_s_visitor_name;
static PyObject *__pyx_kp_u_w;
static PyObject *__pyx_kp_u_w_Z;
static PyObject *__pyx_n_s_whitespace;
static PyObject *__pyx_n_u_whitespace;
static PyObject *__pyx_n_s_wsp;
static PyObject *__pyx_n_u_wsp;
static PyObject *__pyx_n_s_wsp_2;
static PyObject *__pyx_n_u_x;
static PyObject *__pyx_pf_8DHParser_4ebnf_get_ebnf_preprocessor(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_2grammar_changed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_grammar_class, PyObject *__pyx_v_grammar_source); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_4get_ebnf_grammar(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_6EBNFTransform(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_8get_ebnf_transformer(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_14EBNFDirectives___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_14EBNFDirectives_2__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_14EBNFDirectives_4__setitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_14EBNFDirectives_6keys(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_grammar_name, PyObject *__pyx_v_grammar_source); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_2_reset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_4result(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_6set_grammar_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_grammar_name, PyObject *__pyx_v_grammar_source); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_8gen_preprocessor_skeleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_10gen_transformer_skeleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_12gen_compiler_skeleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_14verify_transformation_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_transtable); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_16verify_compiler(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_compiler); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_18_check_rx(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node, PyObject *__pyx_v_rx); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_20_extract_regex(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_22_gen_search_rule(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_nd); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_24_gen_search_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_nodes); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_15assemble_parser_remove_connections(PyObject *__pyx_self, PyObject *__pyx_v_symbol); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_26assemble_parser(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_definitions, CYTHON_UNUSED PyObject *__pyx_v_root_node); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_28on_syntax(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_30on_definition(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_12on_directive_check_argnum(PyObject *__pyx_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_32on_directive(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_14__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_34non_terminal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node, PyObject *__pyx_v_parser_class, PyObject *__pyx_v_custom_args); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_36on_expression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_38_error_customization(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_40on_term(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_9on_factor_check(PyObject *__pyx_self, PyObject *__pyx_v_node); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_42on_factor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_44on_option(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_46on_repetition(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_48on_oneormore(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_50on_group(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_node); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_12on_unordered_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_12on_unordered_3genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_52on_unordered(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_54on_symbol(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_56TOKEN_PARSER(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_58WSPC_PARSER(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_10on_literal_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_60on_literal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_62on_plaintext(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_64on_regexp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_66on_whitespace(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_node); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_10get_ebnf_compiler(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_grammar_name, PyObject *__pyx_v_grammar_source); /* proto */
static PyObject *__pyx_pf_8DHParser_4ebnf_12compile_ebnf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ebnf_source, PyObject *__pyx_v_branding); /* proto */
static PyObject *__pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct__assemble_parser(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct_1_on_directive(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct_2_on_factor(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct_4_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct_5_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct_6_on_literal(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct_7_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_int_neg_5;
static PyObject *__pyx_int_neg_6;
static PyObject *__pyx_int_neg_7;
static PyObject *__pyx_tuple_;
static PyObject *__pyx_slice__19;
static PyObject *__pyx_slice__23;
static PyObject *__pyx_slice__24;
static PyObject *__pyx_slice__41;
static PyObject *__pyx_slice__42;
static PyObject *__pyx_slice__43;
static PyObject *__pyx_slice__46;
static PyObject *__pyx_slice__48;
static PyObject *__pyx_slice__50;
static PyObject *__pyx_tuple__26;
static PyObject *__pyx_tuple__29;
static PyObject *__pyx_tuple__36;
static PyObject *__pyx_tuple__38;
static PyObject *__pyx_tuple__52;
static PyObject *__pyx_tuple__57;
static PyObject *__pyx_tuple__59;
static PyObject *__pyx_tuple__61;
static PyObject *__pyx_tuple__62;
static PyObject *__pyx_tuple__80;
static PyObject *__pyx_tuple__82;
static PyObject *__pyx_tuple__84;
static PyObject *__pyx_tuple__85;
static PyObject *__pyx_tuple__86;
static PyObject *__pyx_tuple__87;
static PyObject *__pyx_tuple__89;
static PyObject *__pyx_tuple__91;
static PyObject *__pyx_tuple__93;
static PyObject *__pyx_tuple__95;
static PyObject *__pyx_tuple__97;
static PyObject *__pyx_tuple__99;
static PyObject *__pyx_tuple__101;
static PyObject *__pyx_tuple__102;
static PyObject *__pyx_tuple__104;
static PyObject *__pyx_tuple__106;
static PyObject *__pyx_tuple__108;
static PyObject *__pyx_tuple__109;
static PyObject *__pyx_tuple__111;
static PyObject *__pyx_tuple__113;
static PyObject *__pyx_tuple__115;
static PyObject *__pyx_tuple__117;
static PyObject *__pyx_tuple__119;
static PyObject *__pyx_tuple__121;
static PyObject *__pyx_tuple__123;
static PyObject *__pyx_tuple__125;
static PyObject *__pyx_tuple__127;
static PyObject *__pyx_tuple__129;
static PyObject *__pyx_tuple__131;
static PyObject *__pyx_tuple__133;
static PyObject *__pyx_tuple__135;
static PyObject *__pyx_tuple__137;
static PyObject *__pyx_tuple__139;
static PyObject *__pyx_tuple__141;
static PyObject *__pyx_tuple__143;
static PyObject *__pyx_tuple__145;
static PyObject *__pyx_tuple__147;
static PyObject *__pyx_tuple__149;
static PyObject *__pyx_tuple__151;
static PyObject *__pyx_tuple__153;
static PyObject *__pyx_tuple__155;
static PyObject *__pyx_tuple__157;
static PyObject *__pyx_tuple__159;
static PyObject *__pyx_tuple__161;
static PyObject *__pyx_tuple__163;
static PyObject *__pyx_tuple__165;
static PyObject *__pyx_tuple__167;
static PyObject *__pyx_tuple__169;
static PyObject *__pyx_tuple__171;
static PyObject *__pyx_tuple__172;
static PyObject *__pyx_tuple__174;
static PyObject *__pyx_codeobj__30;
static PyObject *__pyx_codeobj__37;
static PyObject *__pyx_codeobj__53;
static PyObject *__pyx_codeobj__63;
static PyObject *__pyx_codeobj__81;
static PyObject *__pyx_codeobj__83;
static PyObject *__pyx_codeobj__88;
static PyObject *__pyx_codeobj__90;
static PyObject *__pyx_codeobj__92;
static PyObject *__pyx_codeobj__94;
static PyObject *__pyx_codeobj__96;
static PyObject *__pyx_codeobj__98;
static PyObject *__pyx_codeobj__100;
static PyObject *__pyx_codeobj__103;
static PyObject *__pyx_codeobj__105;
static PyObject *__pyx_codeobj__107;
static PyObject *__pyx_codeobj__110;
static PyObject *__pyx_codeobj__112;
static PyObject *__pyx_codeobj__114;
static PyObject *__pyx_codeobj__116;
static PyObject *__pyx_codeobj__118;
static PyObject *__pyx_codeobj__120;
static PyObject *__pyx_codeobj__122;
static PyObject *__pyx_codeobj__124;
static PyObject *__pyx_codeobj__126;
static PyObject *__pyx_codeobj__128;
static PyObject *__pyx_codeobj__130;
static PyObject *__pyx_codeobj__132;
static PyObject *__pyx_codeobj__134;
static PyObject *__pyx_codeobj__136;
static PyObject *__pyx_codeobj__138;
static PyObject *__pyx_codeobj__140;
static PyObject *__pyx_codeobj__142;
static PyObject *__pyx_codeobj__144;
static PyObject *__pyx_codeobj__146;
static PyObject *__pyx_codeobj__148;
static PyObject *__pyx_codeobj__150;
static PyObject *__pyx_codeobj__152;
static PyObject *__pyx_codeobj__154;
static PyObject *__pyx_codeobj__156;
static PyObject *__pyx_codeobj__158;
static PyObject *__pyx_codeobj__160;
static PyObject *__pyx_codeobj__162;
static PyObject *__pyx_codeobj__164;
static PyObject *__pyx_codeobj__166;
static PyObject *__pyx_codeobj__168;
static PyObject *__pyx_codeobj__170;
static PyObject *__pyx_codeobj__173;
/* Late includes */

/* "DHParser/ebnf.py":79
 * 
 * 
 * def get_ebnf_preprocessor() -> PreprocessorFunc:             # <<<<<<<<<<<<<<
 *     return nil_preprocessor
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_1get_ebnf_preprocessor(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_1get_ebnf_preprocessor = {"get_ebnf_preprocessor", (PyCFunction)__pyx_pw_8DHParser_4ebnf_1get_ebnf_preprocessor, METH_NOARGS, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_1get_ebnf_preprocessor(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_ebnf_preprocessor (wrapper)", 0);
  __pyx_r = __pyx_pf_8DHParser_4ebnf_get_ebnf_preprocessor(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_get_ebnf_preprocessor(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("get_ebnf_preprocessor", 0);

  /* "DHParser/ebnf.py":80
 * 
 * def get_ebnf_preprocessor() -> PreprocessorFunc:
 *     return nil_preprocessor             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_nil_preprocessor); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":79
 * 
 * 
 * def get_ebnf_preprocessor() -> PreprocessorFunc:             # <<<<<<<<<<<<<<
 *     return nil_preprocessor
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("DHParser.ebnf.get_ebnf_preprocessor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":170
 * 
 * 
 * def grammar_changed(grammar_class, grammar_source: str) -> bool:             # <<<<<<<<<<<<<<
 *     """
 *     Returns ``True`` if ``grammar_class`` does not reflect the latest
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_3grammar_changed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8DHParser_4ebnf_2grammar_changed[] = "\n    Returns ``True`` if ``grammar_class`` does not reflect the latest\n    changes of ``grammar_source``\n\n    Parameters:\n        grammar_class:  the parser class representing the grammar\n            or the file name of a compiler suite containing the grammar\n        grammar_source:  File name or string representation of the\n            EBNF code of the grammar\n\n    Returns (bool):\n        True, if the source text of the grammar is different from the\n        source from which the grammar class was generated\n    ";
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_3grammar_changed = {"grammar_changed", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_3grammar_changed, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8DHParser_4ebnf_2grammar_changed};
static PyObject *__pyx_pw_8DHParser_4ebnf_3grammar_changed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_grammar_class = 0;
  PyObject *__pyx_v_grammar_source = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("grammar_changed (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grammar_class,&__pyx_n_s_grammar_source,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grammar_class)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grammar_source)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("grammar_changed", 1, 2, 2, 1); __PYX_ERR(0, 170, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "grammar_changed") < 0)) __PYX_ERR(0, 170, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_grammar_class = values[0];
    __pyx_v_grammar_source = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("grammar_changed", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 170, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.grammar_changed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grammar_source), (&PyUnicode_Type), 1, "grammar_source", 1))) __PYX_ERR(0, 170, __pyx_L1_error)
  __pyx_r = __pyx_pf_8DHParser_4ebnf_2grammar_changed(__pyx_self, __pyx_v_grammar_class, __pyx_v_grammar_source);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_2grammar_changed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_grammar_class, PyObject *__pyx_v_grammar_source) {
  PyObject *__pyx_v_grammar = NULL;
  PyObject *__pyx_v_chksum = NULL;
  PyObject *__pyx_v_f = NULL;
  PyObject *__pyx_v_pycode = NULL;
  PyObject *__pyx_v_m = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  __Pyx_RefNannySetupContext("grammar_changed", 0);

  /* "DHParser/ebnf.py":185
 *         source from which the grammar class was generated
 *     """
 *     grammar = load_if_file(grammar_source)             # <<<<<<<<<<<<<<
 *     chksum = md5(grammar, __version__)
 *     if isinstance(grammar_class, str):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_load_if_file); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_grammar_source) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_grammar_source);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_grammar = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":186
 *     """
 *     grammar = load_if_file(grammar_source)
 *     chksum = md5(grammar, __version__)             # <<<<<<<<<<<<<<
 *     if isinstance(grammar_class, str):
 *         # grammar_class = load_compiler_suite(grammar_class)[1]
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_md5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_version); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_grammar, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_grammar, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_v_grammar);
    __Pyx_GIVEREF(__pyx_v_grammar);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_grammar);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_chksum = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":187
 *     grammar = load_if_file(grammar_source)
 *     chksum = md5(grammar, __version__)
 *     if isinstance(grammar_class, str):             # <<<<<<<<<<<<<<
 *         # grammar_class = load_compiler_suite(grammar_class)[1]
 *         with open(grammar_class, 'r', encoding='utf8') as f:
 */
  __pyx_t_7 = PyUnicode_Check(__pyx_v_grammar_class); 
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (__pyx_t_8) {

    /* "DHParser/ebnf.py":189
 *     if isinstance(grammar_class, str):
 *         # grammar_class = load_compiler_suite(grammar_class)[1]
 *         with open(grammar_class, 'r', encoding='utf8') as f:             # <<<<<<<<<<<<<<
 *             pycode = f.read()
 *         m = re.search(r'class \w*\(Grammar\)', pycode)
 */
    /*with:*/ {
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_grammar_class);
      __Pyx_GIVEREF(__pyx_v_grammar_class);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_grammar_class);
      __Pyx_INCREF(__pyx_n_u_r);
      __Pyx_GIVEREF(__pyx_n_u_r);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_r);
      __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_n_u_utf8) < 0) __PYX_ERR(0, 189, __pyx_L1_error)
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 189, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_9 = __Pyx_PyObject_LookupSpecial(__pyx_t_6, __pyx_n_s_exit); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 189, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_t_6, __pyx_n_s_enter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      /*try:*/ {
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_10);
          __Pyx_XGOTREF(__pyx_t_11);
          __Pyx_XGOTREF(__pyx_t_12);
          /*try:*/ {
            __pyx_v_f = __pyx_t_1;
            __pyx_t_1 = 0;

            /* "DHParser/ebnf.py":190
 *         # grammar_class = load_compiler_suite(grammar_class)[1]
 *         with open(grammar_class, 'r', encoding='utf8') as f:
 *             pycode = f.read()             # <<<<<<<<<<<<<<
 *         m = re.search(r'class \w*\(Grammar\)', pycode)
 *         if m:
 */
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_read); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 190, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_2 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
              __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
              if (likely(__pyx_t_2)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
                __Pyx_INCREF(__pyx_t_2);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_6, function);
              }
            }
            __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_v_pycode = __pyx_t_1;
            __pyx_t_1 = 0;

            /* "DHParser/ebnf.py":189
 *     if isinstance(grammar_class, str):
 *         # grammar_class = load_compiler_suite(grammar_class)[1]
 *         with open(grammar_class, 'r', encoding='utf8') as f:             # <<<<<<<<<<<<<<
 *             pycode = f.read()
 *         m = re.search(r'class \w*\(Grammar\)', pycode)
 */
          }
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          goto __pyx_L13_try_end;
          __pyx_L8_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          /*except:*/ {
            __Pyx_AddTraceback("DHParser.ebnf.grammar_changed", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_2) < 0) __PYX_ERR(0, 189, __pyx_L10_except_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_3 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 189, __pyx_L10_except_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_3, NULL);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 189, __pyx_L10_except_error)
            __Pyx_GOTREF(__pyx_t_13);
            __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_13);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            if (__pyx_t_8 < 0) __PYX_ERR(0, 189, __pyx_L10_except_error)
            __pyx_t_7 = ((!(__pyx_t_8 != 0)) != 0);
            if (__pyx_t_7) {
              __Pyx_GIVEREF(__pyx_t_1);
              __Pyx_GIVEREF(__pyx_t_6);
              __Pyx_XGIVEREF(__pyx_t_2);
              __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_6, __pyx_t_2);
              __pyx_t_1 = 0; __pyx_t_6 = 0; __pyx_t_2 = 0; 
              __PYX_ERR(0, 189, __pyx_L10_except_error)
            }
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            goto __pyx_L9_exception_handled;
          }
          __pyx_L10_except_error:;
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_XGIVEREF(__pyx_t_11);
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
          goto __pyx_L1_error;
          __pyx_L9_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_XGIVEREF(__pyx_t_11);
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
          __pyx_L13_try_end:;
        }
      }
      /*finally:*/ {
        /*normal exit:*/{
          if (__pyx_t_9) {
            __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple_, NULL);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 189, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          }
          goto __pyx_L7;
        }
        __pyx_L7:;
      }
      goto __pyx_L17;
      __pyx_L4_error:;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L1_error;
      __pyx_L17:;
    }

    /* "DHParser/ebnf.py":191
 *         with open(grammar_class, 'r', encoding='utf8') as f:
 *             pycode = f.read()
 *         m = re.search(r'class \w*\(Grammar\)', pycode)             # <<<<<<<<<<<<<<
 *         if m:
 *             m = re.search('    source_hash__ *= *"([a-z0-9]*)"',
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_re); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_search); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_v_pycode)) { __Pyx_RaiseUnboundLocalError("pycode"); __PYX_ERR(0, 191, __pyx_L1_error) }
    __pyx_t_6 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_5 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_kp_u_class_w_Grammar, __pyx_v_pycode};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_kp_u_class_w_Grammar, __pyx_v_pycode};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 191, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_u_class_w_Grammar);
      __Pyx_GIVEREF(__pyx_kp_u_class_w_Grammar);
      PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_5, __pyx_kp_u_class_w_Grammar);
      __Pyx_INCREF(__pyx_v_pycode);
      __Pyx_GIVEREF(__pyx_v_pycode);
      PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_5, __pyx_v_pycode);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_m = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "DHParser/ebnf.py":192
 *             pycode = f.read()
 *         m = re.search(r'class \w*\(Grammar\)', pycode)
 *         if m:             # <<<<<<<<<<<<<<
 *             m = re.search('    source_hash__ *= *"([a-z0-9]*)"',
 *                           pycode[m.span()[1]:])
 */
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_m); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 192, __pyx_L1_error)
    if (__pyx_t_7) {

      /* "DHParser/ebnf.py":193
 *         m = re.search(r'class \w*\(Grammar\)', pycode)
 *         if m:
 *             m = re.search('    source_hash__ *= *"([a-z0-9]*)"',             # <<<<<<<<<<<<<<
 *                           pycode[m.span()[1]:])
 *             return not (m and m.groups() and m.groups()[-1] == chksum)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_re); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_search); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 193, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "DHParser/ebnf.py":194
 *         if m:
 *             m = re.search('    source_hash__ *= *"([a-z0-9]*)"',
 *                           pycode[m.span()[1]:])             # <<<<<<<<<<<<<<
 *             return not (m and m.groups() and m.groups()[-1] == chksum)
 *         else:
 */
      if (unlikely(!__pyx_v_pycode)) { __Pyx_RaiseUnboundLocalError("pycode"); __PYX_ERR(0, 194, __pyx_L1_error) }
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_span); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 194, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 194, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_pycode, 0, 0, &__pyx_t_6, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_kp_u_source_hash___a_z0_9, __pyx_t_1};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_kp_u_source_hash___a_z0_9, __pyx_t_1};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else
      #endif
      {
        __pyx_t_4 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 193, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (__pyx_t_6) {
          __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
        }
        __Pyx_INCREF(__pyx_kp_u_source_hash___a_z0_9);
        __Pyx_GIVEREF(__pyx_kp_u_source_hash___a_z0_9);
        PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_kp_u_source_hash___a_z0_9);
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_t_1);
        __pyx_t_1 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_m, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "DHParser/ebnf.py":195
 *             m = re.search('    source_hash__ *= *"([a-z0-9]*)"',
 *                           pycode[m.span()[1]:])
 *             return not (m and m.groups() and m.groups()[-1] == chksum)             # <<<<<<<<<<<<<<
 *         else:
 *             return True
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_m); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 195, __pyx_L1_error)
      if (__pyx_t_8) {
      } else {
        __pyx_t_7 = __pyx_t_8;
        goto __pyx_L19_bool_binop_done;
      }
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_groups); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 195, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 195, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_8) {
      } else {
        __pyx_t_7 = __pyx_t_8;
        goto __pyx_L19_bool_binop_done;
      }
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_groups); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 195, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 195, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_v_chksum, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 195, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_7 = __pyx_t_8;
      __pyx_L19_bool_binop_done:;
      __pyx_t_2 = __Pyx_PyBool_FromLong((!__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "DHParser/ebnf.py":192
 *             pycode = f.read()
 *         m = re.search(r'class \w*\(Grammar\)', pycode)
 *         if m:             # <<<<<<<<<<<<<<
 *             m = re.search('    source_hash__ *= *"([a-z0-9]*)"',
 *                           pycode[m.span()[1]:])
 */
    }

    /* "DHParser/ebnf.py":197
 *             return not (m and m.groups() and m.groups()[-1] == chksum)
 *         else:
 *             return True             # <<<<<<<<<<<<<<
 *     else:
 *         return chksum != grammar_class.source_hash__
 */
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;
    }

    /* "DHParser/ebnf.py":187
 *     grammar = load_if_file(grammar_source)
 *     chksum = md5(grammar, __version__)
 *     if isinstance(grammar_class, str):             # <<<<<<<<<<<<<<
 *         # grammar_class = load_compiler_suite(grammar_class)[1]
 *         with open(grammar_class, 'r', encoding='utf8') as f:
 */
  }

  /* "DHParser/ebnf.py":199
 *             return True
 *     else:
 *         return chksum != grammar_class.source_hash__             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_grammar_class, __pyx_n_s_source_hash); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_chksum, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "DHParser/ebnf.py":170
 * 
 * 
 * def grammar_changed(grammar_class, grammar_source: str) -> bool:             # <<<<<<<<<<<<<<
 *     """
 *     Returns ``True`` if ``grammar_class`` does not reflect the latest
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("DHParser.ebnf.grammar_changed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_grammar);
  __Pyx_XDECREF(__pyx_v_chksum);
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XDECREF(__pyx_v_pycode);
  __Pyx_XDECREF(__pyx_v_m);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":202
 * 
 * 
 * def get_ebnf_grammar() -> EBNFGrammar:             # <<<<<<<<<<<<<<
 *     try:
 *         grammar = GLOBALS.ebnf_grammar_singleton
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_5get_ebnf_grammar(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_5get_ebnf_grammar = {"get_ebnf_grammar", (PyCFunction)__pyx_pw_8DHParser_4ebnf_5get_ebnf_grammar, METH_NOARGS, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_5get_ebnf_grammar(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_ebnf_grammar (wrapper)", 0);
  __pyx_r = __pyx_pf_8DHParser_4ebnf_4get_ebnf_grammar(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_4get_ebnf_grammar(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_grammar = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_RefNannySetupContext("get_ebnf_grammar", 0);

  /* "DHParser/ebnf.py":203
 * 
 * def get_ebnf_grammar() -> EBNFGrammar:
 *     try:             # <<<<<<<<<<<<<<
 *         grammar = GLOBALS.ebnf_grammar_singleton
 *         return grammar
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "DHParser/ebnf.py":204
 * def get_ebnf_grammar() -> EBNFGrammar:
 *     try:
 *         grammar = GLOBALS.ebnf_grammar_singleton             # <<<<<<<<<<<<<<
 *         return grammar
 *     except AttributeError:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_GLOBALS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 204, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ebnf_grammar_singleton); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 204, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_grammar = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "DHParser/ebnf.py":205
 *     try:
 *         grammar = GLOBALS.ebnf_grammar_singleton
 *         return grammar             # <<<<<<<<<<<<<<
 *     except AttributeError:
 *         GLOBALS.ebnf_grammar_singleton = EBNFGrammar()
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_grammar);
      __pyx_r = __pyx_v_grammar;
      goto __pyx_L7_try_return;

      /* "DHParser/ebnf.py":203
 * 
 * def get_ebnf_grammar() -> EBNFGrammar:
 *     try:             # <<<<<<<<<<<<<<
 *         grammar = GLOBALS.ebnf_grammar_singleton
 *         return grammar
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "DHParser/ebnf.py":206
 *         grammar = GLOBALS.ebnf_grammar_singleton
 *         return grammar
 *     except AttributeError:             # <<<<<<<<<<<<<<
 *         GLOBALS.ebnf_grammar_singleton = EBNFGrammar()
 *         return GLOBALS.ebnf_grammar_singleton
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("DHParser.ebnf.get_ebnf_grammar", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 206, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_7);

      /* "DHParser/ebnf.py":207
 *         return grammar
 *     except AttributeError:
 *         GLOBALS.ebnf_grammar_singleton = EBNFGrammar()             # <<<<<<<<<<<<<<
 *         return GLOBALS.ebnf_grammar_singleton
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_EBNFGrammar); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 207, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
        }
      }
      __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 207, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_GLOBALS); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 207, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__Pyx_PyObject_SetAttrStr(__pyx_t_9, __pyx_n_s_ebnf_grammar_singleton, __pyx_t_8) < 0) __PYX_ERR(0, 207, __pyx_L5_except_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "DHParser/ebnf.py":208
 *     except AttributeError:
 *         GLOBALS.ebnf_grammar_singleton = EBNFGrammar()
 *         return GLOBALS.ebnf_grammar_singleton             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_GLOBALS); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 208, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_ebnf_grammar_singleton); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 208, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "DHParser/ebnf.py":203
 * 
 * def get_ebnf_grammar() -> EBNFGrammar:
 *     try:             # <<<<<<<<<<<<<<
 *         grammar = GLOBALS.ebnf_grammar_singleton
 *         return grammar
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "DHParser/ebnf.py":202
 * 
 * 
 * def get_ebnf_grammar() -> EBNFGrammar:             # <<<<<<<<<<<<<<
 *     try:
 *         grammar = GLOBALS.ebnf_grammar_singleton
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("DHParser.ebnf.get_ebnf_grammar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_grammar);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":251
 * 
 * 
 * def EBNFTransform() -> TransformationFunc:             # <<<<<<<<<<<<<<
 *     return partial(traverse, processing_table=EBNF_AST_transformation_table.copy())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_7EBNFTransform(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_7EBNFTransform = {"EBNFTransform", (PyCFunction)__pyx_pw_8DHParser_4ebnf_7EBNFTransform, METH_NOARGS, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_7EBNFTransform(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("EBNFTransform (wrapper)", 0);
  __pyx_r = __pyx_pf_8DHParser_4ebnf_6EBNFTransform(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_6EBNFTransform(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("EBNFTransform", 0);

  /* "DHParser/ebnf.py":252
 * 
 * def EBNFTransform() -> TransformationFunc:
 *     return partial(traverse, processing_table=EBNF_AST_transformation_table.copy())             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_partial); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_traverse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_EBNF_AST_transformation_table); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_copy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_processing_table, __pyx_t_4) < 0) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":251
 * 
 * 
 * def EBNFTransform() -> TransformationFunc:             # <<<<<<<<<<<<<<
 *     return partial(traverse, processing_table=EBNF_AST_transformation_table.copy())
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFTransform", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":255
 * 
 * 
 * def get_ebnf_transformer() -> TransformationFunc:             # <<<<<<<<<<<<<<
 *     try:
 *         transformer = GLOBALS.EBNF_transformer_singleton
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_9get_ebnf_transformer(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_9get_ebnf_transformer = {"get_ebnf_transformer", (PyCFunction)__pyx_pw_8DHParser_4ebnf_9get_ebnf_transformer, METH_NOARGS, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_9get_ebnf_transformer(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_ebnf_transformer (wrapper)", 0);
  __pyx_r = __pyx_pf_8DHParser_4ebnf_8get_ebnf_transformer(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_8get_ebnf_transformer(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_transformer = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_RefNannySetupContext("get_ebnf_transformer", 0);

  /* "DHParser/ebnf.py":256
 * 
 * def get_ebnf_transformer() -> TransformationFunc:
 *     try:             # <<<<<<<<<<<<<<
 *         transformer = GLOBALS.EBNF_transformer_singleton
 *     except AttributeError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "DHParser/ebnf.py":257
 * def get_ebnf_transformer() -> TransformationFunc:
 *     try:
 *         transformer = GLOBALS.EBNF_transformer_singleton             # <<<<<<<<<<<<<<
 *     except AttributeError:
 *         GLOBALS.EBNF_transformer_singleton = EBNFTransform()
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_GLOBALS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 257, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_EBNF_transformer_singleton); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 257, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_transformer = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "DHParser/ebnf.py":256
 * 
 * def get_ebnf_transformer() -> TransformationFunc:
 *     try:             # <<<<<<<<<<<<<<
 *         transformer = GLOBALS.EBNF_transformer_singleton
 *     except AttributeError:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "DHParser/ebnf.py":258
 *     try:
 *         transformer = GLOBALS.EBNF_transformer_singleton
 *     except AttributeError:             # <<<<<<<<<<<<<<
 *         GLOBALS.EBNF_transformer_singleton = EBNFTransform()
 *         transformer = GLOBALS.EBNF_transformer_singleton
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("DHParser.ebnf.get_ebnf_transformer", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 258, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_7);

      /* "DHParser/ebnf.py":259
 *         transformer = GLOBALS.EBNF_transformer_singleton
 *     except AttributeError:
 *         GLOBALS.EBNF_transformer_singleton = EBNFTransform()             # <<<<<<<<<<<<<<
 *         transformer = GLOBALS.EBNF_transformer_singleton
 *     return transformer
 */
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_EBNFTransform); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 259, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
        }
      }
      __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 259, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_GLOBALS); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 259, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__Pyx_PyObject_SetAttrStr(__pyx_t_9, __pyx_n_s_EBNF_transformer_singleton, __pyx_t_8) < 0) __PYX_ERR(0, 259, __pyx_L5_except_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "DHParser/ebnf.py":260
 *     except AttributeError:
 *         GLOBALS.EBNF_transformer_singleton = EBNFTransform()
 *         transformer = GLOBALS.EBNF_transformer_singleton             # <<<<<<<<<<<<<<
 *     return transformer
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_GLOBALS); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 260, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_EBNF_transformer_singleton); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 260, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF_SET(__pyx_v_transformer, __pyx_t_8);
      __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "DHParser/ebnf.py":256
 * 
 * def get_ebnf_transformer() -> TransformationFunc:
 *     try:             # <<<<<<<<<<<<<<
 *         transformer = GLOBALS.EBNF_transformer_singleton
 *     except AttributeError:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L8_try_end:;
  }

  /* "DHParser/ebnf.py":261
 *         GLOBALS.EBNF_transformer_singleton = EBNFTransform()
 *         transformer = GLOBALS.EBNF_transformer_singleton
 *     return transformer             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_transformer);
  __pyx_r = __pyx_v_transformer;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":255
 * 
 * 
 * def get_ebnf_transformer() -> TransformationFunc:             # <<<<<<<<<<<<<<
 *     try:
 *         transformer = GLOBALS.EBNF_transformer_singleton
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("DHParser.ebnf.get_ebnf_transformer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_transformer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":376
 *                  'resume', 'drop']
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.whitespace = WHITESPACE_TYPES['vertical']  # type: str
 *         self.comment = ''     # type: str
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_14EBNFDirectives_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_14EBNFDirectives_1__init__ = {"__init__", (PyCFunction)__pyx_pw_8DHParser_4ebnf_14EBNFDirectives_1__init__, METH_O, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_14EBNFDirectives_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8DHParser_4ebnf_14EBNFDirectives___init__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_14EBNFDirectives___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "DHParser/ebnf.py":377
 * 
 *     def __init__(self):
 *         self.whitespace = WHITESPACE_TYPES['vertical']  # type: str             # <<<<<<<<<<<<<<
 *         self.comment = ''     # type: str
 *         self.literalws = {'right'}  # type: Collection[str]
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WHITESPACE_TYPES); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_vertical); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_whitespace, __pyx_t_2) < 0) __PYX_ERR(0, 377, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":378
 *     def __init__(self):
 *         self.whitespace = WHITESPACE_TYPES['vertical']  # type: str
 *         self.comment = ''     # type: str             # <<<<<<<<<<<<<<
 *         self.literalws = {'right'}  # type: Collection[str]
 *         self.tokens = set()   # type: Collection[str]
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_comment, __pyx_kp_u__2) < 0) __PYX_ERR(0, 378, __pyx_L1_error)

  /* "DHParser/ebnf.py":379
 *         self.whitespace = WHITESPACE_TYPES['vertical']  # type: str
 *         self.comment = ''     # type: str
 *         self.literalws = {'right'}  # type: Collection[str]             # <<<<<<<<<<<<<<
 *         self.tokens = set()   # type: Collection[str]
 *         self.filter = dict()  # type: Dict[str, str]
 */
  __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PySet_Add(__pyx_t_2, __pyx_n_u_right) < 0) __PYX_ERR(0, 379, __pyx_L1_error)
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_literalws, __pyx_t_2) < 0) __PYX_ERR(0, 379, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":380
 *         self.comment = ''     # type: str
 *         self.literalws = {'right'}  # type: Collection[str]
 *         self.tokens = set()   # type: Collection[str]             # <<<<<<<<<<<<<<
 *         self.filter = dict()  # type: Dict[str, str]
 *         self.error = dict()   # type: Dict[str, List[Tuple[ReprType, ReprType]]]
 */
  __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tokens, __pyx_t_2) < 0) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":381
 *         self.literalws = {'right'}  # type: Collection[str]
 *         self.tokens = set()   # type: Collection[str]
 *         self.filter = dict()  # type: Dict[str, str]             # <<<<<<<<<<<<<<
 *         self.error = dict()   # type: Dict[str, List[Tuple[ReprType, ReprType]]]
 *         self.skip = dict()    # type: Dict[str, List[Union[unrepr, str]]]
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_filter, __pyx_t_2) < 0) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":382
 *         self.tokens = set()   # type: Collection[str]
 *         self.filter = dict()  # type: Dict[str, str]
 *         self.error = dict()   # type: Dict[str, List[Tuple[ReprType, ReprType]]]             # <<<<<<<<<<<<<<
 *         self.skip = dict()    # type: Dict[str, List[Union[unrepr, str]]]
 *         self.resume = dict()  # type: Dict[str, List[Union[unrepr, str]]]
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_error, __pyx_t_2) < 0) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":383
 *         self.filter = dict()  # type: Dict[str, str]
 *         self.error = dict()   # type: Dict[str, List[Tuple[ReprType, ReprType]]]
 *         self.skip = dict()    # type: Dict[str, List[Union[unrepr, str]]]             # <<<<<<<<<<<<<<
 *         self.resume = dict()  # type: Dict[str, List[Union[unrepr, str]]]
 *         self.drop = set()     # type: Set[str]
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_skip, __pyx_t_2) < 0) __PYX_ERR(0, 383, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":384
 *         self.error = dict()   # type: Dict[str, List[Tuple[ReprType, ReprType]]]
 *         self.skip = dict()    # type: Dict[str, List[Union[unrepr, str]]]
 *         self.resume = dict()  # type: Dict[str, List[Union[unrepr, str]]]             # <<<<<<<<<<<<<<
 *         self.drop = set()     # type: Set[str]
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_resume, __pyx_t_2) < 0) __PYX_ERR(0, 384, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":385
 *         self.skip = dict()    # type: Dict[str, List[Union[unrepr, str]]]
 *         self.resume = dict()  # type: Dict[str, List[Union[unrepr, str]]]
 *         self.drop = set()     # type: Set[str]             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, key):
 */
  __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_drop, __pyx_t_2) < 0) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":376
 *                  'resume', 'drop']
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.whitespace = WHITESPACE_TYPES['vertical']  # type: str
 *         self.comment = ''     # type: str
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFDirectives.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":387
 *         self.drop = set()     # type: Set[str]
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         return getattr(self, key)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_14EBNFDirectives_3__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_14EBNFDirectives_3__getitem__ = {"__getitem__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_14EBNFDirectives_3__getitem__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_14EBNFDirectives_3__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_key,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(0, 387, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) __PYX_ERR(0, 387, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_key = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 387, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFDirectives.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8DHParser_4ebnf_14EBNFDirectives_2__getitem__(__pyx_self, __pyx_v_self, __pyx_v_key);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_14EBNFDirectives_2__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "DHParser/ebnf.py":388
 * 
 *     def __getitem__(self, key):
 *         return getattr(self, key)             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, key, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetAttr(__pyx_v_self, __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":387
 *         self.drop = set()     # type: Set[str]
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         return getattr(self, key)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFDirectives.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":390
 *         return getattr(self, key)
 * 
 *     def __setitem__(self, key, value):             # <<<<<<<<<<<<<<
 *         assert hasattr(self, key)
 *         setattr(self, key, value)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_14EBNFDirectives_5__setitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_14EBNFDirectives_5__setitem__ = {"__setitem__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_14EBNFDirectives_5__setitem__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_14EBNFDirectives_5__setitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_key,&__pyx_n_s_value,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__setitem__", 1, 3, 3, 1); __PYX_ERR(0, 390, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__setitem__", 1, 3, 3, 2); __PYX_ERR(0, 390, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__setitem__") < 0)) __PYX_ERR(0, 390, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_key = values[1];
    __pyx_v_value = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setitem__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 390, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFDirectives.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8DHParser_4ebnf_14EBNFDirectives_4__setitem__(__pyx_self, __pyx_v_self, __pyx_v_key, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_14EBNFDirectives_4__setitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "DHParser/ebnf.py":391
 * 
 *     def __setitem__(self, key, value):
 *         assert hasattr(self, key)             # <<<<<<<<<<<<<<
 *         setattr(self, key, value)
 * 
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_1 = __Pyx_HasAttr(__pyx_v_self, __pyx_v_key); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 391, __pyx_L1_error)
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 391, __pyx_L1_error)
    }
  }
  #endif

  /* "DHParser/ebnf.py":392
 *     def __setitem__(self, key, value):
 *         assert hasattr(self, key)
 *         setattr(self, key, value)             # <<<<<<<<<<<<<<
 * 
 *     def keys(self):
 */
  __pyx_t_2 = PyObject_SetAttr(__pyx_v_self, __pyx_v_key, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 392, __pyx_L1_error)

  /* "DHParser/ebnf.py":390
 *         return getattr(self, key)
 * 
 *     def __setitem__(self, key, value):             # <<<<<<<<<<<<<<
 *         assert hasattr(self, key)
 *         setattr(self, key, value)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFDirectives.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":394
 *         setattr(self, key, value)
 * 
 *     def keys(self):             # <<<<<<<<<<<<<<
 *         return self.__dict__.keys()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_14EBNFDirectives_7keys(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_14EBNFDirectives_7keys = {"keys", (PyCFunction)__pyx_pw_8DHParser_4ebnf_14EBNFDirectives_7keys, METH_O, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_14EBNFDirectives_7keys(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("keys (wrapper)", 0);
  __pyx_r = __pyx_pf_8DHParser_4ebnf_14EBNFDirectives_6keys(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_14EBNFDirectives_6keys(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("keys", 0);

  /* "DHParser/ebnf.py":395
 * 
 *     def keys(self):
 *         return self.__dict__.keys()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":394
 *         setattr(self, key, value)
 * 
 *     def keys(self):             # <<<<<<<<<<<<<<
 *         return self.__dict__.keys()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFDirectives.keys", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":505
 * 
 * 
 *     def __init__(self, grammar_name="DSL", grammar_source=""):             # <<<<<<<<<<<<<<
 *         self.grammar_id = 0
 *         super(EBNFCompiler, self).__init__()  # calls the _reset()-method
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_grammar_name = 0;
  PyObject *__pyx_v_grammar_source = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_grammar_name,&__pyx_n_s_grammar_source,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_u_DSL));
    values[2] = ((PyObject *)((PyObject*)__pyx_kp_u__2));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grammar_name);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grammar_source);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 505, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_grammar_name = values[1];
    __pyx_v_grammar_source = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 505, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler___init__(__pyx_self, __pyx_v_self, __pyx_v_grammar_name, __pyx_v_grammar_source);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_grammar_name, PyObject *__pyx_v_grammar_source) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "DHParser/ebnf.py":506
 * 
 *     def __init__(self, grammar_name="DSL", grammar_source=""):
 *         self.grammar_id = 0             # <<<<<<<<<<<<<<
 *         super(EBNFCompiler, self).__init__()  # calls the _reset()-method
 *         self.set_grammar_name(grammar_name, grammar_source)
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_grammar_id, __pyx_int_0) < 0) __PYX_ERR(0, 506, __pyx_L1_error)

  /* "DHParser/ebnf.py":507
 *     def __init__(self, grammar_name="DSL", grammar_source=""):
 *         self.grammar_id = 0
 *         super(EBNFCompiler, self).__init__()  # calls the _reset()-method             # <<<<<<<<<<<<<<
 *         self.set_grammar_name(grammar_name, grammar_source)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_EBNFCompiler); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":508
 *         self.grammar_id = 0
 *         super(EBNFCompiler, self).__init__()  # calls the _reset()-method
 *         self.set_grammar_name(grammar_name, grammar_source)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_set_grammar_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_grammar_name, __pyx_v_grammar_source};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_grammar_name, __pyx_v_grammar_source};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_grammar_name);
    __Pyx_GIVEREF(__pyx_v_grammar_name);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_grammar_name);
    __Pyx_INCREF(__pyx_v_grammar_source);
    __Pyx_GIVEREF(__pyx_v_grammar_source);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_grammar_source);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":505
 * 
 * 
 *     def __init__(self, grammar_name="DSL", grammar_source=""):             # <<<<<<<<<<<<<<
 *         self.grammar_id = 0
 *         super(EBNFCompiler, self).__init__()  # calls the _reset()-method
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":511
 * 
 * 
 *     def _reset(self):             # <<<<<<<<<<<<<<
 *         super(EBNFCompiler, self)._reset()
 *         self._result = ''           # type: str
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_3_reset(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_3_reset = {"_reset", (PyCFunction)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_3_reset, METH_O, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_3_reset(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_reset (wrapper)", 0);
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_2_reset(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_2_reset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("_reset", 0);

  /* "DHParser/ebnf.py":512
 * 
 *     def _reset(self):
 *         super(EBNFCompiler, self)._reset()             # <<<<<<<<<<<<<<
 *         self._result = ''           # type: str
 *         self.re_flags = set()       # type: Set[str]
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_EBNFCompiler); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_reset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":513
 *     def _reset(self):
 *         super(EBNFCompiler, self)._reset()
 *         self._result = ''           # type: str             # <<<<<<<<<<<<<<
 *         self.re_flags = set()       # type: Set[str]
 *         self.rules = OrderedDict()  # type: OrderedDict[str, List[Node]]
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_result, __pyx_kp_u__2) < 0) __PYX_ERR(0, 513, __pyx_L1_error)

  /* "DHParser/ebnf.py":514
 *         super(EBNFCompiler, self)._reset()
 *         self._result = ''           # type: str
 *         self.re_flags = set()       # type: Set[str]             # <<<<<<<<<<<<<<
 *         self.rules = OrderedDict()  # type: OrderedDict[str, List[Node]]
 *         self.current_symbols = []   # type: List[Node]
 */
  __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_re_flags, __pyx_t_1) < 0) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":515
 *         self._result = ''           # type: str
 *         self.re_flags = set()       # type: Set[str]
 *         self.rules = OrderedDict()  # type: OrderedDict[str, List[Node]]             # <<<<<<<<<<<<<<
 *         self.current_symbols = []   # type: List[Node]
 *         self.symbols = {}           # type: Dict[str, Node]
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rules, __pyx_t_1) < 0) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":516
 *         self.re_flags = set()       # type: Set[str]
 *         self.rules = OrderedDict()  # type: OrderedDict[str, List[Node]]
 *         self.current_symbols = []   # type: List[Node]             # <<<<<<<<<<<<<<
 *         self.symbols = {}           # type: Dict[str, Node]
 *         self.variables = set()      # type: Set[str]
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_current_symbols, __pyx_t_1) < 0) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":517
 *         self.rules = OrderedDict()  # type: OrderedDict[str, List[Node]]
 *         self.current_symbols = []   # type: List[Node]
 *         self.symbols = {}           # type: Dict[str, Node]             # <<<<<<<<<<<<<<
 *         self.variables = set()      # type: Set[str]
 *         self.recursive = set()      # type: Set[str]
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_symbols, __pyx_t_1) < 0) __PYX_ERR(0, 517, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":518
 *         self.current_symbols = []   # type: List[Node]
 *         self.symbols = {}           # type: Dict[str, Node]
 *         self.variables = set()      # type: Set[str]             # <<<<<<<<<<<<<<
 *         self.recursive = set()      # type: Set[str]
 *         self.definitions = {}       # type: Dict[str, str]
 */
  __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_variables, __pyx_t_1) < 0) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":519
 *         self.symbols = {}           # type: Dict[str, Node]
 *         self.variables = set()      # type: Set[str]
 *         self.recursive = set()      # type: Set[str]             # <<<<<<<<<<<<<<
 *         self.definitions = {}       # type: Dict[str, str]
 *         self.deferred_tasks = []    # type: List[Callable]
 */
  __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_recursive, __pyx_t_1) < 0) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":520
 *         self.variables = set()      # type: Set[str]
 *         self.recursive = set()      # type: Set[str]
 *         self.definitions = {}       # type: Dict[str, str]             # <<<<<<<<<<<<<<
 *         self.deferred_tasks = []    # type: List[Callable]
 *         self.root_symbol = ""       # type: str
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_definitions, __pyx_t_1) < 0) __PYX_ERR(0, 520, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":521
 *         self.recursive = set()      # type: Set[str]
 *         self.definitions = {}       # type: Dict[str, str]
 *         self.deferred_tasks = []    # type: List[Callable]             # <<<<<<<<<<<<<<
 *         self.root_symbol = ""       # type: str
 *         self.directives = EBNFDirectives()   # type: EBNFDirectives
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_deferred_tasks, __pyx_t_1) < 0) __PYX_ERR(0, 521, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":522
 *         self.definitions = {}       # type: Dict[str, str]
 *         self.deferred_tasks = []    # type: List[Callable]
 *         self.root_symbol = ""       # type: str             # <<<<<<<<<<<<<<
 *         self.directives = EBNFDirectives()   # type: EBNFDirectives
 *         self.defined_directives = set()      # type: Set[str]
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_root_symbol, __pyx_kp_u__2) < 0) __PYX_ERR(0, 522, __pyx_L1_error)

  /* "DHParser/ebnf.py":523
 *         self.deferred_tasks = []    # type: List[Callable]
 *         self.root_symbol = ""       # type: str
 *         self.directives = EBNFDirectives()   # type: EBNFDirectives             # <<<<<<<<<<<<<<
 *         self.defined_directives = set()      # type: Set[str]
 *         self.consumed_custom_errors = set()  # type: Set[str]
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_EBNFDirectives); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_directives, __pyx_t_1) < 0) __PYX_ERR(0, 523, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":524
 *         self.root_symbol = ""       # type: str
 *         self.directives = EBNFDirectives()   # type: EBNFDirectives
 *         self.defined_directives = set()      # type: Set[str]             # <<<<<<<<<<<<<<
 *         self.consumed_custom_errors = set()  # type: Set[str]
 *         self.consumed_skip_rules = set()     # type: Set[str]
 */
  __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_defined_directives, __pyx_t_1) < 0) __PYX_ERR(0, 524, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":525
 *         self.directives = EBNFDirectives()   # type: EBNFDirectives
 *         self.defined_directives = set()      # type: Set[str]
 *         self.consumed_custom_errors = set()  # type: Set[str]             # <<<<<<<<<<<<<<
 *         self.consumed_skip_rules = set()     # type: Set[str]
 *         self.grammar_id += 1
 */
  __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_consumed_custom_errors, __pyx_t_1) < 0) __PYX_ERR(0, 525, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":526
 *         self.defined_directives = set()      # type: Set[str]
 *         self.consumed_custom_errors = set()  # type: Set[str]
 *         self.consumed_skip_rules = set()     # type: Set[str]             # <<<<<<<<<<<<<<
 *         self.grammar_id += 1
 * 
 */
  __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_consumed_skip_rules, __pyx_t_1) < 0) __PYX_ERR(0, 526, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":527
 *         self.consumed_custom_errors = set()  # type: Set[str]
 *         self.consumed_skip_rules = set()     # type: Set[str]
 *         self.grammar_id += 1             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_grammar_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_grammar_id, __pyx_t_3) < 0) __PYX_ERR(0, 527, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "DHParser/ebnf.py":511
 * 
 * 
 *     def _reset(self):             # <<<<<<<<<<<<<<
 *         super(EBNFCompiler, self)._reset()
 *         self._result = ''           # type: str
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler._reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":531
 * 
 *     @property
 *     def result(self) -> str:             # <<<<<<<<<<<<<<
 *         return self._result
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_5result(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_5result = {"result", (PyCFunction)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_5result, METH_O, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_5result(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("result (wrapper)", 0);
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_4result(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_4result(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("result", 0);

  /* "DHParser/ebnf.py":532
 *     @property
 *     def result(self) -> str:
 *         return self._result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 532, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":531
 * 
 *     @property
 *     def result(self) -> str:             # <<<<<<<<<<<<<<
 *         return self._result
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":535
 * 
 * 
 *     def set_grammar_name(self, grammar_name: str = "", grammar_source: str = ""):             # <<<<<<<<<<<<<<
 *         """
 *         Changes the grammar name and source.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_7set_grammar_name(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8DHParser_4ebnf_12EBNFCompiler_6set_grammar_name[] = "\n        Changes the grammar name and source.\n\n        The grammar name and the source text are metadata that do not affect the\n        compilation process. It is used to name and annotate the output.\n        Returns `self`.\n        ";
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_7set_grammar_name = {"set_grammar_name", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_7set_grammar_name, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8DHParser_4ebnf_12EBNFCompiler_6set_grammar_name};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_7set_grammar_name(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_grammar_name = 0;
  PyObject *__pyx_v_grammar_source = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_grammar_name (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_grammar_name,&__pyx_n_s_grammar_source,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject*)((PyObject*)__pyx_kp_u__2));
    values[2] = ((PyObject*)((PyObject*)__pyx_kp_u__2));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grammar_name);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grammar_source);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_grammar_name") < 0)) __PYX_ERR(0, 535, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_grammar_name = ((PyObject*)values[1]);
    __pyx_v_grammar_source = ((PyObject*)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_grammar_name", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 535, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.set_grammar_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grammar_name), (&PyUnicode_Type), 1, "grammar_name", 1))) __PYX_ERR(0, 535, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grammar_source), (&PyUnicode_Type), 1, "grammar_source", 1))) __PYX_ERR(0, 535, __pyx_L1_error)
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_6set_grammar_name(__pyx_self, __pyx_v_self, __pyx_v_grammar_name, __pyx_v_grammar_source);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_6set_grammar_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_grammar_name, PyObject *__pyx_v_grammar_source) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("set_grammar_name", 0);
  __Pyx_INCREF(__pyx_v_grammar_name);

  /* "DHParser/ebnf.py":543
 *         Returns `self`.
 *         """
 *         assert grammar_name == "" or re.match(r'\w+\Z', grammar_name)             # <<<<<<<<<<<<<<
 *         if not grammar_name and re.fullmatch(r'[\w/:\\]+', grammar_source):
 *             grammar_name = os.path.splitext(os.path.basename(grammar_source))[0]
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_grammar_name, __pyx_kp_u__2, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 543, __pyx_L1_error)
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L3_bool_binop_done;
    }
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_re); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 543, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_match); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 543, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_u_w_Z, __pyx_v_grammar_name};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 543, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_u_w_Z, __pyx_v_grammar_name};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 543, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 543, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_u_w_Z);
      __Pyx_GIVEREF(__pyx_kp_u_w_Z);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_kp_u_w_Z);
      __Pyx_INCREF(__pyx_v_grammar_name);
      __Pyx_GIVEREF(__pyx_v_grammar_name);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_grammar_name);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 543, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 543, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = __pyx_t_3;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!__pyx_t_1)) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 543, __pyx_L1_error)
    }
  }
  #endif

  /* "DHParser/ebnf.py":544
 *         """
 *         assert grammar_name == "" or re.match(r'\w+\Z', grammar_name)
 *         if not grammar_name and re.fullmatch(r'[\w/:\\]+', grammar_source):             # <<<<<<<<<<<<<<
 *             grammar_name = os.path.splitext(os.path.basename(grammar_source))[0]
 *         self.grammar_name = grammar_name
 */
  __pyx_t_3 = (__pyx_v_grammar_name != Py_None)&&(__Pyx_PyUnicode_IS_TRUE(__pyx_v_grammar_name) != 0);
  __pyx_t_2 = ((!__pyx_t_3) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_re); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_fullmatch); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_8)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_kp_u_w, __pyx_v_grammar_source};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 544, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_kp_u_w, __pyx_v_grammar_source};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 544, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_kp_u_w);
    __Pyx_GIVEREF(__pyx_kp_u_w);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_kp_u_w);
    __Pyx_INCREF(__pyx_v_grammar_source);
    __Pyx_GIVEREF(__pyx_v_grammar_source);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_v_grammar_source);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 544, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "DHParser/ebnf.py":545
 *         assert grammar_name == "" or re.match(r'\w+\Z', grammar_name)
 *         if not grammar_name and re.fullmatch(r'[\w/:\\]+', grammar_source):
 *             grammar_name = os.path.splitext(os.path.basename(grammar_source))[0]             # <<<<<<<<<<<<<<
 *         self.grammar_name = grammar_name
 *         self.grammar_source = load_if_file(grammar_source)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_os); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_splitext); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_os); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_path); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_basename); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_9, __pyx_v_grammar_source) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_grammar_source);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(PyUnicode_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_8)->tp_name), 0))) __PYX_ERR(0, 545, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_grammar_name, ((PyObject*)__pyx_t_8));
    __pyx_t_8 = 0;

    /* "DHParser/ebnf.py":544
 *         """
 *         assert grammar_name == "" or re.match(r'\w+\Z', grammar_name)
 *         if not grammar_name and re.fullmatch(r'[\w/:\\]+', grammar_source):             # <<<<<<<<<<<<<<
 *             grammar_name = os.path.splitext(os.path.basename(grammar_source))[0]
 *         self.grammar_name = grammar_name
 */
  }

  /* "DHParser/ebnf.py":546
 *         if not grammar_name and re.fullmatch(r'[\w/:\\]+', grammar_source):
 *             grammar_name = os.path.splitext(os.path.basename(grammar_source))[0]
 *         self.grammar_name = grammar_name             # <<<<<<<<<<<<<<
 *         self.grammar_source = load_if_file(grammar_source)
 *         return self
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_grammar_name, __pyx_v_grammar_name) < 0) __PYX_ERR(0, 546, __pyx_L1_error)

  /* "DHParser/ebnf.py":547
 *             grammar_name = os.path.splitext(os.path.basename(grammar_source))[0]
 *         self.grammar_name = grammar_name
 *         self.grammar_source = load_if_file(grammar_source)             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_load_if_file); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_8 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_grammar_source) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_grammar_source);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_grammar_source, __pyx_t_8) < 0) __PYX_ERR(0, 547, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "DHParser/ebnf.py":548
 *         self.grammar_name = grammar_name
 *         self.grammar_source = load_if_file(grammar_source)
 *         return self             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":535
 * 
 * 
 *     def set_grammar_name(self, grammar_name: str = "", grammar_source: str = ""):             # <<<<<<<<<<<<<<
 *         """
 *         Changes the grammar name and source.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.set_grammar_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_grammar_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":553
 *     # methods for generating skeleton code for preprocessor, transformer, and compiler
 * 
 *     def gen_preprocessor_skeleton(self) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Returns Python-skeleton-code for a preprocessor-function for
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_9gen_preprocessor_skeleton(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_8DHParser_4ebnf_12EBNFCompiler_8gen_preprocessor_skeleton[] = "\n        Returns Python-skeleton-code for a preprocessor-function for\n        the previously compiled formal language.\n        ";
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_9gen_preprocessor_skeleton = {"gen_preprocessor_skeleton", (PyCFunction)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_9gen_preprocessor_skeleton, METH_O, __pyx_doc_8DHParser_4ebnf_12EBNFCompiler_8gen_preprocessor_skeleton};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_9gen_preprocessor_skeleton(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gen_preprocessor_skeleton (wrapper)", 0);
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_8gen_preprocessor_skeleton(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_8gen_preprocessor_skeleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("gen_preprocessor_skeleton", 0);

  /* "DHParser/ebnf.py":558
 *         the previously compiled formal language.
 *         """
 *         name = self.grammar_name + "Preprocessor"             # <<<<<<<<<<<<<<
 *         return "def %s(text):\n    return text, lambda i: i\n" % name \
 *                + PREPROCESSOR_FACTORY.format(NAME=self.grammar_name)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_grammar_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_n_u_Preprocessor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_name = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":559
 *         """
 *         name = self.grammar_name + "Preprocessor"
 *         return "def %s(text):\n    return text, lambda i: i\n" % name \             # <<<<<<<<<<<<<<
 *                + PREPROCESSOR_FACTORY.format(NAME=self.grammar_name)
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_def_s_text_return_text_lambda_i, __pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "DHParser/ebnf.py":560
 *         name = self.grammar_name + "Preprocessor"
 *         return "def %s(text):\n    return text, lambda i: i\n" % name \
 *                + PREPROCESSOR_FACTORY.format(NAME=self.grammar_name)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PREPROCESSOR_FACTORY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_grammar_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_NAME, __pyx_t_4) < 0) __PYX_ERR(0, 560, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 560, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":553
 *     # methods for generating skeleton code for preprocessor, transformer, and compiler
 * 
 *     def gen_preprocessor_skeleton(self) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Returns Python-skeleton-code for a preprocessor-function for
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.gen_preprocessor_skeleton", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":563
 * 
 * 
 *     def gen_transformer_skeleton(self) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Returns Python-skeleton-code for the AST-transformation for the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_11gen_transformer_skeleton(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_8DHParser_4ebnf_12EBNFCompiler_10gen_transformer_skeleton[] = "\n        Returns Python-skeleton-code for the AST-transformation for the\n        previously compiled formal language.\n        ";
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_11gen_transformer_skeleton = {"gen_transformer_skeleton", (PyCFunction)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_11gen_transformer_skeleton, METH_O, __pyx_doc_8DHParser_4ebnf_12EBNFCompiler_10gen_transformer_skeleton};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_11gen_transformer_skeleton(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gen_transformer_skeleton (wrapper)", 0);
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_10gen_transformer_skeleton(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_10gen_transformer_skeleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_tt_name = NULL;
  PyObject *__pyx_v_transtable = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_transformations = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("gen_transformer_skeleton", 0);

  /* "DHParser/ebnf.py":568
 *         previously compiled formal language.
 *         """
 *         if not self.rules:             # <<<<<<<<<<<<<<
 *             raise EBNFCompilerError('Compiler must be run before calling '
 *                                     '"gen_transformer_Skeleton()"!')
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rules); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 568, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((!__pyx_t_2) != 0);
  if (unlikely(__pyx_t_3)) {

    /* "DHParser/ebnf.py":569
 *         """
 *         if not self.rules:
 *             raise EBNFCompilerError('Compiler must be run before calling '             # <<<<<<<<<<<<<<
 *                                     '"gen_transformer_Skeleton()"!')
 *         tt_name = self.grammar_name + '_AST_transformation_table'
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_EBNFCompilerError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_Compiler_must_be_run_before_call) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_Compiler_must_be_run_before_call);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 569, __pyx_L1_error)

    /* "DHParser/ebnf.py":568
 *         previously compiled formal language.
 *         """
 *         if not self.rules:             # <<<<<<<<<<<<<<
 *             raise EBNFCompilerError('Compiler must be run before calling '
 *                                     '"gen_transformer_Skeleton()"!')
 */
  }

  /* "DHParser/ebnf.py":571
 *             raise EBNFCompilerError('Compiler must be run before calling '
 *                                     '"gen_transformer_Skeleton()"!')
 *         tt_name = self.grammar_name + '_AST_transformation_table'             # <<<<<<<<<<<<<<
 *         transtable = [tt_name + ' = {',
 *                       '    # AST Transformations for the ' + self.grammar_name + '-grammar']
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_grammar_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_n_u_AST_transformation_table); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_tt_name = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "DHParser/ebnf.py":572
 *                                     '"gen_transformer_Skeleton()"!')
 *         tt_name = self.grammar_name + '_AST_transformation_table'
 *         transtable = [tt_name + ' = {',             # <<<<<<<<<<<<<<
 *                       '    # AST Transformations for the ' + self.grammar_name + '-grammar']
 *         transtable.append('    "<": flatten_anonymous_nodes,')
 */
  __pyx_t_4 = PyNumber_Add(__pyx_v_tt_name, __pyx_kp_u__3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "DHParser/ebnf.py":573
 *         tt_name = self.grammar_name + '_AST_transformation_table'
 *         transtable = [tt_name + ' = {',
 *                       '    # AST Transformations for the ' + self.grammar_name + '-grammar']             # <<<<<<<<<<<<<<
 *         transtable.append('    "<": flatten_anonymous_nodes,')
 *         for name in self.rules:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_grammar_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyNumber_Add(__pyx_kp_u_AST_Transformations_for_the, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_t_5, __pyx_kp_u_grammar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "DHParser/ebnf.py":572
 *                                     '"gen_transformer_Skeleton()"!')
 *         tt_name = self.grammar_name + '_AST_transformation_table'
 *         transtable = [tt_name + ' = {',             # <<<<<<<<<<<<<<
 *                       '    # AST Transformations for the ' + self.grammar_name + '-grammar']
 *         transtable.append('    "<": flatten_anonymous_nodes,')
 */
  __pyx_t_5 = PyList_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
  __pyx_t_4 = 0;
  __pyx_t_1 = 0;
  __pyx_v_transtable = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "DHParser/ebnf.py":574
 *         transtable = [tt_name + ' = {',
 *                       '    # AST Transformations for the ' + self.grammar_name + '-grammar']
 *         transtable.append('    "<": flatten_anonymous_nodes,')             # <<<<<<<<<<<<<<
 *         for name in self.rules:
 *             transformations = '[]'
 */
  __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_transtable, __pyx_kp_u_flatten_anonymous_nodes); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 574, __pyx_L1_error)

  /* "DHParser/ebnf.py":575
 *                       '    # AST Transformations for the ' + self.grammar_name + '-grammar']
 *         transtable.append('    "<": flatten_anonymous_nodes,')
 *         for name in self.rules:             # <<<<<<<<<<<<<<
 *             transformations = '[]'
 *             # rule = self.definitions[name]
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rules); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
    __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 575, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 575, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 575, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      } else {
        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 575, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 575, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      }
    } else {
      __pyx_t_5 = __pyx_t_8(__pyx_t_1);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 575, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "DHParser/ebnf.py":576
 *         transtable.append('    "<": flatten_anonymous_nodes,')
 *         for name in self.rules:
 *             transformations = '[]'             # <<<<<<<<<<<<<<
 *             # rule = self.definitions[name]
 *             # if rule.startswith('Alternative'):
 */
    __Pyx_INCREF(__pyx_kp_u__4);
    __Pyx_XDECREF_SET(__pyx_v_transformations, __pyx_kp_u__4);

    /* "DHParser/ebnf.py":582
 *             # elif rule.startswith('Synonym'):
 *             #     transformations = '[reduce_single_child]'
 *             transtable.append('    "' + name + '": %s,' % transformations)             # <<<<<<<<<<<<<<
 *         # transtable.append('    ":Token": reduce_single_child,')
 *         transtable += ['    "*": replace_by_single_child', '}', '']
 */
    __pyx_t_5 = PyNumber_Add(__pyx_kp_u__5, __pyx_v_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_s, __pyx_v_transformations); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_transtable, __pyx_t_9); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 582, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "DHParser/ebnf.py":575
 *                       '    # AST Transformations for the ' + self.grammar_name + '-grammar']
 *         transtable.append('    "<": flatten_anonymous_nodes,')
 *         for name in self.rules:             # <<<<<<<<<<<<<<
 *             transformations = '[]'
 *             # rule = self.definitions[name]
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":584
 *             transtable.append('    "' + name + '": %s,' % transformations)
 *         # transtable.append('    ":Token": reduce_single_child,')
 *         transtable += ['    "*": replace_by_single_child', '}', '']             # <<<<<<<<<<<<<<
 *         transtable += [TRANSFORMER_FACTORY.format(NAME=self.grammar_name, ID=self.grammar_id)]
 *         return '\n'.join(transtable)
 */
  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_kp_u_replace_by_single_child);
  __Pyx_GIVEREF(__pyx_kp_u_replace_by_single_child);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_replace_by_single_child);
  __Pyx_INCREF(__pyx_kp_u__6);
  __Pyx_GIVEREF(__pyx_kp_u__6);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u__6);
  __Pyx_INCREF(__pyx_kp_u__2);
  __Pyx_GIVEREF(__pyx_kp_u__2);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__2);
  __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_v_transtable, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_transtable, ((PyObject*)__pyx_t_9));
  __pyx_t_9 = 0;

  /* "DHParser/ebnf.py":585
 *         # transtable.append('    ":Token": reduce_single_child,')
 *         transtable += ['    "*": replace_by_single_child', '}', '']
 *         transtable += [TRANSFORMER_FACTORY.format(NAME=self.grammar_name, ID=self.grammar_id)]             # <<<<<<<<<<<<<<
 *         return '\n'.join(transtable)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_TRANSFORMER_FACTORY); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_grammar_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_NAME, __pyx_t_4) < 0) __PYX_ERR(0, 585, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_grammar_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_ID, __pyx_t_4) < 0) __PYX_ERR(0, 585, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_9, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_transtable, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF_SET(__pyx_v_transtable, ((PyObject*)__pyx_t_4));
  __pyx_t_4 = 0;

  /* "DHParser/ebnf.py":586
 *         transtable += ['    "*": replace_by_single_child', '}', '']
 *         transtable += [TRANSFORMER_FACTORY.format(NAME=self.grammar_name, ID=self.grammar_id)]
 *         return '\n'.join(transtable)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__7, __pyx_v_transtable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":563
 * 
 * 
 *     def gen_transformer_skeleton(self) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Returns Python-skeleton-code for the AST-transformation for the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.gen_transformer_skeleton", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tt_name);
  __Pyx_XDECREF(__pyx_v_transtable);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_transformations);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":589
 * 
 * 
 *     def gen_compiler_skeleton(self) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Returns Python-skeleton-code for a Compiler-class for the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_13gen_compiler_skeleton(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_8DHParser_4ebnf_12EBNFCompiler_12gen_compiler_skeleton[] = "\n        Returns Python-skeleton-code for a Compiler-class for the\n        previously compiled formal language.\n        ";
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_13gen_compiler_skeleton = {"gen_compiler_skeleton", (PyCFunction)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_13gen_compiler_skeleton, METH_O, __pyx_doc_8DHParser_4ebnf_12EBNFCompiler_12gen_compiler_skeleton};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_13gen_compiler_skeleton(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gen_compiler_skeleton (wrapper)", 0);
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_12gen_compiler_skeleton(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_12gen_compiler_skeleton(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_compiler = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_method_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  __Pyx_RefNannySetupContext("gen_compiler_skeleton", 0);

  /* "DHParser/ebnf.py":594
 *         previously compiled formal language.
 *         """
 *         if not self.rules:             # <<<<<<<<<<<<<<
 *             raise EBNFCompilerError('Compiler has not been run before calling '
 *                                     '"gen_Compiler_Skeleton()"!')
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rules); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 594, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((!__pyx_t_2) != 0);
  if (unlikely(__pyx_t_3)) {

    /* "DHParser/ebnf.py":595
 *         """
 *         if not self.rules:
 *             raise EBNFCompilerError('Compiler has not been run before calling '             # <<<<<<<<<<<<<<
 *                                     '"gen_Compiler_Skeleton()"!')
 *         compiler = ['class ' + self.grammar_name + 'Compiler(Compiler):',
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_EBNFCompilerError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_Compiler_has_not_been_run_before) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_Compiler_has_not_been_run_before);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 595, __pyx_L1_error)

    /* "DHParser/ebnf.py":594
 *         previously compiled formal language.
 *         """
 *         if not self.rules:             # <<<<<<<<<<<<<<
 *             raise EBNFCompilerError('Compiler has not been run before calling '
 *                                     '"gen_Compiler_Skeleton()"!')
 */
  }

  /* "DHParser/ebnf.py":597
 *             raise EBNFCompilerError('Compiler has not been run before calling '
 *                                     '"gen_Compiler_Skeleton()"!')
 *         compiler = ['class ' + self.grammar_name + 'Compiler(Compiler):',             # <<<<<<<<<<<<<<
 *                     '    """Compiler for the abstract-syntax-tree of a '
 *                     + self.grammar_name + ' source file.',
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_grammar_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Add(__pyx_kp_u_class, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_t_4, __pyx_kp_u_Compiler_Compiler); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "DHParser/ebnf.py":599
 *         compiler = ['class ' + self.grammar_name + 'Compiler(Compiler):',
 *                     '    """Compiler for the abstract-syntax-tree of a '
 *                     + self.grammar_name + ' source file.',             # <<<<<<<<<<<<<<
 *                     '    """', '',
 *                     '    def __init__(self):',
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_grammar_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyNumber_Add(__pyx_kp_u_Compiler_for_the_abstract_synta, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_kp_u_source_file); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "DHParser/ebnf.py":602
 *                     '    """', '',
 *                     '    def __init__(self):',
 *                     '        super(' + self.grammar_name + 'Compiler, self).__init__()',             # <<<<<<<<<<<<<<
 *                     '',
 *                     '    def _reset(self):',
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_grammar_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyNumber_Add(__pyx_kp_u_super_2, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_kp_u_Compiler_self___init); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "DHParser/ebnf.py":597
 *             raise EBNFCompilerError('Compiler has not been run before calling '
 *                                     '"gen_Compiler_Skeleton()"!')
 *         compiler = ['class ' + self.grammar_name + 'Compiler(Compiler):',             # <<<<<<<<<<<<<<
 *                     '    """Compiler for the abstract-syntax-tree of a '
 *                     + self.grammar_name + ' source file.',
 */
  __pyx_t_6 = PyList_New(10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
  __Pyx_INCREF(__pyx_kp_u__8);
  __Pyx_GIVEREF(__pyx_kp_u__8);
  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u__8);
  __Pyx_INCREF(__pyx_kp_u__2);
  __Pyx_GIVEREF(__pyx_kp_u__2);
  PyList_SET_ITEM(__pyx_t_6, 3, __pyx_kp_u__2);
  __Pyx_INCREF(__pyx_kp_u_def___init___self);
  __Pyx_GIVEREF(__pyx_kp_u_def___init___self);
  PyList_SET_ITEM(__pyx_t_6, 4, __pyx_kp_u_def___init___self);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_6, 5, __pyx_t_5);
  __Pyx_INCREF(__pyx_kp_u__2);
  __Pyx_GIVEREF(__pyx_kp_u__2);
  PyList_SET_ITEM(__pyx_t_6, 6, __pyx_kp_u__2);
  __Pyx_INCREF(__pyx_kp_u_def__reset_self);
  __Pyx_GIVEREF(__pyx_kp_u_def__reset_self);
  PyList_SET_ITEM(__pyx_t_6, 7, __pyx_kp_u_def__reset_self);
  __Pyx_INCREF(__pyx_kp_u_super__reset);
  __Pyx_GIVEREF(__pyx_kp_u_super__reset);
  PyList_SET_ITEM(__pyx_t_6, 8, __pyx_kp_u_super__reset);
  __Pyx_INCREF(__pyx_kp_u_initialize_your_variables_here);
  __Pyx_GIVEREF(__pyx_kp_u_initialize_your_variables_here);
  PyList_SET_ITEM(__pyx_t_6, 9, __pyx_kp_u_initialize_your_variables_here);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_v_compiler = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "DHParser/ebnf.py":607
 *                     '        super()._reset()',
 *                     '        # initialize your variables here, not in the constructor!']
 *         for name in self.rules:             # <<<<<<<<<<<<<<
 *             method_name = visitor_name(name)
 *             if name == self.root_symbol:
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rules); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
    __pyx_t_5 = __pyx_t_6; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 607, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 607, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_5))) {
        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 607, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 607, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 607, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 607, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_8(__pyx_t_5);
      if (unlikely(!__pyx_t_6)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 607, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "DHParser/ebnf.py":608
 *                     '        # initialize your variables here, not in the constructor!']
 *         for name in self.rules:
 *             method_name = visitor_name(name)             # <<<<<<<<<<<<<<
 *             if name == self.root_symbol:
 *                 compiler += ['    def ' + method_name + '(self, node):',
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_visitor_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_1, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_name);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_method_name, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "DHParser/ebnf.py":609
 *         for name in self.rules:
 *             method_name = visitor_name(name)
 *             if name == self.root_symbol:             # <<<<<<<<<<<<<<
 *                 compiler += ['    def ' + method_name + '(self, node):',
 *                              '        return self.fallback_compiler(node)', '']
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_root_symbol); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_name, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 609, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 609, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_3) {

      /* "DHParser/ebnf.py":610
 *             method_name = visitor_name(name)
 *             if name == self.root_symbol:
 *                 compiler += ['    def ' + method_name + '(self, node):',             # <<<<<<<<<<<<<<
 *                              '        return self.fallback_compiler(node)', '']
 *             else:
 */
      __pyx_t_4 = PyNumber_Add(__pyx_kp_u_def, __pyx_v_method_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 610, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_kp_u_self_node); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 610, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 610, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_6);
      PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
      __Pyx_INCREF(__pyx_kp_u_return_self_fallback_compiler_n);
      __Pyx_GIVEREF(__pyx_kp_u_return_self_fallback_compiler_n);
      PyList_SET_ITEM(__pyx_t_4, 1, __pyx_kp_u_return_self_fallback_compiler_n);
      __Pyx_INCREF(__pyx_kp_u__2);
      __Pyx_GIVEREF(__pyx_kp_u__2);
      PyList_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__2);
      __pyx_t_6 = 0;
      __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_compiler, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 610, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_compiler, ((PyObject*)__pyx_t_6));
      __pyx_t_6 = 0;

      /* "DHParser/ebnf.py":609
 *         for name in self.rules:
 *             method_name = visitor_name(name)
 *             if name == self.root_symbol:             # <<<<<<<<<<<<<<
 *                 compiler += ['    def ' + method_name + '(self, node):',
 *                              '        return self.fallback_compiler(node)', '']
 */
      goto __pyx_L6;
    }

    /* "DHParser/ebnf.py":613
 *                              '        return self.fallback_compiler(node)', '']
 *             else:
 *                 compiler += ['    # def ' + method_name + '(self, node):',             # <<<<<<<<<<<<<<
 *                              '    #     return node', '']
 *         compiler += [COMPILER_FACTORY.format(NAME=self.grammar_name, ID=self.grammar_id)]
 */
    /*else*/ {
      __pyx_t_6 = PyNumber_Add(__pyx_kp_u_def_2, __pyx_v_method_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 613, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = PyNumber_Add(__pyx_t_6, __pyx_kp_u_self_node); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 613, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 613, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_4);
      PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
      __Pyx_INCREF(__pyx_kp_u_return_node);
      __Pyx_GIVEREF(__pyx_kp_u_return_node);
      PyList_SET_ITEM(__pyx_t_6, 1, __pyx_kp_u_return_node);
      __Pyx_INCREF(__pyx_kp_u__2);
      __Pyx_GIVEREF(__pyx_kp_u__2);
      PyList_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u__2);
      __pyx_t_4 = 0;
      __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_compiler, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 613, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF_SET(__pyx_v_compiler, ((PyObject*)__pyx_t_4));
      __pyx_t_4 = 0;
    }
    __pyx_L6:;

    /* "DHParser/ebnf.py":607
 *                     '        super()._reset()',
 *                     '        # initialize your variables here, not in the constructor!']
 *         for name in self.rules:             # <<<<<<<<<<<<<<
 *             method_name = visitor_name(name)
 *             if name == self.root_symbol:
 */
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "DHParser/ebnf.py":615
 *                 compiler += ['    # def ' + method_name + '(self, node):',
 *                              '    #     return node', '']
 *         compiler += [COMPILER_FACTORY.format(NAME=self.grammar_name, ID=self.grammar_id)]             # <<<<<<<<<<<<<<
 *         return '\n'.join(compiler)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_COMPILER_FACTORY); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_grammar_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_NAME, __pyx_t_6) < 0) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_grammar_id); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ID, __pyx_t_6) < 0) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_compiler, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF_SET(__pyx_v_compiler, ((PyObject*)__pyx_t_6));
  __pyx_t_6 = 0;

  /* "DHParser/ebnf.py":616
 *                              '    #     return node', '']
 *         compiler += [COMPILER_FACTORY.format(NAME=self.grammar_name, ID=self.grammar_id)]
 *         return '\n'.join(compiler)             # <<<<<<<<<<<<<<
 * 
 *     def verify_transformation_table(self, transtable):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = PyUnicode_Join(__pyx_kp_u__7, __pyx_v_compiler); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_r = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":589
 * 
 * 
 *     def gen_compiler_skeleton(self) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Returns Python-skeleton-code for a Compiler-class for the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.gen_compiler_skeleton", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_compiler);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_method_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":618
 *         return '\n'.join(compiler)
 * 
 *     def verify_transformation_table(self, transtable):             # <<<<<<<<<<<<<<
 *         """
 *         Checks for symbols that occur in the transformation-table but have
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_15verify_transformation_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8DHParser_4ebnf_12EBNFCompiler_14verify_transformation_table[] = "\n        Checks for symbols that occur in the transformation-table but have\n        never been defined in the grammar. Usually, this kind of\n        inconsistency results from an error like a typo in the transformation\n        table.\n        ";
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_15verify_transformation_table = {"verify_transformation_table", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_15verify_transformation_table, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8DHParser_4ebnf_12EBNFCompiler_14verify_transformation_table};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_15verify_transformation_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_transtable = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("verify_transformation_table (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_transtable,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_transtable)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("verify_transformation_table", 1, 2, 2, 1); __PYX_ERR(0, 618, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "verify_transformation_table") < 0)) __PYX_ERR(0, 618, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_transtable = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("verify_transformation_table", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 618, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.verify_transformation_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_14verify_transformation_table(__pyx_self, __pyx_v_self, __pyx_v_transtable);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_14verify_transformation_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_transtable) {
  PyObject *__pyx_v_table_entries = NULL;
  PyObject *__pyx_v_symbols = NULL;
  PyObject *__pyx_v_messages = NULL;
  PyObject *__pyx_v_entry = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_UCS4 __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  __Pyx_RefNannySetupContext("verify_transformation_table", 0);

  /* "DHParser/ebnf.py":625
 *         table.
 *         """
 *         assert self._dirty_flag             # <<<<<<<<<<<<<<
 *         table_entries = set(expand_table(transtable).keys()) - {'*', '<', '>', '~'}
 *         symbols = self.rules.keys()
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dirty_flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 625, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 625, __pyx_L1_error)
    }
  }
  #endif

  /* "DHParser/ebnf.py":626
 *         """
 *         assert self._dirty_flag
 *         table_entries = set(expand_table(transtable).keys()) - {'*', '<', '>', '~'}             # <<<<<<<<<<<<<<
 *         symbols = self.rules.keys()
 *         messages = []
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_expand_table); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_transtable) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_transtable);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_keys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PySet_New(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PySet_Add(__pyx_t_1, __pyx_kp_u__9) < 0) __PYX_ERR(0, 626, __pyx_L1_error)
  if (PySet_Add(__pyx_t_1, __pyx_kp_u__10) < 0) __PYX_ERR(0, 626, __pyx_L1_error)
  if (PySet_Add(__pyx_t_1, __pyx_kp_u__11) < 0) __PYX_ERR(0, 626, __pyx_L1_error)
  if (PySet_Add(__pyx_t_1, __pyx_kp_u__12) < 0) __PYX_ERR(0, 626, __pyx_L1_error)
  __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_table_entries = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "DHParser/ebnf.py":627
 *         assert self._dirty_flag
 *         table_entries = set(expand_table(transtable).keys()) - {'*', '<', '>', '~'}
 *         symbols = self.rules.keys()             # <<<<<<<<<<<<<<
 *         messages = []
 *         for entry in table_entries:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rules); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_keys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_symbols = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "DHParser/ebnf.py":628
 *         table_entries = set(expand_table(transtable).keys()) - {'*', '<', '>', '~'}
 *         symbols = self.rules.keys()
 *         messages = []             # <<<<<<<<<<<<<<
 *         for entry in table_entries:
 *             if entry not in symbols and not entry.startswith(":"):
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_messages = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "DHParser/ebnf.py":629
 *         symbols = self.rules.keys()
 *         messages = []
 *         for entry in table_entries:             # <<<<<<<<<<<<<<
 *             if entry not in symbols and not entry.startswith(":"):
 *                 messages.append(Error(('Symbol "%s" is not defined in grammar %s but appears in '
 */
  if (likely(PyList_CheckExact(__pyx_v_table_entries)) || PyTuple_CheckExact(__pyx_v_table_entries)) {
    __pyx_t_3 = __pyx_v_table_entries; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_table_entries); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 629, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 629, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 629, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 629, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 629, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 629, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_7(__pyx_t_3);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 629, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_entry, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "DHParser/ebnf.py":630
 *         messages = []
 *         for entry in table_entries:
 *             if entry not in symbols and not entry.startswith(":"):             # <<<<<<<<<<<<<<
 *                 messages.append(Error(('Symbol "%s" is not defined in grammar %s but appears in '
 *                                        'the transformation table!') % (entry, self.grammar_name),
 */
    __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_entry, __pyx_v_symbols, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 630, __pyx_L1_error)
    __pyx_t_9 = (__pyx_t_8 != 0);
    if (__pyx_t_9) {
    } else {
      __pyx_t_2 = __pyx_t_9;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_entry, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 630, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_kp_u__13) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_kp_u__13);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 630, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 630, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_8 = ((!__pyx_t_9) != 0);
    __pyx_t_2 = __pyx_t_8;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_2) {

      /* "DHParser/ebnf.py":631
 *         for entry in table_entries:
 *             if entry not in symbols and not entry.startswith(":"):
 *                 messages.append(Error(('Symbol "%s" is not defined in grammar %s but appears in '             # <<<<<<<<<<<<<<
 *                                        'the transformation table!') % (entry, self.grammar_name),
 *                                       0, Error.UNDEFINED_SYMBOL_IN_TRANSTABLE_WARNING))
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 631, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_10 = 0;
      __pyx_t_11 = 127;
      __Pyx_INCREF(__pyx_kp_u_Symbol);
      __pyx_t_10 += 8;
      __Pyx_GIVEREF(__pyx_kp_u_Symbol);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Symbol);

      /* "DHParser/ebnf.py":632
 *             if entry not in symbols and not entry.startswith(":"):
 *                 messages.append(Error(('Symbol "%s" is not defined in grammar %s but appears in '
 *                                        'the transformation table!') % (entry, self.grammar_name),             # <<<<<<<<<<<<<<
 *                                       0, Error.UNDEFINED_SYMBOL_IN_TRANSTABLE_WARNING))
 *         return messages
 */
      __pyx_t_12 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_entry), __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 632, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_11;
      __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_12);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_12);
      __pyx_t_12 = 0;
      __Pyx_INCREF(__pyx_kp_u_is_not_defined_in_grammar);
      __pyx_t_10 += 28;
      __Pyx_GIVEREF(__pyx_kp_u_is_not_defined_in_grammar);
      PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_is_not_defined_in_grammar);
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_grammar_name); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 632, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_13 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_12), __pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 632, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) : __pyx_t_11;
      __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13);
      __Pyx_GIVEREF(__pyx_t_13);
      PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_13);
      __pyx_t_13 = 0;
      __Pyx_INCREF(__pyx_kp_u_but_appears_in_the_transformati);
      __pyx_t_10 += 41;
      __Pyx_GIVEREF(__pyx_kp_u_but_appears_in_the_transformati);
      PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u_but_appears_in_the_transformati);

      /* "DHParser/ebnf.py":631
 *         for entry in table_entries:
 *             if entry not in symbols and not entry.startswith(":"):
 *                 messages.append(Error(('Symbol "%s" is not defined in grammar %s but appears in '             # <<<<<<<<<<<<<<
 *                                        'the transformation table!') % (entry, self.grammar_name),
 *                                       0, Error.UNDEFINED_SYMBOL_IN_TRANSTABLE_WARNING))
 */
      __pyx_t_13 = __Pyx_PyUnicode_Join(__pyx_t_5, 5, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 631, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "DHParser/ebnf.py":633
 *                 messages.append(Error(('Symbol "%s" is not defined in grammar %s but appears in '
 *                                        'the transformation table!') % (entry, self.grammar_name),
 *                                       0, Error.UNDEFINED_SYMBOL_IN_TRANSTABLE_WARNING))             # <<<<<<<<<<<<<<
 *         return messages
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 633, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_UNDEFINED_SYMBOL_IN_TRANSTABLE_W); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 633, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      __pyx_t_14 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_14 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_13, __pyx_int_0, __pyx_t_12};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 631, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_13, __pyx_int_0, __pyx_t_12};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 631, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      } else
      #endif
      {
        __pyx_t_15 = PyTuple_New(3+__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 631, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        if (__pyx_t_5) {
          __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_5); __pyx_t_5 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_13);
        PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_14, __pyx_t_13);
        __Pyx_INCREF(__pyx_int_0);
        __Pyx_GIVEREF(__pyx_int_0);
        PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_14, __pyx_int_0);
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_14, __pyx_t_12);
        __pyx_t_13 = 0;
        __pyx_t_12 = 0;
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_15, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 631, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "DHParser/ebnf.py":631
 *         for entry in table_entries:
 *             if entry not in symbols and not entry.startswith(":"):
 *                 messages.append(Error(('Symbol "%s" is not defined in grammar %s but appears in '             # <<<<<<<<<<<<<<
 *                                        'the transformation table!') % (entry, self.grammar_name),
 *                                       0, Error.UNDEFINED_SYMBOL_IN_TRANSTABLE_WARNING))
 */
      __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_messages, __pyx_t_4); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 631, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "DHParser/ebnf.py":630
 *         messages = []
 *         for entry in table_entries:
 *             if entry not in symbols and not entry.startswith(":"):             # <<<<<<<<<<<<<<
 *                 messages.append(Error(('Symbol "%s" is not defined in grammar %s but appears in '
 *                                        'the transformation table!') % (entry, self.grammar_name),
 */
    }

    /* "DHParser/ebnf.py":629
 *         symbols = self.rules.keys()
 *         messages = []
 *         for entry in table_entries:             # <<<<<<<<<<<<<<
 *             if entry not in symbols and not entry.startswith(":"):
 *                 messages.append(Error(('Symbol "%s" is not defined in grammar %s but appears in '
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "DHParser/ebnf.py":634
 *                                        'the transformation table!') % (entry, self.grammar_name),
 *                                       0, Error.UNDEFINED_SYMBOL_IN_TRANSTABLE_WARNING))
 *         return messages             # <<<<<<<<<<<<<<
 * 
 *     def verify_compiler(self, compiler):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_messages);
  __pyx_r = __pyx_v_messages;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":618
 *         return '\n'.join(compiler)
 * 
 *     def verify_transformation_table(self, transtable):             # <<<<<<<<<<<<<<
 *         """
 *         Checks for symbols that occur in the transformation-table but have
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.verify_transformation_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_table_entries);
  __Pyx_XDECREF(__pyx_v_symbols);
  __Pyx_XDECREF(__pyx_v_messages);
  __Pyx_XDECREF(__pyx_v_entry);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":636
 *         return messages
 * 
 *     def verify_compiler(self, compiler):             # <<<<<<<<<<<<<<
 *         """
 *         Checks for on_XXXX()-methods that occur in the compiler, although XXXX
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_17verify_compiler(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8DHParser_4ebnf_12EBNFCompiler_16verify_compiler[] = "\n        Checks for on_XXXX()-methods that occur in the compiler, although XXXX\n        has never been defined in the grammar. Usually, this kind of\n        inconsistency results from an error like a typo in the compiler-code.\n        ";
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_17verify_compiler = {"verify_compiler", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_17verify_compiler, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8DHParser_4ebnf_12EBNFCompiler_16verify_compiler};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_17verify_compiler(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_compiler = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("verify_compiler (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_compiler,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_compiler)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("verify_compiler", 1, 2, 2, 1); __PYX_ERR(0, 636, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "verify_compiler") < 0)) __PYX_ERR(0, 636, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_compiler = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("verify_compiler", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 636, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.verify_compiler", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_16verify_compiler(__pyx_self, __pyx_v_self, __pyx_v_compiler);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_16verify_compiler(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_compiler) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("verify_compiler", 0);

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":645
 * 
 * 
 *     def _check_rx(self, node: Node, rx: str) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Checks whether the string `rx` represents a valid regular
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_19_check_rx(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8DHParser_4ebnf_12EBNFCompiler_18_check_rx[] = "\n        Checks whether the string `rx` represents a valid regular\n        expression. Makes sure that multiline regular expressions are\n        prepended by the multiline-flag. Returns the regular expression string.\n        ";
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_19_check_rx = {"_check_rx", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_19_check_rx, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8DHParser_4ebnf_12EBNFCompiler_18_check_rx};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_19_check_rx(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_node = 0;
  PyObject *__pyx_v_rx = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_check_rx (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,&__pyx_n_s_rx,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_check_rx", 1, 3, 3, 1); __PYX_ERR(0, 645, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rx)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_check_rx", 1, 3, 3, 2); __PYX_ERR(0, 645, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_check_rx") < 0)) __PYX_ERR(0, 645, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_node = values[1];
    __pyx_v_rx = ((PyObject*)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_check_rx", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 645, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler._check_rx", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rx), (&PyUnicode_Type), 1, "rx", 1))) __PYX_ERR(0, 645, __pyx_L1_error)
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_18_check_rx(__pyx_self, __pyx_v_self, __pyx_v_node, __pyx_v_rx);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_18_check_rx(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node, PyObject *__pyx_v_rx) {
  PyObject *__pyx_v_flags = NULL;
  PyObject *__pyx_v_re_error = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_UCS4 __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  char const *__pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  __Pyx_RefNannySetupContext("_check_rx", 0);
  __Pyx_INCREF(__pyx_v_rx);

  /* "DHParser/ebnf.py":651
 *         prepended by the multiline-flag. Returns the regular expression string.
 *         """
 *         flags = self.re_flags | {'x'} if rx.find('\n') >= 0 else self.re_flags             # <<<<<<<<<<<<<<
 *         if flags:
 *             rx = "(?%s)%s" % ("".join(flags), rx)
 */
  if (unlikely(__pyx_v_rx == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "find");
    __PYX_ERR(0, 651, __pyx_L1_error)
  }
  __pyx_t_2 = PyUnicode_Find(__pyx_v_rx, __pyx_kp_u__7, 0, PY_SSIZE_T_MAX, 1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-2))) __PYX_ERR(0, 651, __pyx_L1_error)
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 651, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 651, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_re_flags); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PySet_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PySet_Add(__pyx_t_3, __pyx_n_u_x) < 0) __PYX_ERR(0, 651, __pyx_L1_error)
    __pyx_t_6 = PyNumber_Or(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = __pyx_t_6;
    __pyx_t_6 = 0;
  } else {
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_re_flags); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __pyx_t_6;
    __pyx_t_6 = 0;
  }
  __pyx_v_flags = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":652
 *         """
 *         flags = self.re_flags | {'x'} if rx.find('\n') >= 0 else self.re_flags
 *         if flags:             # <<<<<<<<<<<<<<
 *             rx = "(?%s)%s" % ("".join(flags), rx)
 *         try:
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_flags); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 652, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "DHParser/ebnf.py":653
 *         flags = self.re_flags | {'x'} if rx.find('\n') >= 0 else self.re_flags
 *         if flags:
 *             rx = "(?%s)%s" % ("".join(flags), rx)             # <<<<<<<<<<<<<<
 *         try:
 *             re.compile(rx)
 */
    __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = 0;
    __pyx_t_7 = 127;
    __Pyx_INCREF(__pyx_kp_u__14);
    __pyx_t_2 += 2;
    __Pyx_GIVEREF(__pyx_kp_u__14);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__14);
    __pyx_t_6 = PyUnicode_Join(__pyx_kp_u__2, __pyx_v_flags); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 653, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_7;
    __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_kp_u__15);
    __pyx_t_2 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__15);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__15);
    __pyx_t_6 = __Pyx_PyUnicode_Unicode(__pyx_v_rx); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 653, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_7;
    __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_1, 4, __pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 653, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_rx, ((PyObject*)__pyx_t_6));
    __pyx_t_6 = 0;

    /* "DHParser/ebnf.py":652
 *         """
 *         flags = self.re_flags | {'x'} if rx.find('\n') >= 0 else self.re_flags
 *         if flags:             # <<<<<<<<<<<<<<
 *             rx = "(?%s)%s" % ("".join(flags), rx)
 *         try:
 */
  }

  /* "DHParser/ebnf.py":654
 *         if flags:
 *             rx = "(?%s)%s" % ("".join(flags), rx)
 *         try:             # <<<<<<<<<<<<<<
 *             re.compile(rx)
 *         except Exception as re_error:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_10);
    /*try:*/ {

      /* "DHParser/ebnf.py":655
 *             rx = "(?%s)%s" % ("".join(flags), rx)
 *         try:
 *             re.compile(rx)             # <<<<<<<<<<<<<<
 *         except Exception as re_error:
 *             self.tree.new_error(node, "malformed regular expression %s: %s" %
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_re); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_compile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 655, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_v_rx) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_rx);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 655, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "DHParser/ebnf.py":654
 *         if flags:
 *             rx = "(?%s)%s" % ("".join(flags), rx)
 *         try:             # <<<<<<<<<<<<<<
 *             re.compile(rx)
 *         except Exception as re_error:
 */
    }
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "DHParser/ebnf.py":656
 *         try:
 *             re.compile(rx)
 *         except Exception as re_error:             # <<<<<<<<<<<<<<
 *             self.tree.new_error(node, "malformed regular expression %s: %s" %
 *                                 (repr(rx), str(re_error)))
 */
    __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_11) {
      __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler._check_rx", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_3, &__pyx_t_1) < 0) __PYX_ERR(0, 656, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_v_re_error = __pyx_t_3;
      /*try:*/ {

        /* "DHParser/ebnf.py":657
 *             re.compile(rx)
 *         except Exception as re_error:
 *             self.tree.new_error(node, "malformed regular expression %s: %s" %             # <<<<<<<<<<<<<<
 *                                 (repr(rx), str(re_error)))
 *         return rx
 */
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 657, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_new_error); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 657, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = PyTuple_New(4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 657, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_2 = 0;
        __pyx_t_7 = 127;
        __Pyx_INCREF(__pyx_kp_u_malformed_regular_expression);
        __pyx_t_2 += 29;
        __Pyx_GIVEREF(__pyx_kp_u_malformed_regular_expression);
        PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_kp_u_malformed_regular_expression);

        /* "DHParser/ebnf.py":658
 *         except Exception as re_error:
 *             self.tree.new_error(node, "malformed regular expression %s: %s" %
 *                                 (repr(rx), str(re_error)))             # <<<<<<<<<<<<<<
 *         return rx
 * 
 */
        __pyx_t_14 = PyObject_Repr(__pyx_v_rx); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 658, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_15 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_14), __pyx_empty_unicode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 658, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) : __pyx_t_7;
        __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_15);
        __pyx_t_15 = 0;
        __Pyx_INCREF(__pyx_kp_u__16);
        __pyx_t_2 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__16);
        PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_kp_u__16);
        __pyx_t_15 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_re_error); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 658, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) : __pyx_t_7;
        __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_12, 3, __pyx_t_15);
        __pyx_t_15 = 0;

        /* "DHParser/ebnf.py":657
 *             re.compile(rx)
 *         except Exception as re_error:
 *             self.tree.new_error(node, "malformed regular expression %s: %s" %             # <<<<<<<<<<<<<<
 *                                 (repr(rx), str(re_error)))
 *         return rx
 */
        __pyx_t_15 = __Pyx_PyUnicode_Join(__pyx_t_12, 4, __pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 657, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = NULL;
        __pyx_t_11 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_13);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_13, function);
            __pyx_t_11 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_13)) {
          PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_node, __pyx_t_15};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 657, __pyx_L15_error)
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) {
          PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_node, __pyx_t_15};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 657, __pyx_L15_error)
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        } else
        #endif
        {
          __pyx_t_14 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 657, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_14);
          if (__pyx_t_12) {
            __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_12); __pyx_t_12 = NULL;
          }
          __Pyx_INCREF(__pyx_v_node);
          __Pyx_GIVEREF(__pyx_v_node);
          PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_11, __pyx_v_node);
          __Pyx_GIVEREF(__pyx_t_15);
          PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_11, __pyx_t_15);
          __pyx_t_15 = 0;
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_14, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 657, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        }
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }

      /* "DHParser/ebnf.py":656
 *         try:
 *             re.compile(rx)
 *         except Exception as re_error:             # <<<<<<<<<<<<<<
 *             self.tree.new_error(node, "malformed regular expression %s: %s" %
 *                                 (repr(rx), str(re_error)))
 */
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_re_error);
          __pyx_v_re_error = NULL;
          goto __pyx_L16;
        }
        __pyx_L15_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __pyx_t_11 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_re_error);
            __pyx_v_re_error = NULL;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
          }
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20);
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_17;
          goto __pyx_L6_except_error;
        }
        __pyx_L16:;
      }
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "DHParser/ebnf.py":654
 *         if flags:
 *             rx = "(?%s)%s" % ("".join(flags), rx)
 *         try:             # <<<<<<<<<<<<<<
 *             re.compile(rx)
 *         except Exception as re_error:
 */
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
    goto __pyx_L1_error;
    __pyx_L5_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
    __pyx_L9_try_end:;
  }

  /* "DHParser/ebnf.py":659
 *             self.tree.new_error(node, "malformed regular expression %s: %s" %
 *                                 (repr(rx), str(re_error)))
 *         return rx             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_rx);
  __pyx_r = __pyx_v_rx;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":645
 * 
 * 
 *     def _check_rx(self, node: Node, rx: str) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Checks whether the string `rx` represents a valid regular
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler._check_rx", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_flags);
  __Pyx_XDECREF(__pyx_v_re_error);
  __Pyx_XDECREF(__pyx_v_rx);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":662
 * 
 * 
 *     def _extract_regex(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         """Extracts regular expression string from regexp-Node."""
 *         value = node.content.strip("~")
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_21_extract_regex(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8DHParser_4ebnf_12EBNFCompiler_20_extract_regex[] = "Extracts regular expression string from regexp-Node.";
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_21_extract_regex = {"_extract_regex", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_21_extract_regex, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8DHParser_4ebnf_12EBNFCompiler_20_extract_regex};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_21_extract_regex(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_node = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_extract_regex (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_extract_regex", 1, 2, 2, 1); __PYX_ERR(0, 662, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_extract_regex") < 0)) __PYX_ERR(0, 662, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_node = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_extract_regex", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 662, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler._extract_regex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_20_extract_regex(__pyx_self, __pyx_v_self, __pyx_v_node);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_20_extract_regex(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node) {
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("_extract_regex", 0);

  /* "DHParser/ebnf.py":664
 *     def _extract_regex(self, node: Node) -> str:
 *         """Extracts regular expression string from regexp-Node."""
 *         value = node.content.strip("~")             # <<<<<<<<<<<<<<
 *         if value[0] + value[-1] in {'""', "''"}:
 *             value = escape_re(value[1:-1])
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_content); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_strip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_kp_u__12) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__12);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_value = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":665
 *         """Extracts regular expression string from regexp-Node."""
 *         value = node.content.strip("~")
 *         if value[0] + value[-1] in {'""', "''"}:             # <<<<<<<<<<<<<<
 *             value = escape_re(value[1:-1])
 *         elif value[0] + value[-1] == '//':
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_value, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u__17, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 665, __pyx_L1_error)
  if (!__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u__18, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 665, __pyx_L1_error)
  __pyx_t_4 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "DHParser/ebnf.py":666
 *         value = node.content.strip("~")
 *         if value[0] + value[-1] in {'""', "''"}:
 *             value = escape_re(value[1:-1])             # <<<<<<<<<<<<<<
 *         elif value[0] + value[-1] == '//':
 *             value = self._check_rx(node, value[1:-1])
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_escape_re); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_value, 1, -1L, NULL, NULL, &__pyx_slice__19, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "DHParser/ebnf.py":665
 *         """Extracts regular expression string from regexp-Node."""
 *         value = node.content.strip("~")
 *         if value[0] + value[-1] in {'""', "''"}:             # <<<<<<<<<<<<<<
 *             value = escape_re(value[1:-1])
 *         elif value[0] + value[-1] == '//':
 */
    goto __pyx_L3;
  }

  /* "DHParser/ebnf.py":667
 *         if value[0] + value[-1] in {'""', "''"}:
 *             value = escape_re(value[1:-1])
 *         elif value[0] + value[-1] == '//':             # <<<<<<<<<<<<<<
 *             value = self._check_rx(node, value[1:-1])
 *         return value
 */
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_value, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_kp_u__20, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 667, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "DHParser/ebnf.py":668
 *             value = escape_re(value[1:-1])
 *         elif value[0] + value[-1] == '//':
 *             value = self._check_rx(node, value[1:-1])             # <<<<<<<<<<<<<<
 *         return value
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_check_rx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 668, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_value, 1, -1L, NULL, NULL, &__pyx_slice__19, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 668, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_node, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_node, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 668, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_INCREF(__pyx_v_node);
      __Pyx_GIVEREF(__pyx_v_node);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_node);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "DHParser/ebnf.py":667
 *         if value[0] + value[-1] in {'""', "''"}:
 *             value = escape_re(value[1:-1])
 *         elif value[0] + value[-1] == '//':             # <<<<<<<<<<<<<<
 *             value = self._check_rx(node, value[1:-1])
 *         return value
 */
  }
  __pyx_L3:;

  /* "DHParser/ebnf.py":669
 *         elif value[0] + value[-1] == '//':
 *             value = self._check_rx(node, value[1:-1])
 *         return value             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_value);
  __pyx_r = ((PyObject*)__pyx_v_value);
  goto __pyx_L0;

  /* "DHParser/ebnf.py":662
 * 
 * 
 *     def _extract_regex(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         """Extracts regular expression string from regexp-Node."""
 *         value = node.content.strip("~")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler._extract_regex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":672
 * 
 * 
 *     def _gen_search_rule(self, nd: Node) -> ReprType:             # <<<<<<<<<<<<<<
 *         """Generates a search rule, which can be either a string for simple
 *         string search or a regular expression from the nodes content. Returns
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_23_gen_search_rule(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8DHParser_4ebnf_12EBNFCompiler_22_gen_search_rule[] = "Generates a search rule, which can be either a string for simple\n        string search or a regular expression from the nodes content. Returns\n        an empty string in case the node is neither regexp nor literal.\n        ";
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_23_gen_search_rule = {"_gen_search_rule", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_23_gen_search_rule, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8DHParser_4ebnf_12EBNFCompiler_22_gen_search_rule};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_23_gen_search_rule(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_nd = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_gen_search_rule (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_nd,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nd)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_gen_search_rule", 1, 2, 2, 1); __PYX_ERR(0, 672, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_gen_search_rule") < 0)) __PYX_ERR(0, 672, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_nd = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_gen_search_rule", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 672, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler._gen_search_rule", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_22_gen_search_rule(__pyx_self, __pyx_v_self, __pyx_v_nd);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_22_gen_search_rule(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_nd) {
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("_gen_search_rule", 0);

  /* "DHParser/ebnf.py":677
 *         an empty string in case the node is neither regexp nor literal.
 *         """
 *         if nd.tag_name == 'regexp':             # <<<<<<<<<<<<<<
 *             return unrepr("re.compile(r'%s')" % self._extract_regex(nd))
 *         elif nd.tag_name == 'literal':
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_nd, __pyx_n_s_tag_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_regexp, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "DHParser/ebnf.py":678
 *         """
 *         if nd.tag_name == 'regexp':
 *             return unrepr("re.compile(r'%s')" % self._extract_regex(nd))             # <<<<<<<<<<<<<<
 *         elif nd.tag_name == 'literal':
 *             s = nd.content.strip()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_unrepr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extract_regex); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_nd) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_nd);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_re_compile_r_s, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "DHParser/ebnf.py":677
 *         an empty string in case the node is neither regexp nor literal.
 *         """
 *         if nd.tag_name == 'regexp':             # <<<<<<<<<<<<<<
 *             return unrepr("re.compile(r'%s')" % self._extract_regex(nd))
 *         elif nd.tag_name == 'literal':
 */
  }

  /* "DHParser/ebnf.py":679
 *         if nd.tag_name == 'regexp':
 *             return unrepr("re.compile(r'%s')" % self._extract_regex(nd))
 *         elif nd.tag_name == 'literal':             # <<<<<<<<<<<<<<
 *             s = nd.content.strip()
 *             return s.strip('"') if s[0] == '"' else s.strip("'")
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_nd, __pyx_n_s_tag_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_literal, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "DHParser/ebnf.py":680
 *             return unrepr("re.compile(r'%s')" % self._extract_regex(nd))
 *         elif nd.tag_name == 'literal':
 *             s = nd.content.strip()             # <<<<<<<<<<<<<<
 *             return s.strip('"') if s[0] == '"' else s.strip("'")
 *         return ''
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_nd, __pyx_n_s_content); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 680, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_strip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 680, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 680, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_s = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "DHParser/ebnf.py":681
 *         elif nd.tag_name == 'literal':
 *             s = nd.content.strip()
 *             return s.strip('"') if s[0] == '"' else s.strip("'")             # <<<<<<<<<<<<<<
 *         return ''
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_s, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 681, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_5, __pyx_kp_u__21, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 681, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_2) {
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_strip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 681, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u__21) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__21);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 681, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_1 = __pyx_t_5;
      __pyx_t_5 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_strip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 681, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u__22) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__22);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 681, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_1 = __pyx_t_5;
      __pyx_t_5 = 0;
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "DHParser/ebnf.py":679
 *         if nd.tag_name == 'regexp':
 *             return unrepr("re.compile(r'%s')" % self._extract_regex(nd))
 *         elif nd.tag_name == 'literal':             # <<<<<<<<<<<<<<
 *             s = nd.content.strip()
 *             return s.strip('"') if s[0] == '"' else s.strip("'")
 */
  }

  /* "DHParser/ebnf.py":682
 *             s = nd.content.strip()
 *             return s.strip('"') if s[0] == '"' else s.strip("'")
 *         return ''             # <<<<<<<<<<<<<<
 * 
 *     def _gen_search_list(self, nodes: Sequence[Node]) -> List[Union[unrepr, str]]:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_kp_u__2);
  __pyx_r = __pyx_kp_u__2;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":672
 * 
 * 
 *     def _gen_search_rule(self, nd: Node) -> ReprType:             # <<<<<<<<<<<<<<
 *         """Generates a search rule, which can be either a string for simple
 *         string search or a regular expression from the nodes content. Returns
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler._gen_search_rule", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":684
 *         return ''
 * 
 *     def _gen_search_list(self, nodes: Sequence[Node]) -> List[Union[unrepr, str]]:             # <<<<<<<<<<<<<<
 *         search_list = []  # type: List[Union[unrepr, str]]
 *         for child in nodes:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_25_gen_search_list(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_25_gen_search_list = {"_gen_search_list", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_25_gen_search_list, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_25_gen_search_list(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_nodes = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_gen_search_list (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_nodes,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodes)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_gen_search_list", 1, 2, 2, 1); __PYX_ERR(0, 684, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_gen_search_list") < 0)) __PYX_ERR(0, 684, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_nodes = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_gen_search_list", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 684, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler._gen_search_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_24_gen_search_list(__pyx_self, __pyx_v_self, __pyx_v_nodes);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_24_gen_search_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_nodes) {
  PyObject *__pyx_v_search_list = NULL;
  PyObject *__pyx_v_child = NULL;
  PyObject *__pyx_v_rule = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  __Pyx_RefNannySetupContext("_gen_search_list", 0);

  /* "DHParser/ebnf.py":685
 * 
 *     def _gen_search_list(self, nodes: Sequence[Node]) -> List[Union[unrepr, str]]:
 *         search_list = []  # type: List[Union[unrepr, str]]             # <<<<<<<<<<<<<<
 *         for child in nodes:
 *             rule = self._gen_search_rule(child)
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_search_list = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":686
 *     def _gen_search_list(self, nodes: Sequence[Node]) -> List[Union[unrepr, str]]:
 *         search_list = []  # type: List[Union[unrepr, str]]
 *         for child in nodes:             # <<<<<<<<<<<<<<
 *             rule = self._gen_search_rule(child)
 *             search_list.append(rule if rule else unrepr(child.content.strip()))
 */
  if (likely(PyList_CheckExact(__pyx_v_nodes)) || PyTuple_CheckExact(__pyx_v_nodes)) {
    __pyx_t_1 = __pyx_v_nodes; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_nodes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 686, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 686, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 686, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 686, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 686, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 686, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_child, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "DHParser/ebnf.py":687
 *         search_list = []  # type: List[Union[unrepr, str]]
 *         for child in nodes:
 *             rule = self._gen_search_rule(child)             # <<<<<<<<<<<<<<
 *             search_list.append(rule if rule else unrepr(child.content.strip()))
 *         return search_list
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_gen_search_rule); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_child) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_child);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_rule, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "DHParser/ebnf.py":688
 *         for child in nodes:
 *             rule = self._gen_search_rule(child)
 *             search_list.append(rule if rule else unrepr(child.content.strip()))             # <<<<<<<<<<<<<<
 *         return search_list
 * 
 */
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_rule); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 688, __pyx_L1_error)
    if (__pyx_t_7) {
      __Pyx_INCREF(__pyx_v_rule);
      __pyx_t_4 = __pyx_v_rule;
    } else {
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_unrepr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 688, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_child, __pyx_n_s_content); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 688, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_strip); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 688, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_10, function);
        }
      }
      __pyx_t_8 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 688, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      __pyx_t_5 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_10, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 688, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_4 = __pyx_t_5;
      __pyx_t_5 = 0;
    }
    __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_search_list, __pyx_t_4); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 688, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "DHParser/ebnf.py":686
 *     def _gen_search_list(self, nodes: Sequence[Node]) -> List[Union[unrepr, str]]:
 *         search_list = []  # type: List[Union[unrepr, str]]
 *         for child in nodes:             # <<<<<<<<<<<<<<
 *             rule = self._gen_search_rule(child)
 *             search_list.append(rule if rule else unrepr(child.content.strip()))
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":689
 *             rule = self._gen_search_rule(child)
 *             search_list.append(rule if rule else unrepr(child.content.strip()))
 *         return search_list             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_search_list);
  __pyx_r = __pyx_v_search_list;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":684
 *         return ''
 * 
 *     def _gen_search_list(self, nodes: Sequence[Node]) -> List[Union[unrepr, str]]:             # <<<<<<<<<<<<<<
 *         search_list = []  # type: List[Union[unrepr, str]]
 *         for child in nodes:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler._gen_search_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_search_list);
  __Pyx_XDECREF(__pyx_v_child);
  __Pyx_XDECREF(__pyx_v_rule);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":692
 * 
 * 
 *     def assemble_parser(self, definitions: List[Tuple[str, str]], root_node: Node) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Creates the Python code for the parser after compilation of
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_27assemble_parser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8DHParser_4ebnf_12EBNFCompiler_26assemble_parser[] = "\n        Creates the Python code for the parser after compilation of\n        the EBNF-Grammar\n        ";
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_27assemble_parser = {"assemble_parser", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_27assemble_parser, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8DHParser_4ebnf_12EBNFCompiler_26assemble_parser};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_27assemble_parser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_definitions = 0;
  CYTHON_UNUSED PyObject *__pyx_v_root_node = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("assemble_parser (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_definitions,&__pyx_n_s_root_node,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_definitions)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("assemble_parser", 1, 3, 3, 1); __PYX_ERR(0, 692, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_root_node)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("assemble_parser", 1, 3, 3, 2); __PYX_ERR(0, 692, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "assemble_parser") < 0)) __PYX_ERR(0, 692, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_definitions = values[1];
    __pyx_v_root_node = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("assemble_parser", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 692, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.assemble_parser", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_26assemble_parser(__pyx_self, __pyx_v_self, __pyx_v_definitions, __pyx_v_root_node);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":837
 *         defined_symbols.difference_update(self.RESERVED_SYMBOLS)
 * 
 *         def remove_connections(symbol):             # <<<<<<<<<<<<<<
 *             """Recursively removes all symbols which appear in the
 *             definiens of a particular symbol."""
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_15assemble_parser_1remove_connections(PyObject *__pyx_self, PyObject *__pyx_v_symbol); /*proto*/
static char __pyx_doc_8DHParser_4ebnf_12EBNFCompiler_15assemble_parser_remove_connections[] = "Recursively removes all symbols which appear in the\n            definiens of a particular symbol.";
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_15assemble_parser_1remove_connections = {"remove_connections", (PyCFunction)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_15assemble_parser_1remove_connections, METH_O, __pyx_doc_8DHParser_4ebnf_12EBNFCompiler_15assemble_parser_remove_connections};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_15assemble_parser_1remove_connections(PyObject *__pyx_self, PyObject *__pyx_v_symbol) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("remove_connections (wrapper)", 0);
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_15assemble_parser_remove_connections(__pyx_self, ((PyObject *)__pyx_v_symbol));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_15assemble_parser_remove_connections(PyObject *__pyx_self, PyObject *__pyx_v_symbol) {
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct__assemble_parser *__pyx_cur_scope;
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct__assemble_parser *__pyx_outer_scope;
  PyObject *__pyx_v_related = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  __Pyx_RefNannySetupContext("remove_connections", 0);
  __pyx_outer_scope = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct__assemble_parser *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "DHParser/ebnf.py":840
 *             """Recursively removes all symbols which appear in the
 *             definiens of a particular symbol."""
 *             if symbol in defined_symbols:             # <<<<<<<<<<<<<<
 *                 defined_symbols.remove(symbol)
 *                 for related in self.rules[symbol][1:]:
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_defined_symbols)) { __Pyx_RaiseClosureNameError("defined_symbols"); __PYX_ERR(0, 840, __pyx_L1_error) }
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_symbol, __pyx_cur_scope->__pyx_v_defined_symbols, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 840, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "DHParser/ebnf.py":841
 *             definiens of a particular symbol."""
 *             if symbol in defined_symbols:
 *                 defined_symbols.remove(symbol)             # <<<<<<<<<<<<<<
 *                 for related in self.rules[symbol][1:]:
 *                     remove_connections(str(related))
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_defined_symbols)) { __Pyx_RaiseClosureNameError("defined_symbols"); __PYX_ERR(0, 841, __pyx_L1_error) }
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_defined_symbols, __pyx_n_s_remove); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 841, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_symbol) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_symbol);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 841, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "DHParser/ebnf.py":842
 *             if symbol in defined_symbols:
 *                 defined_symbols.remove(symbol)
 *                 for related in self.rules[symbol][1:]:             # <<<<<<<<<<<<<<
 *                     remove_connections(str(related))
 * 
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 842, __pyx_L1_error) }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_rules); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 842, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_symbol); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 842, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_4, 1, 0, NULL, NULL, &__pyx_slice__23, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 842, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 842, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 842, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 842, __pyx_L1_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 842, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        } else {
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 842, __pyx_L1_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 842, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_7(__pyx_t_4);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 842, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_v_related, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "DHParser/ebnf.py":843
 *                 defined_symbols.remove(symbol)
 *                 for related in self.rules[symbol][1:]:
 *                     remove_connections(str(related))             # <<<<<<<<<<<<<<
 * 
 *         remove_connections(self.root_symbol)
 */
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_related); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 843, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (unlikely(!__pyx_cur_scope->__pyx_v_remove_connections)) { __Pyx_RaiseClosureNameError("remove_connections"); __PYX_ERR(0, 843, __pyx_L1_error) }
      __pyx_t_5 = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_15assemble_parser_remove_connections(__pyx_cur_scope->__pyx_v_remove_connections, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 843, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "DHParser/ebnf.py":842
 *             if symbol in defined_symbols:
 *                 defined_symbols.remove(symbol)
 *                 for related in self.rules[symbol][1:]:             # <<<<<<<<<<<<<<
 *                     remove_connections(str(related))
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "DHParser/ebnf.py":840
 *             """Recursively removes all symbols which appear in the
 *             definiens of a particular symbol."""
 *             if symbol in defined_symbols:             # <<<<<<<<<<<<<<
 *                 defined_symbols.remove(symbol)
 *                 for related in self.rules[symbol][1:]:
 */
  }

  /* "DHParser/ebnf.py":837
 *         defined_symbols.difference_update(self.RESERVED_SYMBOLS)
 * 
 *         def remove_connections(symbol):             # <<<<<<<<<<<<<<
 *             """Recursively removes all symbols which appear in the
 *             definiens of a particular symbol."""
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.assemble_parser.remove_connections", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_related);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":692
 * 
 * 
 *     def assemble_parser(self, definitions: List[Tuple[str, str]], root_node: Node) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Creates the Python code for the parser after compilation of
 */

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_26assemble_parser(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_definitions, CYTHON_UNUSED PyObject *__pyx_v_root_node) {
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct__assemble_parser *__pyx_cur_scope;
  PyObject *__pyx_v_task = NULL;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_resume_rules = NULL;
  PyObject *__pyx_v_symbol = NULL;
  PyObject *__pyx_v_raw_rules = NULL;
  PyObject *__pyx_v_refined_rules = NULL;
  PyObject *__pyx_v_rule = NULL;
  PyObject *__pyx_v_nd = NULL;
  PyObject *__pyx_v_refined = NULL;
  PyObject *__pyx_v_err_msgs = NULL;
  PyObject *__pyx_v_custom_errors = NULL;
  PyObject *__pyx_v_search = NULL;
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_v_def_node = NULL;
  PyObject *__pyx_v_skip = NULL;
  PyObject *__pyx_v_skip_rules = NULL;
  PyObject *__pyx_v_article = NULL;
  PyObject *__pyx_v_show_source = NULL;
  PyObject *__pyx_v_declarations = NULL;
  PyObject *__pyx_v_statement = NULL;
  PyObject *__pyx_v_leftover = NULL;
  PyObject *__pyx_7genexpr__pyx_v_line = NULL;
  PyObject *__pyx_8genexpr1__pyx_v_symbol = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *(*__pyx_t_20)(PyObject *);
  PyObject *__pyx_t_21 = NULL;
  Py_UCS4 __pyx_t_22;
  PyObject *__pyx_t_23 = NULL;
  __Pyx_RefNannySetupContext("assemble_parser", 0);
  __pyx_cur_scope = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct__assemble_parser *)__pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct__assemble_parser(__pyx_ptype_8DHParser_4ebnf___pyx_scope_struct__assemble_parser, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct__assemble_parser *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 692, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);

  /* "DHParser/ebnf.py":701
 *         # be done before the symbol table is complete
 * 
 *         for task in self.deferred_tasks:             # <<<<<<<<<<<<<<
 *             task()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_deferred_tasks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 701, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 701, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 701, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 701, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_task, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "DHParser/ebnf.py":702
 * 
 *         for task in self.deferred_tasks:
 *             task()             # <<<<<<<<<<<<<<
 * 
 *         # provide for capturing of symbols that are variables, i.e. the
 */
    __Pyx_INCREF(__pyx_v_task);
    __pyx_t_5 = __pyx_v_task; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "DHParser/ebnf.py":701
 *         # be done before the symbol table is complete
 * 
 *         for task in self.deferred_tasks:             # <<<<<<<<<<<<<<
 *             task()
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":707
 *         # value of will be retrieved at some point during the parsing process
 * 
 *         if self.variables:             # <<<<<<<<<<<<<<
 *             for i in range(len(definitions)):
 *                 if definitions[i][0] in self.variables:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_variables); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 707, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_7) {

    /* "DHParser/ebnf.py":708
 * 
 *         if self.variables:
 *             for i in range(len(definitions)):             # <<<<<<<<<<<<<<
 *                 if definitions[i][0] in self.variables:
 *                     definitions[i] = (definitions[i][0], 'Capture(%s)' % definitions[i][1])
 */
    __pyx_t_3 = PyObject_Length(__pyx_v_definitions); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 708, __pyx_L1_error)
    __pyx_t_8 = __pyx_t_3;
    for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
      __pyx_v_i = __pyx_t_9;

      /* "DHParser/ebnf.py":709
 *         if self.variables:
 *             for i in range(len(definitions)):
 *                 if definitions[i][0] in self.variables:             # <<<<<<<<<<<<<<
 *                     definitions[i] = (definitions[i][0], 'Capture(%s)' % definitions[i][1])
 * 
 */
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_definitions, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 709, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 709, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_variables); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 709, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 709, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_10 = (__pyx_t_7 != 0);
      if (__pyx_t_10) {

        /* "DHParser/ebnf.py":710
 *             for i in range(len(definitions)):
 *                 if definitions[i][0] in self.variables:
 *                     definitions[i] = (definitions[i][0], 'Capture(%s)' % definitions[i][1])             # <<<<<<<<<<<<<<
 * 
 *         # add special fields for Grammar class
 */
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_definitions, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 710, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 710, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_definitions, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 710, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 710, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Capture_s, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 710, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 710, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
        __pyx_t_1 = 0;
        __pyx_t_2 = 0;
        if (unlikely(__Pyx_SetItemInt(__pyx_v_definitions, __pyx_v_i, __pyx_t_5, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0)) __PYX_ERR(0, 710, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "DHParser/ebnf.py":709
 *         if self.variables:
 *             for i in range(len(definitions)):
 *                 if definitions[i][0] in self.variables:             # <<<<<<<<<<<<<<
 *                     definitions[i] = (definitions[i][0], 'Capture(%s)' % definitions[i][1])
 * 
 */
      }
    }

    /* "DHParser/ebnf.py":707
 *         # value of will be retrieved at some point during the parsing process
 * 
 *         if self.variables:             # <<<<<<<<<<<<<<
 *             for i in range(len(definitions)):
 *                 if definitions[i][0] in self.variables:
 */
  }

  /* "DHParser/ebnf.py":714
 *         # add special fields for Grammar class
 * 
 *         definitions.append((self.WHITESPACE_PARSER_KEYWORD,             # <<<<<<<<<<<<<<
 *                             'Whitespace(%s)' % self.WHITESPACE_KEYWORD))
 *         if DROP_WSPC in self.directives.drop:
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_WHITESPACE_PARSER_KEYWORD); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "DHParser/ebnf.py":715
 * 
 *         definitions.append((self.WHITESPACE_PARSER_KEYWORD,
 *                             'Whitespace(%s)' % self.WHITESPACE_KEYWORD))             # <<<<<<<<<<<<<<
 *         if DROP_WSPC in self.directives.drop:
 *             definitions.append((self.DROP_WHITESPACE_PARSER_KEYWORD,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_WHITESPACE_KEYWORD); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Whitespace_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":714
 *         # add special fields for Grammar class
 * 
 *         definitions.append((self.WHITESPACE_PARSER_KEYWORD,             # <<<<<<<<<<<<<<
 *                             'Whitespace(%s)' % self.WHITESPACE_KEYWORD))
 *         if DROP_WSPC in self.directives.drop:
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_5 = 0;
  __pyx_t_1 = 0;
  __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_definitions, __pyx_t_2); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 714, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":716
 *         definitions.append((self.WHITESPACE_PARSER_KEYWORD,
 *                             'Whitespace(%s)' % self.WHITESPACE_KEYWORD))
 *         if DROP_WSPC in self.directives.drop:             # <<<<<<<<<<<<<<
 *             definitions.append((self.DROP_WHITESPACE_PARSER_KEYWORD,
 *                                 'DropWhitespace(%s)' % self.WHITESPACE_KEYWORD))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DROP_WSPC); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_directives); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_drop); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_5, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 716, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_7 = (__pyx_t_10 != 0);
  if (__pyx_t_7) {

    /* "DHParser/ebnf.py":717
 *                             'Whitespace(%s)' % self.WHITESPACE_KEYWORD))
 *         if DROP_WSPC in self.directives.drop:
 *             definitions.append((self.DROP_WHITESPACE_PARSER_KEYWORD,             # <<<<<<<<<<<<<<
 *                                 'DropWhitespace(%s)' % self.WHITESPACE_KEYWORD))
 *         definitions.append((self.WHITESPACE_KEYWORD,
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_DROP_WHITESPACE_PARSER_KEYWORD); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);

    /* "DHParser/ebnf.py":718
 *         if DROP_WSPC in self.directives.drop:
 *             definitions.append((self.DROP_WHITESPACE_PARSER_KEYWORD,
 *                                 'DropWhitespace(%s)' % self.WHITESPACE_KEYWORD))             # <<<<<<<<<<<<<<
 *         definitions.append((self.WHITESPACE_KEYWORD,
 *                             ("mixin_comment(whitespace=" + self.RAW_WS_KEYWORD
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_WHITESPACE_KEYWORD); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_DropWhitespace_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "DHParser/ebnf.py":717
 *                             'Whitespace(%s)' % self.WHITESPACE_KEYWORD))
 *         if DROP_WSPC in self.directives.drop:
 *             definitions.append((self.DROP_WHITESPACE_PARSER_KEYWORD,             # <<<<<<<<<<<<<<
 *                                 'DropWhitespace(%s)' % self.WHITESPACE_KEYWORD))
 *         definitions.append((self.WHITESPACE_KEYWORD,
 */
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_definitions, __pyx_t_2); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 717, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "DHParser/ebnf.py":716
 *         definitions.append((self.WHITESPACE_PARSER_KEYWORD,
 *                             'Whitespace(%s)' % self.WHITESPACE_KEYWORD))
 *         if DROP_WSPC in self.directives.drop:             # <<<<<<<<<<<<<<
 *             definitions.append((self.DROP_WHITESPACE_PARSER_KEYWORD,
 *                                 'DropWhitespace(%s)' % self.WHITESPACE_KEYWORD))
 */
  }

  /* "DHParser/ebnf.py":719
 *             definitions.append((self.DROP_WHITESPACE_PARSER_KEYWORD,
 *                                 'DropWhitespace(%s)' % self.WHITESPACE_KEYWORD))
 *         definitions.append((self.WHITESPACE_KEYWORD,             # <<<<<<<<<<<<<<
 *                             ("mixin_comment(whitespace=" + self.RAW_WS_KEYWORD
 *                              + ", comment=" + self.COMMENT_KEYWORD + ")")))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_WHITESPACE_KEYWORD); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "DHParser/ebnf.py":720
 *                                 'DropWhitespace(%s)' % self.WHITESPACE_KEYWORD))
 *         definitions.append((self.WHITESPACE_KEYWORD,
 *                             ("mixin_comment(whitespace=" + self.RAW_WS_KEYWORD             # <<<<<<<<<<<<<<
 *                              + ", comment=" + self.COMMENT_KEYWORD + ")")))
 *         definitions.append((self.RAW_WS_KEYWORD, "r'{}'".format(self.directives.whitespace)))
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_RAW_WS_KEYWORD); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyNumber_Add(__pyx_kp_u_mixin_comment_whitespace, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":721
 *         definitions.append((self.WHITESPACE_KEYWORD,
 *                             ("mixin_comment(whitespace=" + self.RAW_WS_KEYWORD
 *                              + ", comment=" + self.COMMENT_KEYWORD + ")")))             # <<<<<<<<<<<<<<
 *         definitions.append((self.RAW_WS_KEYWORD, "r'{}'".format(self.directives.whitespace)))
 *         definitions.append((self.COMMENT_KEYWORD, "r'{}'".format(self.directives.comment)))
 */
  __pyx_t_1 = PyNumber_Add(__pyx_t_5, __pyx_kp_u_comment_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_COMMENT_KEYWORD); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_kp_u__15); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "DHParser/ebnf.py":719
 *             definitions.append((self.DROP_WHITESPACE_PARSER_KEYWORD,
 *                                 'DropWhitespace(%s)' % self.WHITESPACE_KEYWORD))
 *         definitions.append((self.WHITESPACE_KEYWORD,             # <<<<<<<<<<<<<<
 *                             ("mixin_comment(whitespace=" + self.RAW_WS_KEYWORD
 *                              + ", comment=" + self.COMMENT_KEYWORD + ")")))
 */
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
  __pyx_t_2 = 0;
  __pyx_t_5 = 0;
  __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_definitions, __pyx_t_6); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 719, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "DHParser/ebnf.py":722
 *                             ("mixin_comment(whitespace=" + self.RAW_WS_KEYWORD
 *                              + ", comment=" + self.COMMENT_KEYWORD + ")")))
 *         definitions.append((self.RAW_WS_KEYWORD, "r'{}'".format(self.directives.whitespace)))             # <<<<<<<<<<<<<<
 *         definitions.append((self.COMMENT_KEYWORD, "r'{}'".format(self.directives.comment)))
 * 
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_RAW_WS_KEYWORD); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_r_2, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_directives); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_whitespace); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_5 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
  __pyx_t_6 = 0;
  __pyx_t_5 = 0;
  __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_definitions, __pyx_t_2); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":723
 *                              + ", comment=" + self.COMMENT_KEYWORD + ")")))
 *         definitions.append((self.RAW_WS_KEYWORD, "r'{}'".format(self.directives.whitespace)))
 *         definitions.append((self.COMMENT_KEYWORD, "r'{}'".format(self.directives.comment)))             # <<<<<<<<<<<<<<
 * 
 *         # prepare and add resume-rules
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_COMMENT_KEYWORD); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_r_2, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_directives); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_comment); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_5 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_12, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
  __pyx_t_2 = 0;
  __pyx_t_5 = 0;
  __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_definitions, __pyx_t_6); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "DHParser/ebnf.py":727
 *         # prepare and add resume-rules
 * 
 *         resume_rules = dict()  # type: Dict[str, List[ReprType]]             # <<<<<<<<<<<<<<
 *         for symbol, raw_rules in self.directives.resume.items():
 *             refined_rules = []
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_resume_rules = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "DHParser/ebnf.py":728
 * 
 *         resume_rules = dict()  # type: Dict[str, List[ReprType]]
 *         for symbol, raw_rules in self.directives.resume.items():             # <<<<<<<<<<<<<<
 *             refined_rules = []
 *             for rule in raw_rules:
 */
  __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_directives); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_resume); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(__pyx_t_2 == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
    __PYX_ERR(0, 728, __pyx_L1_error)
  }
  __pyx_t_5 = __Pyx_dict_iterator(__pyx_t_2, 0, __pyx_n_s_items, (&__pyx_t_8), (&__pyx_t_13)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_XDECREF(__pyx_t_6);
  __pyx_t_6 = __pyx_t_5;
  __pyx_t_5 = 0;
  while (1) {
    __pyx_t_14 = __Pyx_dict_iter_next(__pyx_t_6, __pyx_t_8, &__pyx_t_3, &__pyx_t_5, &__pyx_t_2, NULL, __pyx_t_13);
    if (unlikely(__pyx_t_14 == 0)) break;
    if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 728, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_symbol, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_raw_rules, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "DHParser/ebnf.py":729
 *         resume_rules = dict()  # type: Dict[str, List[ReprType]]
 *         for symbol, raw_rules in self.directives.resume.items():
 *             refined_rules = []             # <<<<<<<<<<<<<<
 *             for rule in raw_rules:
 *                 if isinstance(rule, unrepr) and rule.s.isidentifier():
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 729, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_refined_rules, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "DHParser/ebnf.py":730
 *         for symbol, raw_rules in self.directives.resume.items():
 *             refined_rules = []
 *             for rule in raw_rules:             # <<<<<<<<<<<<<<
 *                 if isinstance(rule, unrepr) and rule.s.isidentifier():
 *                     try:
 */
    if (likely(PyList_CheckExact(__pyx_v_raw_rules)) || PyTuple_CheckExact(__pyx_v_raw_rules)) {
      __pyx_t_2 = __pyx_v_raw_rules; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_raw_rules); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 730, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 730, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 730, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 730, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 730, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 730, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_2);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 730, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_XDECREF_SET(__pyx_v_rule, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "DHParser/ebnf.py":731
 *             refined_rules = []
 *             for rule in raw_rules:
 *                 if isinstance(rule, unrepr) and rule.s.isidentifier():             # <<<<<<<<<<<<<<
 *                     try:
 *                         nd = self.rules[rule.s][0].children[1]
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_unrepr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 731, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_10 = PyObject_IsInstance(__pyx_v_rule, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 731, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_15 = (__pyx_t_10 != 0);
      if (__pyx_t_15) {
      } else {
        __pyx_t_7 = __pyx_t_15;
        goto __pyx_L15_bool_binop_done;
      }
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_rule, __pyx_n_s_s_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 731, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_isidentifier); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 731, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_12);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_12, function);
        }
      }
      __pyx_t_5 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 731, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 731, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __pyx_t_15;
      __pyx_L15_bool_binop_done:;
      if (__pyx_t_7) {

        /* "DHParser/ebnf.py":732
 *             for rule in raw_rules:
 *                 if isinstance(rule, unrepr) and rule.s.isidentifier():
 *                     try:             # <<<<<<<<<<<<<<
 *                         nd = self.rules[rule.s][0].children[1]
 *                         refined = self._gen_search_rule(nd)
 */
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          /*try:*/ {

            /* "DHParser/ebnf.py":733
 *                 if isinstance(rule, unrepr) and rule.s.isidentifier():
 *                     try:
 *                         nd = self.rules[rule.s][0].children[1]             # <<<<<<<<<<<<<<
 *                         refined = self._gen_search_rule(nd)
 *                     except IndexError:
 */
            __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_rules); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 733, __pyx_L17_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_rule, __pyx_n_s_s_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 733, __pyx_L17_error)
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 733, __pyx_L17_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 733, __pyx_L17_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 733, __pyx_L17_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 733, __pyx_L17_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_XDECREF_SET(__pyx_v_nd, __pyx_t_12);
            __pyx_t_12 = 0;

            /* "DHParser/ebnf.py":734
 *                     try:
 *                         nd = self.rules[rule.s][0].children[1]
 *                         refined = self._gen_search_rule(nd)             # <<<<<<<<<<<<<<
 *                     except IndexError:
 *                         refined = ""
 */
            __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_gen_search_rule); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 734, __pyx_L17_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_5 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
              __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
              if (likely(__pyx_t_5)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                __Pyx_INCREF(__pyx_t_5);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_1, function);
              }
            }
            __pyx_t_12 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v_nd) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_nd);
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 734, __pyx_L17_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_XDECREF_SET(__pyx_v_refined, __pyx_t_12);
            __pyx_t_12 = 0;

            /* "DHParser/ebnf.py":732
 *             for rule in raw_rules:
 *                 if isinstance(rule, unrepr) and rule.s.isidentifier():
 *                     try:             # <<<<<<<<<<<<<<
 *                         nd = self.rules[rule.s][0].children[1]
 *                         refined = self._gen_search_rule(nd)
 */
          }
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          goto __pyx_L24_try_end;
          __pyx_L17_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "DHParser/ebnf.py":735
 *                         nd = self.rules[rule.s][0].children[1]
 *                         refined = self._gen_search_rule(nd)
 *                     except IndexError:             # <<<<<<<<<<<<<<
 *                         refined = ""
 *                     if refined:
 */
          __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IndexError);
          if (__pyx_t_14) {
            __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.assemble_parser", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_1, &__pyx_t_5) < 0) __PYX_ERR(0, 735, __pyx_L19_except_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_GOTREF(__pyx_t_5);

            /* "DHParser/ebnf.py":736
 *                         refined = self._gen_search_rule(nd)
 *                     except IndexError:
 *                         refined = ""             # <<<<<<<<<<<<<<
 *                     if refined:
 *                         refined_rules.append(refined)
 */
            __Pyx_INCREF(__pyx_kp_u__2);
            __Pyx_XDECREF_SET(__pyx_v_refined, __pyx_kp_u__2);
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            goto __pyx_L18_exception_handled;
          }
          goto __pyx_L19_except_error;
          __pyx_L19_except_error:;

          /* "DHParser/ebnf.py":732
 *             for rule in raw_rules:
 *                 if isinstance(rule, unrepr) and rule.s.isidentifier():
 *                     try:             # <<<<<<<<<<<<<<
 *                         nd = self.rules[rule.s][0].children[1]
 *                         refined = self._gen_search_rule(nd)
 */
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
          goto __pyx_L1_error;
          __pyx_L18_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
          __pyx_L24_try_end:;
        }

        /* "DHParser/ebnf.py":737
 *                     except IndexError:
 *                         refined = ""
 *                     if refined:             # <<<<<<<<<<<<<<
 *                         refined_rules.append(refined)
 *                     else:
 */
        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_refined); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 737, __pyx_L1_error)
        if (__pyx_t_7) {

          /* "DHParser/ebnf.py":738
 *                         refined = ""
 *                     if refined:
 *                         refined_rules.append(refined)             # <<<<<<<<<<<<<<
 *                     else:
 *                         self.tree.new_error(nd, 'Symbol "%s" cannot be used in resume rule, since'
 */
          __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_refined_rules, __pyx_v_refined); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 738, __pyx_L1_error)

          /* "DHParser/ebnf.py":737
 *                     except IndexError:
 *                         refined = ""
 *                     if refined:             # <<<<<<<<<<<<<<
 *                         refined_rules.append(refined)
 *                     else:
 */
          goto __pyx_L27;
        }

        /* "DHParser/ebnf.py":740
 *                         refined_rules.append(refined)
 *                     else:
 *                         self.tree.new_error(nd, 'Symbol "%s" cannot be used in resume rule, since'             # <<<<<<<<<<<<<<
 *                                                 ' it represents neither literal nor regexp!')
 *                 else:
 */
        /*else*/ {
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 740, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_new_error); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 740, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_v_nd)) { __Pyx_RaiseUnboundLocalError("nd"); __PYX_ERR(0, 740, __pyx_L1_error) }
          __pyx_t_1 = NULL;
          __pyx_t_14 = 0;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
            __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_12);
            if (likely(__pyx_t_1)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
              __Pyx_INCREF(__pyx_t_1);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_12, function);
              __pyx_t_14 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_12)) {
            PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_nd, __pyx_kp_u_Symbol_s_cannot_be_used_in_resum};
            __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 740, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_GOTREF(__pyx_t_5);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
            PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_nd, __pyx_kp_u_Symbol_s_cannot_be_used_in_resum};
            __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 740, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_GOTREF(__pyx_t_5);
          } else
          #endif
          {
            __pyx_t_19 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 740, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_19);
            if (__pyx_t_1) {
              __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_1); __pyx_t_1 = NULL;
            }
            __Pyx_INCREF(__pyx_v_nd);
            __Pyx_GIVEREF(__pyx_v_nd);
            PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_14, __pyx_v_nd);
            __Pyx_INCREF(__pyx_kp_u_Symbol_s_cannot_be_used_in_resum);
            __Pyx_GIVEREF(__pyx_kp_u_Symbol_s_cannot_be_used_in_resum);
            PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_14, __pyx_kp_u_Symbol_s_cannot_be_used_in_resum);
            __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_19, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 740, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
          }
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_L27:;

        /* "DHParser/ebnf.py":731
 *             refined_rules = []
 *             for rule in raw_rules:
 *                 if isinstance(rule, unrepr) and rule.s.isidentifier():             # <<<<<<<<<<<<<<
 *                     try:
 *                         nd = self.rules[rule.s][0].children[1]
 */
        goto __pyx_L14;
      }

      /* "DHParser/ebnf.py":743
 *                                                 ' it represents neither literal nor regexp!')
 *                 else:
 *                     refined_rules.append(rule)             # <<<<<<<<<<<<<<
 *             resume_rules[symbol] = refined_rules
 *         definitions.append((self.RESUME_RULES_KEYWORD, repr(resume_rules)))
 */
      /*else*/ {
        __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_refined_rules, __pyx_v_rule); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 743, __pyx_L1_error)
      }
      __pyx_L14:;

      /* "DHParser/ebnf.py":730
 *         for symbol, raw_rules in self.directives.resume.items():
 *             refined_rules = []
 *             for rule in raw_rules:             # <<<<<<<<<<<<<<
 *                 if isinstance(rule, unrepr) and rule.s.isidentifier():
 *                     try:
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "DHParser/ebnf.py":744
 *                 else:
 *                     refined_rules.append(rule)
 *             resume_rules[symbol] = refined_rules             # <<<<<<<<<<<<<<
 *         definitions.append((self.RESUME_RULES_KEYWORD, repr(resume_rules)))
 * 
 */
    if (unlikely(PyDict_SetItem(__pyx_v_resume_rules, __pyx_v_symbol, __pyx_v_refined_rules) < 0)) __PYX_ERR(0, 744, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "DHParser/ebnf.py":745
 *                     refined_rules.append(rule)
 *             resume_rules[symbol] = refined_rules
 *         definitions.append((self.RESUME_RULES_KEYWORD, repr(resume_rules)))             # <<<<<<<<<<<<<<
 * 
 *         # prepare and add customized error-messages
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_RESUME_RULES_KEYWORD); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyObject_Repr(__pyx_v_resume_rules); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __pyx_t_6 = 0;
  __pyx_t_2 = 0;
  __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_definitions, __pyx_t_5); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 745, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "DHParser/ebnf.py":749
 *         # prepare and add customized error-messages
 * 
 *         for symbol, err_msgs in self.directives.error.items():             # <<<<<<<<<<<<<<
 *             custom_errors = []  # type: List[Tuple[ReprType, ReprType]]
 *             for search, message in err_msgs:
 */
  __pyx_t_8 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_directives); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(__pyx_t_6 == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
    __PYX_ERR(0, 749, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_dict_iterator(__pyx_t_6, 0, __pyx_n_s_items, (&__pyx_t_3), (&__pyx_t_13)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_XDECREF(__pyx_t_5);
  __pyx_t_5 = __pyx_t_2;
  __pyx_t_2 = 0;
  while (1) {
    __pyx_t_14 = __Pyx_dict_iter_next(__pyx_t_5, __pyx_t_3, &__pyx_t_8, &__pyx_t_2, &__pyx_t_6, NULL, __pyx_t_13);
    if (unlikely(__pyx_t_14 == 0)) break;
    if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 749, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF_SET(__pyx_v_symbol, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_err_msgs, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "DHParser/ebnf.py":750
 * 
 *         for symbol, err_msgs in self.directives.error.items():
 *             custom_errors = []  # type: List[Tuple[ReprType, ReprType]]             # <<<<<<<<<<<<<<
 *             for search, message in err_msgs:
 *                 if isinstance(search, unrepr) and search.s.isidentifier():
 */
    __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 750, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF_SET(__pyx_v_custom_errors, ((PyObject*)__pyx_t_6));
    __pyx_t_6 = 0;

    /* "DHParser/ebnf.py":751
 *         for symbol, err_msgs in self.directives.error.items():
 *             custom_errors = []  # type: List[Tuple[ReprType, ReprType]]
 *             for search, message in err_msgs:             # <<<<<<<<<<<<<<
 *                 if isinstance(search, unrepr) and search.s.isidentifier():
 *                     try:
 */
    if (likely(PyList_CheckExact(__pyx_v_err_msgs)) || PyTuple_CheckExact(__pyx_v_err_msgs)) {
      __pyx_t_6 = __pyx_v_err_msgs; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_err_msgs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 751, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 751, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        if (likely(PyList_CheckExact(__pyx_t_6))) {
          if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 751, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 751, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 751, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 751, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_4(__pyx_t_6);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 751, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
        PyObject* sequence = __pyx_t_2;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 751, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_12 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_19 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_12 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_19 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_19);
        #else
        __pyx_t_12 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 751, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_19 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 751, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_19);
        #endif
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 751, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_20 = Py_TYPE(__pyx_t_1)->tp_iternext;
        index = 0; __pyx_t_12 = __pyx_t_20(__pyx_t_1); if (unlikely(!__pyx_t_12)) goto __pyx_L32_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_12);
        index = 1; __pyx_t_19 = __pyx_t_20(__pyx_t_1); if (unlikely(!__pyx_t_19)) goto __pyx_L32_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_19);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_1), 2) < 0) __PYX_ERR(0, 751, __pyx_L1_error)
        __pyx_t_20 = NULL;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L33_unpacking_done;
        __pyx_L32_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_20 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 751, __pyx_L1_error)
        __pyx_L33_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_search, __pyx_t_12);
      __pyx_t_12 = 0;
      __Pyx_XDECREF_SET(__pyx_v_message, __pyx_t_19);
      __pyx_t_19 = 0;

      /* "DHParser/ebnf.py":752
 *             custom_errors = []  # type: List[Tuple[ReprType, ReprType]]
 *             for search, message in err_msgs:
 *                 if isinstance(search, unrepr) and search.s.isidentifier():             # <<<<<<<<<<<<<<
 *                     try:
 *                         nd = self.rules[search.s][0].children[1]
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_unrepr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 752, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_15 = PyObject_IsInstance(__pyx_v_search, __pyx_t_2); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 752, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_10 = (__pyx_t_15 != 0);
      if (__pyx_t_10) {
      } else {
        __pyx_t_7 = __pyx_t_10;
        goto __pyx_L35_bool_binop_done;
      }
      __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_search, __pyx_n_s_s_2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 752, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s_isidentifier); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 752, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __pyx_t_19 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
        __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_12);
        if (likely(__pyx_t_19)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
          __Pyx_INCREF(__pyx_t_19);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_12, function);
        }
      }
      __pyx_t_2 = (__pyx_t_19) ? __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_19) : __Pyx_PyObject_CallNoArg(__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 752, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 752, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_7 = __pyx_t_10;
      __pyx_L35_bool_binop_done:;
      if (__pyx_t_7) {

        /* "DHParser/ebnf.py":753
 *             for search, message in err_msgs:
 *                 if isinstance(search, unrepr) and search.s.isidentifier():
 *                     try:             # <<<<<<<<<<<<<<
 *                         nd = self.rules[search.s][0].children[1]
 *                         search = self._gen_search_rule(nd)
 */
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_16);
          /*try:*/ {

            /* "DHParser/ebnf.py":754
 *                 if isinstance(search, unrepr) and search.s.isidentifier():
 *                     try:
 *                         nd = self.rules[search.s][0].children[1]             # <<<<<<<<<<<<<<
 *                         search = self._gen_search_rule(nd)
 *                     except IndexError:
 */
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_rules); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L37_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_search, __pyx_n_s_s_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 754, __pyx_L37_error)
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_19 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 754, __pyx_L37_error)
            __Pyx_GOTREF(__pyx_t_19);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_19, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 754, __pyx_L37_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
            __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_children); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 754, __pyx_L37_error)
            __Pyx_GOTREF(__pyx_t_19);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_19, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 754, __pyx_L37_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
            __Pyx_XDECREF_SET(__pyx_v_nd, __pyx_t_12);
            __pyx_t_12 = 0;

            /* "DHParser/ebnf.py":755
 *                     try:
 *                         nd = self.rules[search.s][0].children[1]
 *                         search = self._gen_search_rule(nd)             # <<<<<<<<<<<<<<
 *                     except IndexError:
 *                         search = ''
 */
            __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_gen_search_rule); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 755, __pyx_L37_error)
            __Pyx_GOTREF(__pyx_t_19);
            __pyx_t_2 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_19))) {
              __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_19);
              if (likely(__pyx_t_2)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_19);
                __Pyx_INCREF(__pyx_t_2);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_19, function);
              }
            }
            __pyx_t_12 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_19, __pyx_t_2, __pyx_v_nd) : __Pyx_PyObject_CallOneArg(__pyx_t_19, __pyx_v_nd);
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 755, __pyx_L37_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
            __Pyx_DECREF_SET(__pyx_v_search, __pyx_t_12);
            __pyx_t_12 = 0;

            /* "DHParser/ebnf.py":753
 *             for search, message in err_msgs:
 *                 if isinstance(search, unrepr) and search.s.isidentifier():
 *                     try:             # <<<<<<<<<<<<<<
 *                         nd = self.rules[search.s][0].children[1]
 *                         search = self._gen_search_rule(nd)
 */
          }
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          goto __pyx_L44_try_end;
          __pyx_L37_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "DHParser/ebnf.py":756
 *                         nd = self.rules[search.s][0].children[1]
 *                         search = self._gen_search_rule(nd)
 *                     except IndexError:             # <<<<<<<<<<<<<<
 *                         search = ''
 *                 custom_errors.append((search, message))
 */
          __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IndexError);
          if (__pyx_t_14) {
            __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.assemble_parser", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_19, &__pyx_t_2) < 0) __PYX_ERR(0, 756, __pyx_L39_except_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_GOTREF(__pyx_t_19);
            __Pyx_GOTREF(__pyx_t_2);

            /* "DHParser/ebnf.py":757
 *                         search = self._gen_search_rule(nd)
 *                     except IndexError:
 *                         search = ''             # <<<<<<<<<<<<<<
 *                 custom_errors.append((search, message))
 *             definitions.append((symbol + self.ERR_MSG_SUFFIX, repr(custom_errors)))
 */
            __Pyx_INCREF(__pyx_kp_u__2);
            __Pyx_DECREF_SET(__pyx_v_search, __pyx_kp_u__2);
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            goto __pyx_L38_exception_handled;
          }
          goto __pyx_L39_except_error;
          __pyx_L39_except_error:;

          /* "DHParser/ebnf.py":753
 *             for search, message in err_msgs:
 *                 if isinstance(search, unrepr) and search.s.isidentifier():
 *                     try:             # <<<<<<<<<<<<<<
 *                         nd = self.rules[search.s][0].children[1]
 *                         search = self._gen_search_rule(nd)
 */
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16);
          goto __pyx_L1_error;
          __pyx_L38_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16);
          __pyx_L44_try_end:;
        }

        /* "DHParser/ebnf.py":752
 *             custom_errors = []  # type: List[Tuple[ReprType, ReprType]]
 *             for search, message in err_msgs:
 *                 if isinstance(search, unrepr) and search.s.isidentifier():             # <<<<<<<<<<<<<<
 *                     try:
 *                         nd = self.rules[search.s][0].children[1]
 */
      }

      /* "DHParser/ebnf.py":758
 *                     except IndexError:
 *                         search = ''
 *                 custom_errors.append((search, message))             # <<<<<<<<<<<<<<
 *             definitions.append((symbol + self.ERR_MSG_SUFFIX, repr(custom_errors)))
 * 
 */
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 758, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_search);
      __Pyx_GIVEREF(__pyx_v_search);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_search);
      __Pyx_INCREF(__pyx_v_message);
      __Pyx_GIVEREF(__pyx_v_message);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_message);
      __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_custom_errors, __pyx_t_2); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 758, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "DHParser/ebnf.py":751
 *         for symbol, err_msgs in self.directives.error.items():
 *             custom_errors = []  # type: List[Tuple[ReprType, ReprType]]
 *             for search, message in err_msgs:             # <<<<<<<<<<<<<<
 *                 if isinstance(search, unrepr) and search.s.isidentifier():
 *                     try:
 */
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "DHParser/ebnf.py":759
 *                         search = ''
 *                 custom_errors.append((search, message))
 *             definitions.append((symbol + self.ERR_MSG_SUFFIX, repr(custom_errors)))             # <<<<<<<<<<<<<<
 * 
 *         for symbol in self.directives.error.keys():
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_ERR_MSG_SUFFIX); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyNumber_Add(__pyx_v_symbol, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyObject_Repr(__pyx_v_custom_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_19 = PyTuple_New(2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_t_6);
    __pyx_t_2 = 0;
    __pyx_t_6 = 0;
    __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_definitions, __pyx_t_19); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 759, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "DHParser/ebnf.py":761
 *             definitions.append((symbol + self.ERR_MSG_SUFFIX, repr(custom_errors)))
 * 
 *         for symbol in self.directives.error.keys():             # <<<<<<<<<<<<<<
 *             if symbol not in self.consumed_custom_errors:
 *                 def_node = self.rules[symbol][0]
 */
  __pyx_t_3 = 0;
  __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_directives); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (unlikely(__pyx_t_6 == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys");
    __PYX_ERR(0, 761, __pyx_L1_error)
  }
  __pyx_t_19 = __Pyx_dict_iterator(__pyx_t_6, 0, __pyx_n_s_keys, (&__pyx_t_8), (&__pyx_t_13)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_XDECREF(__pyx_t_5);
  __pyx_t_5 = __pyx_t_19;
  __pyx_t_19 = 0;
  while (1) {
    __pyx_t_14 = __Pyx_dict_iter_next(__pyx_t_5, __pyx_t_8, &__pyx_t_3, &__pyx_t_19, NULL, NULL, __pyx_t_13);
    if (unlikely(__pyx_t_14 == 0)) break;
    if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 761, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_XDECREF_SET(__pyx_v_symbol, __pyx_t_19);
    __pyx_t_19 = 0;

    /* "DHParser/ebnf.py":762
 * 
 *         for symbol in self.directives.error.keys():
 *             if symbol not in self.consumed_custom_errors:             # <<<<<<<<<<<<<<
 *                 def_node = self.rules[symbol][0]
 *                 self.tree.new_error(
 */
    __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_consumed_custom_errors); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_symbol, __pyx_t_19, Py_NE)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 762, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    __pyx_t_10 = (__pyx_t_7 != 0);
    if (__pyx_t_10) {

      /* "DHParser/ebnf.py":763
 *         for symbol in self.directives.error.keys():
 *             if symbol not in self.consumed_custom_errors:
 *                 def_node = self.rules[symbol][0]             # <<<<<<<<<<<<<<
 *                 self.tree.new_error(
 *                     def_node, 'Customized error message for symbol "{}" will never be used, '
 */
      __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_rules); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 763, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_19, __pyx_v_symbol); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 763, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __pyx_t_19 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 763, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_def_node, __pyx_t_19);
      __pyx_t_19 = 0;

      /* "DHParser/ebnf.py":764
 *             if symbol not in self.consumed_custom_errors:
 *                 def_node = self.rules[symbol][0]
 *                 self.tree.new_error(             # <<<<<<<<<<<<<<
 *                     def_node, 'Customized error message for symbol "{}" will never be used, '
 *                     'because the mandatory marker "" appears nowhere in its definiendum!'
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_new_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "DHParser/ebnf.py":767
 *                     def_node, 'Customized error message for symbol "{}" will never be used, '
 *                     'because the mandatory marker "" appears nowhere in its definiendum!'
 *                     .format(symbol), Error.UNUSED_ERROR_HANDLING_WARNING)             # <<<<<<<<<<<<<<
 * 
 *         # prepare and add skip-rules
 */
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Customized_error_message_for_sym, __pyx_n_s_format); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_1 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_12);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_12, function);
        }
      }
      __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_1, __pyx_v_symbol) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_symbol);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Error); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_UNUSED_ERROR_HANDLING_WARNING); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_12 = NULL;
      __pyx_t_14 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_12)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_12);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_14 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[4] = {__pyx_t_12, __pyx_v_def_node, __pyx_t_6, __pyx_t_1};
        __pyx_t_19 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 764, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_GOTREF(__pyx_t_19);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[4] = {__pyx_t_12, __pyx_v_def_node, __pyx_t_6, __pyx_t_1};
        __pyx_t_19 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 764, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_GOTREF(__pyx_t_19);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else
      #endif
      {
        __pyx_t_21 = PyTuple_New(3+__pyx_t_14); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 764, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_21);
        if (__pyx_t_12) {
          __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_12); __pyx_t_12 = NULL;
        }
        __Pyx_INCREF(__pyx_v_def_node);
        __Pyx_GIVEREF(__pyx_v_def_node);
        PyTuple_SET_ITEM(__pyx_t_21, 0+__pyx_t_14, __pyx_v_def_node);
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_21, 1+__pyx_t_14, __pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_21, 2+__pyx_t_14, __pyx_t_1);
        __pyx_t_6 = 0;
        __pyx_t_1 = 0;
        __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_21, NULL); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 764, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_19);
        __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

      /* "DHParser/ebnf.py":762
 * 
 *         for symbol in self.directives.error.keys():
 *             if symbol not in self.consumed_custom_errors:             # <<<<<<<<<<<<<<
 *                 def_node = self.rules[symbol][0]
 *                 self.tree.new_error(
 */
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "DHParser/ebnf.py":771
 *         # prepare and add skip-rules
 * 
 *         for symbol, skip in self.directives.skip.items():             # <<<<<<<<<<<<<<
 *             skip_rules = []  # type: List[ReprType]
 *             for search in skip:
 */
  __pyx_t_8 = 0;
  __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_directives); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s_skip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (unlikely(__pyx_t_2 == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
    __PYX_ERR(0, 771, __pyx_L1_error)
  }
  __pyx_t_19 = __Pyx_dict_iterator(__pyx_t_2, 0, __pyx_n_s_items, (&__pyx_t_3), (&__pyx_t_13)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_XDECREF(__pyx_t_5);
  __pyx_t_5 = __pyx_t_19;
  __pyx_t_19 = 0;
  while (1) {
    __pyx_t_14 = __Pyx_dict_iter_next(__pyx_t_5, __pyx_t_3, &__pyx_t_8, &__pyx_t_19, &__pyx_t_2, NULL, __pyx_t_13);
    if (unlikely(__pyx_t_14 == 0)) break;
    if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 771, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_symbol, __pyx_t_19);
    __pyx_t_19 = 0;
    __Pyx_XDECREF_SET(__pyx_v_skip, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "DHParser/ebnf.py":772
 * 
 *         for symbol, skip in self.directives.skip.items():
 *             skip_rules = []  # type: List[ReprType]             # <<<<<<<<<<<<<<
 *             for search in skip:
 *                 if isinstance(search, unrepr) and search.s.isidentifier():
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 772, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_skip_rules, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "DHParser/ebnf.py":773
 *         for symbol, skip in self.directives.skip.items():
 *             skip_rules = []  # type: List[ReprType]
 *             for search in skip:             # <<<<<<<<<<<<<<
 *                 if isinstance(search, unrepr) and search.s.isidentifier():
 *                     try:
 */
    if (likely(PyList_CheckExact(__pyx_v_skip)) || PyTuple_CheckExact(__pyx_v_skip)) {
      __pyx_t_2 = __pyx_v_skip; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_skip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 773, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 773, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_19 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_19); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 773, __pyx_L1_error)
          #else
          __pyx_t_19 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 773, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_19);
          #endif
        } else {
          if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_19 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_19); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 773, __pyx_L1_error)
          #else
          __pyx_t_19 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 773, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_19);
          #endif
        }
      } else {
        __pyx_t_19 = __pyx_t_4(__pyx_t_2);
        if (unlikely(!__pyx_t_19)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 773, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_19);
      }
      __Pyx_XDECREF_SET(__pyx_v_search, __pyx_t_19);
      __pyx_t_19 = 0;

      /* "DHParser/ebnf.py":774
 *             skip_rules = []  # type: List[ReprType]
 *             for search in skip:
 *                 if isinstance(search, unrepr) and search.s.isidentifier():             # <<<<<<<<<<<<<<
 *                     try:
 *                         nd = self.rules[search.s][0].children[1]
 */
      __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_unrepr); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 774, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      __pyx_t_7 = PyObject_IsInstance(__pyx_v_search, __pyx_t_19); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 774, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __pyx_t_15 = (__pyx_t_7 != 0);
      if (__pyx_t_15) {
      } else {
        __pyx_t_10 = __pyx_t_15;
        goto __pyx_L55_bool_binop_done;
      }
      __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_search, __pyx_n_s_s_2); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 774, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_21);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_isidentifier); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 774, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
      __pyx_t_21 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_21 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_21)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_21);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      __pyx_t_19 = (__pyx_t_21) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_21) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
      if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 774, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_19); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 774, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __pyx_t_10 = __pyx_t_15;
      __pyx_L55_bool_binop_done:;
      if (__pyx_t_10) {

        /* "DHParser/ebnf.py":775
 *             for search in skip:
 *                 if isinstance(search, unrepr) and search.s.isidentifier():
 *                     try:             # <<<<<<<<<<<<<<
 *                         nd = self.rules[search.s][0].children[1]
 *                         search = self._gen_search_rule(nd)
 */
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          /*try:*/ {

            /* "DHParser/ebnf.py":776
 *                 if isinstance(search, unrepr) and search.s.isidentifier():
 *                     try:
 *                         nd = self.rules[search.s][0].children[1]             # <<<<<<<<<<<<<<
 *                         search = self._gen_search_rule(nd)
 *                     except IndexError:
 */
            __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_rules); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 776, __pyx_L57_error)
            __Pyx_GOTREF(__pyx_t_19);
            __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_search, __pyx_n_s_s_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 776, __pyx_L57_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_21 = __Pyx_PyObject_GetItem(__pyx_t_19, __pyx_t_1); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 776, __pyx_L57_error)
            __Pyx_GOTREF(__pyx_t_21);
            __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_21, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 776, __pyx_L57_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
            __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_children); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 776, __pyx_L57_error)
            __Pyx_GOTREF(__pyx_t_21);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_21, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 776, __pyx_L57_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
            __Pyx_XDECREF_SET(__pyx_v_nd, __pyx_t_1);
            __pyx_t_1 = 0;

            /* "DHParser/ebnf.py":777
 *                     try:
 *                         nd = self.rules[search.s][0].children[1]
 *                         search = self._gen_search_rule(nd)             # <<<<<<<<<<<<<<
 *                     except IndexError:
 *                         search = ''
 */
            __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_gen_search_rule); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 777, __pyx_L57_error)
            __Pyx_GOTREF(__pyx_t_21);
            __pyx_t_19 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_21))) {
              __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_21);
              if (likely(__pyx_t_19)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_21);
                __Pyx_INCREF(__pyx_t_19);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_21, function);
              }
            }
            __pyx_t_1 = (__pyx_t_19) ? __Pyx_PyObject_Call2Args(__pyx_t_21, __pyx_t_19, __pyx_v_nd) : __Pyx_PyObject_CallOneArg(__pyx_t_21, __pyx_v_nd);
            __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 777, __pyx_L57_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
            __Pyx_DECREF_SET(__pyx_v_search, __pyx_t_1);
            __pyx_t_1 = 0;

            /* "DHParser/ebnf.py":775
 *             for search in skip:
 *                 if isinstance(search, unrepr) and search.s.isidentifier():
 *                     try:             # <<<<<<<<<<<<<<
 *                         nd = self.rules[search.s][0].children[1]
 *                         search = self._gen_search_rule(nd)
 */
          }
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          goto __pyx_L64_try_end;
          __pyx_L57_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
          __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

          /* "DHParser/ebnf.py":778
 *                         nd = self.rules[search.s][0].children[1]
 *                         search = self._gen_search_rule(nd)
 *                     except IndexError:             # <<<<<<<<<<<<<<
 *                         search = ''
 *                 skip_rules.append(search)
 */
          __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IndexError);
          if (__pyx_t_14) {
            __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.assemble_parser", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_21, &__pyx_t_19) < 0) __PYX_ERR(0, 778, __pyx_L59_except_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_GOTREF(__pyx_t_21);
            __Pyx_GOTREF(__pyx_t_19);

            /* "DHParser/ebnf.py":779
 *                         search = self._gen_search_rule(nd)
 *                     except IndexError:
 *                         search = ''             # <<<<<<<<<<<<<<
 *                 skip_rules.append(search)
 *             definitions.append((symbol + self.SKIP_RULES_SUFFIX, repr(skip_rules)))
 */
            __Pyx_INCREF(__pyx_kp_u__2);
            __Pyx_DECREF_SET(__pyx_v_search, __pyx_kp_u__2);
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
            __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
            goto __pyx_L58_exception_handled;
          }
          goto __pyx_L59_except_error;
          __pyx_L59_except_error:;

          /* "DHParser/ebnf.py":775
 *             for search in skip:
 *                 if isinstance(search, unrepr) and search.s.isidentifier():
 *                     try:             # <<<<<<<<<<<<<<
 *                         nd = self.rules[search.s][0].children[1]
 *                         search = self._gen_search_rule(nd)
 */
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
          goto __pyx_L1_error;
          __pyx_L58_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
          __pyx_L64_try_end:;
        }

        /* "DHParser/ebnf.py":774
 *             skip_rules = []  # type: List[ReprType]
 *             for search in skip:
 *                 if isinstance(search, unrepr) and search.s.isidentifier():             # <<<<<<<<<<<<<<
 *                     try:
 *                         nd = self.rules[search.s][0].children[1]
 */
      }

      /* "DHParser/ebnf.py":780
 *                     except IndexError:
 *                         search = ''
 *                 skip_rules.append(search)             # <<<<<<<<<<<<<<
 *             definitions.append((symbol + self.SKIP_RULES_SUFFIX, repr(skip_rules)))
 * 
 */
      __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_skip_rules, __pyx_v_search); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 780, __pyx_L1_error)

      /* "DHParser/ebnf.py":773
 *         for symbol, skip in self.directives.skip.items():
 *             skip_rules = []  # type: List[ReprType]
 *             for search in skip:             # <<<<<<<<<<<<<<
 *                 if isinstance(search, unrepr) and search.s.isidentifier():
 *                     try:
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "DHParser/ebnf.py":781
 *                         search = ''
 *                 skip_rules.append(search)
 *             definitions.append((symbol + self.SKIP_RULES_SUFFIX, repr(skip_rules)))             # <<<<<<<<<<<<<<
 * 
 *         for symbol in self.directives.error.keys():
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_SKIP_RULES_SUFFIX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_19 = PyNumber_Add(__pyx_v_symbol, __pyx_t_2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Repr(__pyx_v_skip_rules); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_21 = PyTuple_New(2); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
    __Pyx_GIVEREF(__pyx_t_19);
    PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_19);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_21, 1, __pyx_t_2);
    __pyx_t_19 = 0;
    __pyx_t_2 = 0;
    __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_definitions, __pyx_t_21); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 781, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "DHParser/ebnf.py":783
 *             definitions.append((symbol + self.SKIP_RULES_SUFFIX, repr(skip_rules)))
 * 
 *         for symbol in self.directives.error.keys():             # <<<<<<<<<<<<<<
 *             if symbol not in self.consumed_skip_rules:
 *                 def_node = self.rules[symbol][0]
 */
  __pyx_t_3 = 0;
  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_directives); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  if (unlikely(__pyx_t_2 == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys");
    __PYX_ERR(0, 783, __pyx_L1_error)
  }
  __pyx_t_21 = __Pyx_dict_iterator(__pyx_t_2, 0, __pyx_n_s_keys, (&__pyx_t_8), (&__pyx_t_13)); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_XDECREF(__pyx_t_5);
  __pyx_t_5 = __pyx_t_21;
  __pyx_t_21 = 0;
  while (1) {
    __pyx_t_14 = __Pyx_dict_iter_next(__pyx_t_5, __pyx_t_8, &__pyx_t_3, &__pyx_t_21, NULL, NULL, __pyx_t_13);
    if (unlikely(__pyx_t_14 == 0)) break;
    if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
    __Pyx_XDECREF_SET(__pyx_v_symbol, __pyx_t_21);
    __pyx_t_21 = 0;

    /* "DHParser/ebnf.py":784
 * 
 *         for symbol in self.directives.error.keys():
 *             if symbol not in self.consumed_skip_rules:             # <<<<<<<<<<<<<<
 *                 def_node = self.rules[symbol][0]
 *                 self.tree.new_error(
 */
    __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_consumed_skip_rules); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
    __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_symbol, __pyx_t_21, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 784, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    __pyx_t_15 = (__pyx_t_10 != 0);
    if (__pyx_t_15) {

      /* "DHParser/ebnf.py":785
 *         for symbol in self.directives.error.keys():
 *             if symbol not in self.consumed_skip_rules:
 *                 def_node = self.rules[symbol][0]             # <<<<<<<<<<<<<<
 *                 self.tree.new_error(
 *                     def_node, '"Skip-rules" for symbol "{}" will never be used, '
 */
      __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_rules); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 785, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_21);
      __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_21, __pyx_v_symbol); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 785, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
      __pyx_t_21 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 785, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_21);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_def_node, __pyx_t_21);
      __pyx_t_21 = 0;

      /* "DHParser/ebnf.py":786
 *             if symbol not in self.consumed_skip_rules:
 *                 def_node = self.rules[symbol][0]
 *                 self.tree.new_error(             # <<<<<<<<<<<<<<
 *                     def_node, '"Skip-rules" for symbol "{}" will never be used, '
 *                     'because the mandatory marker "" appears nowhere in its definiendum!'
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 786, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_new_error); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 786, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "DHParser/ebnf.py":789
 *                     def_node, '"Skip-rules" for symbol "{}" will never be used, '
 *                     'because the mandatory marker "" appears nowhere in its definiendum!'
 *                     .format(symbol), Error.UNUSED_ERROR_HANDLING_WARNING)             # <<<<<<<<<<<<<<
 * 
 *         # prepare parser class header and docstring and
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Skip_rules_for_symbol_will_neve, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 789, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_v_symbol) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_symbol);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 789, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 789, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_UNUSED_ERROR_HANDLING_WARNING); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 789, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      __pyx_t_14 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_19))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_19);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_19);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_19, function);
          __pyx_t_14 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_19)) {
        PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_v_def_node, __pyx_t_2, __pyx_t_6};
        __pyx_t_21 = __Pyx_PyFunction_FastCall(__pyx_t_19, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 786, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_GOTREF(__pyx_t_21);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_19)) {
        PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_v_def_node, __pyx_t_2, __pyx_t_6};
        __pyx_t_21 = __Pyx_PyCFunction_FastCall(__pyx_t_19, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 786, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_GOTREF(__pyx_t_21);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(3+__pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 786, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (__pyx_t_1) {
          __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_1); __pyx_t_1 = NULL;
        }
        __Pyx_INCREF(__pyx_v_def_node);
        __Pyx_GIVEREF(__pyx_v_def_node);
        PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_14, __pyx_v_def_node);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_14, __pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_14, __pyx_t_6);
        __pyx_t_2 = 0;
        __pyx_t_6 = 0;
        __pyx_t_21 = __Pyx_PyObject_Call(__pyx_t_19, __pyx_t_12, NULL); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 786, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_21);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

      /* "DHParser/ebnf.py":784
 * 
 *         for symbol in self.directives.error.keys():
 *             if symbol not in self.consumed_skip_rules:             # <<<<<<<<<<<<<<
 *                 def_node = self.rules[symbol][0]
 *                 self.tree.new_error(
 */
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "DHParser/ebnf.py":794
 *         # add EBNF grammar to the doc string of the parser class
 * 
 *         article = 'an ' if self.grammar_name[0:1] in "AaEeIiOoUu" else 'a '  # what about 'hour', 'universe' etc.?             # <<<<<<<<<<<<<<
 *         show_source = get_config_value('add_grammar_source_to_parser_docstring')
 *         declarations = ['class ' + self.grammar_name
 */
  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_grammar_name); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_19 = __Pyx_PyObject_GetSlice(__pyx_t_21, 0, 1, NULL, NULL, &__pyx_slice__24, 1, 1, 1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  __pyx_t_15 = (__Pyx_PyUnicode_ContainsTF(__pyx_t_19, __pyx_n_u_AaEeIiOoUu, Py_EQ)); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 794, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if ((__pyx_t_15 != 0)) {
    __Pyx_INCREF(__pyx_kp_u_an);
    __pyx_t_5 = __pyx_kp_u_an;
  } else {
    __Pyx_INCREF(__pyx_kp_u_a);
    __pyx_t_5 = __pyx_kp_u_a;
  }
  __pyx_v_article = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "DHParser/ebnf.py":795
 * 
 *         article = 'an ' if self.grammar_name[0:1] in "AaEeIiOoUu" else 'a '  # what about 'hour', 'universe' etc.?
 *         show_source = get_config_value('add_grammar_source_to_parser_docstring')             # <<<<<<<<<<<<<<
 *         declarations = ['class ' + self.grammar_name
 *                         + 'Grammar(Grammar):',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_get_config_value); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_21 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_19))) {
    __pyx_t_21 = PyMethod_GET_SELF(__pyx_t_19);
    if (likely(__pyx_t_21)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_19);
      __Pyx_INCREF(__pyx_t_21);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_19, function);
    }
  }
  __pyx_t_5 = (__pyx_t_21) ? __Pyx_PyObject_Call2Args(__pyx_t_19, __pyx_t_21, __pyx_n_u_add_grammar_source_to_parser_doc) : __Pyx_PyObject_CallOneArg(__pyx_t_19, __pyx_n_u_add_grammar_source_to_parser_doc);
  __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __pyx_v_show_source = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "DHParser/ebnf.py":796
 *         article = 'an ' if self.grammar_name[0:1] in "AaEeIiOoUu" else 'a '  # what about 'hour', 'universe' etc.?
 *         show_source = get_config_value('add_grammar_source_to_parser_docstring')
 *         declarations = ['class ' + self.grammar_name             # <<<<<<<<<<<<<<
 *                         + 'Grammar(Grammar):',
 *                         'r"""Parser for ' + article + self.grammar_name
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_grammar_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_19 = PyNumber_Add(__pyx_kp_u_class, __pyx_t_5); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "DHParser/ebnf.py":797
 *         show_source = get_config_value('add_grammar_source_to_parser_docstring')
 *         declarations = ['class ' + self.grammar_name
 *                         + 'Grammar(Grammar):',             # <<<<<<<<<<<<<<
 *                         'r"""Parser for ' + article + self.grammar_name
 *                         + ' source file'
 */
  __pyx_t_5 = PyNumber_Add(__pyx_t_19, __pyx_kp_u_Grammar_Grammar); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "DHParser/ebnf.py":798
 *         declarations = ['class ' + self.grammar_name
 *                         + 'Grammar(Grammar):',
 *                         'r"""Parser for ' + article + self.grammar_name             # <<<<<<<<<<<<<<
 *                         + ' source file'
 *                         + ('. Grammar:' if self.grammar_source and show_source else '.')]
 */
  __pyx_t_19 = __Pyx_PyUnicode_ConcatSafe(__pyx_kp_u_r_Parser_for, __pyx_v_article); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_grammar_name); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __pyx_t_12 = PyNumber_Add(__pyx_t_19, __pyx_t_21); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "DHParser/ebnf.py":799
 *                         + 'Grammar(Grammar):',
 *                         'r"""Parser for ' + article + self.grammar_name
 *                         + ' source file'             # <<<<<<<<<<<<<<
 *                         + ('. Grammar:' if self.grammar_source and show_source else '.')]
 *         definitions.append(('parser_initialization__', '["upon instantiation"]'))
 */
  __pyx_t_21 = PyNumber_Add(__pyx_t_12, __pyx_kp_u_source_file_2); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "DHParser/ebnf.py":800
 *                         'r"""Parser for ' + article + self.grammar_name
 *                         + ' source file'
 *                         + ('. Grammar:' if self.grammar_source and show_source else '.')]             # <<<<<<<<<<<<<<
 *         definitions.append(('parser_initialization__', '["upon instantiation"]'))
 *         if self.grammar_source:
 */
  __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_grammar_source); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_19); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 800, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (__pyx_t_10) {
  } else {
    __pyx_t_15 = __pyx_t_10;
    goto __pyx_L70_bool_binop_done;
  }
  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_show_source); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 800, __pyx_L1_error)
  __pyx_t_15 = __pyx_t_10;
  __pyx_L70_bool_binop_done:;
  if (__pyx_t_15) {
    __Pyx_INCREF(__pyx_kp_u_Grammar);
    __pyx_t_12 = __pyx_kp_u_Grammar;
  } else {
    __Pyx_INCREF(__pyx_kp_u__25);
    __pyx_t_12 = __pyx_kp_u__25;
  }
  __pyx_t_19 = PyNumber_Add(__pyx_t_21, __pyx_t_12); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "DHParser/ebnf.py":796
 *         article = 'an ' if self.grammar_name[0:1] in "AaEeIiOoUu" else 'a '  # what about 'hour', 'universe' etc.?
 *         show_source = get_config_value('add_grammar_source_to_parser_docstring')
 *         declarations = ['class ' + self.grammar_name             # <<<<<<<<<<<<<<
 *                         + 'Grammar(Grammar):',
 *                         'r"""Parser for ' + article + self.grammar_name
 */
  __pyx_t_12 = PyList_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_12, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_19);
  PyList_SET_ITEM(__pyx_t_12, 1, __pyx_t_19);
  __pyx_t_5 = 0;
  __pyx_t_19 = 0;
  __pyx_v_declarations = ((PyObject*)__pyx_t_12);
  __pyx_t_12 = 0;

  /* "DHParser/ebnf.py":801
 *                         + ' source file'
 *                         + ('. Grammar:' if self.grammar_source and show_source else '.')]
 *         definitions.append(('parser_initialization__', '["upon instantiation"]'))             # <<<<<<<<<<<<<<
 *         if self.grammar_source:
 *             definitions.append(('source_hash__',
 */
  __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_definitions, __pyx_tuple__26); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 801, __pyx_L1_error)

  /* "DHParser/ebnf.py":802
 *                         + ('. Grammar:' if self.grammar_source and show_source else '.')]
 *         definitions.append(('parser_initialization__', '["upon instantiation"]'))
 *         if self.grammar_source:             # <<<<<<<<<<<<<<
 *             definitions.append(('source_hash__',
 *                                 '"%s"' % md5(self.grammar_source, __version__)))
 */
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_grammar_source); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__pyx_t_15) {

    /* "DHParser/ebnf.py":804
 *         if self.grammar_source:
 *             definitions.append(('source_hash__',
 *                                 '"%s"' % md5(self.grammar_source, __version__)))             # <<<<<<<<<<<<<<
 *             declarations.append('')
 *             if show_source:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_md5); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 804, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_grammar_source); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 804, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_n_s_version); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 804, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
    __pyx_t_6 = NULL;
    __pyx_t_13 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_19))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_19);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_19);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_19, function);
        __pyx_t_13 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_19)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_5, __pyx_t_21};
      __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_19, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 804, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_19)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_5, __pyx_t_21};
      __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_19, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 804, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    } else
    #endif
    {
      __pyx_t_2 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 804, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_13, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_21);
      PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_13, __pyx_t_21);
      __pyx_t_5 = 0;
      __pyx_t_21 = 0;
      __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_19, __pyx_t_2, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 804, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    __pyx_t_19 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_s_3, __pyx_t_12); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 804, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "DHParser/ebnf.py":803
 *         definitions.append(('parser_initialization__', '["upon instantiation"]'))
 *         if self.grammar_source:
 *             definitions.append(('source_hash__',             # <<<<<<<<<<<<<<
 *                                 '"%s"' % md5(self.grammar_source, __version__)))
 *             declarations.append('')
 */
    __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 803, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_INCREF(__pyx_n_u_source_hash);
    __Pyx_GIVEREF(__pyx_n_u_source_hash);
    PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_n_u_source_hash);
    __Pyx_GIVEREF(__pyx_t_19);
    PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_19);
    __pyx_t_19 = 0;
    __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_definitions, __pyx_t_12); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 803, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "DHParser/ebnf.py":805
 *             definitions.append(('source_hash__',
 *                                 '"%s"' % md5(self.grammar_source, __version__)))
 *             declarations.append('')             # <<<<<<<<<<<<<<
 *             if show_source:
 *                 declarations += [line for line in self.grammar_source.split('\n')]
 */
    __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_declarations, __pyx_kp_u__2); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 805, __pyx_L1_error)

    /* "DHParser/ebnf.py":806
 *                                 '"%s"' % md5(self.grammar_source, __version__)))
 *             declarations.append('')
 *             if show_source:             # <<<<<<<<<<<<<<
 *                 declarations += [line for line in self.grammar_source.split('\n')]
 *             while declarations[-1].strip() == '':
 */
    __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_show_source); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 806, __pyx_L1_error)
    if (__pyx_t_15) {

      /* "DHParser/ebnf.py":807
 *             declarations.append('')
 *             if show_source:
 *                 declarations += [line for line in self.grammar_source.split('\n')]             # <<<<<<<<<<<<<<
 *             while declarations[-1].strip() == '':
 *                 declarations = declarations[:-1]
 */
      { /* enter inner scope */
        __pyx_t_12 = PyList_New(0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 807, __pyx_L76_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_grammar_source); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 807, __pyx_L76_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 807, __pyx_L76_error)
        __Pyx_GOTREF(__pyx_t_21);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_21))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_21);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_21);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_21, function);
          }
        }
        __pyx_t_19 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_21, __pyx_t_2, __pyx_kp_u__7) : __Pyx_PyObject_CallOneArg(__pyx_t_21, __pyx_kp_u__7);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 807, __pyx_L76_error)
        __Pyx_GOTREF(__pyx_t_19);
        __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
        if (likely(PyList_CheckExact(__pyx_t_19)) || PyTuple_CheckExact(__pyx_t_19)) {
          __pyx_t_21 = __pyx_t_19; __Pyx_INCREF(__pyx_t_21); __pyx_t_8 = 0;
          __pyx_t_4 = NULL;
        } else {
          __pyx_t_8 = -1; __pyx_t_21 = PyObject_GetIter(__pyx_t_19); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 807, __pyx_L76_error)
          __Pyx_GOTREF(__pyx_t_21);
          __pyx_t_4 = Py_TYPE(__pyx_t_21)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 807, __pyx_L76_error)
        }
        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
        for (;;) {
          if (likely(!__pyx_t_4)) {
            if (likely(PyList_CheckExact(__pyx_t_21))) {
              if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_21)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_19 = PyList_GET_ITEM(__pyx_t_21, __pyx_t_8); __Pyx_INCREF(__pyx_t_19); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 807, __pyx_L76_error)
              #else
              __pyx_t_19 = PySequence_ITEM(__pyx_t_21, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 807, __pyx_L76_error)
              __Pyx_GOTREF(__pyx_t_19);
              #endif
            } else {
              if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_21)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_19 = PyTuple_GET_ITEM(__pyx_t_21, __pyx_t_8); __Pyx_INCREF(__pyx_t_19); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 807, __pyx_L76_error)
              #else
              __pyx_t_19 = PySequence_ITEM(__pyx_t_21, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 807, __pyx_L76_error)
              __Pyx_GOTREF(__pyx_t_19);
              #endif
            }
          } else {
            __pyx_t_19 = __pyx_t_4(__pyx_t_21);
            if (unlikely(!__pyx_t_19)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(0, 807, __pyx_L76_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_19);
          }
          __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_line, __pyx_t_19);
          __pyx_t_19 = 0;
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_12, (PyObject*)__pyx_7genexpr__pyx_v_line))) __PYX_ERR(0, 807, __pyx_L76_error)
        }
        __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
        __Pyx_XDECREF(__pyx_7genexpr__pyx_v_line); __pyx_7genexpr__pyx_v_line = 0;
        goto __pyx_L79_exit_scope;
        __pyx_L76_error:;
        __Pyx_XDECREF(__pyx_7genexpr__pyx_v_line); __pyx_7genexpr__pyx_v_line = 0;
        goto __pyx_L1_error;
        __pyx_L79_exit_scope:;
      } /* exit inner scope */
      __pyx_t_21 = PyNumber_InPlaceAdd(__pyx_v_declarations, __pyx_t_12); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 807, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_21);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF_SET(__pyx_v_declarations, ((PyObject*)__pyx_t_21));
      __pyx_t_21 = 0;

      /* "DHParser/ebnf.py":806
 *                                 '"%s"' % md5(self.grammar_source, __version__)))
 *             declarations.append('')
 *             if show_source:             # <<<<<<<<<<<<<<
 *                 declarations += [line for line in self.grammar_source.split('\n')]
 *             while declarations[-1].strip() == '':
 */
    }

    /* "DHParser/ebnf.py":808
 *             if show_source:
 *                 declarations += [line for line in self.grammar_source.split('\n')]
 *             while declarations[-1].strip() == '':             # <<<<<<<<<<<<<<
 *                 declarations = declarations[:-1]
 *         declarations.append('"""')
 */
    while (1) {
      __pyx_t_12 = __Pyx_GetItemInt_List(__pyx_v_declarations, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 808, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_strip); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 808, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_12 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_19))) {
        __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_19);
        if (likely(__pyx_t_12)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_19);
          __Pyx_INCREF(__pyx_t_12);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_19, function);
        }
      }
      __pyx_t_21 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_19, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_19);
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 808, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_21);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __pyx_t_15 = (__Pyx_PyUnicode_Equals(__pyx_t_21, __pyx_kp_u__2, Py_EQ)); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 808, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
      if (!__pyx_t_15) break;

      /* "DHParser/ebnf.py":809
 *                 declarations += [line for line in self.grammar_source.split('\n')]
 *             while declarations[-1].strip() == '':
 *                 declarations = declarations[:-1]             # <<<<<<<<<<<<<<
 *         declarations.append('"""')
 * 
 */
      __pyx_t_21 = __Pyx_PyList_GetSlice(__pyx_v_declarations, 0, -1L); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 809, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_21);
      __Pyx_DECREF_SET(__pyx_v_declarations, ((PyObject*)__pyx_t_21));
      __pyx_t_21 = 0;
    }

    /* "DHParser/ebnf.py":802
 *                         + ('. Grammar:' if self.grammar_source and show_source else '.')]
 *         definitions.append(('parser_initialization__', '["upon instantiation"]'))
 *         if self.grammar_source:             # <<<<<<<<<<<<<<
 *             definitions.append(('source_hash__',
 *                                 '"%s"' % md5(self.grammar_source, __version__)))
 */
  }

  /* "DHParser/ebnf.py":810
 *             while declarations[-1].strip() == '':
 *                 declarations = declarations[:-1]
 *         declarations.append('"""')             # <<<<<<<<<<<<<<
 * 
 *         # turn definitions into declarations in reverse order
 */
  __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_declarations, __pyx_kp_u__27); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 810, __pyx_L1_error)

  /* "DHParser/ebnf.py":814
 *         # turn definitions into declarations in reverse order
 * 
 *         self.root_symbol = definitions[0][0] if definitions else ""             # <<<<<<<<<<<<<<
 *         definitions.reverse()
 *         declarations += [symbol + ' = Forward()'
 */
  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_definitions); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 814, __pyx_L1_error)
  if (__pyx_t_15) {
    __pyx_t_19 = __Pyx_GetItemInt(__pyx_v_definitions, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 814, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_19, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 814, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    __pyx_t_21 = __pyx_t_12;
    __pyx_t_12 = 0;
  } else {
    __Pyx_INCREF(__pyx_kp_u__2);
    __pyx_t_21 = __pyx_kp_u__2;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_root_symbol, __pyx_t_21) < 0) __PYX_ERR(0, 814, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "DHParser/ebnf.py":815
 * 
 *         self.root_symbol = definitions[0][0] if definitions else ""
 *         definitions.reverse()             # <<<<<<<<<<<<<<
 *         declarations += [symbol + ' = Forward()'
 *                          for symbol in sorted(list(self.recursive))]
 */
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_definitions, __pyx_n_s_reverse); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_19 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
    __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_12);
    if (likely(__pyx_t_19)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_19);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_12, function);
    }
  }
  __pyx_t_21 = (__pyx_t_19) ? __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_19) : __Pyx_PyObject_CallNoArg(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "DHParser/ebnf.py":816
 *         self.root_symbol = definitions[0][0] if definitions else ""
 *         definitions.reverse()
 *         declarations += [symbol + ' = Forward()'             # <<<<<<<<<<<<<<
 *                          for symbol in sorted(list(self.recursive))]
 *         for symbol, statement in definitions:
 */
  { /* enter inner scope */
    __pyx_t_21 = PyList_New(0); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 816, __pyx_L84_error)
    __Pyx_GOTREF(__pyx_t_21);

    /* "DHParser/ebnf.py":817
 *         definitions.reverse()
 *         declarations += [symbol + ' = Forward()'
 *                          for symbol in sorted(list(self.recursive))]             # <<<<<<<<<<<<<<
 *         for symbol, statement in definitions:
 *             if symbol in self.recursive:
 */
    __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_recursive); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 817, __pyx_L84_error)
    __Pyx_GOTREF(__pyx_t_19);
    __pyx_t_2 = PySequence_List(__pyx_t_19); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 817, __pyx_L84_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    __pyx_t_19 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 817, __pyx_L84_error)
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_12 = ((PyObject*)__pyx_t_19);
    __pyx_t_19 = 0;
    __pyx_t_11 = PyList_Sort(__pyx_t_12); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 817, __pyx_L84_error)
    if (unlikely(__pyx_t_12 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 817, __pyx_L84_error)
    }
    __pyx_t_19 = __pyx_t_12; __Pyx_INCREF(__pyx_t_19); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    for (;;) {
      if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_19)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_12 = PyList_GET_ITEM(__pyx_t_19, __pyx_t_8); __Pyx_INCREF(__pyx_t_12); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 817, __pyx_L84_error)
      #else
      __pyx_t_12 = PySequence_ITEM(__pyx_t_19, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 817, __pyx_L84_error)
      __Pyx_GOTREF(__pyx_t_12);
      #endif
      __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_symbol, __pyx_t_12);
      __pyx_t_12 = 0;

      /* "DHParser/ebnf.py":816
 *         self.root_symbol = definitions[0][0] if definitions else ""
 *         definitions.reverse()
 *         declarations += [symbol + ' = Forward()'             # <<<<<<<<<<<<<<
 *                          for symbol in sorted(list(self.recursive))]
 *         for symbol, statement in definitions:
 */
      __pyx_t_12 = PyNumber_Add(__pyx_8genexpr1__pyx_v_symbol, __pyx_kp_u_Forward); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 816, __pyx_L84_error)
      __Pyx_GOTREF(__pyx_t_12);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_21, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 816, __pyx_L84_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

      /* "DHParser/ebnf.py":817
 *         definitions.reverse()
 *         declarations += [symbol + ' = Forward()'
 *                          for symbol in sorted(list(self.recursive))]             # <<<<<<<<<<<<<<
 *         for symbol, statement in definitions:
 *             if symbol in self.recursive:
 */
    }
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_symbol); __pyx_8genexpr1__pyx_v_symbol = 0;
    goto __pyx_L87_exit_scope;
    __pyx_L84_error:;
    __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_symbol); __pyx_8genexpr1__pyx_v_symbol = 0;
    goto __pyx_L1_error;
    __pyx_L87_exit_scope:;
  } /* exit inner scope */

  /* "DHParser/ebnf.py":816
 *         self.root_symbol = definitions[0][0] if definitions else ""
 *         definitions.reverse()
 *         declarations += [symbol + ' = Forward()'             # <<<<<<<<<<<<<<
 *                          for symbol in sorted(list(self.recursive))]
 *         for symbol, statement in definitions:
 */
  __pyx_t_19 = PyNumber_InPlaceAdd(__pyx_v_declarations, __pyx_t_21); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  __Pyx_DECREF_SET(__pyx_v_declarations, ((PyObject*)__pyx_t_19));
  __pyx_t_19 = 0;

  /* "DHParser/ebnf.py":818
 *         declarations += [symbol + ' = Forward()'
 *                          for symbol in sorted(list(self.recursive))]
 *         for symbol, statement in definitions:             # <<<<<<<<<<<<<<
 *             if symbol in self.recursive:
 *                 declarations += [symbol + '.set(' + statement + ')']
 */
  if (likely(PyList_CheckExact(__pyx_v_definitions)) || PyTuple_CheckExact(__pyx_v_definitions)) {
    __pyx_t_19 = __pyx_v_definitions; __Pyx_INCREF(__pyx_t_19); __pyx_t_8 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_8 = -1; __pyx_t_19 = PyObject_GetIter(__pyx_v_definitions); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 818, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __pyx_t_4 = Py_TYPE(__pyx_t_19)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 818, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_19))) {
        if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_19)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_21 = PyList_GET_ITEM(__pyx_t_19, __pyx_t_8); __Pyx_INCREF(__pyx_t_21); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 818, __pyx_L1_error)
        #else
        __pyx_t_21 = PySequence_ITEM(__pyx_t_19, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 818, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_21);
        #endif
      } else {
        if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_19)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_21 = PyTuple_GET_ITEM(__pyx_t_19, __pyx_t_8); __Pyx_INCREF(__pyx_t_21); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 818, __pyx_L1_error)
        #else
        __pyx_t_21 = PySequence_ITEM(__pyx_t_19, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 818, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_21);
        #endif
      }
    } else {
      __pyx_t_21 = __pyx_t_4(__pyx_t_19);
      if (unlikely(!__pyx_t_21)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 818, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_21);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_21))) || (PyList_CheckExact(__pyx_t_21))) {
      PyObject* sequence = __pyx_t_21;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 818, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_12 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_12 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_2);
      #else
      __pyx_t_12 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 818, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 818, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_5 = PyObject_GetIter(__pyx_t_21); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 818, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
      __pyx_t_20 = Py_TYPE(__pyx_t_5)->tp_iternext;
      index = 0; __pyx_t_12 = __pyx_t_20(__pyx_t_5); if (unlikely(!__pyx_t_12)) goto __pyx_L90_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_12);
      index = 1; __pyx_t_2 = __pyx_t_20(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L90_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_5), 2) < 0) __PYX_ERR(0, 818, __pyx_L1_error)
      __pyx_t_20 = NULL;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L91_unpacking_done;
      __pyx_L90_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_20 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 818, __pyx_L1_error)
      __pyx_L91_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_symbol, __pyx_t_12);
    __pyx_t_12 = 0;
    __Pyx_XDECREF_SET(__pyx_v_statement, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "DHParser/ebnf.py":819
 *                          for symbol in sorted(list(self.recursive))]
 *         for symbol, statement in definitions:
 *             if symbol in self.recursive:             # <<<<<<<<<<<<<<
 *                 declarations += [symbol + '.set(' + statement + ')']
 *             else:
 */
    __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_recursive); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
    __pyx_t_15 = (__Pyx_PySequence_ContainsTF(__pyx_v_symbol, __pyx_t_21, Py_EQ)); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 819, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    __pyx_t_10 = (__pyx_t_15 != 0);
    if (__pyx_t_10) {

      /* "DHParser/ebnf.py":820
 *         for symbol, statement in definitions:
 *             if symbol in self.recursive:
 *                 declarations += [symbol + '.set(' + statement + ')']             # <<<<<<<<<<<<<<
 *             else:
 *                 declarations += [symbol + ' = ' + statement]
 */
      __pyx_t_21 = PyNumber_Add(__pyx_v_symbol, __pyx_kp_u_set); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 820, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_21);
      __pyx_t_2 = PyNumber_Add(__pyx_t_21, __pyx_v_statement); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 820, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
      __pyx_t_21 = PyNumber_Add(__pyx_t_2, __pyx_kp_u__15); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 820, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_21);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 820, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_21);
      PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_21);
      __pyx_t_21 = 0;
      __pyx_t_21 = PyNumber_InPlaceAdd(__pyx_v_declarations, __pyx_t_2); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 820, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_21);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_declarations, ((PyObject*)__pyx_t_21));
      __pyx_t_21 = 0;

      /* "DHParser/ebnf.py":819
 *                          for symbol in sorted(list(self.recursive))]
 *         for symbol, statement in definitions:
 *             if symbol in self.recursive:             # <<<<<<<<<<<<<<
 *                 declarations += [symbol + '.set(' + statement + ')']
 *             else:
 */
      goto __pyx_L92;
    }

    /* "DHParser/ebnf.py":822
 *                 declarations += [symbol + '.set(' + statement + ')']
 *             else:
 *                 declarations += [symbol + ' = ' + statement]             # <<<<<<<<<<<<<<
 * 
 *         # check for symbols used but never defined
 */
    /*else*/ {
      __pyx_t_21 = PyNumber_Add(__pyx_v_symbol, __pyx_kp_u__28); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 822, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_21);
      __pyx_t_2 = PyNumber_Add(__pyx_t_21, __pyx_v_statement); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 822, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
      __pyx_t_21 = PyList_New(1); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 822, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_21);
      __Pyx_GIVEREF(__pyx_t_2);
      PyList_SET_ITEM(__pyx_t_21, 0, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_declarations, __pyx_t_21); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 822, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
      __Pyx_DECREF_SET(__pyx_v_declarations, ((PyObject*)__pyx_t_2));
      __pyx_t_2 = 0;
    }
    __pyx_L92:;

    /* "DHParser/ebnf.py":818
 *         declarations += [symbol + ' = Forward()'
 *                          for symbol in sorted(list(self.recursive))]
 *         for symbol, statement in definitions:             # <<<<<<<<<<<<<<
 *             if symbol in self.recursive:
 *                 declarations += [symbol + '.set(' + statement + ')']
 */
  }
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "DHParser/ebnf.py":826
 *         # check for symbols used but never defined
 * 
 *         defined_symbols = set(self.rules.keys()) | self.RESERVED_SYMBOLS             # <<<<<<<<<<<<<<
 *         for symbol in self.symbols:
 *             if symbol not in defined_symbols:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_rules); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_keys); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_21))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_21);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_21);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_21, function);
    }
  }
  __pyx_t_19 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_21, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_21);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  __pyx_t_21 = PySet_New(__pyx_t_19); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_RESERVED_SYMBOLS); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_2 = PyNumber_Or(__pyx_t_21, __pyx_t_19); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_cur_scope->__pyx_v_defined_symbols = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":827
 * 
 *         defined_symbols = set(self.rules.keys()) | self.RESERVED_SYMBOLS
 *         for symbol in self.symbols:             # <<<<<<<<<<<<<<
 *             if symbol not in defined_symbols:
 *                 self.tree.new_error(self.symbols[symbol],
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_symbols); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_19 = __pyx_t_2; __Pyx_INCREF(__pyx_t_19); __pyx_t_8 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_8 = -1; __pyx_t_19 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 827, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __pyx_t_4 = Py_TYPE(__pyx_t_19)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 827, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_19))) {
        if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_19)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_19, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 827, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_19, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 827, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_19)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_19, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 827, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_19, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 827, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_19);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 827, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_symbol, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "DHParser/ebnf.py":828
 *         defined_symbols = set(self.rules.keys()) | self.RESERVED_SYMBOLS
 *         for symbol in self.symbols:
 *             if symbol not in defined_symbols:             # <<<<<<<<<<<<<<
 *                 self.tree.new_error(self.symbols[symbol],
 *                                     "Missing definition for symbol '%s'" % symbol)
 */
    __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_symbol, __pyx_cur_scope->__pyx_v_defined_symbols, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 828, __pyx_L1_error)
    __pyx_t_15 = (__pyx_t_10 != 0);
    if (__pyx_t_15) {

      /* "DHParser/ebnf.py":829
 *         for symbol in self.symbols:
 *             if symbol not in defined_symbols:
 *                 self.tree.new_error(self.symbols[symbol],             # <<<<<<<<<<<<<<
 *                                     "Missing definition for symbol '%s'" % symbol)
 *                 # root_node.error_flag = True
 */
      __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 829, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_21);
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_new_error); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 829, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
      __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_symbols); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 829, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_21);
      __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_21, __pyx_v_symbol); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 829, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

      /* "DHParser/ebnf.py":830
 *             if symbol not in defined_symbols:
 *                 self.tree.new_error(self.symbols[symbol],
 *                                     "Missing definition for symbol '%s'" % symbol)             # <<<<<<<<<<<<<<
 *                 # root_node.error_flag = True
 * 
 */
      __pyx_t_21 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Missing_definition_for_symbol_s, __pyx_v_symbol); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 830, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_21);
      __pyx_t_6 = NULL;
      __pyx_t_13 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_12);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_12, function);
          __pyx_t_13 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_12)) {
        PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_5, __pyx_t_21};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 829, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
        PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_5, __pyx_t_21};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 829, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
      } else
      #endif
      {
        __pyx_t_1 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 829, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (__pyx_t_6) {
          __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_13, __pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_21);
        PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_13, __pyx_t_21);
        __pyx_t_5 = 0;
        __pyx_t_21 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 829, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "DHParser/ebnf.py":828
 *         defined_symbols = set(self.rules.keys()) | self.RESERVED_SYMBOLS
 *         for symbol in self.symbols:
 *             if symbol not in defined_symbols:             # <<<<<<<<<<<<<<
 *                 self.tree.new_error(self.symbols[symbol],
 *                                     "Missing definition for symbol '%s'" % symbol)
 */
    }

    /* "DHParser/ebnf.py":827
 * 
 *         defined_symbols = set(self.rules.keys()) | self.RESERVED_SYMBOLS
 *         for symbol in self.symbols:             # <<<<<<<<<<<<<<
 *             if symbol not in defined_symbols:
 *                 self.tree.new_error(self.symbols[symbol],
 */
  }
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "DHParser/ebnf.py":835
 *         # check for unconnected rules
 * 
 *         defined_symbols.difference_update(self.RESERVED_SYMBOLS)             # <<<<<<<<<<<<<<
 * 
 *         def remove_connections(symbol):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_defined_symbols, __pyx_n_s_difference_update); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_RESERVED_SYMBOLS); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_19 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "DHParser/ebnf.py":837
 *         defined_symbols.difference_update(self.RESERVED_SYMBOLS)
 * 
 *         def remove_connections(symbol):             # <<<<<<<<<<<<<<
 *             """Recursively removes all symbols which appear in the
 *             definiens of a particular symbol."""
 */
  __pyx_t_19 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_15assemble_parser_1remove_connections, 0, __pyx_n_s_EBNFCompiler_assemble_parser_loc, ((PyObject*)__pyx_cur_scope), __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_GIVEREF(__pyx_t_19);
  __pyx_cur_scope->__pyx_v_remove_connections = __pyx_t_19;
  __pyx_t_19 = 0;

  /* "DHParser/ebnf.py":845
 *                     remove_connections(str(related))
 * 
 *         remove_connections(self.root_symbol)             # <<<<<<<<<<<<<<
 *         for leftover in defined_symbols:
 *             self.tree.new_error(self.rules[leftover][0],
 */
  __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_root_symbol); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_2 = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_15assemble_parser_remove_connections(__pyx_cur_scope->__pyx_v_remove_connections, __pyx_t_19); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":846
 * 
 *         remove_connections(self.root_symbol)
 *         for leftover in defined_symbols:             # <<<<<<<<<<<<<<
 *             self.tree.new_error(self.rules[leftover][0],
 *                                 ('Rule "%s" is not connected to parser root "%s" !') %
 */
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_defined_symbols)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_defined_symbols)) {
    __pyx_t_2 = __pyx_cur_scope->__pyx_v_defined_symbols; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_defined_symbols); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 846, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 846, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_19 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_19); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 846, __pyx_L1_error)
        #else
        __pyx_t_19 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 846, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_19);
        #endif
      } else {
        if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_19 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_19); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 846, __pyx_L1_error)
        #else
        __pyx_t_19 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 846, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_19);
        #endif
      }
    } else {
      __pyx_t_19 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_19)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 846, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_19);
    }
    __Pyx_XDECREF_SET(__pyx_v_leftover, __pyx_t_19);
    __pyx_t_19 = 0;

    /* "DHParser/ebnf.py":847
 *         remove_connections(self.root_symbol)
 *         for leftover in defined_symbols:
 *             self.tree.new_error(self.rules[leftover][0],             # <<<<<<<<<<<<<<
 *                                 ('Rule "%s" is not connected to parser root "%s" !') %
 *                                 (leftover, self.root_symbol), Error.WARNING)
 */
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 847, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_new_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 847, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_rules); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 847, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_21 = __Pyx_PyObject_GetItem(__pyx_t_12, __pyx_v_leftover); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 847, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_21, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 847, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

    /* "DHParser/ebnf.py":848
 *         for leftover in defined_symbols:
 *             self.tree.new_error(self.rules[leftover][0],
 *                                 ('Rule "%s" is not connected to parser root "%s" !') %             # <<<<<<<<<<<<<<
 *                                 (leftover, self.root_symbol), Error.WARNING)
 * 
 */
    __pyx_t_21 = PyTuple_New(5); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 848, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
    __pyx_t_3 = 0;
    __pyx_t_22 = 127;
    __Pyx_INCREF(__pyx_kp_u_Rule);
    __pyx_t_3 += 6;
    __Pyx_GIVEREF(__pyx_kp_u_Rule);
    PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_kp_u_Rule);

    /* "DHParser/ebnf.py":849
 *             self.tree.new_error(self.rules[leftover][0],
 *                                 ('Rule "%s" is not connected to parser root "%s" !') %
 *                                 (leftover, self.root_symbol), Error.WARNING)             # <<<<<<<<<<<<<<
 * 
 *         # set root_symbol parser and assemble python grammar definition
 */
    __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_leftover), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_22 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_22) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_22;
    __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_21, 1, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_kp_u_is_not_connected_to_parser_root);
    __pyx_t_3 += 35;
    __Pyx_GIVEREF(__pyx_kp_u_is_not_connected_to_parser_root);
    PyTuple_SET_ITEM(__pyx_t_21, 2, __pyx_kp_u_is_not_connected_to_parser_root);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_root_symbol); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_22 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_22) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_22;
    __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_21, 3, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_kp_u__31);
    __pyx_t_3 += 3;
    __Pyx_GIVEREF(__pyx_kp_u__31);
    PyTuple_SET_ITEM(__pyx_t_21, 4, __pyx_kp_u__31);

    /* "DHParser/ebnf.py":848
 *         for leftover in defined_symbols:
 *             self.tree.new_error(self.rules[leftover][0],
 *                                 ('Rule "%s" is not connected to parser root "%s" !') %             # <<<<<<<<<<<<<<
 *                                 (leftover, self.root_symbol), Error.WARNING)
 * 
 */
    __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_21, 5, __pyx_t_3, __pyx_t_22); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 848, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

    /* "DHParser/ebnf.py":849
 *             self.tree.new_error(self.rules[leftover][0],
 *                                 ('Rule "%s" is not connected to parser root "%s" !') %
 *                                 (leftover, self.root_symbol), Error.WARNING)             # <<<<<<<<<<<<<<
 * 
 *         # set root_symbol parser and assemble python grammar definition
 */
    __Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_n_s_Error); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_WARNING); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    __pyx_t_21 = NULL;
    __pyx_t_13 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_21 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_21)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_21);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_13 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[4] = {__pyx_t_21, __pyx_t_12, __pyx_t_6, __pyx_t_5};
      __pyx_t_19 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 847, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[4] = {__pyx_t_21, __pyx_t_12, __pyx_t_6, __pyx_t_5};
      __pyx_t_19 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 847, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_23 = PyTuple_New(3+__pyx_t_13); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 847, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_23);
      if (__pyx_t_21) {
        __Pyx_GIVEREF(__pyx_t_21); PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_t_21); __pyx_t_21 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_12);
      PyTuple_SET_ITEM(__pyx_t_23, 0+__pyx_t_13, __pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_23, 1+__pyx_t_13, __pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_23, 2+__pyx_t_13, __pyx_t_5);
      __pyx_t_12 = 0;
      __pyx_t_6 = 0;
      __pyx_t_5 = 0;
      __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_23, NULL); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 847, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

    /* "DHParser/ebnf.py":846
 * 
 *         remove_connections(self.root_symbol)
 *         for leftover in defined_symbols:             # <<<<<<<<<<<<<<
 *             self.tree.new_error(self.rules[leftover][0],
 *                                 ('Rule "%s" is not connected to parser root "%s" !') %
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":853
 *         # set root_symbol parser and assemble python grammar definition
 * 
 *         if self.root_symbol and 'root__' not in self.rules:             # <<<<<<<<<<<<<<
 *             declarations.append('root__ = ' + self.root_symbol)
 *         declarations.append('')
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_root_symbol); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 853, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_10) {
  } else {
    __pyx_t_15 = __pyx_t_10;
    goto __pyx_L99_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_rules); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_root, __pyx_t_2, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 853, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = (__pyx_t_10 != 0);
  __pyx_t_15 = __pyx_t_7;
  __pyx_L99_bool_binop_done:;
  if (__pyx_t_15) {

    /* "DHParser/ebnf.py":854
 * 
 *         if self.root_symbol and 'root__' not in self.rules:
 *             declarations.append('root__ = ' + self.root_symbol)             # <<<<<<<<<<<<<<
 *         declarations.append('')
 *         self._result = '\n    '.join(declarations) \
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_root_symbol); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_19 = PyNumber_Add(__pyx_kp_u_root_2, __pyx_t_2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_declarations, __pyx_t_19); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 854, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

    /* "DHParser/ebnf.py":853
 *         # set root_symbol parser and assemble python grammar definition
 * 
 *         if self.root_symbol and 'root__' not in self.rules:             # <<<<<<<<<<<<<<
 *             declarations.append('root__ = ' + self.root_symbol)
 *         declarations.append('')
 */
  }

  /* "DHParser/ebnf.py":855
 *         if self.root_symbol and 'root__' not in self.rules:
 *             declarations.append('root__ = ' + self.root_symbol)
 *         declarations.append('')             # <<<<<<<<<<<<<<
 *         self._result = '\n    '.join(declarations) \
 *                        + GRAMMAR_FACTORY.format(NAME=self.grammar_name, ID=self.grammar_id)
 */
  __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_declarations, __pyx_kp_u__2); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 855, __pyx_L1_error)

  /* "DHParser/ebnf.py":856
 *             declarations.append('root__ = ' + self.root_symbol)
 *         declarations.append('')
 *         self._result = '\n    '.join(declarations) \             # <<<<<<<<<<<<<<
 *                        + GRAMMAR_FACTORY.format(NAME=self.grammar_name, ID=self.grammar_id)
 *         return self._result
 */
  __pyx_t_19 = PyUnicode_Join(__pyx_kp_u__32, __pyx_v_declarations); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);

  /* "DHParser/ebnf.py":857
 *         declarations.append('')
 *         self._result = '\n    '.join(declarations) \
 *                        + GRAMMAR_FACTORY.format(NAME=self.grammar_name, ID=self.grammar_id)             # <<<<<<<<<<<<<<
 *         return self._result
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GRAMMAR_FACTORY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_grammar_name); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_23);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_NAME, __pyx_t_23) < 0) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
  __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_grammar_id); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_23);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ID, __pyx_t_23) < 0) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
  __pyx_t_23 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_23);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Add(__pyx_t_19, __pyx_t_23); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;

  /* "DHParser/ebnf.py":856
 *             declarations.append('root__ = ' + self.root_symbol)
 *         declarations.append('')
 *         self._result = '\n    '.join(declarations) \             # <<<<<<<<<<<<<<
 *                        + GRAMMAR_FACTORY.format(NAME=self.grammar_name, ID=self.grammar_id)
 *         return self._result
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_result, __pyx_t_2) < 0) __PYX_ERR(0, 856, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":858
 *         self._result = '\n    '.join(declarations) \
 *                        + GRAMMAR_FACTORY.format(NAME=self.grammar_name, ID=self.grammar_id)
 *         return self._result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 858, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":692
 * 
 * 
 *     def assemble_parser(self, definitions: List[Tuple[str, str]], root_node: Node) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Creates the Python code for the parser after compilation of
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_XDECREF(__pyx_t_23);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.assemble_parser", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_task);
  __Pyx_XDECREF(__pyx_v_resume_rules);
  __Pyx_XDECREF(__pyx_v_symbol);
  __Pyx_XDECREF(__pyx_v_raw_rules);
  __Pyx_XDECREF(__pyx_v_refined_rules);
  __Pyx_XDECREF(__pyx_v_rule);
  __Pyx_XDECREF(__pyx_v_nd);
  __Pyx_XDECREF(__pyx_v_refined);
  __Pyx_XDECREF(__pyx_v_err_msgs);
  __Pyx_XDECREF(__pyx_v_custom_errors);
  __Pyx_XDECREF(__pyx_v_search);
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XDECREF(__pyx_v_def_node);
  __Pyx_XDECREF(__pyx_v_skip);
  __Pyx_XDECREF(__pyx_v_skip_rules);
  __Pyx_XDECREF(__pyx_v_article);
  __Pyx_XDECREF(__pyx_v_show_source);
  __Pyx_XDECREF(__pyx_v_declarations);
  __Pyx_XDECREF(__pyx_v_statement);
  __Pyx_XDECREF(__pyx_v_leftover);
  __Pyx_XDECREF(__pyx_7genexpr__pyx_v_line);
  __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_symbol);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":863
 *     ## compilation methods
 * 
 *     def on_syntax(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         definitions = []  # type: List[Tuple[str, str]]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_29on_syntax(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_29on_syntax = {"on_syntax", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_29on_syntax, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_29on_syntax(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_node = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_syntax (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_syntax", 1, 2, 2, 1); __PYX_ERR(0, 863, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_syntax") < 0)) __PYX_ERR(0, 863, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_node = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("on_syntax", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 863, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_syntax", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_28on_syntax(__pyx_self, __pyx_v_self, __pyx_v_node);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_28on_syntax(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node) {
  PyObject *__pyx_v_definitions = NULL;
  PyObject *__pyx_v_nd = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  __Pyx_RefNannySetupContext("on_syntax", 0);
  __Pyx_INCREF(__pyx_v_node);

  /* "DHParser/ebnf.py":864
 * 
 *     def on_syntax(self, node: Node) -> str:
 *         definitions = []  # type: List[Tuple[str, str]]             # <<<<<<<<<<<<<<
 * 
 *         # drop the wrapping sequence node
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_definitions = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":867
 * 
 *         # drop the wrapping sequence node
 *         if len(node.children) == 1 and node.children[0].is_anonymous():             # <<<<<<<<<<<<<<
 *             node = node.children[0]
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 867, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = ((__pyx_t_3 == 1) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_is_anonymous); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 867, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "DHParser/ebnf.py":868
 *         # drop the wrapping sequence node
 *         if len(node.children) == 1 and node.children[0].is_anonymous():
 *             node = node.children[0]             # <<<<<<<<<<<<<<
 * 
 *         # compile definitions and directives and collect definitions
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 868, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 868, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_node, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "DHParser/ebnf.py":867
 * 
 *         # drop the wrapping sequence node
 *         if len(node.children) == 1 and node.children[0].is_anonymous():             # <<<<<<<<<<<<<<
 *             node = node.children[0]
 * 
 */
  }

  /* "DHParser/ebnf.py":871
 * 
 *         # compile definitions and directives and collect definitions
 *         for nd in node.children:             # <<<<<<<<<<<<<<
 *             if nd.tag_name == "definition":
 *                 definitions.append(self.compile(nd))
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
    __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 871, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 871, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 871, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 871, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 871, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 871, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      }
    } else {
      __pyx_t_5 = __pyx_t_7(__pyx_t_1);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 871, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_nd, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "DHParser/ebnf.py":872
 *         # compile definitions and directives and collect definitions
 *         for nd in node.children:
 *             if nd.tag_name == "definition":             # <<<<<<<<<<<<<<
 *                 definitions.append(self.compile(nd))
 *             else:
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_nd, __pyx_n_s_tag_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 872, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_5, __pyx_n_u_definition, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 872, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_2) {

      /* "DHParser/ebnf.py":873
 *         for nd in node.children:
 *             if nd.tag_name == "definition":
 *                 definitions.append(self.compile(nd))             # <<<<<<<<<<<<<<
 *             else:
 *                 assert nd.tag_name == "directive", nd.as_sxpr()
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compile); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 873, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_v_nd) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_nd);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 873, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_definitions, __pyx_t_5); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 873, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "DHParser/ebnf.py":872
 *         # compile definitions and directives and collect definitions
 *         for nd in node.children:
 *             if nd.tag_name == "definition":             # <<<<<<<<<<<<<<
 *                 definitions.append(self.compile(nd))
 *             else:
 */
      goto __pyx_L8;
    }

    /* "DHParser/ebnf.py":875
 *                 definitions.append(self.compile(nd))
 *             else:
 *                 assert nd.tag_name == "directive", nd.as_sxpr()             # <<<<<<<<<<<<<<
 *                 self.compile(nd)
 *             # node.error_flag = max(node.error_flag, nd.error_flag)
 */
    /*else*/ {
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(!Py_OptimizeFlag)) {
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_nd, __pyx_n_s_tag_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 875, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_5, __pyx_n_u_directive, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 875, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_2)) {
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_nd, __pyx_n_s_as_sxpr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 875, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_8 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
            if (likely(__pyx_t_8)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_6, function);
            }
          }
          __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 875, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = PyTuple_Pack(1, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 875, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          PyErr_SetObject(PyExc_AssertionError, __pyx_t_6);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __PYX_ERR(0, 875, __pyx_L1_error)
        }
      }
      #endif

      /* "DHParser/ebnf.py":876
 *             else:
 *                 assert nd.tag_name == "directive", nd.as_sxpr()
 *                 self.compile(nd)             # <<<<<<<<<<<<<<
 *             # node.error_flag = max(node.error_flag, nd.error_flag)
 *         self.definitions.update(definitions)
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compile); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 876, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_v_nd) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_nd);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 876, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_L8:;

    /* "DHParser/ebnf.py":871
 * 
 *         # compile definitions and directives and collect definitions
 *         for nd in node.children:             # <<<<<<<<<<<<<<
 *             if nd.tag_name == "definition":
 *                 definitions.append(self.compile(nd))
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":878
 *                 self.compile(nd)
 *             # node.error_flag = max(node.error_flag, nd.error_flag)
 *         self.definitions.update(definitions)             # <<<<<<<<<<<<<<
 * 
 *         return self.assemble_parser(definitions, node)
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_definitions); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_definitions) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_definitions);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":880
 *         self.definitions.update(definitions)
 * 
 *         return self.assemble_parser(definitions, node)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_assemble_parser); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_10 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_10 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_definitions, __pyx_v_node};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 880, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_definitions, __pyx_v_node};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 880, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 880, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_v_definitions);
    __Pyx_GIVEREF(__pyx_v_definitions);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_10, __pyx_v_definitions);
    __Pyx_INCREF(__pyx_v_node);
    __Pyx_GIVEREF(__pyx_v_node);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_10, __pyx_v_node);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 880, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 880, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":863
 *     ## compilation methods
 * 
 *     def on_syntax(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         definitions = []  # type: List[Tuple[str, str]]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_syntax", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_definitions);
  __Pyx_XDECREF(__pyx_v_nd);
  __Pyx_XDECREF(__pyx_v_node);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":883
 * 
 * 
 *     def on_definition(self, node: Node) -> Tuple[str, str]:             # <<<<<<<<<<<<<<
 *         rule = node.children[0].content
 *         if rule in self.rules:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_31on_definition(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_31on_definition = {"on_definition", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_31on_definition, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_31on_definition(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_node = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_definition (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_definition", 1, 2, 2, 1); __PYX_ERR(0, 883, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_definition") < 0)) __PYX_ERR(0, 883, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_node = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("on_definition", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 883, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_definition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_30on_definition(__pyx_self, __pyx_v_self, __pyx_v_node);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_30on_definition(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node) {
  PyObject *__pyx_v_rule = NULL;
  PyObject *__pyx_v_first = NULL;
  PyObject *__pyx_v_defn = NULL;
  PyObject *__pyx_v_error = NULL;
  PyObject *__pyx_v_extract_tb = NULL;
  PyObject *__pyx_v_trace = NULL;
  PyObject *__pyx_v_errmsg = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  Py_ssize_t __pyx_t_14;
  Py_UCS4 __pyx_t_15;
  int __pyx_t_16;
  char const *__pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  __Pyx_RefNannySetupContext("on_definition", 0);

  /* "DHParser/ebnf.py":884
 * 
 *     def on_definition(self, node: Node) -> Tuple[str, str]:
 *         rule = node.children[0].content             # <<<<<<<<<<<<<<
 *         if rule in self.rules:
 *             first = self.rules[rule][0]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_content); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_rule = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":885
 *     def on_definition(self, node: Node) -> Tuple[str, str]:
 *         rule = node.children[0].content
 *         if rule in self.rules:             # <<<<<<<<<<<<<<
 *             first = self.rules[rule][0]
 *             if not first.errors:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rules); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_rule, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 885, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "DHParser/ebnf.py":886
 *         rule = node.children[0].content
 *         if rule in self.rules:
 *             first = self.rules[rule][0]             # <<<<<<<<<<<<<<
 *             if not first.errors:
 *                 self.tree.new_error(first, 'First definition of rule "%s" '
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rules); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_rule); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 886, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_first = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "DHParser/ebnf.py":887
 *         if rule in self.rules:
 *             first = self.rules[rule][0]
 *             if not first.errors:             # <<<<<<<<<<<<<<
 *                 self.tree.new_error(first, 'First definition of rule "%s" '
 *                                     'followed by illegal redefinitions.' % rule)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_errors); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 887, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = ((!__pyx_t_4) != 0);
    if (__pyx_t_3) {

      /* "DHParser/ebnf.py":888
 *             first = self.rules[rule][0]
 *             if not first.errors:
 *                 self.tree.new_error(first, 'First definition of rule "%s" '             # <<<<<<<<<<<<<<
 *                                     'followed by illegal redefinitions.' % rule)
 *             self.tree.new_error(node, 'A rule "%s" has already been defined earlier.' % rule)
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 888, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_new_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 888, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "DHParser/ebnf.py":889
 *             if not first.errors:
 *                 self.tree.new_error(first, 'First definition of rule "%s" '
 *                                     'followed by illegal redefinitions.' % rule)             # <<<<<<<<<<<<<<
 *             self.tree.new_error(node, 'A rule "%s" has already been defined earlier.' % rule)
 *         elif rule in EBNFCompiler.RESERVED_SYMBOLS:
 */
      __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_First_definition_of_rule_s_follo, __pyx_v_rule); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_7 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_first, __pyx_t_2};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 888, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_first, __pyx_t_2};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 888, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 888, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (__pyx_t_6) {
          __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
        }
        __Pyx_INCREF(__pyx_v_first);
        __Pyx_GIVEREF(__pyx_v_first);
        PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_first);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 888, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "DHParser/ebnf.py":887
 *         if rule in self.rules:
 *             first = self.rules[rule][0]
 *             if not first.errors:             # <<<<<<<<<<<<<<
 *                 self.tree.new_error(first, 'First definition of rule "%s" '
 *                                     'followed by illegal redefinitions.' % rule)
 */
    }

    /* "DHParser/ebnf.py":890
 *                 self.tree.new_error(first, 'First definition of rule "%s" '
 *                                     'followed by illegal redefinitions.' % rule)
 *             self.tree.new_error(node, 'A rule "%s" has already been defined earlier.' % rule)             # <<<<<<<<<<<<<<
 *         elif rule in EBNFCompiler.RESERVED_SYMBOLS:
 *             self.tree.new_error(node, 'Symbol "%s" is a reserved symbol.' % rule)
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 890, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_new_error); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 890, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_A_rule_s_has_already_been_define, __pyx_v_rule); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 890, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_node, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 890, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_node, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 890, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 890, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_2) {
        __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
      }
      __Pyx_INCREF(__pyx_v_node);
      __Pyx_GIVEREF(__pyx_v_node);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_v_node);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 890, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "DHParser/ebnf.py":885
 *     def on_definition(self, node: Node) -> Tuple[str, str]:
 *         rule = node.children[0].content
 *         if rule in self.rules:             # <<<<<<<<<<<<<<
 *             first = self.rules[rule][0]
 *             if not first.errors:
 */
    goto __pyx_L3;
  }

  /* "DHParser/ebnf.py":891
 *                                     'followed by illegal redefinitions.' % rule)
 *             self.tree.new_error(node, 'A rule "%s" has already been defined earlier.' % rule)
 *         elif rule in EBNFCompiler.RESERVED_SYMBOLS:             # <<<<<<<<<<<<<<
 *             self.tree.new_error(node, 'Symbol "%s" is a reserved symbol.' % rule)
 *         elif not sane_parser_name(rule):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_EBNFCompiler); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_RESERVED_SYMBOLS); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_rule, __pyx_t_8, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 891, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "DHParser/ebnf.py":892
 *             self.tree.new_error(node, 'A rule "%s" has already been defined earlier.' % rule)
 *         elif rule in EBNFCompiler.RESERVED_SYMBOLS:
 *             self.tree.new_error(node, 'Symbol "%s" is a reserved symbol.' % rule)             # <<<<<<<<<<<<<<
 *         elif not sane_parser_name(rule):
 *             self.tree.new_error(node, 'Illegal symbol "%s". Symbols must not start or '
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_new_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Symbol_s_is_a_reserved_symbol, __pyx_v_rule); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_node, __pyx_t_1};
      __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 892, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_node, __pyx_t_1};
      __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 892, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else
    #endif
    {
      __pyx_t_2 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 892, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_v_node);
      __Pyx_GIVEREF(__pyx_v_node);
      PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_7, __pyx_v_node);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_7, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 892, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "DHParser/ebnf.py":891
 *                                     'followed by illegal redefinitions.' % rule)
 *             self.tree.new_error(node, 'A rule "%s" has already been defined earlier.' % rule)
 *         elif rule in EBNFCompiler.RESERVED_SYMBOLS:             # <<<<<<<<<<<<<<
 *             self.tree.new_error(node, 'Symbol "%s" is a reserved symbol.' % rule)
 *         elif not sane_parser_name(rule):
 */
    goto __pyx_L3;
  }

  /* "DHParser/ebnf.py":893
 *         elif rule in EBNFCompiler.RESERVED_SYMBOLS:
 *             self.tree.new_error(node, 'Symbol "%s" is a reserved symbol.' % rule)
 *         elif not sane_parser_name(rule):             # <<<<<<<<<<<<<<
 *             self.tree.new_error(node, 'Illegal symbol "%s". Symbols must not start or '
 *                                 ' end with a doube underscore "__".' % rule)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_sane_parser_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_8 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_2, __pyx_v_rule) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_rule);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 893, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_3 = ((!__pyx_t_4) != 0);
  if (__pyx_t_3) {

    /* "DHParser/ebnf.py":894
 *             self.tree.new_error(node, 'Symbol "%s" is a reserved symbol.' % rule)
 *         elif not sane_parser_name(rule):
 *             self.tree.new_error(node, 'Illegal symbol "%s". Symbols must not start or '             # <<<<<<<<<<<<<<
 *                                 ' end with a doube underscore "__".' % rule)
 *         elif rule in self.directives.tokens:
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_new_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "DHParser/ebnf.py":895
 *         elif not sane_parser_name(rule):
 *             self.tree.new_error(node, 'Illegal symbol "%s". Symbols must not start or '
 *                                 ' end with a doube underscore "__".' % rule)             # <<<<<<<<<<<<<<
 *         elif rule in self.directives.tokens:
 *             self.tree.new_error(node, 'Symbol "%s" has already been defined as '
 */
    __pyx_t_6 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Illegal_symbol_s_Symbols_must_no, __pyx_v_rule); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 895, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_node, __pyx_t_6};
      __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 894, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_node, __pyx_t_6};
      __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 894, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 894, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__pyx_t_1) {
        __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = NULL;
      }
      __Pyx_INCREF(__pyx_v_node);
      __Pyx_GIVEREF(__pyx_v_node);
      PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_v_node);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 894, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "DHParser/ebnf.py":893
 *         elif rule in EBNFCompiler.RESERVED_SYMBOLS:
 *             self.tree.new_error(node, 'Symbol "%s" is a reserved symbol.' % rule)
 *         elif not sane_parser_name(rule):             # <<<<<<<<<<<<<<
 *             self.tree.new_error(node, 'Illegal symbol "%s". Symbols must not start or '
 *                                 ' end with a doube underscore "__".' % rule)
 */
    goto __pyx_L3;
  }

  /* "DHParser/ebnf.py":896
 *             self.tree.new_error(node, 'Illegal symbol "%s". Symbols must not start or '
 *                                 ' end with a doube underscore "__".' % rule)
 *         elif rule in self.directives.tokens:             # <<<<<<<<<<<<<<
 *             self.tree.new_error(node, 'Symbol "%s" has already been defined as '
 *                                 'a preprocessor token.' % rule)
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_directives); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_tokens); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_rule, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 896, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "DHParser/ebnf.py":897
 *                                 ' end with a doube underscore "__".' % rule)
 *         elif rule in self.directives.tokens:
 *             self.tree.new_error(node, 'Symbol "%s" has already been defined as '             # <<<<<<<<<<<<<<
 *                                 'a preprocessor token.' % rule)
 *         elif keyword.iskeyword(rule):
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 897, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_new_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 897, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "DHParser/ebnf.py":898
 *         elif rule in self.directives.tokens:
 *             self.tree.new_error(node, 'Symbol "%s" has already been defined as '
 *                                 'a preprocessor token.' % rule)             # <<<<<<<<<<<<<<
 *         elif keyword.iskeyword(rule):
 *             self.tree.new_error(node, 'Python keyword "%s" may not be used as a symbol. '
 */
    __pyx_t_8 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Symbol_s_has_already_been_define, __pyx_v_rule); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 898, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_node, __pyx_t_8};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 897, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_node, __pyx_t_8};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 897, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_1 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 897, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_INCREF(__pyx_v_node);
      __Pyx_GIVEREF(__pyx_v_node);
      PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_7, __pyx_v_node);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_7, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 897, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "DHParser/ebnf.py":896
 *             self.tree.new_error(node, 'Illegal symbol "%s". Symbols must not start or '
 *                                 ' end with a doube underscore "__".' % rule)
 *         elif rule in self.directives.tokens:             # <<<<<<<<<<<<<<
 *             self.tree.new_error(node, 'Symbol "%s" has already been defined as '
 *                                 'a preprocessor token.' % rule)
 */
    goto __pyx_L3;
  }

  /* "DHParser/ebnf.py":899
 *             self.tree.new_error(node, 'Symbol "%s" has already been defined as '
 *                                 'a preprocessor token.' % rule)
 *         elif keyword.iskeyword(rule):             # <<<<<<<<<<<<<<
 *             self.tree.new_error(node, 'Python keyword "%s" may not be used as a symbol. '
 *                                 % rule + '(This may change in the future.)')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_keyword); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_iskeyword); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v_rule) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_rule);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 899, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_4) {

    /* "DHParser/ebnf.py":900
 *                                 'a preprocessor token.' % rule)
 *         elif keyword.iskeyword(rule):
 *             self.tree.new_error(node, 'Python keyword "%s" may not be used as a symbol. '             # <<<<<<<<<<<<<<
 *                                 % rule + '(This may change in the future.)')
 *         try:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 900, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_new_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 900, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "DHParser/ebnf.py":901
 *         elif keyword.iskeyword(rule):
 *             self.tree.new_error(node, 'Python keyword "%s" may not be used as a symbol. '
 *                                 % rule + '(This may change in the future.)')             # <<<<<<<<<<<<<<
 *         try:
 *             self.current_symbols = [node]
 */
    __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Python_keyword_s_may_not_be_used, __pyx_v_rule); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_kp_u_This_may_change_in_the_future); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 901, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_node, __pyx_t_8};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 900, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_node, __pyx_t_8};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 900, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 900, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_1) {
        __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = NULL;
      }
      __Pyx_INCREF(__pyx_v_node);
      __Pyx_GIVEREF(__pyx_v_node);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_v_node);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 900, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "DHParser/ebnf.py":899
 *             self.tree.new_error(node, 'Symbol "%s" has already been defined as '
 *                                 'a preprocessor token.' % rule)
 *         elif keyword.iskeyword(rule):             # <<<<<<<<<<<<<<
 *             self.tree.new_error(node, 'Python keyword "%s" may not be used as a symbol. '
 *                                 % rule + '(This may change in the future.)')
 */
  }
  __pyx_L3:;

  /* "DHParser/ebnf.py":902
 *             self.tree.new_error(node, 'Python keyword "%s" may not be used as a symbol. '
 *                                 % rule + '(This may change in the future.)')
 *         try:             # <<<<<<<<<<<<<<
 *             self.current_symbols = [node]
 *             self.rules[rule] = self.current_symbols
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
    __Pyx_XGOTREF(__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_11);
    /*try:*/ {

      /* "DHParser/ebnf.py":903
 *                                 % rule + '(This may change in the future.)')
 *         try:
 *             self.current_symbols = [node]             # <<<<<<<<<<<<<<
 *             self.rules[rule] = self.current_symbols
 *             defn = self.compile(node.children[1])
 */
      __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 903, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_node);
      __Pyx_GIVEREF(__pyx_v_node);
      PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_node);
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_current_symbols, __pyx_t_2) < 0) __PYX_ERR(0, 903, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "DHParser/ebnf.py":904
 *         try:
 *             self.current_symbols = [node]
 *             self.rules[rule] = self.current_symbols             # <<<<<<<<<<<<<<
 *             defn = self.compile(node.children[1])
 *             if rule in self.variables:
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_current_symbols); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 904, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rules); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 904, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_v_rule, __pyx_t_2) < 0)) __PYX_ERR(0, 904, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "DHParser/ebnf.py":905
 *             self.current_symbols = [node]
 *             self.rules[rule] = self.current_symbols
 *             defn = self.compile(node.children[1])             # <<<<<<<<<<<<<<
 *             if rule in self.variables:
 *                 defn = 'Capture(%s)' % defn
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compile); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 905, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 905, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_6, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 905, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 905, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_defn = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "DHParser/ebnf.py":906
 *             self.rules[rule] = self.current_symbols
 *             defn = self.compile(node.children[1])
 *             if rule in self.variables:             # <<<<<<<<<<<<<<
 *                 defn = 'Capture(%s)' % defn
 *                 self.variables.remove(rule)
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_variables); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 906, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_v_rule, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 906, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_3 = (__pyx_t_4 != 0);
      if (__pyx_t_3) {

        /* "DHParser/ebnf.py":907
 *             defn = self.compile(node.children[1])
 *             if rule in self.variables:
 *                 defn = 'Capture(%s)' % defn             # <<<<<<<<<<<<<<
 *                 self.variables.remove(rule)
 *             elif defn.find("(") < 0:
 */
        __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Capture_s, __pyx_v_defn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 907, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF_SET(__pyx_v_defn, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "DHParser/ebnf.py":908
 *             if rule in self.variables:
 *                 defn = 'Capture(%s)' % defn
 *                 self.variables.remove(rule)             # <<<<<<<<<<<<<<
 *             elif defn.find("(") < 0:
 *                 # assume it's a synonym, like 'page = REGEX_PAGE_NR'
 */
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_variables); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 908, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_remove); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 908, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
          }
        }
        __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_5, __pyx_v_rule) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_rule);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 908, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "DHParser/ebnf.py":906
 *             self.rules[rule] = self.current_symbols
 *             defn = self.compile(node.children[1])
 *             if rule in self.variables:             # <<<<<<<<<<<<<<
 *                 defn = 'Capture(%s)' % defn
 *                 self.variables.remove(rule)
 */
        goto __pyx_L11;
      }

      /* "DHParser/ebnf.py":909
 *                 defn = 'Capture(%s)' % defn
 *                 self.variables.remove(rule)
 *             elif defn.find("(") < 0:             # <<<<<<<<<<<<<<
 *                 # assume it's a synonym, like 'page = REGEX_PAGE_NR'
 *                 defn = 'Synonym(%s)' % defn
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_defn, __pyx_n_s_find); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 909, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_5, __pyx_kp_u__33) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_kp_u__33);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 909, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 909, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 909, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (__pyx_t_3) {

        /* "DHParser/ebnf.py":911
 *             elif defn.find("(") < 0:
 *                 # assume it's a synonym, like 'page = REGEX_PAGE_NR'
 *                 defn = 'Synonym(%s)' % defn             # <<<<<<<<<<<<<<
 *         except TypeError as error:
 *             from traceback import extract_tb
 */
        __pyx_t_8 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Synonym_s, __pyx_v_defn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 911, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF_SET(__pyx_v_defn, __pyx_t_8);
        __pyx_t_8 = 0;

        /* "DHParser/ebnf.py":909
 *                 defn = 'Capture(%s)' % defn
 *                 self.variables.remove(rule)
 *             elif defn.find("(") < 0:             # <<<<<<<<<<<<<<
 *                 # assume it's a synonym, like 'page = REGEX_PAGE_NR'
 *                 defn = 'Synonym(%s)' % defn
 */
      }
      __pyx_L11:;

      /* "DHParser/ebnf.py":902
 *             self.tree.new_error(node, 'Python keyword "%s" may not be used as a symbol. '
 *                                 % rule + '(This may change in the future.)')
 *         try:             # <<<<<<<<<<<<<<
 *             self.current_symbols = [node]
 *             self.rules[rule] = self.current_symbols
 */
    }
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    goto __pyx_L10_try_end;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "DHParser/ebnf.py":912
 *                 # assume it's a synonym, like 'page = REGEX_PAGE_NR'
 *                 defn = 'Synonym(%s)' % defn
 *         except TypeError as error:             # <<<<<<<<<<<<<<
 *             from traceback import extract_tb
 *             trace = str(extract_tb(error.__traceback__)[-1])
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
    if (__pyx_t_7) {
      __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_definition", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_2, &__pyx_t_5) < 0) __PYX_ERR(0, 912, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_v_error = __pyx_t_2;
      /*try:*/ {

        /* "DHParser/ebnf.py":913
 *                 defn = 'Synonym(%s)' % defn
 *         except TypeError as error:
 *             from traceback import extract_tb             # <<<<<<<<<<<<<<
 *             trace = str(extract_tb(error.__traceback__)[-1])
 *             errmsg = "%s (TypeError: %s; %s)\n%s" \
 */
        __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 913, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_n_s_extract_tb);
        __Pyx_GIVEREF(__pyx_n_s_extract_tb);
        PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_extract_tb);
        __pyx_t_1 = __Pyx_Import(__pyx_n_s_traceback, __pyx_t_6, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 913, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_extract_tb); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 913, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_v_extract_tb = __pyx_t_6;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "DHParser/ebnf.py":914
 *         except TypeError as error:
 *             from traceback import extract_tb
 *             trace = str(extract_tb(error.__traceback__)[-1])             # <<<<<<<<<<<<<<
 *             errmsg = "%s (TypeError: %s; %s)\n%s" \
 *                      % (EBNFCompiler.AST_ERROR, str(error), trace, node.as_sxpr())
 */
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_error, __pyx_n_s_traceback_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 914, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_v_extract_tb);
        __pyx_t_12 = __pyx_v_extract_tb; __pyx_t_13 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
          __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12);
          if (likely(__pyx_t_13)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
            __Pyx_INCREF(__pyx_t_13);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_12, function);
          }
        }
        __pyx_t_1 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_13, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_6);
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 914, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_1, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 914, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 914, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_v_trace = __pyx_t_1;
        __pyx_t_1 = 0;

        /* "DHParser/ebnf.py":915
 *             from traceback import extract_tb
 *             trace = str(extract_tb(error.__traceback__)[-1])
 *             errmsg = "%s (TypeError: %s; %s)\n%s" \             # <<<<<<<<<<<<<<
 *                      % (EBNFCompiler.AST_ERROR, str(error), trace, node.as_sxpr())
 *             self.tree.new_error(node, errmsg)
 */
        __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 915, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_14 = 0;
        __pyx_t_15 = 127;

        /* "DHParser/ebnf.py":916
 *             trace = str(extract_tb(error.__traceback__)[-1])
 *             errmsg = "%s (TypeError: %s; %s)\n%s" \
 *                      % (EBNFCompiler.AST_ERROR, str(error), trace, node.as_sxpr())             # <<<<<<<<<<<<<<
 *             self.tree.new_error(node, errmsg)
 *             rule, defn = rule + ':error', '"' + errmsg + '"'
 */
        __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_EBNFCompiler); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 916, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_AST_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 916, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_6), __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 916, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_15;
        __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_12);
        __pyx_t_12 = 0;
        __Pyx_INCREF(__pyx_kp_u_TypeError_2);
        __pyx_t_14 += 13;
        __Pyx_GIVEREF(__pyx_kp_u_TypeError_2);
        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_TypeError_2);
        __pyx_t_12 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_error); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 916, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_15;
        __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_12);
        __pyx_t_12 = 0;
        __Pyx_INCREF(__pyx_kp_u__34);
        __pyx_t_14 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__34);
        PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_kp_u__34);
        __pyx_t_12 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_trace), __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 916, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_15;
        __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_t_12);
        __pyx_t_12 = 0;
        __Pyx_INCREF(__pyx_kp_u__35);
        __pyx_t_14 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__35);
        PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_kp_u__35);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_as_sxpr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 916, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_13 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_13)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_13);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
          }
        }
        __pyx_t_12 = (__pyx_t_13) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_13) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 916, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_12), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 916, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_15;
        __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "DHParser/ebnf.py":915
 *             from traceback import extract_tb
 *             trace = str(extract_tb(error.__traceback__)[-1])
 *             errmsg = "%s (TypeError: %s; %s)\n%s" \             # <<<<<<<<<<<<<<
 *                      % (EBNFCompiler.AST_ERROR, str(error), trace, node.as_sxpr())
 *             self.tree.new_error(node, errmsg)
 */
        __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 915, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_v_errmsg = ((PyObject*)__pyx_t_6);
        __pyx_t_6 = 0;

        /* "DHParser/ebnf.py":917
 *             errmsg = "%s (TypeError: %s; %s)\n%s" \
 *                      % (EBNFCompiler.AST_ERROR, str(error), trace, node.as_sxpr())
 *             self.tree.new_error(node, errmsg)             # <<<<<<<<<<<<<<
 *             rule, defn = rule + ':error', '"' + errmsg + '"'
 *         return rule, defn
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 917, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_new_error); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 917, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_12);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_12, function);
            __pyx_t_7 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_12)) {
          PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_node, __pyx_v_errmsg};
          __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 917, __pyx_L17_error)
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
          PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_node, __pyx_v_errmsg};
          __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 917, __pyx_L17_error)
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else
        #endif
        {
          __pyx_t_13 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 917, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_13);
          if (__pyx_t_1) {
            __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_1); __pyx_t_1 = NULL;
          }
          __Pyx_INCREF(__pyx_v_node);
          __Pyx_GIVEREF(__pyx_v_node);
          PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_7, __pyx_v_node);
          __Pyx_INCREF(__pyx_v_errmsg);
          __Pyx_GIVEREF(__pyx_v_errmsg);
          PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_7, __pyx_v_errmsg);
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 917, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "DHParser/ebnf.py":918
 *                      % (EBNFCompiler.AST_ERROR, str(error), trace, node.as_sxpr())
 *             self.tree.new_error(node, errmsg)
 *             rule, defn = rule + ':error', '"' + errmsg + '"'             # <<<<<<<<<<<<<<
 *         return rule, defn
 * 
 */
        __pyx_t_6 = PyNumber_Add(__pyx_v_rule, __pyx_kp_u_error_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 918, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_12 = __Pyx_PyUnicode_Concat(__pyx_kp_u__21, __pyx_v_errmsg); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 918, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_t_12, __pyx_kp_u__21); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 918, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF_SET(__pyx_v_rule, __pyx_t_6);
        __pyx_t_6 = 0;
        __Pyx_XDECREF_SET(__pyx_v_defn, __pyx_t_13);
        __pyx_t_13 = 0;
      }

      /* "DHParser/ebnf.py":912
 *                 # assume it's a synonym, like 'page = REGEX_PAGE_NR'
 *                 defn = 'Synonym(%s)' % defn
 *         except TypeError as error:             # <<<<<<<<<<<<<<
 *             from traceback import extract_tb
 *             trace = str(extract_tb(error.__traceback__)[-1])
 */
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_error);
          __pyx_v_error = NULL;
          goto __pyx_L18;
        }
        __pyx_L17_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __pyx_t_7 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_error);
            __pyx_v_error = NULL;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
          }
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20);
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_17;
          goto __pyx_L7_except_error;
        }
        __pyx_L18:;
      }
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L6_exception_handled;
    }
    goto __pyx_L7_except_error;
    __pyx_L7_except_error:;

    /* "DHParser/ebnf.py":902
 *             self.tree.new_error(node, 'Python keyword "%s" may not be used as a symbol. '
 *                                 % rule + '(This may change in the future.)')
 *         try:             # <<<<<<<<<<<<<<
 *             self.current_symbols = [node]
 *             self.rules[rule] = self.current_symbols
 */
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
    goto __pyx_L1_error;
    __pyx_L6_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
    __pyx_L10_try_end:;
  }

  /* "DHParser/ebnf.py":919
 *             self.tree.new_error(node, errmsg)
 *             rule, defn = rule + ':error', '"' + errmsg + '"'
 *         return rule, defn             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_rule);
  __Pyx_GIVEREF(__pyx_v_rule);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_rule);
  __Pyx_INCREF(__pyx_v_defn);
  __Pyx_GIVEREF(__pyx_v_defn);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_defn);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":883
 * 
 * 
 *     def on_definition(self, node: Node) -> Tuple[str, str]:             # <<<<<<<<<<<<<<
 *         rule = node.children[0].content
 *         if rule in self.rules:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_definition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_rule);
  __Pyx_XDECREF(__pyx_v_first);
  __Pyx_XDECREF(__pyx_v_defn);
  __Pyx_XDECREF(__pyx_v_error);
  __Pyx_XDECREF(__pyx_v_extract_tb);
  __Pyx_XDECREF(__pyx_v_trace);
  __Pyx_XDECREF(__pyx_v_errmsg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":922
 * 
 * 
 *     def on_directive(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         key = node.children[0].content
 *         assert key not in self.directives.tokens
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_33on_directive(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_33on_directive = {"on_directive", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_33on_directive, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_33on_directive(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_node = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_directive (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_directive", 1, 2, 2, 1); __PYX_ERR(0, 922, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_directive") < 0)) __PYX_ERR(0, 922, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_node = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("on_directive", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 922, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_directive", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_32on_directive(__pyx_self, __pyx_v_self, __pyx_v_node);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":934
 *             self.defined_directives.add(key)
 * 
 *         def check_argnum(n: int = 1):             # <<<<<<<<<<<<<<
 *             if len(node.children) > n + 1:
 *                 self.tree.new_error(node, 'Directive "%s" can have at most %i values.' % (key, n))
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_12on_directive_1check_argnum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_12on_directive_1check_argnum = {"check_argnum", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_12on_directive_1check_argnum, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_12on_directive_1check_argnum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("check_argnum (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)((PyObject *)__pyx_int_1));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "check_argnum") < 0)) __PYX_ERR(0, 934, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_n = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("check_argnum", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 934, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_directive.check_argnum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_12on_directive_check_argnum(__pyx_self, __pyx_v_n);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_12on_directive_check_argnum(PyObject *__pyx_self, PyObject *__pyx_v_n) {
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_1_on_directive *__pyx_cur_scope;
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_1_on_directive *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("check_argnum", 0);
  __pyx_outer_scope = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_1_on_directive *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "DHParser/ebnf.py":935
 * 
 *         def check_argnum(n: int = 1):
 *             if len(node.children) > n + 1:             # <<<<<<<<<<<<<<
 *                 self.tree.new_error(node, 'Directive "%s" can have at most %i values.' % (key, n))
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_node)) { __Pyx_RaiseClosureNameError("node"); __PYX_ERR(0, 935, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_n, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "DHParser/ebnf.py":936
 *         def check_argnum(n: int = 1):
 *             if len(node.children) > n + 1:
 *                 self.tree.new_error(node, 'Directive "%s" can have at most %i values.' % (key, n))             # <<<<<<<<<<<<<<
 * 
 *         if key in {'comment', 'whitespace'}:
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 936, __pyx_L1_error) }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 936, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_new_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 936, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_v_node)) { __Pyx_RaiseClosureNameError("node"); __PYX_ERR(0, 936, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 936, __pyx_L1_error) }
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 936, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_key);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_key);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_key);
    __Pyx_INCREF(__pyx_v_n);
    __Pyx_GIVEREF(__pyx_v_n);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_n);
    __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_Directive_s_can_have_at_most_i_v, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 936, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_node, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 936, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_node, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 936, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 936, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_node);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_node);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_cur_scope->__pyx_v_node);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 936, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "DHParser/ebnf.py":935
 * 
 *         def check_argnum(n: int = 1):
 *             if len(node.children) > n + 1:             # <<<<<<<<<<<<<<
 *                 self.tree.new_error(node, 'Directive "%s" can have at most %i values.' % (key, n))
 * 
 */
  }

  /* "DHParser/ebnf.py":934
 *             self.defined_directives.add(key)
 * 
 *         def check_argnum(n: int = 1):             # <<<<<<<<<<<<<<
 *             if len(node.children) > n + 1:
 *                 self.tree.new_error(node, 'Directive "%s" can have at most %i values.' % (key, n))
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_directive.check_argnum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":922
 * 
 * 
 *     def on_directive(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         key = node.children[0].content
 *         assert key not in self.directives.tokens
 */

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_32on_directive(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node) {
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_1_on_directive *__pyx_cur_scope;
  PyObject *__pyx_v_check_argnum = 0;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_child = NULL;
  PyObject *__pyx_v_node_type = NULL;
  PyObject *__pyx_v_values = NULL;
  PyObject *__pyx_v_wsp = NULL;
  PyObject *__pyx_v_tokens = NULL;
  PyObject *__pyx_v_redeclared = NULL;
  PyObject *__pyx_v_symbol = NULL;
  PyObject *__pyx_v_error_msgs = NULL;
  PyObject *__pyx_v_rule = NULL;
  PyObject *__pyx_8genexpr2__pyx_v_child = NULL;
  PyObject *__pyx_8genexpr3__pyx_v_child = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  Py_UCS4 __pyx_t_10;
  int __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  PyObject *__pyx_t_13 = NULL;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  __Pyx_RefNannySetupContext("on_directive", 0);
  __pyx_cur_scope = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_1_on_directive *)__pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct_1_on_directive(__pyx_ptype_8DHParser_4ebnf___pyx_scope_struct_1_on_directive, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_1_on_directive *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 922, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);
  __pyx_cur_scope->__pyx_v_node = __pyx_v_node;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_node);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_node);

  /* "DHParser/ebnf.py":923
 * 
 *     def on_directive(self, node: Node) -> str:
 *         key = node.children[0].content             # <<<<<<<<<<<<<<
 *         assert key not in self.directives.tokens
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_content); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_key = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":924
 *     def on_directive(self, node: Node) -> str:
 *         key = node.children[0].content
 *         assert key not in self.directives.tokens             # <<<<<<<<<<<<<<
 * 
 *         if key not in self.REPEATABLE_DIRECTIVES and not key.endswith('_error'):
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_directives); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 924, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_tokens); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 924, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_cur_scope->__pyx_v_key, __pyx_t_2, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 924, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!(__pyx_t_3 != 0))) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 924, __pyx_L1_error)
    }
  }
  #endif

  /* "DHParser/ebnf.py":926
 *         assert key not in self.directives.tokens
 * 
 *         if key not in self.REPEATABLE_DIRECTIVES and not key.endswith('_error'):             # <<<<<<<<<<<<<<
 *             if key in self.defined_directives:
 *                 self.tree.new_error(node, 'Directive "%s" has already been defined earlier. '
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_REPEATABLE_DIRECTIVES); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 926, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_cur_scope->__pyx_v_key, __pyx_t_2, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 926, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_key, __pyx_n_s_endswith); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 926, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_n_u_error_3) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_n_u_error_3);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 926, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 926, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = ((!__pyx_t_5) != 0);
  __pyx_t_3 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "DHParser/ebnf.py":927
 * 
 *         if key not in self.REPEATABLE_DIRECTIVES and not key.endswith('_error'):
 *             if key in self.defined_directives:             # <<<<<<<<<<<<<<
 *                 self.tree.new_error(node, 'Directive "%s" has already been defined earlier. '
 *                                     % key + 'Later definition will be ignored!',
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_defined_directives); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 927, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_cur_scope->__pyx_v_key, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 927, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = (__pyx_t_3 != 0);
    if (__pyx_t_4) {

      /* "DHParser/ebnf.py":928
 *         if key not in self.REPEATABLE_DIRECTIVES and not key.endswith('_error'):
 *             if key in self.defined_directives:
 *                 self.tree.new_error(node, 'Directive "%s" has already been defined earlier. '             # <<<<<<<<<<<<<<
 *                                     % key + 'Later definition will be ignored!',
 *                                     code=Error.REDEFINED_DIRECTIVE)
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 928, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_new_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 928, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "DHParser/ebnf.py":929
 *             if key in self.defined_directives:
 *                 self.tree.new_error(node, 'Directive "%s" has already been defined earlier. '
 *                                     % key + 'Later definition will be ignored!',             # <<<<<<<<<<<<<<
 *                                     code=Error.REDEFINED_DIRECTIVE)
 *                 return ""
 */
      __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Directive_s_has_already_been_def, __pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 929, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_Later_definition_will_be_ignored); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 929, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "DHParser/ebnf.py":928
 *         if key not in self.REPEATABLE_DIRECTIVES and not key.endswith('_error'):
 *             if key in self.defined_directives:
 *                 self.tree.new_error(node, 'Directive "%s" has already been defined earlier. '             # <<<<<<<<<<<<<<
 *                                     % key + 'Later definition will be ignored!',
 *                                     code=Error.REDEFINED_DIRECTIVE)
 */
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 928, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_node);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_node);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_node);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "DHParser/ebnf.py":930
 *                 self.tree.new_error(node, 'Directive "%s" has already been defined earlier. '
 *                                     % key + 'Later definition will be ignored!',
 *                                     code=Error.REDEFINED_DIRECTIVE)             # <<<<<<<<<<<<<<
 *                 return ""
 *             self.defined_directives.add(key)
 */
      __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 930, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 930, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_REDEFINED_DIRECTIVE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 930, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_code, __pyx_t_8) < 0) __PYX_ERR(0, 930, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "DHParser/ebnf.py":928
 *         if key not in self.REPEATABLE_DIRECTIVES and not key.endswith('_error'):
 *             if key in self.defined_directives:
 *                 self.tree.new_error(node, 'Directive "%s" has already been defined earlier. '             # <<<<<<<<<<<<<<
 *                                     % key + 'Later definition will be ignored!',
 *                                     code=Error.REDEFINED_DIRECTIVE)
 */
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 928, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "DHParser/ebnf.py":931
 *                                     % key + 'Later definition will be ignored!',
 *                                     code=Error.REDEFINED_DIRECTIVE)
 *                 return ""             # <<<<<<<<<<<<<<
 *             self.defined_directives.add(key)
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_kp_u__2);
      __pyx_r = __pyx_kp_u__2;
      goto __pyx_L0;

      /* "DHParser/ebnf.py":927
 * 
 *         if key not in self.REPEATABLE_DIRECTIVES and not key.endswith('_error'):
 *             if key in self.defined_directives:             # <<<<<<<<<<<<<<
 *                 self.tree.new_error(node, 'Directive "%s" has already been defined earlier. '
 *                                     % key + 'Later definition will be ignored!',
 */
    }

    /* "DHParser/ebnf.py":932
 *                                     code=Error.REDEFINED_DIRECTIVE)
 *                 return ""
 *             self.defined_directives.add(key)             # <<<<<<<<<<<<<<
 * 
 *         def check_argnum(n: int = 1):
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_defined_directives); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_8 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_cur_scope->__pyx_v_key) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_cur_scope->__pyx_v_key);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "DHParser/ebnf.py":926
 *         assert key not in self.directives.tokens
 * 
 *         if key not in self.REPEATABLE_DIRECTIVES and not key.endswith('_error'):             # <<<<<<<<<<<<<<
 *             if key in self.defined_directives:
 *                 self.tree.new_error(node, 'Directive "%s" has already been defined earlier. '
 */
  }

  /* "DHParser/ebnf.py":934
 *             self.defined_directives.add(key)
 * 
 *         def check_argnum(n: int = 1):             # <<<<<<<<<<<<<<
 *             if len(node.children) > n + 1:
 *                 self.tree.new_error(node, 'Directive "%s" can have at most %i values.' % (key, n))
 */
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_n, __pyx_n_u_int) < 0) __PYX_ERR(0, 934, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_12on_directive_1check_argnum, 0, __pyx_n_s_EBNFCompiler_on_directive_locals, ((PyObject*)__pyx_cur_scope), __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__38);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_v_check_argnum = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":938
 *                 self.tree.new_error(node, 'Directive "%s" can have at most %i values.' % (key, n))
 * 
 *         if key in {'comment', 'whitespace'}:             # <<<<<<<<<<<<<<
 *             check_argnum()
 *             if node.children[1].tag_name == "symbol":
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_key);
  __pyx_t_2 = __pyx_cur_scope->__pyx_v_key;
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_comment, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 938, __pyx_L1_error)
  if (!__pyx_t_3) {
  } else {
    __pyx_t_4 = __pyx_t_3;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_whitespace, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 938, __pyx_L1_error)
  __pyx_t_4 = __pyx_t_3;
  __pyx_L8_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = (__pyx_t_4 != 0);
  if (__pyx_t_3) {

    /* "DHParser/ebnf.py":939
 * 
 *         if key in {'comment', 'whitespace'}:
 *             check_argnum()             # <<<<<<<<<<<<<<
 *             if node.children[1].tag_name == "symbol":
 *                 value = node.children[1].content
 */
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_v_check_argnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 939, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "DHParser/ebnf.py":940
 *         if key in {'comment', 'whitespace'}:
 *             check_argnum()
 *             if node.children[1].tag_name == "symbol":             # <<<<<<<<<<<<<<
 *                 value = node.children[1].content
 *                 if key == 'whitespace' and value in WHITESPACE_TYPES:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_tag_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_symbol, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 940, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_3) {

      /* "DHParser/ebnf.py":941
 *             check_argnum()
 *             if node.children[1].tag_name == "symbol":
 *                 value = node.children[1].content             # <<<<<<<<<<<<<<
 *                 if key == 'whitespace' and value in WHITESPACE_TYPES:
 *                     value = WHITESPACE_TYPES[value]  # replace whitespace-name by regex
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 941, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 941, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_content); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 941, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_v_value = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "DHParser/ebnf.py":942
 *             if node.children[1].tag_name == "symbol":
 *                 value = node.children[1].content
 *                 if key == 'whitespace' and value in WHITESPACE_TYPES:             # <<<<<<<<<<<<<<
 *                     value = WHITESPACE_TYPES[value]  # replace whitespace-name by regex
 *                 else:
 */
      __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_cur_scope->__pyx_v_key, __pyx_n_u_whitespace, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 942, __pyx_L1_error)
      if (__pyx_t_4) {
      } else {
        __pyx_t_3 = __pyx_t_4;
        goto __pyx_L12_bool_binop_done;
      }
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_WHITESPACE_TYPES); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 942, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_v_value, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 942, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_5 = (__pyx_t_4 != 0);
      __pyx_t_3 = __pyx_t_5;
      __pyx_L12_bool_binop_done:;
      if (__pyx_t_3) {

        /* "DHParser/ebnf.py":943
 *                 value = node.children[1].content
 *                 if key == 'whitespace' and value in WHITESPACE_TYPES:
 *                     value = WHITESPACE_TYPES[value]  # replace whitespace-name by regex             # <<<<<<<<<<<<<<
 *                 else:
 *                     self.tree.new_error(node, 'Value "%s" not allowed for directive "%s".'
 */
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_WHITESPACE_TYPES); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 943, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 943, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_8);
        __pyx_t_8 = 0;

        /* "DHParser/ebnf.py":942
 *             if node.children[1].tag_name == "symbol":
 *                 value = node.children[1].content
 *                 if key == 'whitespace' and value in WHITESPACE_TYPES:             # <<<<<<<<<<<<<<
 *                     value = WHITESPACE_TYPES[value]  # replace whitespace-name by regex
 *                 else:
 */
        goto __pyx_L11;
      }

      /* "DHParser/ebnf.py":945
 *                     value = WHITESPACE_TYPES[value]  # replace whitespace-name by regex
 *                 else:
 *                     self.tree.new_error(node, 'Value "%s" not allowed for directive "%s".'             # <<<<<<<<<<<<<<
 *                                         % (value, key))
 *             else:
 */
      /*else*/ {
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 945, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_new_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 945, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 945, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_9 = 0;
        __pyx_t_10 = 127;
        __Pyx_INCREF(__pyx_kp_u_Value);
        __pyx_t_9 += 7;
        __Pyx_GIVEREF(__pyx_kp_u_Value);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_Value);

        /* "DHParser/ebnf.py":946
 *                 else:
 *                     self.tree.new_error(node, 'Value "%s" not allowed for directive "%s".'
 *                                         % (value, key))             # <<<<<<<<<<<<<<
 *             else:
 *                 value = self._extract_regex(node.children[1])
 */
        __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_value), __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 946, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_10;
        __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
        __pyx_t_1 = 0;
        __Pyx_INCREF(__pyx_kp_u_not_allowed_for_directive);
        __pyx_t_9 += 29;
        __Pyx_GIVEREF(__pyx_kp_u_not_allowed_for_directive);
        PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_not_allowed_for_directive);
        __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_cur_scope->__pyx_v_key), __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 946, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_10;
        __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_1);
        __pyx_t_1 = 0;
        __Pyx_INCREF(__pyx_kp_u__39);
        __pyx_t_9 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__39);
        PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__39);

        /* "DHParser/ebnf.py":945
 *                     value = WHITESPACE_TYPES[value]  # replace whitespace-name by regex
 *                 else:
 *                     self.tree.new_error(node, 'Value "%s" not allowed for directive "%s".'             # <<<<<<<<<<<<<<
 *                                         % (value, key))
 *             else:
 */
        __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_2, 5, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = NULL;
        __pyx_t_11 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
            __pyx_t_11 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_cur_scope->__pyx_v_node, __pyx_t_1};
          __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 945, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_cur_scope->__pyx_v_node, __pyx_t_1};
          __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 945, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else
        #endif
        {
          __pyx_t_7 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 945, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          if (__pyx_t_2) {
            __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL;
          }
          __Pyx_INCREF(__pyx_cur_scope->__pyx_v_node);
          __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_node);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_11, __pyx_cur_scope->__pyx_v_node);
          __Pyx_GIVEREF(__pyx_t_1);
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_11, __pyx_t_1);
          __pyx_t_1 = 0;
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 945, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __pyx_L11:;

      /* "DHParser/ebnf.py":940
 *         if key in {'comment', 'whitespace'}:
 *             check_argnum()
 *             if node.children[1].tag_name == "symbol":             # <<<<<<<<<<<<<<
 *                 value = node.children[1].content
 *                 if key == 'whitespace' and value in WHITESPACE_TYPES:
 */
      goto __pyx_L10;
    }

    /* "DHParser/ebnf.py":948
 *                                         % (value, key))
 *             else:
 *                 value = self._extract_regex(node.children[1])             # <<<<<<<<<<<<<<
 *                 if key == 'whitespace' and not re.match(value, ''):
 *                     self.tree.new_error(node, "Implicit whitespace should always "
 */
    /*else*/ {
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_extract_regex); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 948, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 948, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_7, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 948, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      __pyx_t_8 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 948, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_value = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "DHParser/ebnf.py":949
 *             else:
 *                 value = self._extract_regex(node.children[1])
 *                 if key == 'whitespace' and not re.match(value, ''):             # <<<<<<<<<<<<<<
 *                     self.tree.new_error(node, "Implicit whitespace should always "
 *                                         "match the empty string, /%s/ does not." % value)
 */
      __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_cur_scope->__pyx_v_key, __pyx_n_u_whitespace, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 949, __pyx_L1_error)
      if (__pyx_t_5) {
      } else {
        __pyx_t_3 = __pyx_t_5;
        goto __pyx_L15_bool_binop_done;
      }
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_re); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 949, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_match); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 949, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_11 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_11 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_value, __pyx_kp_u__2};
        __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 949, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_8);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_value, __pyx_kp_u__2};
        __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 949, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_8);
      } else
      #endif
      {
        __pyx_t_7 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 949, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (__pyx_t_6) {
          __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
        }
        __Pyx_INCREF(__pyx_v_value);
        __Pyx_GIVEREF(__pyx_v_value);
        PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_11, __pyx_v_value);
        __Pyx_INCREF(__pyx_kp_u__2);
        __Pyx_GIVEREF(__pyx_kp_u__2);
        PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_11, __pyx_kp_u__2);
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 949, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 949, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_4 = ((!__pyx_t_5) != 0);
      __pyx_t_3 = __pyx_t_4;
      __pyx_L15_bool_binop_done:;
      if (__pyx_t_3) {

        /* "DHParser/ebnf.py":950
 *                 value = self._extract_regex(node.children[1])
 *                 if key == 'whitespace' and not re.match(value, ''):
 *                     self.tree.new_error(node, "Implicit whitespace should always "             # <<<<<<<<<<<<<<
 *                                         "match the empty string, /%s/ does not." % value)
 *             self.directives[key] = value
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 950, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_new_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 950, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "DHParser/ebnf.py":951
 *                 if key == 'whitespace' and not re.match(value, ''):
 *                     self.tree.new_error(node, "Implicit whitespace should always "
 *                                         "match the empty string, /%s/ does not." % value)             # <<<<<<<<<<<<<<
 *             self.directives[key] = value
 * 
 */
        __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Implicit_whitespace_should_alway, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 951, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = NULL;
        __pyx_t_11 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
            __pyx_t_11 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_cur_scope->__pyx_v_node, __pyx_t_1};
          __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 950, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_cur_scope->__pyx_v_node, __pyx_t_1};
          __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 950, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else
        #endif
        {
          __pyx_t_2 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 950, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          if (__pyx_t_6) {
            __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __pyx_t_6 = NULL;
          }
          __Pyx_INCREF(__pyx_cur_scope->__pyx_v_node);
          __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_node);
          PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_11, __pyx_cur_scope->__pyx_v_node);
          __Pyx_GIVEREF(__pyx_t_1);
          PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_11, __pyx_t_1);
          __pyx_t_1 = 0;
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 950, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "DHParser/ebnf.py":949
 *             else:
 *                 value = self._extract_regex(node.children[1])
 *                 if key == 'whitespace' and not re.match(value, ''):             # <<<<<<<<<<<<<<
 *                     self.tree.new_error(node, "Implicit whitespace should always "
 *                                         "match the empty string, /%s/ does not." % value)
 */
      }
    }
    __pyx_L10:;

    /* "DHParser/ebnf.py":952
 *                     self.tree.new_error(node, "Implicit whitespace should always "
 *                                         "match the empty string, /%s/ does not." % value)
 *             self.directives[key] = value             # <<<<<<<<<<<<<<
 * 
 *         elif key == 'drop':
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_directives); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_cur_scope->__pyx_v_key, __pyx_v_value) < 0)) __PYX_ERR(0, 952, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "DHParser/ebnf.py":938
 *                 self.tree.new_error(node, 'Directive "%s" can have at most %i values.' % (key, n))
 * 
 *         if key in {'comment', 'whitespace'}:             # <<<<<<<<<<<<<<
 *             check_argnum()
 *             if node.children[1].tag_name == "symbol":
 */
    goto __pyx_L7;
  }

  /* "DHParser/ebnf.py":954
 *             self.directives[key] = value
 * 
 *         elif key == 'drop':             # <<<<<<<<<<<<<<
 *             check_argnum(2)
 *             for child in node.children[1:]:
 */
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_cur_scope->__pyx_v_key, __pyx_n_u_drop, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 954, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "DHParser/ebnf.py":955
 * 
 *         elif key == 'drop':
 *             check_argnum(2)             # <<<<<<<<<<<<<<
 *             for child in node.children[1:]:
 *                 node_type = child.content.lower()
 */
    __pyx_t_8 = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_12on_directive_check_argnum(__pyx_v_check_argnum, __pyx_int_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 955, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "DHParser/ebnf.py":956
 *         elif key == 'drop':
 *             check_argnum(2)
 *             for child in node.children[1:]:             # <<<<<<<<<<<<<<
 *                 node_type = child.content.lower()
 *                 assert node_type in DROP_VALUES, child.content
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 956, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_t_8, 1, 0, NULL, NULL, &__pyx_slice__23, 1, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 956, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
      __pyx_t_8 = __pyx_t_7; __Pyx_INCREF(__pyx_t_8); __pyx_t_9 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 956, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_12 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 956, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    for (;;) {
      if (likely(!__pyx_t_12)) {
        if (likely(PyList_CheckExact(__pyx_t_8))) {
          if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_8)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 956, __pyx_L1_error)
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 956, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        } else {
          if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 956, __pyx_L1_error)
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 956, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        }
      } else {
        __pyx_t_7 = __pyx_t_12(__pyx_t_8);
        if (unlikely(!__pyx_t_7)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 956, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_7);
      }
      __Pyx_XDECREF_SET(__pyx_v_child, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "DHParser/ebnf.py":957
 *             check_argnum(2)
 *             for child in node.children[1:]:
 *                 node_type = child.content.lower()             # <<<<<<<<<<<<<<
 *                 assert node_type in DROP_VALUES, child.content
 *                 self.directives[key].add(node_type)
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_child, __pyx_n_s_content); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 957, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_lower); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 957, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 957, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF_SET(__pyx_v_node_type, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "DHParser/ebnf.py":958
 *             for child in node.children[1:]:
 *                 node_type = child.content.lower()
 *                 assert node_type in DROP_VALUES, child.content             # <<<<<<<<<<<<<<
 *                 self.directives[key].add(node_type)
 * 
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(!Py_OptimizeFlag)) {
        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_DROP_VALUES); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 958, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_node_type, __pyx_t_7, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 958, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!(__pyx_t_3 != 0))) {
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_child, __pyx_n_s_content); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 958, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_1 = PyTuple_Pack(1, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          PyErr_SetObject(PyExc_AssertionError, __pyx_t_1);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __PYX_ERR(0, 958, __pyx_L1_error)
        }
      }
      #endif

      /* "DHParser/ebnf.py":959
 *                 node_type = child.content.lower()
 *                 assert node_type in DROP_VALUES, child.content
 *                 self.directives[key].add(node_type)             # <<<<<<<<<<<<<<
 * 
 *         elif key == 'ignorecase':
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_directives); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 959, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 959, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_add); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 959, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, __pyx_v_node_type) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_node_type);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 959, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "DHParser/ebnf.py":956
 *         elif key == 'drop':
 *             check_argnum(2)
 *             for child in node.children[1:]:             # <<<<<<<<<<<<<<
 *                 node_type = child.content.lower()
 *                 assert node_type in DROP_VALUES, child.content
 */
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "DHParser/ebnf.py":954
 *             self.directives[key] = value
 * 
 *         elif key == 'drop':             # <<<<<<<<<<<<<<
 *             check_argnum(2)
 *             for child in node.children[1:]:
 */
    goto __pyx_L7;
  }

  /* "DHParser/ebnf.py":961
 *                 self.directives[key].add(node_type)
 * 
 *         elif key == 'ignorecase':             # <<<<<<<<<<<<<<
 *             check_argnum()
 *             if node.children[1].content.lower() not in {"off", "false", "no"}:
 */
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_cur_scope->__pyx_v_key, __pyx_n_u_ignorecase, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 961, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "DHParser/ebnf.py":962
 * 
 *         elif key == 'ignorecase':
 *             check_argnum()             # <<<<<<<<<<<<<<
 *             if node.children[1].content.lower() not in {"off", "false", "no"}:
 *                 self.re_flags.add('i')
 */
    __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_v_check_argnum); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 962, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "DHParser/ebnf.py":963
 *         elif key == 'ignorecase':
 *             check_argnum()
 *             if node.children[1].content.lower() not in {"off", "false", "no"}:             # <<<<<<<<<<<<<<
 *                 self.re_flags.add('i')
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 963, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 963, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_content); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 963, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_lower); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 963, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_8 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 963, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_8, __pyx_n_u_off, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 963, __pyx_L1_error)
    if (__pyx_t_4) {
    } else {
      __pyx_t_3 = __pyx_t_4;
      goto __pyx_L20_bool_binop_done;
    }
    __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_8, __pyx_n_u_false, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 963, __pyx_L1_error)
    if (__pyx_t_4) {
    } else {
      __pyx_t_3 = __pyx_t_4;
      goto __pyx_L20_bool_binop_done;
    }
    __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_8, __pyx_n_u_no, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 963, __pyx_L1_error)
    __pyx_t_3 = __pyx_t_4;
    __pyx_L20_bool_binop_done:;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_4 = (__pyx_t_3 != 0);
    if (__pyx_t_4) {

      /* "DHParser/ebnf.py":964
 *             check_argnum()
 *             if node.children[1].content.lower() not in {"off", "false", "no"}:
 *                 self.re_flags.add('i')             # <<<<<<<<<<<<<<
 * 
 *         elif key == 'literalws':
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_re_flags); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 964, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_add); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 964, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      __pyx_t_8 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_7, __pyx_n_u_i) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_n_u_i);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 964, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "DHParser/ebnf.py":963
 *         elif key == 'ignorecase':
 *             check_argnum()
 *             if node.children[1].content.lower() not in {"off", "false", "no"}:             # <<<<<<<<<<<<<<
 *                 self.re_flags.add('i')
 * 
 */
    }

    /* "DHParser/ebnf.py":961
 *                 self.directives[key].add(node_type)
 * 
 *         elif key == 'ignorecase':             # <<<<<<<<<<<<<<
 *             check_argnum()
 *             if node.children[1].content.lower() not in {"off", "false", "no"}:
 */
    goto __pyx_L7;
  }

  /* "DHParser/ebnf.py":966
 *                 self.re_flags.add('i')
 * 
 *         elif key == 'literalws':             # <<<<<<<<<<<<<<
 *             values = {child.content.strip().lower() for child in node.children[1:]}
 *             if ((values - {'left', 'right', 'both', 'none'})
 */
  __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_cur_scope->__pyx_v_key, __pyx_n_u_literalws, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 966, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "DHParser/ebnf.py":967
 * 
 *         elif key == 'literalws':
 *             values = {child.content.strip().lower() for child in node.children[1:]}             # <<<<<<<<<<<<<<
 *             if ((values - {'left', 'right', 'both', 'none'})
 *                     or ('none' in values and len(values) > 1)):
 */
    { /* enter inner scope */
      __pyx_t_8 = PySet_New(NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 967, __pyx_L25_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 967, __pyx_L25_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_slice__23, 1, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 967, __pyx_L25_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
        __pyx_t_1 = __pyx_t_7; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0;
        __pyx_t_12 = NULL;
      } else {
        __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 967, __pyx_L25_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 967, __pyx_L25_error)
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      for (;;) {
        if (likely(!__pyx_t_12)) {
          if (likely(PyList_CheckExact(__pyx_t_1))) {
            if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 967, __pyx_L25_error)
            #else
            __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 967, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_7);
            #endif
          } else {
            if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 967, __pyx_L25_error)
            #else
            __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 967, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_7);
            #endif
          }
        } else {
          __pyx_t_7 = __pyx_t_12(__pyx_t_1);
          if (unlikely(!__pyx_t_7)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 967, __pyx_L25_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_7);
        }
        __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_child, __pyx_t_7);
        __pyx_t_7 = 0;
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr2__pyx_v_child, __pyx_n_s_content); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 967, __pyx_L25_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_strip); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 967, __pyx_L25_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_13);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_13, function);
          }
        }
        __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_13);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 967, __pyx_L25_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_lower); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 967, __pyx_L25_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_13);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_13, function);
          }
        }
        __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_13);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 967, __pyx_L25_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        if (unlikely(PySet_Add(__pyx_t_8, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 967, __pyx_L25_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_child); __pyx_8genexpr2__pyx_v_child = 0;
      goto __pyx_L28_exit_scope;
      __pyx_L25_error:;
      __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_child); __pyx_8genexpr2__pyx_v_child = 0;
      goto __pyx_L1_error;
      __pyx_L28_exit_scope:;
    } /* exit inner scope */
    __pyx_v_values = ((PyObject*)__pyx_t_8);
    __pyx_t_8 = 0;

    /* "DHParser/ebnf.py":968
 *         elif key == 'literalws':
 *             values = {child.content.strip().lower() for child in node.children[1:]}
 *             if ((values - {'left', 'right', 'both', 'none'})             # <<<<<<<<<<<<<<
 *                     or ('none' in values and len(values) > 1)):
 *                 self.tree.new_error(node, 'Directive "literalws" allows only `left`, `right`, '
 */
    __pyx_t_8 = PySet_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 968, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (PySet_Add(__pyx_t_8, __pyx_n_u_left) < 0) __PYX_ERR(0, 968, __pyx_L1_error)
    if (PySet_Add(__pyx_t_8, __pyx_n_u_right) < 0) __PYX_ERR(0, 968, __pyx_L1_error)
    if (PySet_Add(__pyx_t_8, __pyx_n_u_both) < 0) __PYX_ERR(0, 968, __pyx_L1_error)
    if (PySet_Add(__pyx_t_8, __pyx_n_u_none) < 0) __PYX_ERR(0, 968, __pyx_L1_error)
    __pyx_t_1 = PyNumber_Subtract(__pyx_v_values, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 968, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 968, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!__pyx_t_3) {
    } else {
      __pyx_t_4 = __pyx_t_3;
      goto __pyx_L30_bool_binop_done;
    }

    /* "DHParser/ebnf.py":969
 *             values = {child.content.strip().lower() for child in node.children[1:]}
 *             if ((values - {'left', 'right', 'both', 'none'})
 *                     or ('none' in values and len(values) > 1)):             # <<<<<<<<<<<<<<
 *                 self.tree.new_error(node, 'Directive "literalws" allows only `left`, `right`, '
 *                                     '`both` or `none`, not `%s`' % ", ".join(values))
 */
    __pyx_t_3 = (__Pyx_PySet_ContainsTF(__pyx_n_u_none, __pyx_v_values, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 969, __pyx_L1_error)
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L30_bool_binop_done;
    }
    __pyx_t_9 = PySet_GET_SIZE(__pyx_v_values); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 969, __pyx_L1_error)
    __pyx_t_5 = ((__pyx_t_9 > 1) != 0);
    __pyx_t_4 = __pyx_t_5;
    __pyx_L30_bool_binop_done:;

    /* "DHParser/ebnf.py":968
 *         elif key == 'literalws':
 *             values = {child.content.strip().lower() for child in node.children[1:]}
 *             if ((values - {'left', 'right', 'both', 'none'})             # <<<<<<<<<<<<<<
 *                     or ('none' in values and len(values) > 1)):
 *                 self.tree.new_error(node, 'Directive "literalws" allows only `left`, `right`, '
 */
    if (__pyx_t_4) {

      /* "DHParser/ebnf.py":970
 *             if ((values - {'left', 'right', 'both', 'none'})
 *                     or ('none' in values and len(values) > 1)):
 *                 self.tree.new_error(node, 'Directive "literalws" allows only `left`, `right`, '             # <<<<<<<<<<<<<<
 *                                     '`both` or `none`, not `%s`' % ", ".join(values))
 *             wsp = {'left', 'right'} if 'both' in values \
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 970, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_new_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 970, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "DHParser/ebnf.py":971
 *                     or ('none' in values and len(values) > 1)):
 *                 self.tree.new_error(node, 'Directive "literalws" allows only `left`, `right`, '
 *                                     '`both` or `none`, not `%s`' % ", ".join(values))             # <<<<<<<<<<<<<<
 *             wsp = {'left', 'right'} if 'both' in values \
 *                 else {} if 'none' in values else values
 */
      __pyx_t_8 = PyUnicode_Join(__pyx_kp_u__40, __pyx_v_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 971, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_13 = PyUnicode_Format(__pyx_kp_u_Directive_literalws_allows_only, __pyx_t_8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 971, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      __pyx_t_11 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_11 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_cur_scope->__pyx_v_node, __pyx_t_13};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 970, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_cur_scope->__pyx_v_node, __pyx_t_13};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 970, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      } else
      #endif
      {
        __pyx_t_2 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 970, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (__pyx_t_8) {
          __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8); __pyx_t_8 = NULL;
        }
        __Pyx_INCREF(__pyx_cur_scope->__pyx_v_node);
        __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_node);
        PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_11, __pyx_cur_scope->__pyx_v_node);
        __Pyx_GIVEREF(__pyx_t_13);
        PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_11, __pyx_t_13);
        __pyx_t_13 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 970, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "DHParser/ebnf.py":968
 *         elif key == 'literalws':
 *             values = {child.content.strip().lower() for child in node.children[1:]}
 *             if ((values - {'left', 'right', 'both', 'none'})             # <<<<<<<<<<<<<<
 *                     or ('none' in values and len(values) > 1)):
 *                 self.tree.new_error(node, 'Directive "literalws" allows only `left`, `right`, '
 */
    }

    /* "DHParser/ebnf.py":972
 *                 self.tree.new_error(node, 'Directive "literalws" allows only `left`, `right`, '
 *                                     '`both` or `none`, not `%s`' % ", ".join(values))
 *             wsp = {'left', 'right'} if 'both' in values \             # <<<<<<<<<<<<<<
 *                 else {} if 'none' in values else values
 *             self.directives.literalws = wsp
 */
    __pyx_t_4 = (__Pyx_PySet_ContainsTF(__pyx_n_u_both, __pyx_v_values, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 972, __pyx_L1_error)
    if ((__pyx_t_4 != 0)) {
      __pyx_t_7 = PySet_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 972, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PySet_Add(__pyx_t_7, __pyx_n_u_left) < 0) __PYX_ERR(0, 972, __pyx_L1_error)
      if (PySet_Add(__pyx_t_7, __pyx_n_u_right) < 0) __PYX_ERR(0, 972, __pyx_L1_error)
      __pyx_t_1 = __pyx_t_7;
      __pyx_t_7 = 0;
    } else {

      /* "DHParser/ebnf.py":973
 *                                     '`both` or `none`, not `%s`' % ", ".join(values))
 *             wsp = {'left', 'right'} if 'both' in values \
 *                 else {} if 'none' in values else values             # <<<<<<<<<<<<<<
 *             self.directives.literalws = wsp
 * 
 */
      __pyx_t_5 = (__Pyx_PySet_ContainsTF(__pyx_n_u_none, __pyx_v_values, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 973, __pyx_L1_error)
      if ((__pyx_t_5 != 0)) {
        __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 973, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = __pyx_t_2;
        __pyx_t_2 = 0;
      } else {
        __Pyx_INCREF(__pyx_v_values);
        __pyx_t_7 = __pyx_v_values;
      }
      __pyx_t_1 = __pyx_t_7;
      __pyx_t_7 = 0;
    }
    __pyx_v_wsp = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "DHParser/ebnf.py":974
 *             wsp = {'left', 'right'} if 'both' in values \
 *                 else {} if 'none' in values else values
 *             self.directives.literalws = wsp             # <<<<<<<<<<<<<<
 * 
 *         elif key in {'tokens', 'preprocessor_tokens'}:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_directives); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 974, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_literalws, __pyx_v_wsp) < 0) __PYX_ERR(0, 974, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "DHParser/ebnf.py":966
 *                 self.re_flags.add('i')
 * 
 *         elif key == 'literalws':             # <<<<<<<<<<<<<<
 *             values = {child.content.strip().lower() for child in node.children[1:]}
 *             if ((values - {'left', 'right', 'both', 'none'})
 */
    goto __pyx_L7;
  }

  /* "DHParser/ebnf.py":976
 *             self.directives.literalws = wsp
 * 
 *         elif key in {'tokens', 'preprocessor_tokens'}:             # <<<<<<<<<<<<<<
 *             tokens = {child.content.strip() for child in node.children[1:]}
 *             redeclared = self.directives.tokens & tokens
 */
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_key);
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_key;
  __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_tokens, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 976, __pyx_L1_error)
  if (!__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L33_bool_binop_done;
  }
  __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_preprocessor_tokens, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 976, __pyx_L1_error)
  __pyx_t_4 = __pyx_t_5;
  __pyx_L33_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "DHParser/ebnf.py":977
 * 
 *         elif key in {'tokens', 'preprocessor_tokens'}:
 *             tokens = {child.content.strip() for child in node.children[1:]}             # <<<<<<<<<<<<<<
 *             redeclared = self.directives.tokens & tokens
 *             if redeclared:
 */
    { /* enter inner scope */
      __pyx_t_1 = PySet_New(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 977, __pyx_L37_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 977, __pyx_L37_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_7, 1, 0, NULL, NULL, &__pyx_slice__23, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 977, __pyx_L37_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
        __pyx_t_7 = __pyx_t_2; __Pyx_INCREF(__pyx_t_7); __pyx_t_9 = 0;
        __pyx_t_12 = NULL;
      } else {
        __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 977, __pyx_L37_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_12 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 977, __pyx_L37_error)
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      for (;;) {
        if (likely(!__pyx_t_12)) {
          if (likely(PyList_CheckExact(__pyx_t_7))) {
            if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_7)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 977, __pyx_L37_error)
            #else
            __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 977, __pyx_L37_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          } else {
            if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 977, __pyx_L37_error)
            #else
            __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 977, __pyx_L37_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          }
        } else {
          __pyx_t_2 = __pyx_t_12(__pyx_t_7);
          if (unlikely(!__pyx_t_2)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 977, __pyx_L37_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_child, __pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr3__pyx_v_child, __pyx_n_s_content); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 977, __pyx_L37_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_strip); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 977, __pyx_L37_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_13 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_13)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_13);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
          }
        }
        __pyx_t_2 = (__pyx_t_13) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_13) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 977, __pyx_L37_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(PySet_Add(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 977, __pyx_L37_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_child); __pyx_8genexpr3__pyx_v_child = 0;
      goto __pyx_L40_exit_scope;
      __pyx_L37_error:;
      __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_child); __pyx_8genexpr3__pyx_v_child = 0;
      goto __pyx_L1_error;
      __pyx_L40_exit_scope:;
    } /* exit inner scope */
    __pyx_v_tokens = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "DHParser/ebnf.py":978
 *         elif key in {'tokens', 'preprocessor_tokens'}:
 *             tokens = {child.content.strip() for child in node.children[1:]}
 *             redeclared = self.directives.tokens & tokens             # <<<<<<<<<<<<<<
 *             if redeclared:
 *                 self.tree.new_error(node, 'Tokens %s have already been declared earlier. '
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_directives); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_tokens); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 978, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_And(__pyx_t_7, __pyx_v_tokens); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_redeclared = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "DHParser/ebnf.py":979
 *             tokens = {child.content.strip() for child in node.children[1:]}
 *             redeclared = self.directives.tokens & tokens
 *             if redeclared:             # <<<<<<<<<<<<<<
 *                 self.tree.new_error(node, 'Tokens %s have already been declared earlier. '
 *                                     % str(redeclared) + 'Later declaration will be ignored',
 */
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_redeclared); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 979, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "DHParser/ebnf.py":980
 *             redeclared = self.directives.tokens & tokens
 *             if redeclared:
 *                 self.tree.new_error(node, 'Tokens %s have already been declared earlier. '             # <<<<<<<<<<<<<<
 *                                     % str(redeclared) + 'Later declaration will be ignored',
 *                                     code=Error.REDECLARED_TOKEN_WARNING)
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 980, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_new_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 980, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "DHParser/ebnf.py":981
 *             if redeclared:
 *                 self.tree.new_error(node, 'Tokens %s have already been declared earlier. '
 *                                     % str(redeclared) + 'Later declaration will be ignored',             # <<<<<<<<<<<<<<
 *                                     code=Error.REDECLARED_TOKEN_WARNING)
 *             self.directives.tokens |= tokens - redeclared
 */
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_redeclared); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 981, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_Tokens_s_have_already_been_decla, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 981, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_Later_declaration_will_be_ignore); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 981, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "DHParser/ebnf.py":980
 *             redeclared = self.directives.tokens & tokens
 *             if redeclared:
 *                 self.tree.new_error(node, 'Tokens %s have already been declared earlier. '             # <<<<<<<<<<<<<<
 *                                     % str(redeclared) + 'Later declaration will be ignored',
 *                                     code=Error.REDECLARED_TOKEN_WARNING)
 */
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 980, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_node);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_node);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_node);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "DHParser/ebnf.py":982
 *                 self.tree.new_error(node, 'Tokens %s have already been declared earlier. '
 *                                     % str(redeclared) + 'Later declaration will be ignored',
 *                                     code=Error.REDECLARED_TOKEN_WARNING)             # <<<<<<<<<<<<<<
 *             self.directives.tokens |= tokens - redeclared
 * 
 */
      __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 982, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_Error); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 982, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_REDECLARED_TOKEN_WARNING); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 982, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_code, __pyx_t_13) < 0) __PYX_ERR(0, 982, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

      /* "DHParser/ebnf.py":980
 *             redeclared = self.directives.tokens & tokens
 *             if redeclared:
 *                 self.tree.new_error(node, 'Tokens %s have already been declared earlier. '             # <<<<<<<<<<<<<<
 *                                     % str(redeclared) + 'Later declaration will be ignored',
 *                                     code=Error.REDECLARED_TOKEN_WARNING)
 */
      __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 980, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

      /* "DHParser/ebnf.py":979
 *             tokens = {child.content.strip() for child in node.children[1:]}
 *             redeclared = self.directives.tokens & tokens
 *             if redeclared:             # <<<<<<<<<<<<<<
 *                 self.tree.new_error(node, 'Tokens %s have already been declared earlier. '
 *                                     % str(redeclared) + 'Later declaration will be ignored',
 */
    }

    /* "DHParser/ebnf.py":983
 *                                     % str(redeclared) + 'Later declaration will be ignored',
 *                                     code=Error.REDECLARED_TOKEN_WARNING)
 *             self.directives.tokens |= tokens - redeclared             # <<<<<<<<<<<<<<
 * 
 *         elif key.endswith('_filter'):
 */
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_directives); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 983, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_tokens); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 983, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyNumber_Subtract(__pyx_v_tokens, __pyx_v_redeclared); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 983, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = PyNumber_InPlaceOr(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 983, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_13, __pyx_n_s_tokens, __pyx_t_7) < 0) __PYX_ERR(0, 983, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

    /* "DHParser/ebnf.py":976
 *             self.directives.literalws = wsp
 * 
 *         elif key in {'tokens', 'preprocessor_tokens'}:             # <<<<<<<<<<<<<<
 *             tokens = {child.content.strip() for child in node.children[1:]}
 *             redeclared = self.directives.tokens & tokens
 */
    goto __pyx_L7;
  }

  /* "DHParser/ebnf.py":985
 *             self.directives.tokens |= tokens - redeclared
 * 
 *         elif key.endswith('_filter'):             # <<<<<<<<<<<<<<
 *             check_argnum()
 *             symbol = key[:-7]
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_key, __pyx_n_s_endswith); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_13 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, __pyx_n_u_filter_2) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_n_u_filter_2);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 985, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  if (__pyx_t_5) {

    /* "DHParser/ebnf.py":986
 * 
 *         elif key.endswith('_filter'):
 *             check_argnum()             # <<<<<<<<<<<<<<
 *             symbol = key[:-7]
 *             self.directives.filter[symbol] = node.children[1].content.strip()
 */
    __pyx_t_13 = __Pyx_PyObject_CallNoArg(__pyx_v_check_argnum); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 986, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

    /* "DHParser/ebnf.py":987
 *         elif key.endswith('_filter'):
 *             check_argnum()
 *             symbol = key[:-7]             # <<<<<<<<<<<<<<
 *             self.directives.filter[symbol] = node.children[1].content.strip()
 * 
 */
    __pyx_t_13 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_key, 0, -7L, NULL, NULL, &__pyx_slice__41, 0, 1, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 987, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_v_symbol = __pyx_t_13;
    __pyx_t_13 = 0;

    /* "DHParser/ebnf.py":988
 *             check_argnum()
 *             symbol = key[:-7]
 *             self.directives.filter[symbol] = node.children[1].content.strip()             # <<<<<<<<<<<<<<
 * 
 *         elif key.endswith('_error'):
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 988, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_7, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 988, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_content); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 988, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_strip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 988, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_13 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 988, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_directives); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 988, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_filter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 988, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_v_symbol, __pyx_t_13) < 0)) __PYX_ERR(0, 988, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

    /* "DHParser/ebnf.py":985
 *             self.directives.tokens |= tokens - redeclared
 * 
 *         elif key.endswith('_filter'):             # <<<<<<<<<<<<<<
 *             check_argnum()
 *             symbol = key[:-7]
 */
    goto __pyx_L7;
  }

  /* "DHParser/ebnf.py":990
 *             self.directives.filter[symbol] = node.children[1].content.strip()
 * 
 *         elif key.endswith('_error'):             # <<<<<<<<<<<<<<
 *             check_argnum(2)
 *             symbol = key[:-6]
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_key, __pyx_n_s_endswith); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_13 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, __pyx_n_u_error_3) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_n_u_error_3);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 990, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  if (__pyx_t_5) {

    /* "DHParser/ebnf.py":991
 * 
 *         elif key.endswith('_error'):
 *             check_argnum(2)             # <<<<<<<<<<<<<<
 *             symbol = key[:-6]
 *             error_msgs = self.directives.error.get(symbol, [])
 */
    __pyx_t_13 = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_12on_directive_check_argnum(__pyx_v_check_argnum, __pyx_int_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 991, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

    /* "DHParser/ebnf.py":992
 *         elif key.endswith('_error'):
 *             check_argnum(2)
 *             symbol = key[:-6]             # <<<<<<<<<<<<<<
 *             error_msgs = self.directives.error.get(symbol, [])
 *             if symbol in self.rules:
 */
    __pyx_t_13 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_key, 0, -6L, NULL, NULL, &__pyx_slice__42, 0, 1, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 992, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_v_symbol = __pyx_t_13;
    __pyx_t_13 = 0;

    /* "DHParser/ebnf.py":993
 *             check_argnum(2)
 *             symbol = key[:-6]
 *             error_msgs = self.directives.error.get(symbol, [])             # <<<<<<<<<<<<<<
 *             if symbol in self.rules:
 *                 self.tree.new_error(node, 'Custom error message for symbol "%s"' % symbol
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_directives); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 993, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 993, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 993, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 993, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = NULL;
    __pyx_t_11 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_11 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_symbol, __pyx_t_2};
      __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 993, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_symbol, __pyx_t_2};
      __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 993, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 993, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_1) {
        __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __pyx_t_1 = NULL;
      }
      __Pyx_INCREF(__pyx_v_symbol);
      __Pyx_GIVEREF(__pyx_v_symbol);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_11, __pyx_v_symbol);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_11, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 993, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_error_msgs = __pyx_t_13;
    __pyx_t_13 = 0;

    /* "DHParser/ebnf.py":994
 *             symbol = key[:-6]
 *             error_msgs = self.directives.error.get(symbol, [])
 *             if symbol in self.rules:             # <<<<<<<<<<<<<<
 *                 self.tree.new_error(node, 'Custom error message for symbol "%s"' % symbol
 *                                     + 'must be defined before the symbol!')
 */
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_rules); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 994, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_symbol, __pyx_t_13, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 994, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __pyx_t_4 = (__pyx_t_5 != 0);
    if (__pyx_t_4) {

      /* "DHParser/ebnf.py":995
 *             error_msgs = self.directives.error.get(symbol, [])
 *             if symbol in self.rules:
 *                 self.tree.new_error(node, 'Custom error message for symbol "%s"' % symbol             # <<<<<<<<<<<<<<
 *                                     + 'must be defined before the symbol!')
 *             if node.children[1 if len(node.children) == 2 else 2].tag_name != 'literal':
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 995, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_new_error); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 995, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Custom_error_message_for_symbol, __pyx_v_symbol); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 995, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);

      /* "DHParser/ebnf.py":996
 *             if symbol in self.rules:
 *                 self.tree.new_error(node, 'Custom error message for symbol "%s"' % symbol
 *                                     + 'must be defined before the symbol!')             # <<<<<<<<<<<<<<
 *             if node.children[1 if len(node.children) == 2 else 2].tag_name != 'literal':
 *                 self.tree.new_error(
 */
      __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_kp_u_must_be_defined_before_the_symbo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 996, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = NULL;
      __pyx_t_11 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_11 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_cur_scope->__pyx_v_node, __pyx_t_2};
        __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 995, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_cur_scope->__pyx_v_node, __pyx_t_2};
        __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 995, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      {
        __pyx_t_1 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (__pyx_t_7) {
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __pyx_t_7 = NULL;
        }
        __Pyx_INCREF(__pyx_cur_scope->__pyx_v_node);
        __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_node);
        PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_11, __pyx_cur_scope->__pyx_v_node);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_11, __pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 995, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

      /* "DHParser/ebnf.py":994
 *             symbol = key[:-6]
 *             error_msgs = self.directives.error.get(symbol, [])
 *             if symbol in self.rules:             # <<<<<<<<<<<<<<
 *                 self.tree.new_error(node, 'Custom error message for symbol "%s"' % symbol
 *                                     + 'must be defined before the symbol!')
 */
    }

    /* "DHParser/ebnf.py":997
 *                 self.tree.new_error(node, 'Custom error message for symbol "%s"' % symbol
 *                                     + 'must be defined before the symbol!')
 *             if node.children[1 if len(node.children) == 2 else 2].tag_name != 'literal':             # <<<<<<<<<<<<<<
 *                 self.tree.new_error(
 *                     node, 'Directive "%s" requires message string or a a pair ' % key +
 */
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 997, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 997, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_14 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 997, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (((__pyx_t_14 == 2) != 0)) {
      __pyx_t_9 = 1;
    } else {
      __pyx_t_9 = 2;
    }
    __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_13, __pyx_t_9, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 997, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_tag_name); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 997, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_13, __pyx_n_u_literal, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 997, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (__pyx_t_4) {

      /* "DHParser/ebnf.py":998
 *                                     + 'must be defined before the symbol!')
 *             if node.children[1 if len(node.children) == 2 else 2].tag_name != 'literal':
 *                 self.tree.new_error(             # <<<<<<<<<<<<<<
 *                     node, 'Directive "%s" requires message string or a a pair ' % key +
 *                     '(regular expression or search string, message string) as argument!')
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 998, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_new_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "DHParser/ebnf.py":999
 *             if node.children[1 if len(node.children) == 2 else 2].tag_name != 'literal':
 *                 self.tree.new_error(
 *                     node, 'Directive "%s" requires message string or a a pair ' % key +             # <<<<<<<<<<<<<<
 *                     '(regular expression or search string, message string) as argument!')
 *             if len(node.children) == 2:
 */
      __pyx_t_8 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Directive_s_requires_message_str, __pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 999, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_8, __pyx_kp_u_regular_expression_or_search_st); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 999, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      __pyx_t_11 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_11 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_cur_scope->__pyx_v_node, __pyx_t_2};
        __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 998, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_cur_scope->__pyx_v_node, __pyx_t_2};
        __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 998, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      {
        __pyx_t_7 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 998, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (__pyx_t_8) {
          __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __pyx_t_8 = NULL;
        }
        __Pyx_INCREF(__pyx_cur_scope->__pyx_v_node);
        __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_node);
        PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_11, __pyx_cur_scope->__pyx_v_node);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_11, __pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 998, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

      /* "DHParser/ebnf.py":997
 *                 self.tree.new_error(node, 'Custom error message for symbol "%s"' % symbol
 *                                     + 'must be defined before the symbol!')
 *             if node.children[1 if len(node.children) == 2 else 2].tag_name != 'literal':             # <<<<<<<<<<<<<<
 *                 self.tree.new_error(
 *                     node, 'Directive "%s" requires message string or a a pair ' % key +
 */
    }

    /* "DHParser/ebnf.py":1001
 *                     node, 'Directive "%s" requires message string or a a pair ' % key +
 *                     '(regular expression or search string, message string) as argument!')
 *             if len(node.children) == 2:             # <<<<<<<<<<<<<<
 *                 error_msgs.append(('', unrepr(node.children[1].content)))
 *             elif len(node.children) == 3:
 */
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1001, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_9 = PyObject_Length(__pyx_t_13); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1001, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __pyx_t_4 = ((__pyx_t_9 == 2) != 0);
    if (__pyx_t_4) {

      /* "DHParser/ebnf.py":1002
 *                     '(regular expression or search string, message string) as argument!')
 *             if len(node.children) == 2:
 *                 error_msgs.append(('', unrepr(node.children[1].content)))             # <<<<<<<<<<<<<<
 *             elif len(node.children) == 3:
 *                 rule = self._gen_search_rule(node.children[1])
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_unrepr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1002, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1002, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_7, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1002, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_content); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1002, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      __pyx_t_13 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1002, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1002, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_kp_u__2);
      __Pyx_GIVEREF(__pyx_kp_u__2);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__2);
      __Pyx_GIVEREF(__pyx_t_13);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_13);
      __pyx_t_13 = 0;
      __pyx_t_15 = __Pyx_PyObject_Append(__pyx_v_error_msgs, __pyx_t_1); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 1002, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "DHParser/ebnf.py":1001
 *                     node, 'Directive "%s" requires message string or a a pair ' % key +
 *                     '(regular expression or search string, message string) as argument!')
 *             if len(node.children) == 2:             # <<<<<<<<<<<<<<
 *                 error_msgs.append(('', unrepr(node.children[1].content)))
 *             elif len(node.children) == 3:
 */
      goto __pyx_L44;
    }

    /* "DHParser/ebnf.py":1003
 *             if len(node.children) == 2:
 *                 error_msgs.append(('', unrepr(node.children[1].content)))
 *             elif len(node.children) == 3:             # <<<<<<<<<<<<<<
 *                 rule = self._gen_search_rule(node.children[1])
 *                 error_msgs.append((rule if rule else unrepr(node.children[1].content),
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1003, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1003, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = ((__pyx_t_9 == 3) != 0);
    if (__pyx_t_4) {

      /* "DHParser/ebnf.py":1004
 *                 error_msgs.append(('', unrepr(node.children[1].content)))
 *             elif len(node.children) == 3:
 *                 rule = self._gen_search_rule(node.children[1])             # <<<<<<<<<<<<<<
 *                 error_msgs.append((rule if rule else unrepr(node.children[1].content),
 *                                    unrepr(node.children[2].content)))
 */
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_gen_search_rule); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1004, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1004, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_7, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1004, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_13);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_13, function);
        }
      }
      __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_7, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_2);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1004, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_v_rule = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "DHParser/ebnf.py":1005
 *             elif len(node.children) == 3:
 *                 rule = self._gen_search_rule(node.children[1])
 *                 error_msgs.append((rule if rule else unrepr(node.children[1].content),             # <<<<<<<<<<<<<<
 *                                    unrepr(node.children[2].content)))
 *             else:
 */
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_rule); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1005, __pyx_L1_error)
      if (__pyx_t_4) {
        __Pyx_INCREF(__pyx_v_rule);
        __pyx_t_1 = __pyx_v_rule;
      } else {
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_unrepr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1005, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1005, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_7, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1005, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_content); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1005, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
          }
        }
        __pyx_t_13 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1005, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_1 = __pyx_t_13;
        __pyx_t_13 = 0;
      }

      /* "DHParser/ebnf.py":1006
 *                 rule = self._gen_search_rule(node.children[1])
 *                 error_msgs.append((rule if rule else unrepr(node.children[1].content),
 *                                    unrepr(node.children[2].content)))             # <<<<<<<<<<<<<<
 *             else:
 *                 self.tree.new_error(node, 'Directive "%s" allows at most two parameters' % key)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_unrepr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1006, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1006, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_7, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1006, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_content); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1006, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      __pyx_t_13 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1006, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "DHParser/ebnf.py":1005
 *             elif len(node.children) == 3:
 *                 rule = self._gen_search_rule(node.children[1])
 *                 error_msgs.append((rule if rule else unrepr(node.children[1].content),             # <<<<<<<<<<<<<<
 *                                    unrepr(node.children[2].content)))
 *             else:
 */
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1005, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_13);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_13);
      __pyx_t_1 = 0;
      __pyx_t_13 = 0;
      __pyx_t_15 = __Pyx_PyObject_Append(__pyx_v_error_msgs, __pyx_t_2); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 1005, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "DHParser/ebnf.py":1003
 *             if len(node.children) == 2:
 *                 error_msgs.append(('', unrepr(node.children[1].content)))
 *             elif len(node.children) == 3:             # <<<<<<<<<<<<<<
 *                 rule = self._gen_search_rule(node.children[1])
 *                 error_msgs.append((rule if rule else unrepr(node.children[1].content),
 */
      goto __pyx_L44;
    }

    /* "DHParser/ebnf.py":1008
 *                                    unrepr(node.children[2].content)))
 *             else:
 *                 self.tree.new_error(node, 'Directive "%s" allows at most two parameters' % key)             # <<<<<<<<<<<<<<
 *             self.directives.error[symbol] = error_msgs
 * 
 */
    /*else*/ {
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1008, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_new_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1008, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_13 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Directive_s_allows_at_most_two_p, __pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1008, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_7 = NULL;
      __pyx_t_11 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_11 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_cur_scope->__pyx_v_node, __pyx_t_13};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1008, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_cur_scope->__pyx_v_node, __pyx_t_13};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1008, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1008, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (__pyx_t_7) {
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
        }
        __Pyx_INCREF(__pyx_cur_scope->__pyx_v_node);
        __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_node);
        PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_11, __pyx_cur_scope->__pyx_v_node);
        __Pyx_GIVEREF(__pyx_t_13);
        PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_11, __pyx_t_13);
        __pyx_t_13 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1008, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_L44:;

    /* "DHParser/ebnf.py":1009
 *             else:
 *                 self.tree.new_error(node, 'Directive "%s" allows at most two parameters' % key)
 *             self.directives.error[symbol] = error_msgs             # <<<<<<<<<<<<<<
 * 
 *         elif key.endswith('_skip'):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_directives); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_symbol, __pyx_v_error_msgs) < 0)) __PYX_ERR(0, 1009, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "DHParser/ebnf.py":990
 *             self.directives.filter[symbol] = node.children[1].content.strip()
 * 
 *         elif key.endswith('_error'):             # <<<<<<<<<<<<<<
 *             check_argnum(2)
 *             symbol = key[:-6]
 */
    goto __pyx_L7;
  }

  /* "DHParser/ebnf.py":1011
 *             self.directives.error[symbol] = error_msgs
 * 
 *         elif key.endswith('_skip'):             # <<<<<<<<<<<<<<
 *             symbol = key[:-5]
 *             if symbol in self.rules:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_key, __pyx_n_s_endswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __pyx_n_u_skip_2) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_skip_2);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1011, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "DHParser/ebnf.py":1012
 * 
 *         elif key.endswith('_skip'):
 *             symbol = key[:-5]             # <<<<<<<<<<<<<<
 *             if symbol in self.rules:
 *                 self.tree.new_error(node, 'Skip list for resuming in series for symbol "{}"'
 */
    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_key, 0, -5L, NULL, NULL, &__pyx_slice__43, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1012, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_symbol = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "DHParser/ebnf.py":1013
 *         elif key.endswith('_skip'):
 *             symbol = key[:-5]
 *             if symbol in self.rules:             # <<<<<<<<<<<<<<
 *                 self.tree.new_error(node, 'Skip list for resuming in series for symbol "{}"'
 *                                     'must be defined before the symbol!'.format(symbol))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_rules); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1013, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_v_symbol, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1013, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = (__pyx_t_4 != 0);
    if (__pyx_t_5) {

      /* "DHParser/ebnf.py":1014
 *             symbol = key[:-5]
 *             if symbol in self.rules:
 *                 self.tree.new_error(node, 'Skip list for resuming in series for symbol "{}"'             # <<<<<<<<<<<<<<
 *                                     'must be defined before the symbol!'.format(symbol))
 *             self.directives.skip[symbol] = self._gen_search_list(node.children[1:])
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1014, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_new_error); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1014, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "DHParser/ebnf.py":1015
 *             if symbol in self.rules:
 *                 self.tree.new_error(node, 'Skip list for resuming in series for symbol "{}"'
 *                                     'must be defined before the symbol!'.format(symbol))             # <<<<<<<<<<<<<<
 *             self.directives.skip[symbol] = self._gen_search_list(node.children[1:])
 * 
 */
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Skip_list_for_resuming_in_series, __pyx_n_s_format); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1015, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_7 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_13);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_13, function);
        }
      }
      __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_7, __pyx_v_symbol) : __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_v_symbol);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1015, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_13 = NULL;
      __pyx_t_11 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_13)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_13);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_11 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_cur_scope->__pyx_v_node, __pyx_t_2};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_cur_scope->__pyx_v_node, __pyx_t_2};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      {
        __pyx_t_7 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1014, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (__pyx_t_13) {
          __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_13); __pyx_t_13 = NULL;
        }
        __Pyx_INCREF(__pyx_cur_scope->__pyx_v_node);
        __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_node);
        PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_11, __pyx_cur_scope->__pyx_v_node);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_11, __pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "DHParser/ebnf.py":1013
 *         elif key.endswith('_skip'):
 *             symbol = key[:-5]
 *             if symbol in self.rules:             # <<<<<<<<<<<<<<
 *                 self.tree.new_error(node, 'Skip list for resuming in series for symbol "{}"'
 *                                     'must be defined before the symbol!'.format(symbol))
 */
    }

    /* "DHParser/ebnf.py":1016
 *                 self.tree.new_error(node, 'Skip list for resuming in series for symbol "{}"'
 *                                     'must be defined before the symbol!'.format(symbol))
 *             self.directives.skip[symbol] = self._gen_search_list(node.children[1:])             # <<<<<<<<<<<<<<
 * 
 *         elif key.endswith('_resume'):
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_gen_search_list); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_7, 1, 0, NULL, NULL, &__pyx_slice__23, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_7, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_2);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_directives); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_skip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_v_symbol, __pyx_t_1) < 0)) __PYX_ERR(0, 1016, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "DHParser/ebnf.py":1011
 *             self.directives.error[symbol] = error_msgs
 * 
 *         elif key.endswith('_skip'):             # <<<<<<<<<<<<<<
 *             symbol = key[:-5]
 *             if symbol in self.rules:
 */
    goto __pyx_L7;
  }

  /* "DHParser/ebnf.py":1018
 *             self.directives.skip[symbol] = self._gen_search_list(node.children[1:])
 * 
 *         elif key.endswith('_resume'):             # <<<<<<<<<<<<<<
 *             symbol = key[:-7]
 *             self.directives.resume[symbol] = self._gen_search_list(node.children[1:])
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_key, __pyx_n_s_endswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __pyx_n_u_resume_2) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_resume_2);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1018, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "DHParser/ebnf.py":1019
 * 
 *         elif key.endswith('_resume'):
 *             symbol = key[:-7]             # <<<<<<<<<<<<<<
 *             self.directives.resume[symbol] = self._gen_search_list(node.children[1:])
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_key, 0, -7L, NULL, NULL, &__pyx_slice__41, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1019, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_symbol = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "DHParser/ebnf.py":1020
 *         elif key.endswith('_resume'):
 *             symbol = key[:-7]
 *             self.directives.resume[symbol] = self._gen_search_list(node.children[1:])             # <<<<<<<<<<<<<<
 * 
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_gen_search_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1020, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1020, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_t_8, 1, 0, NULL, NULL, &__pyx_slice__23, 1, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1020, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1020, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_directives); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1020, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_resume); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1020, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_v_symbol, __pyx_t_1) < 0)) __PYX_ERR(0, 1020, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "DHParser/ebnf.py":1018
 *             self.directives.skip[symbol] = self._gen_search_list(node.children[1:])
 * 
 *         elif key.endswith('_resume'):             # <<<<<<<<<<<<<<
 *             symbol = key[:-7]
 *             self.directives.resume[symbol] = self._gen_search_list(node.children[1:])
 */
    goto __pyx_L7;
  }

  /* "DHParser/ebnf.py":1023
 * 
 *         else:
 *             self.tree.new_error(node, 'Unknown directive %s ! (Known ones are %s .)' %             # <<<<<<<<<<<<<<
 *                                 (key, ', '.join(list(self.directives.keys()))))
 * 
 */
  /*else*/ {
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1023, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_new_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1023, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyTuple_New(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1023, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = 0;
    __pyx_t_10 = 127;
    __Pyx_INCREF(__pyx_kp_u_Unknown_directive);
    __pyx_t_9 += 18;
    __Pyx_GIVEREF(__pyx_kp_u_Unknown_directive);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u_Unknown_directive);

    /* "DHParser/ebnf.py":1024
 *         else:
 *             self.tree.new_error(node, 'Unknown directive %s ! (Known ones are %s .)' %
 *                                 (key, ', '.join(list(self.directives.keys()))))             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
    __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_cur_scope->__pyx_v_key), __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1024, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_10;
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_8);
    __pyx_t_8 = 0;
    __Pyx_INCREF(__pyx_kp_u_Known_ones_are);
    __pyx_t_9 += 19;
    __Pyx_GIVEREF(__pyx_kp_u_Known_ones_are);
    PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_kp_u_Known_ones_are);
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_directives); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1024, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_keys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1024, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __pyx_t_13 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_13)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_13);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_8 = (__pyx_t_13) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_13) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1024, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PySequence_List(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1024, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyUnicode_Join(__pyx_kp_u__40, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1024, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_10;
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_8);
    __pyx_t_8 = 0;
    __Pyx_INCREF(__pyx_kp_u__44);
    __pyx_t_9 += 3;
    __Pyx_GIVEREF(__pyx_kp_u__44);
    PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_kp_u__44);

    /* "DHParser/ebnf.py":1023
 * 
 *         else:
 *             self.tree.new_error(node, 'Unknown directive %s ! (Known ones are %s .)' %             # <<<<<<<<<<<<<<
 *                                 (key, ', '.join(list(self.directives.keys()))))
 * 
 */
    __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1023, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    __pyx_t_11 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_11 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_cur_scope->__pyx_v_node, __pyx_t_8};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1023, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_cur_scope->__pyx_v_node, __pyx_t_8};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1023, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1023, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_node);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_node);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_11, __pyx_cur_scope->__pyx_v_node);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_11, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1023, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L7:;

  /* "DHParser/ebnf.py":1026
 *                                 (key, ', '.join(list(self.directives.keys()))))
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             if symbol not in self.symbols:
 *                 # remember first use of symbol, so that dangling references or
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
    __Pyx_XGOTREF(__pyx_t_16);
    __Pyx_XGOTREF(__pyx_t_17);
    __Pyx_XGOTREF(__pyx_t_18);
    /*try:*/ {

      /* "DHParser/ebnf.py":1027
 * 
 *         try:
 *             if symbol not in self.symbols:             # <<<<<<<<<<<<<<
 *                 # remember first use of symbol, so that dangling references or
 *                 # redundant definitions or usages of symbols can be detected later
 */
      if (unlikely(!__pyx_v_symbol)) { __Pyx_RaiseUnboundLocalError("symbol"); __PYX_ERR(0, 1027, __pyx_L46_error) }
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1027, __pyx_L46_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_symbol, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1027, __pyx_L46_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_4 = (__pyx_t_5 != 0);
      if (__pyx_t_4) {

        /* "DHParser/ebnf.py":1030
 *                 # remember first use of symbol, so that dangling references or
 *                 # redundant definitions or usages of symbols can be detected later
 *                 self.symbols[symbol] = node             # <<<<<<<<<<<<<<
 *         except NameError:
 *             pass  # no symbol was referred to in directive
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1030, __pyx_L46_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (unlikely(!__pyx_v_symbol)) { __Pyx_RaiseUnboundLocalError("symbol"); __PYX_ERR(0, 1030, __pyx_L46_error) }
        if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_symbol, __pyx_cur_scope->__pyx_v_node) < 0)) __PYX_ERR(0, 1030, __pyx_L46_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "DHParser/ebnf.py":1027
 * 
 *         try:
 *             if symbol not in self.symbols:             # <<<<<<<<<<<<<<
 *                 # remember first use of symbol, so that dangling references or
 *                 # redundant definitions or usages of symbols can be detected later
 */
      }

      /* "DHParser/ebnf.py":1026
 *                                 (key, ', '.join(list(self.directives.keys()))))
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             if symbol not in self.symbols:
 *                 # remember first use of symbol, so that dangling references or
 */
    }
    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
    goto __pyx_L51_try_end;
    __pyx_L46_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "DHParser/ebnf.py":1031
 *                 # redundant definitions or usages of symbols can be detected later
 *                 self.symbols[symbol] = node
 *         except NameError:             # <<<<<<<<<<<<<<
 *             pass  # no symbol was referred to in directive
 * 
 */
    __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_NameError);
    if (__pyx_t_11) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L47_exception_handled;
    }
    goto __pyx_L48_except_error;
    __pyx_L48_except_error:;

    /* "DHParser/ebnf.py":1026
 *                                 (key, ', '.join(list(self.directives.keys()))))
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             if symbol not in self.symbols:
 *                 # remember first use of symbol, so that dangling references or
 */
    __Pyx_XGIVEREF(__pyx_t_16);
    __Pyx_XGIVEREF(__pyx_t_17);
    __Pyx_XGIVEREF(__pyx_t_18);
    __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
    goto __pyx_L1_error;
    __pyx_L47_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_16);
    __Pyx_XGIVEREF(__pyx_t_17);
    __Pyx_XGIVEREF(__pyx_t_18);
    __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
    __pyx_L51_try_end:;
  }

  /* "DHParser/ebnf.py":1034
 *             pass  # no symbol was referred to in directive
 * 
 *         return ""             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_kp_u__2);
  __pyx_r = __pyx_kp_u__2;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":922
 * 
 * 
 *     def on_directive(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         key = node.children[0].content
 *         assert key not in self.directives.tokens
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_directive", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_check_argnum);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_child);
  __Pyx_XDECREF(__pyx_v_node_type);
  __Pyx_XDECREF(__pyx_v_values);
  __Pyx_XDECREF(__pyx_v_wsp);
  __Pyx_XDECREF(__pyx_v_tokens);
  __Pyx_XDECREF(__pyx_v_redeclared);
  __Pyx_XDECREF(__pyx_v_symbol);
  __Pyx_XDECREF(__pyx_v_error_msgs);
  __Pyx_XDECREF(__pyx_v_rule);
  __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_child);
  __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_child);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":1037
 * 
 * 
 *     def non_terminal(self, node: Node, parser_class: str, custom_args: List[str] = []) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Compiles any non-terminal, where `parser_class` indicates the Parser class
 */

static PyObject *__pyx_pf_8DHParser_4ebnf_14__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_custom_args);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_custom_args);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_custom_args);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("DHParser.ebnf.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_35non_terminal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8DHParser_4ebnf_12EBNFCompiler_34non_terminal[] = "\n        Compiles any non-terminal, where `parser_class` indicates the Parser class\n        name for the particular non-terminal.\n        ";
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_35non_terminal = {"non_terminal", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_35non_terminal, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8DHParser_4ebnf_12EBNFCompiler_34non_terminal};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_35non_terminal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_node = 0;
  PyObject *__pyx_v_parser_class = 0;
  PyObject *__pyx_v_custom_args = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("non_terminal (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,&__pyx_n_s_parser_class,&__pyx_n_s_custom_args,0};
    PyObject* values[4] = {0,0,0,0};
    __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self);
    values[3] = __pyx_dynamic_args->__pyx_arg_custom_args;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("non_terminal", 0, 3, 4, 1); __PYX_ERR(0, 1037, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_parser_class)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("non_terminal", 0, 3, 4, 2); __PYX_ERR(0, 1037, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_custom_args);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "non_terminal") < 0)) __PYX_ERR(0, 1037, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_node = values[1];
    __pyx_v_parser_class = ((PyObject*)values[2]);
    __pyx_v_custom_args = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("non_terminal", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1037, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.non_terminal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser_class), (&PyUnicode_Type), 1, "parser_class", 1))) __PYX_ERR(0, 1037, __pyx_L1_error)
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_34non_terminal(__pyx_self, __pyx_v_self, __pyx_v_node, __pyx_v_parser_class, __pyx_v_custom_args);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_34non_terminal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node, PyObject *__pyx_v_parser_class, PyObject *__pyx_v_custom_args) {
  PyObject *__pyx_v_arguments = NULL;
  PyObject *__pyx_8genexpr4__pyx_v_r = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("non_terminal", 0);

  /* "DHParser/ebnf.py":1042
 *         name for the particular non-terminal.
 *         """
 *         arguments = [self.compile(r) for r in node.children] + custom_args             # <<<<<<<<<<<<<<
 *         return parser_class + '(' + ', '.join(arguments) + ')'
 * 
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1042, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1042, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1042, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1042, __pyx_L5_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1042, __pyx_L5_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1042, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1042, __pyx_L5_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1042, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_5(__pyx_t_3);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1042, __pyx_L5_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_r, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compile); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1042, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_8genexpr4__pyx_v_r) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_8genexpr4__pyx_v_r);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1042, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 1042, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_r); __pyx_8genexpr4__pyx_v_r = 0;
    goto __pyx_L8_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_r); __pyx_8genexpr4__pyx_v_r = 0;
    goto __pyx_L1_error;
    __pyx_L8_exit_scope:;
  } /* exit inner scope */
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_v_custom_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_arguments = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "DHParser/ebnf.py":1043
 *         """
 *         arguments = [self.compile(r) for r in node.children] + custom_args
 *         return parser_class + '(' + ', '.join(arguments) + ')'             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyUnicode_ConcatSafe(__pyx_v_parser_class, __pyx_kp_u__33); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyUnicode_Join(__pyx_kp_u__40, __pyx_v_arguments); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u__15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":1037
 * 
 * 
 *     def non_terminal(self, node: Node, parser_class: str, custom_args: List[str] = []) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Compiles any non-terminal, where `parser_class` indicates the Parser class
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.non_terminal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_arguments);
  __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_r);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":1046
 * 
 * 
 *     def on_expression(self, node) -> str:             # <<<<<<<<<<<<<<
 *         # TODO: Add check for errors like "a" | "ab" (which will always yield a, even for ab)
 *         return self.non_terminal(node, 'Alternative')
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_37on_expression(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_37on_expression = {"on_expression", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_37on_expression, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_37on_expression(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_node = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_expression (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_expression", 1, 2, 2, 1); __PYX_ERR(0, 1046, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_expression") < 0)) __PYX_ERR(0, 1046, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_node = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("on_expression", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1046, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_36on_expression(__pyx_self, __pyx_v_self, __pyx_v_node);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_36on_expression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("on_expression", 0);

  /* "DHParser/ebnf.py":1048
 *     def on_expression(self, node) -> str:
 *         # TODO: Add check for errors like "a" | "ab" (which will always yield a, even for ab)
 *         return self.non_terminal(node, 'Alternative')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_non_terminal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_node, __pyx_n_u_Alternative};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1048, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_node, __pyx_n_u_Alternative};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1048, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1048, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_node);
    __Pyx_GIVEREF(__pyx_v_node);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_node);
    __Pyx_INCREF(__pyx_n_u_Alternative);
    __Pyx_GIVEREF(__pyx_n_u_Alternative);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_Alternative);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1048, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1048, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":1046
 * 
 * 
 *     def on_expression(self, node) -> str:             # <<<<<<<<<<<<<<
 *         # TODO: Add check for errors like "a" | "ab" (which will always yield a, even for ab)
 *         return self.non_terminal(node, 'Alternative')
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":1051
 * 
 * 
 *     def _error_customization(self, node) -> Tuple[Tuple[Node, ...], List[str]]:             # <<<<<<<<<<<<<<
 *         mandatory_marker = []
 *         filtered_children = []  # type: List[Node]
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_39_error_customization(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_39_error_customization = {"_error_customization", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_39_error_customization, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_39_error_customization(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_node = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_error_customization (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_error_customization", 1, 2, 2, 1); __PYX_ERR(0, 1051, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_error_customization") < 0)) __PYX_ERR(0, 1051, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_node = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_error_customization", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1051, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler._error_customization", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_38_error_customization(__pyx_self, __pyx_v_self, __pyx_v_node);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_38_error_customization(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node) {
  PyObject *__pyx_v_mandatory_marker = NULL;
  PyObject *__pyx_v_filtered_children = NULL;
  PyObject *__pyx_v_nd = NULL;
  PyObject *__pyx_v_custom_args = NULL;
  PyObject *__pyx_v_current_symbol = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  __Pyx_RefNannySetupContext("_error_customization", 0);

  /* "DHParser/ebnf.py":1052
 * 
 *     def _error_customization(self, node) -> Tuple[Tuple[Node, ...], List[str]]:
 *         mandatory_marker = []             # <<<<<<<<<<<<<<
 *         filtered_children = []  # type: List[Node]
 *         for nd in node.children:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_mandatory_marker = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":1053
 *     def _error_customization(self, node) -> Tuple[Tuple[Node, ...], List[str]]:
 *         mandatory_marker = []
 *         filtered_children = []  # type: List[Node]             # <<<<<<<<<<<<<<
 *         for nd in node.children:
 *             if nd.tag_name == TOKEN_PTYPE and nd.content == "":
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1053, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_filtered_children = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":1054
 *         mandatory_marker = []
 *         filtered_children = []  # type: List[Node]
 *         for nd in node.children:             # <<<<<<<<<<<<<<
 *             if nd.tag_name == TOKEN_PTYPE and nd.content == "":
 *                 mandatory_marker.append(len(filtered_children))
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1054, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1054, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1054, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1054, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1054, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1054, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1054, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_nd, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "DHParser/ebnf.py":1055
 *         filtered_children = []  # type: List[Node]
 *         for nd in node.children:
 *             if nd.tag_name == TOKEN_PTYPE and nd.content == "":             # <<<<<<<<<<<<<<
 *                 mandatory_marker.append(len(filtered_children))
 *                 if len(mandatory_marker) > 1:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_nd, __pyx_n_s_tag_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_TOKEN_PTYPE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1055, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1055, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_8) {
    } else {
      __pyx_t_5 = __pyx_t_8;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_nd, __pyx_n_s_content); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_kp_u__45, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1055, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_5 = __pyx_t_8;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_5) {

      /* "DHParser/ebnf.py":1056
 *         for nd in node.children:
 *             if nd.tag_name == TOKEN_PTYPE and nd.content == "":
 *                 mandatory_marker.append(len(filtered_children))             # <<<<<<<<<<<<<<
 *                 if len(mandatory_marker) > 1:
 *                     self.tree.new_error(nd, 'One mandatory marker () sufficient to declare '
 */
      __pyx_t_9 = PyList_GET_SIZE(__pyx_v_filtered_children); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1056, __pyx_L1_error)
      __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1056, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_mandatory_marker, __pyx_t_7); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1056, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "DHParser/ebnf.py":1057
 *             if nd.tag_name == TOKEN_PTYPE and nd.content == "":
 *                 mandatory_marker.append(len(filtered_children))
 *                 if len(mandatory_marker) > 1:             # <<<<<<<<<<<<<<
 *                     self.tree.new_error(nd, 'One mandatory marker () sufficient to declare '
 *                                         'the rest of the elements as mandatory.', Error.WARNING)
 */
      __pyx_t_9 = PyList_GET_SIZE(__pyx_v_mandatory_marker); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1057, __pyx_L1_error)
      __pyx_t_5 = ((__pyx_t_9 > 1) != 0);
      if (__pyx_t_5) {

        /* "DHParser/ebnf.py":1058
 *                 mandatory_marker.append(len(filtered_children))
 *                 if len(mandatory_marker) > 1:
 *                     self.tree.new_error(nd, 'One mandatory marker () sufficient to declare '             # <<<<<<<<<<<<<<
 *                                         'the rest of the elements as mandatory.', Error.WARNING)
 *             else:
 */
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1058, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_new_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1058, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "DHParser/ebnf.py":1059
 *                 if len(mandatory_marker) > 1:
 *                     self.tree.new_error(nd, 'One mandatory marker () sufficient to declare '
 *                                         'the rest of the elements as mandatory.', Error.WARNING)             # <<<<<<<<<<<<<<
 *             else:
 *                 filtered_children.append(nd)
 */
        __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Error); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1059, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_WARNING); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1059, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = NULL;
        __pyx_t_12 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
            __pyx_t_12 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_nd, __pyx_kp_u_One_mandatory_marker_sufficient, __pyx_t_11};
          __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1058, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_nd, __pyx_kp_u_One_mandatory_marker_sufficient, __pyx_t_11};
          __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1058, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        } else
        #endif
        {
          __pyx_t_13 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1058, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          if (__pyx_t_6) {
            __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_6); __pyx_t_6 = NULL;
          }
          __Pyx_INCREF(__pyx_v_nd);
          __Pyx_GIVEREF(__pyx_v_nd);
          PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_12, __pyx_v_nd);
          __Pyx_INCREF(__pyx_kp_u_One_mandatory_marker_sufficient);
          __Pyx_GIVEREF(__pyx_kp_u_One_mandatory_marker_sufficient);
          PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_12, __pyx_kp_u_One_mandatory_marker_sufficient);
          __Pyx_GIVEREF(__pyx_t_11);
          PyTuple_SET_ITEM(__pyx_t_13, 2+__pyx_t_12, __pyx_t_11);
          __pyx_t_11 = 0;
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_13, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1058, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "DHParser/ebnf.py":1057
 *             if nd.tag_name == TOKEN_PTYPE and nd.content == "":
 *                 mandatory_marker.append(len(filtered_children))
 *                 if len(mandatory_marker) > 1:             # <<<<<<<<<<<<<<
 *                     self.tree.new_error(nd, 'One mandatory marker () sufficient to declare '
 *                                         'the rest of the elements as mandatory.', Error.WARNING)
 */
      }

      /* "DHParser/ebnf.py":1055
 *         filtered_children = []  # type: List[Node]
 *         for nd in node.children:
 *             if nd.tag_name == TOKEN_PTYPE and nd.content == "":             # <<<<<<<<<<<<<<
 *                 mandatory_marker.append(len(filtered_children))
 *                 if len(mandatory_marker) > 1:
 */
      goto __pyx_L5;
    }

    /* "DHParser/ebnf.py":1061
 *                                         'the rest of the elements as mandatory.', Error.WARNING)
 *             else:
 *                 filtered_children.append(nd)             # <<<<<<<<<<<<<<
 *         custom_args = ['mandatory=%i' % mandatory_marker[0]] if mandatory_marker else []
 *         # add custom error message if it has been declared for the current definition
 */
    /*else*/ {
      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_filtered_children, __pyx_v_nd); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1061, __pyx_L1_error)
    }
    __pyx_L5:;

    /* "DHParser/ebnf.py":1054
 *         mandatory_marker = []
 *         filtered_children = []  # type: List[Node]
 *         for nd in node.children:             # <<<<<<<<<<<<<<
 *             if nd.tag_name == TOKEN_PTYPE and nd.content == "":
 *                 mandatory_marker.append(len(filtered_children))
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":1062
 *             else:
 *                 filtered_children.append(nd)
 *         custom_args = ['mandatory=%i' % mandatory_marker[0]] if mandatory_marker else []             # <<<<<<<<<<<<<<
 *         # add custom error message if it has been declared for the current definition
 *         if custom_args:
 */
  __pyx_t_5 = (PyList_GET_SIZE(__pyx_v_mandatory_marker) != 0);
  if (__pyx_t_5) {
    __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_mandatory_marker, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1062, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_mandatory_i, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1062, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1062, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_1);
    PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_2 = __pyx_t_7;
    __pyx_t_7 = 0;
  } else {
    __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1062, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_2 = __pyx_t_7;
    __pyx_t_7 = 0;
  }
  __pyx_v_custom_args = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":1064
 *         custom_args = ['mandatory=%i' % mandatory_marker[0]] if mandatory_marker else []
 *         # add custom error message if it has been declared for the current definition
 *         if custom_args:             # <<<<<<<<<<<<<<
 *             current_symbol = next(reversed(self.rules.keys()))
 *             # add customized error messages, if defined
 */
  __pyx_t_5 = (__pyx_v_custom_args != Py_None)&&(PyList_GET_SIZE(__pyx_v_custom_args) != 0);
  if (__pyx_t_5) {

    /* "DHParser/ebnf.py":1065
 *         # add custom error message if it has been declared for the current definition
 *         if custom_args:
 *             current_symbol = next(reversed(self.rules.keys()))             # <<<<<<<<<<<<<<
 *             # add customized error messages, if defined
 *             if current_symbol in self.directives.error:
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rules); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_reversed, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyIter_Next(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_current_symbol = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "DHParser/ebnf.py":1067
 *             current_symbol = next(reversed(self.rules.keys()))
 *             # add customized error messages, if defined
 *             if current_symbol in self.directives.error:             # <<<<<<<<<<<<<<
 *                 if current_symbol in self.consumed_custom_errors:
 *                     self.tree.new_error(
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_directives); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1067, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1067, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_current_symbol, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1067, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = (__pyx_t_5 != 0);
    if (__pyx_t_8) {

      /* "DHParser/ebnf.py":1068
 *             # add customized error messages, if defined
 *             if current_symbol in self.directives.error:
 *                 if current_symbol in self.consumed_custom_errors:             # <<<<<<<<<<<<<<
 *                     self.tree.new_error(
 *                         node, "Cannot apply customized error messages unambigiously, because "
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_consumed_custom_errors); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1068, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_current_symbol, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1068, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_5 = (__pyx_t_8 != 0);
      if (__pyx_t_5) {

        /* "DHParser/ebnf.py":1069
 *             if current_symbol in self.directives.error:
 *                 if current_symbol in self.consumed_custom_errors:
 *                     self.tree.new_error(             # <<<<<<<<<<<<<<
 *                         node, "Cannot apply customized error messages unambigiously, because "
 *                         "symbol {} contains more than one parser with a mandatory marker '' "
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1069, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_new_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1069, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "DHParser/ebnf.py":1072
 *                         node, "Cannot apply customized error messages unambigiously, because "
 *                         "symbol {} contains more than one parser with a mandatory marker '' "
 *                         "in its definiens.".format(current_symbol),             # <<<<<<<<<<<<<<
 *                         Error.AMBIGUOUS_ERROR_HANDLING)
 *                 else:
 */
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Cannot_apply_customized_error_me, __pyx_n_s_format); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1072, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_11 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_13);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_13, function);
          }
        }
        __pyx_t_2 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_11, __pyx_v_current_symbol) : __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_v_current_symbol);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1072, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

        /* "DHParser/ebnf.py":1073
 *                         "symbol {} contains more than one parser with a mandatory marker '' "
 *                         "in its definiens.".format(current_symbol),
 *                         Error.AMBIGUOUS_ERROR_HANDLING)             # <<<<<<<<<<<<<<
 *                 else:
 *                     # use class field instead or direct representation of error messages!
 */
        __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_Error); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1073, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_AMBIGUOUS_ERROR_HANDLING); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1073, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_13 = NULL;
        __pyx_t_12 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_13)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_13);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
            __pyx_t_12 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[4] = {__pyx_t_13, __pyx_v_node, __pyx_t_2, __pyx_t_11};
          __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1069, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[4] = {__pyx_t_13, __pyx_v_node, __pyx_t_2, __pyx_t_11};
          __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1069, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1069, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_13) {
            __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_13); __pyx_t_13 = NULL;
          }
          __Pyx_INCREF(__pyx_v_node);
          __Pyx_GIVEREF(__pyx_v_node);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_12, __pyx_v_node);
          __Pyx_GIVEREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_12, __pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_11);
          PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_12, __pyx_t_11);
          __pyx_t_2 = 0;
          __pyx_t_11 = 0;
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1069, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "DHParser/ebnf.py":1068
 *             # add customized error messages, if defined
 *             if current_symbol in self.directives.error:
 *                 if current_symbol in self.consumed_custom_errors:             # <<<<<<<<<<<<<<
 *                     self.tree.new_error(
 *                         node, "Cannot apply customized error messages unambigiously, because "
 */
        goto __pyx_L11;
      }

      /* "DHParser/ebnf.py":1076
 *                 else:
 *                     # use class field instead or direct representation of error messages!
 *                     custom_args.append('err_msgs=' + current_symbol + self.ERR_MSG_SUFFIX)             # <<<<<<<<<<<<<<
 *                     self.consumed_custom_errors.add(current_symbol)
 *             # add skip-rules to resume parsing of a series, if rules have been declared
 */
      /*else*/ {
        if (unlikely(__pyx_v_custom_args == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
          __PYX_ERR(0, 1076, __pyx_L1_error)
        }
        __pyx_t_1 = PyNumber_Add(__pyx_kp_u_err_msgs, __pyx_v_current_symbol); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1076, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ERR_MSG_SUFFIX); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1076, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1076, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_custom_args, __pyx_t_6); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1076, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "DHParser/ebnf.py":1077
 *                     # use class field instead or direct representation of error messages!
 *                     custom_args.append('err_msgs=' + current_symbol + self.ERR_MSG_SUFFIX)
 *                     self.consumed_custom_errors.add(current_symbol)             # <<<<<<<<<<<<<<
 *             # add skip-rules to resume parsing of a series, if rules have been declared
 *             if current_symbol in self.directives.skip:
 */
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_consumed_custom_errors); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1077, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_add); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1077, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
          }
        }
        __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_7, __pyx_v_current_symbol) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_current_symbol);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1077, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_L11:;

      /* "DHParser/ebnf.py":1067
 *             current_symbol = next(reversed(self.rules.keys()))
 *             # add customized error messages, if defined
 *             if current_symbol in self.directives.error:             # <<<<<<<<<<<<<<
 *                 if current_symbol in self.consumed_custom_errors:
 *                     self.tree.new_error(
 */
    }

    /* "DHParser/ebnf.py":1079
 *                     self.consumed_custom_errors.add(current_symbol)
 *             # add skip-rules to resume parsing of a series, if rules have been declared
 *             if current_symbol in self.directives.skip:             # <<<<<<<<<<<<<<
 *                 if current_symbol in self.consumed_skip_rules:
 *                     self.tree.new_error(
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_directives); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1079, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_skip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1079, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_current_symbol, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1079, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = (__pyx_t_5 != 0);
    if (__pyx_t_8) {

      /* "DHParser/ebnf.py":1080
 *             # add skip-rules to resume parsing of a series, if rules have been declared
 *             if current_symbol in self.directives.skip:
 *                 if current_symbol in self.consumed_skip_rules:             # <<<<<<<<<<<<<<
 *                     self.tree.new_error(
 *                         node, "Cannot apply 'skip-rules' unambigiously, because symbol "
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_consumed_skip_rules); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1080, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_current_symbol, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1080, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_5 = (__pyx_t_8 != 0);
      if (__pyx_t_5) {

        /* "DHParser/ebnf.py":1081
 *             if current_symbol in self.directives.skip:
 *                 if current_symbol in self.consumed_skip_rules:
 *                     self.tree.new_error(             # <<<<<<<<<<<<<<
 *                         node, "Cannot apply 'skip-rules' unambigiously, because symbol "
 *                         "{} contains more than one parser with a mandatory marker '' "
 */
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1081, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_new_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1081, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "DHParser/ebnf.py":1084
 *                         node, "Cannot apply 'skip-rules' unambigiously, because symbol "
 *                         "{} contains more than one parser with a mandatory marker '' "
 *                         "in its definiens.".format(current_symbol),             # <<<<<<<<<<<<<<
 *                         Error.AMBIGUOUS_ERROR_HANDLING)
 *                 else:
 */
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Cannot_apply_skip_rules_unambigi, __pyx_n_s_format); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1084, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_2 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
          }
        }
        __pyx_t_6 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_2, __pyx_v_current_symbol) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_current_symbol);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1084, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

        /* "DHParser/ebnf.py":1085
 *                         "{} contains more than one parser with a mandatory marker '' "
 *                         "in its definiens.".format(current_symbol),
 *                         Error.AMBIGUOUS_ERROR_HANDLING)             # <<<<<<<<<<<<<<
 *                 else:
 *                     # use class field instead or direct representation of error messages!
 */
        __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_Error); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1085, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_AMBIGUOUS_ERROR_HANDLING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1085, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = NULL;
        __pyx_t_12 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
            __pyx_t_12 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_v_node, __pyx_t_6, __pyx_t_2};
          __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1081, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_v_node, __pyx_t_6, __pyx_t_2};
          __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1081, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        } else
        #endif
        {
          __pyx_t_13 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1081, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          if (__pyx_t_11) {
            __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11); __pyx_t_11 = NULL;
          }
          __Pyx_INCREF(__pyx_v_node);
          __Pyx_GIVEREF(__pyx_v_node);
          PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_12, __pyx_v_node);
          __Pyx_GIVEREF(__pyx_t_6);
          PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_12, __pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_13, 2+__pyx_t_12, __pyx_t_2);
          __pyx_t_6 = 0;
          __pyx_t_2 = 0;
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1081, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "DHParser/ebnf.py":1080
 *             # add skip-rules to resume parsing of a series, if rules have been declared
 *             if current_symbol in self.directives.skip:
 *                 if current_symbol in self.consumed_skip_rules:             # <<<<<<<<<<<<<<
 *                     self.tree.new_error(
 *                         node, "Cannot apply 'skip-rules' unambigiously, because symbol "
 */
        goto __pyx_L13;
      }

      /* "DHParser/ebnf.py":1088
 *                 else:
 *                     # use class field instead or direct representation of error messages!
 *                     custom_args.append('skip=' + current_symbol + self.SKIP_RULES_SUFFIX)             # <<<<<<<<<<<<<<
 *                     self.consumed_skip_rules.add(current_symbol)
 *         return tuple(filtered_children), custom_args
 */
      /*else*/ {
        if (unlikely(__pyx_v_custom_args == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
          __PYX_ERR(0, 1088, __pyx_L1_error)
        }
        __pyx_t_1 = PyNumber_Add(__pyx_kp_u_skip_3, __pyx_v_current_symbol); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1088, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_SKIP_RULES_SUFFIX); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1088, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_13 = PyNumber_Add(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1088, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_custom_args, __pyx_t_13); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1088, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

        /* "DHParser/ebnf.py":1089
 *                     # use class field instead or direct representation of error messages!
 *                     custom_args.append('skip=' + current_symbol + self.SKIP_RULES_SUFFIX)
 *                     self.consumed_skip_rules.add(current_symbol)             # <<<<<<<<<<<<<<
 *         return tuple(filtered_children), custom_args
 * 
 */
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_consumed_skip_rules); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1089, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_add); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1089, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
          }
        }
        __pyx_t_13 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_7, __pyx_v_current_symbol) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_current_symbol);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1089, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      }
      __pyx_L13:;

      /* "DHParser/ebnf.py":1079
 *                     self.consumed_custom_errors.add(current_symbol)
 *             # add skip-rules to resume parsing of a series, if rules have been declared
 *             if current_symbol in self.directives.skip:             # <<<<<<<<<<<<<<
 *                 if current_symbol in self.consumed_skip_rules:
 *                     self.tree.new_error(
 */
    }

    /* "DHParser/ebnf.py":1064
 *         custom_args = ['mandatory=%i' % mandatory_marker[0]] if mandatory_marker else []
 *         # add custom error message if it has been declared for the current definition
 *         if custom_args:             # <<<<<<<<<<<<<<
 *             current_symbol = next(reversed(self.rules.keys()))
 *             # add customized error messages, if defined
 */
  }

  /* "DHParser/ebnf.py":1090
 *                     custom_args.append('skip=' + current_symbol + self.SKIP_RULES_SUFFIX)
 *                     self.consumed_skip_rules.add(current_symbol)
 *         return tuple(filtered_children), custom_args             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_13 = PyList_AsTuple(__pyx_v_filtered_children); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_13);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_13);
  __Pyx_INCREF(__pyx_v_custom_args);
  __Pyx_GIVEREF(__pyx_v_custom_args);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_custom_args);
  __pyx_t_13 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":1051
 * 
 * 
 *     def _error_customization(self, node) -> Tuple[Tuple[Node, ...], List[str]]:             # <<<<<<<<<<<<<<
 *         mandatory_marker = []
 *         filtered_children = []  # type: List[Node]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler._error_customization", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_mandatory_marker);
  __Pyx_XDECREF(__pyx_v_filtered_children);
  __Pyx_XDECREF(__pyx_v_nd);
  __Pyx_XDECREF(__pyx_v_custom_args);
  __Pyx_XDECREF(__pyx_v_current_symbol);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":1093
 * 
 * 
 *     def on_term(self, node) -> str:             # <<<<<<<<<<<<<<
 *         filtered_result, custom_args = self._error_customization(node)
 *         mock_node = Node(node.tag_name, filtered_result)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_41on_term(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_41on_term = {"on_term", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_41on_term, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_41on_term(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_node = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_term (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_term", 1, 2, 2, 1); __PYX_ERR(0, 1093, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_term") < 0)) __PYX_ERR(0, 1093, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_node = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("on_term", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1093, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_term", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_40on_term(__pyx_self, __pyx_v_self, __pyx_v_node);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_40on_term(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node) {
  PyObject *__pyx_v_filtered_result = NULL;
  PyObject *__pyx_v_custom_args = NULL;
  PyObject *__pyx_v_mock_node = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("on_term", 0);

  /* "DHParser/ebnf.py":1094
 * 
 *     def on_term(self, node) -> str:
 *         filtered_result, custom_args = self._error_customization(node)             # <<<<<<<<<<<<<<
 *         mock_node = Node(node.tag_name, filtered_result)
 *         return self.non_terminal(mock_node, 'Series', custom_args)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_error_customization); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1094, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_node) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_node);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1094, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 1094, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1094, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1094, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1094, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1094, __pyx_L1_error)
    __pyx_t_5 = NULL;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1094, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_filtered_result = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_custom_args = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "DHParser/ebnf.py":1095
 *     def on_term(self, node) -> str:
 *         filtered_result, custom_args = self._error_customization(node)
 *         mock_node = Node(node.tag_name, filtered_result)             # <<<<<<<<<<<<<<
 *         return self.non_terminal(mock_node, 'Series', custom_args)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Node); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_tag_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_v_filtered_result};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_v_filtered_result};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1095, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_filtered_result);
    __Pyx_GIVEREF(__pyx_v_filtered_result);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_filtered_result);
    __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_mock_node = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":1096
 *         filtered_result, custom_args = self._error_customization(node)
 *         mock_node = Node(node.tag_name, filtered_result)
 *         return self.non_terminal(mock_node, 'Series', custom_args)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_non_terminal); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_mock_node, __pyx_n_u_Series, __pyx_v_custom_args};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1096, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_mock_node, __pyx_n_u_Series, __pyx_v_custom_args};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1096, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_2 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1096, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_INCREF(__pyx_v_mock_node);
    __Pyx_GIVEREF(__pyx_v_mock_node);
    PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_6, __pyx_v_mock_node);
    __Pyx_INCREF(__pyx_n_u_Series);
    __Pyx_GIVEREF(__pyx_n_u_Series);
    PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_6, __pyx_n_u_Series);
    __Pyx_INCREF(__pyx_v_custom_args);
    __Pyx_GIVEREF(__pyx_v_custom_args);
    PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_6, __pyx_v_custom_args);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1096, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1096, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":1093
 * 
 * 
 *     def on_term(self, node) -> str:             # <<<<<<<<<<<<<<
 *         filtered_result, custom_args = self._error_customization(node)
 *         mock_node = Node(node.tag_name, filtered_result)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_term", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_filtered_result);
  __Pyx_XDECREF(__pyx_v_custom_args);
  __Pyx_XDECREF(__pyx_v_mock_node);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":1099
 * 
 * 
 *     def on_factor(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         assert node.children
 *         assert len(node.children) >= 2, node.as_sxpr()
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_43on_factor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_43on_factor = {"on_factor", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_43on_factor, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_43on_factor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_node = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_factor (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_factor", 1, 2, 2, 1); __PYX_ERR(0, 1099, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_factor") < 0)) __PYX_ERR(0, 1099, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_node = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("on_factor", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1099, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_factor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_42on_factor(__pyx_self, __pyx_v_self, __pyx_v_node);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":1129
 *             result = self.non_terminal(node, parser_class, custom_args)
 *             if prefix[:1] == '-':
 *                 def check(node):             # <<<<<<<<<<<<<<
 *                     nd = node
 *                     if len(nd.children) >= 1:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_9on_factor_1check(PyObject *__pyx_self, PyObject *__pyx_v_node); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_9on_factor_1check = {"check", (PyCFunction)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_9on_factor_1check, METH_O, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_9on_factor_1check(PyObject *__pyx_self, PyObject *__pyx_v_node) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("check (wrapper)", 0);
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_9on_factor_check(__pyx_self, ((PyObject *)__pyx_v_node));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_9on_factor_check(PyObject *__pyx_self, PyObject *__pyx_v_node) {
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_2_on_factor *__pyx_cur_scope;
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_2_on_factor *__pyx_outer_scope;
  PyObject *__pyx_v_nd = NULL;
  PyObject *__pyx_v_symlist = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  __Pyx_RefNannySetupContext("check", 0);
  __pyx_outer_scope = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_2_on_factor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "DHParser/ebnf.py":1130
 *             if prefix[:1] == '-':
 *                 def check(node):
 *                     nd = node             # <<<<<<<<<<<<<<
 *                     if len(nd.children) >= 1:
 *                         nd = nd.children[0]
 */
  __Pyx_INCREF(__pyx_v_node);
  __pyx_v_nd = __pyx_v_node;

  /* "DHParser/ebnf.py":1131
 *                 def check(node):
 *                     nd = node
 *                     if len(nd.children) >= 1:             # <<<<<<<<<<<<<<
 *                         nd = nd.children[0]
 *                     while nd.tag_name == "symbol":
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_nd, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1131, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((__pyx_t_2 >= 1) != 0);
  if (__pyx_t_3) {

    /* "DHParser/ebnf.py":1132
 *                     nd = node
 *                     if len(nd.children) >= 1:
 *                         nd = nd.children[0]             # <<<<<<<<<<<<<<
 *                     while nd.tag_name == "symbol":
 *                         symlist = self.rules.get(nd.content, [])
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_nd, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_nd, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "DHParser/ebnf.py":1131
 *                 def check(node):
 *                     nd = node
 *                     if len(nd.children) >= 1:             # <<<<<<<<<<<<<<
 *                         nd = nd.children[0]
 *                     while nd.tag_name == "symbol":
 */
  }

  /* "DHParser/ebnf.py":1133
 *                     if len(nd.children) >= 1:
 *                         nd = nd.children[0]
 *                     while nd.tag_name == "symbol":             # <<<<<<<<<<<<<<
 *                         symlist = self.rules.get(nd.content, [])
 *                         if len(symlist) == 2:
 */
  while (1) {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_nd, __pyx_n_s_tag_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_n_u_symbol, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1133, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!__pyx_t_3) break;

    /* "DHParser/ebnf.py":1134
 *                         nd = nd.children[0]
 *                     while nd.tag_name == "symbol":
 *                         symlist = self.rules.get(nd.content, [])             # <<<<<<<<<<<<<<
 *                         if len(symlist) == 2:
 *                             nd = symlist[1]
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1134, __pyx_L1_error) }
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_rules); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_nd, __pyx_n_s_content); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1134, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1134, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1134, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
      __pyx_t_1 = 0;
      __pyx_t_6 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1134, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_symlist, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "DHParser/ebnf.py":1135
 *                     while nd.tag_name == "symbol":
 *                         symlist = self.rules.get(nd.content, [])
 *                         if len(symlist) == 2:             # <<<<<<<<<<<<<<
 *                             nd = symlist[1]
 *                         else:
 */
    __pyx_t_2 = PyObject_Length(__pyx_v_symlist); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1135, __pyx_L1_error)
    __pyx_t_3 = ((__pyx_t_2 == 2) != 0);
    if (__pyx_t_3) {

      /* "DHParser/ebnf.py":1136
 *                         symlist = self.rules.get(nd.content, [])
 *                         if len(symlist) == 2:
 *                             nd = symlist[1]             # <<<<<<<<<<<<<<
 *                         else:
 *                             if len(symlist) == 1:
 */
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_symlist, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1136, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF_SET(__pyx_v_nd, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "DHParser/ebnf.py":1135
 *                     while nd.tag_name == "symbol":
 *                         symlist = self.rules.get(nd.content, [])
 *                         if len(symlist) == 2:             # <<<<<<<<<<<<<<
 *                             nd = symlist[1]
 *                         else:
 */
      goto __pyx_L6;
    }

    /* "DHParser/ebnf.py":1138
 *                             nd = symlist[1]
 *                         else:
 *                             if len(symlist) == 1:             # <<<<<<<<<<<<<<
 *                                 nd = symlist[0].children[1]
 *                             break
 */
    /*else*/ {
      __pyx_t_2 = PyObject_Length(__pyx_v_symlist); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1138, __pyx_L1_error)
      __pyx_t_3 = ((__pyx_t_2 == 1) != 0);
      if (__pyx_t_3) {

        /* "DHParser/ebnf.py":1139
 *                         else:
 *                             if len(symlist) == 1:
 *                                 nd = symlist[0].children[1]             # <<<<<<<<<<<<<<
 *                             break
 *                     if (nd.tag_name != "regexp" or nd.content[:1] != '/'
 */
        __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_symlist, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1139, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_children); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1139, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1139, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF_SET(__pyx_v_nd, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "DHParser/ebnf.py":1138
 *                             nd = symlist[1]
 *                         else:
 *                             if len(symlist) == 1:             # <<<<<<<<<<<<<<
 *                                 nd = symlist[0].children[1]
 *                             break
 */
      }

      /* "DHParser/ebnf.py":1140
 *                             if len(symlist) == 1:
 *                                 nd = symlist[0].children[1]
 *                             break             # <<<<<<<<<<<<<<
 *                     if (nd.tag_name != "regexp" or nd.content[:1] != '/'
 *                             or nd.content[-1:] != '/'):
 */
      goto __pyx_L5_break;
    }
    __pyx_L6:;
  }
  __pyx_L5_break:;

  /* "DHParser/ebnf.py":1141
 *                                 nd = symlist[0].children[1]
 *                             break
 *                     if (nd.tag_name != "regexp" or nd.content[:1] != '/'             # <<<<<<<<<<<<<<
 *                             or nd.content[-1:] != '/'):
 *                         self.tree.new_error(node, "Lookbehind-parser can only be used with RegExp"
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_nd, __pyx_n_s_tag_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_n_u_regexp, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (!__pyx_t_10) {
  } else {
    __pyx_t_3 = __pyx_t_10;
    goto __pyx_L9_bool_binop_done;
  }

  /* "DHParser/ebnf.py":1142
 *                             break
 *                     if (nd.tag_name != "regexp" or nd.content[:1] != '/'
 *                             or nd.content[-1:] != '/'):             # <<<<<<<<<<<<<<
 *                         self.tree.new_error(node, "Lookbehind-parser can only be used with RegExp"
 *                                             "-parsers, not: " + nd.tag_name)
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_nd, __pyx_n_s_content); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "DHParser/ebnf.py":1141
 *                                 nd = symlist[0].children[1]
 *                             break
 *                     if (nd.tag_name != "regexp" or nd.content[:1] != '/'             # <<<<<<<<<<<<<<
 *                             or nd.content[-1:] != '/'):
 *                         self.tree.new_error(node, "Lookbehind-parser can only be used with RegExp"
 */
  __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_4, 0, 1, NULL, NULL, &__pyx_slice__46, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_5, __pyx_kp_u__47, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!__pyx_t_10) {
  } else {
    __pyx_t_3 = __pyx_t_10;
    goto __pyx_L9_bool_binop_done;
  }

  /* "DHParser/ebnf.py":1142
 *                             break
 *                     if (nd.tag_name != "regexp" or nd.content[:1] != '/'
 *                             or nd.content[-1:] != '/'):             # <<<<<<<<<<<<<<
 *                         self.tree.new_error(node, "Lookbehind-parser can only be used with RegExp"
 *                                             "-parsers, not: " + nd.tag_name)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_nd, __pyx_n_s_content); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_5, -1L, 0, NULL, NULL, &__pyx_slice__48, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_kp_u__47, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1142, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __pyx_t_10;
  __pyx_L9_bool_binop_done:;

  /* "DHParser/ebnf.py":1141
 *                                 nd = symlist[0].children[1]
 *                             break
 *                     if (nd.tag_name != "regexp" or nd.content[:1] != '/'             # <<<<<<<<<<<<<<
 *                             or nd.content[-1:] != '/'):
 *                         self.tree.new_error(node, "Lookbehind-parser can only be used with RegExp"
 */
  if (__pyx_t_3) {

    /* "DHParser/ebnf.py":1143
 *                     if (nd.tag_name != "regexp" or nd.content[:1] != '/'
 *                             or nd.content[-1:] != '/'):
 *                         self.tree.new_error(node, "Lookbehind-parser can only be used with RegExp"             # <<<<<<<<<<<<<<
 *                                             "-parsers, not: " + nd.tag_name)
 * 
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1143, __pyx_L1_error) }
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_new_error); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "DHParser/ebnf.py":1144
 *                             or nd.content[-1:] != '/'):
 *                         self.tree.new_error(node, "Lookbehind-parser can only be used with RegExp"
 *                                             "-parsers, not: " + nd.tag_name)             # <<<<<<<<<<<<<<
 * 
 *                 if not result.startswith('RegExp('):
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_nd, __pyx_n_s_tag_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyNumber_Add(__pyx_kp_u_Lookbehind_parser_can_only_be_us, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_9)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_node, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1143, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_node, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1143, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_1 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1143, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_v_node);
      __Pyx_GIVEREF(__pyx_v_node);
      PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_8, __pyx_v_node);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_8, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1143, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "DHParser/ebnf.py":1141
 *                                 nd = symlist[0].children[1]
 *                             break
 *                     if (nd.tag_name != "regexp" or nd.content[:1] != '/'             # <<<<<<<<<<<<<<
 *                             or nd.content[-1:] != '/'):
 *                         self.tree.new_error(node, "Lookbehind-parser can only be used with RegExp"
 */
  }

  /* "DHParser/ebnf.py":1129
 *             result = self.non_terminal(node, parser_class, custom_args)
 *             if prefix[:1] == '-':
 *                 def check(node):             # <<<<<<<<<<<<<<
 *                     nd = node
 *                     if len(nd.children) >= 1:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_factor.check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_nd);
  __Pyx_XDECREF(__pyx_v_symlist);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":1147
 * 
 *                 if not result.startswith('RegExp('):
 *                     self.deferred_tasks.append(lambda: check(node))             # <<<<<<<<<<<<<<
 *             return result
 *         except KeyError:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_9on_factor_2lambda(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_9on_factor_2lambda = {"lambda", (PyCFunction)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_9on_factor_2lambda, METH_NOARGS, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_9on_factor_2lambda(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda(PyObject *__pyx_self) {
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_2_on_factor *__pyx_cur_scope;
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_2_on_factor *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("lambda", 0);
  __pyx_outer_scope = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_2_on_factor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_node)) { __Pyx_RaiseClosureNameError("node"); __PYX_ERR(0, 1147, __pyx_L1_error) }
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_node;
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_v_check)) { __Pyx_RaiseClosureNameError("check"); __PYX_ERR(0, 1147, __pyx_L1_error) }
  __pyx_t_2 = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_9on_factor_check(__pyx_cur_scope->__pyx_v_check, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_factor.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":1099
 * 
 * 
 *     def on_factor(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         assert node.children
 *         assert len(node.children) >= 2, node.as_sxpr()
 */

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_42on_factor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node) {
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_2_on_factor *__pyx_cur_scope;
  PyObject *__pyx_v_prefix = NULL;
  PyObject *__pyx_v_custom_args = NULL;
  PyObject *__pyx_v_arg = NULL;
  PyObject *__pyx_v_parser_class = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  Py_UCS4 __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  __Pyx_RefNannySetupContext("on_factor", 0);
  __pyx_cur_scope = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_2_on_factor *)__pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct_2_on_factor(__pyx_ptype_8DHParser_4ebnf___pyx_scope_struct_2_on_factor, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_2_on_factor *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1099, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);
  __pyx_cur_scope->__pyx_v_node = __pyx_v_node;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_node);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_node);

  /* "DHParser/ebnf.py":1100
 * 
 *     def on_factor(self, node: Node) -> str:
 *         assert node.children             # <<<<<<<<<<<<<<
 *         assert len(node.children) >= 2, node.as_sxpr()
 *         prefix = node.children[0].content
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1100, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 1100, __pyx_L1_error)
    }
  }
  #endif

  /* "DHParser/ebnf.py":1101
 *     def on_factor(self, node: Node) -> str:
 *         assert node.children
 *         assert len(node.children) >= 2, node.as_sxpr()             # <<<<<<<<<<<<<<
 *         prefix = node.children[0].content
 *         custom_args = []  # type: List[str]
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1101, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!((__pyx_t_3 >= 2) != 0))) {
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_as_sxpr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1101, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1101, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyTuple_Pack(1, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1101, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      PyErr_SetObject(PyExc_AssertionError, __pyx_t_4);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(0, 1101, __pyx_L1_error)
    }
  }
  #endif

  /* "DHParser/ebnf.py":1102
 *         assert node.children
 *         assert len(node.children) >= 2, node.as_sxpr()
 *         prefix = node.children[0].content             # <<<<<<<<<<<<<<
 *         custom_args = []  # type: List[str]
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_content); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_prefix = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "DHParser/ebnf.py":1103
 *         assert len(node.children) >= 2, node.as_sxpr()
 *         prefix = node.children[0].content
 *         custom_args = []  # type: List[str]             # <<<<<<<<<<<<<<
 * 
 *         if prefix in {'::', ':'}:
 */
  __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_custom_args = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "DHParser/ebnf.py":1105
 *         custom_args = []  # type: List[str]
 * 
 *         if prefix in {'::', ':'}:             # <<<<<<<<<<<<<<
 *             assert len(node.children) == 2
 *             arg = node.children[-1]
 */
  __Pyx_INCREF(__pyx_v_prefix);
  __pyx_t_4 = __pyx_v_prefix;
  __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_kp_u__49, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1105, __pyx_L1_error)
  if (!__pyx_t_6) {
  } else {
    __pyx_t_2 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_kp_u__13, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1105, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = (__pyx_t_2 != 0);
  if (__pyx_t_6) {

    /* "DHParser/ebnf.py":1106
 * 
 *         if prefix in {'::', ':'}:
 *             assert len(node.children) == 2             # <<<<<<<<<<<<<<
 *             arg = node.children[-1]
 *             if arg.tag_name != 'symbol':
 */
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(!Py_OptimizeFlag)) {
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1106, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1106, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!((__pyx_t_3 == 2) != 0))) {
        PyErr_SetNone(PyExc_AssertionError);
        __PYX_ERR(0, 1106, __pyx_L1_error)
      }
    }
    #endif

    /* "DHParser/ebnf.py":1107
 *         if prefix in {'::', ':'}:
 *             assert len(node.children) == 2
 *             arg = node.children[-1]             # <<<<<<<<<<<<<<
 *             if arg.tag_name != 'symbol':
 *                 self.tree.new_error(node, ('Retrieve Operator "%s" requires a symbol, '
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_arg = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "DHParser/ebnf.py":1108
 *             assert len(node.children) == 2
 *             arg = node.children[-1]
 *             if arg.tag_name != 'symbol':             # <<<<<<<<<<<<<<
 *                 self.tree.new_error(node, ('Retrieve Operator "%s" requires a symbol, '
 *                                     'and not a %s.') % (prefix, arg.tag_name))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_tag_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_symbol, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1108, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_6) {

      /* "DHParser/ebnf.py":1109
 *             arg = node.children[-1]
 *             if arg.tag_name != 'symbol':
 *                 self.tree.new_error(node, ('Retrieve Operator "%s" requires a symbol, '             # <<<<<<<<<<<<<<
 *                                     'and not a %s.') % (prefix, arg.tag_name))
 *                 return str(arg.result)
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1109, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_new_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1109, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1109, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = 0;
      __pyx_t_7 = 127;
      __Pyx_INCREF(__pyx_kp_u_Retrieve_Operator);
      __pyx_t_3 += 19;
      __Pyx_GIVEREF(__pyx_kp_u_Retrieve_Operator);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Retrieve_Operator);

      /* "DHParser/ebnf.py":1110
 *             if arg.tag_name != 'symbol':
 *                 self.tree.new_error(node, ('Retrieve Operator "%s" requires a symbol, '
 *                                     'and not a %s.') % (prefix, arg.tag_name))             # <<<<<<<<<<<<<<
 *                 return str(arg.result)
 *             if str(arg) in self.directives.filter:
 */
      __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_prefix), __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1110, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_7;
      __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_8);
      __pyx_t_8 = 0;
      __Pyx_INCREF(__pyx_kp_u_requires_a_symbol_and_not_a);
      __pyx_t_3 += 31;
      __Pyx_GIVEREF(__pyx_kp_u_requires_a_symbol_and_not_a);
      PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_requires_a_symbol_and_not_a);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_tag_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1110, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_8), __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1110, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_7;
      __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_INCREF(__pyx_kp_u__25);
      __pyx_t_3 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__25);
      PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_kp_u__25);

      /* "DHParser/ebnf.py":1109
 *             arg = node.children[-1]
 *             if arg.tag_name != 'symbol':
 *                 self.tree.new_error(node, ('Retrieve Operator "%s" requires a symbol, '             # <<<<<<<<<<<<<<
 *                                     'and not a %s.') % (prefix, arg.tag_name))
 *                 return str(arg.result)
 */
      __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_4, 5, __pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1109, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      __pyx_t_10 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_10 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_node, __pyx_t_9};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1109, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_node, __pyx_t_9};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1109, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1109, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (__pyx_t_4) {
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL;
        }
        __Pyx_INCREF(__pyx_cur_scope->__pyx_v_node);
        __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_node);
        PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_10, __pyx_cur_scope->__pyx_v_node);
        __Pyx_GIVEREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_10, __pyx_t_9);
        __pyx_t_9 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1109, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "DHParser/ebnf.py":1111
 *                 self.tree.new_error(node, ('Retrieve Operator "%s" requires a symbol, '
 *                                     'and not a %s.') % (prefix, arg.tag_name))
 *                 return str(arg.result)             # <<<<<<<<<<<<<<
 *             if str(arg) in self.directives.filter:
 *                 custom_args = ['rfilter=%s' % self.directives.filter[str(arg)]]
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_result_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1111, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1111, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = ((PyObject*)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "DHParser/ebnf.py":1108
 *             assert len(node.children) == 2
 *             arg = node.children[-1]
 *             if arg.tag_name != 'symbol':             # <<<<<<<<<<<<<<
 *                 self.tree.new_error(node, ('Retrieve Operator "%s" requires a symbol, '
 *                                     'and not a %s.') % (prefix, arg.tag_name))
 */
    }

    /* "DHParser/ebnf.py":1112
 *                                     'and not a %s.') % (prefix, arg.tag_name))
 *                 return str(arg.result)
 *             if str(arg) in self.directives.filter:             # <<<<<<<<<<<<<<
 *                 custom_args = ['rfilter=%s' % self.directives.filter[str(arg)]]
 *             self.variables.add(str(arg))  # cast(str, arg.result)
 */
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_arg); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_directives); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_filter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_t_5, __pyx_t_8, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1112, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_2 = (__pyx_t_6 != 0);
    if (__pyx_t_2) {

      /* "DHParser/ebnf.py":1113
 *                 return str(arg.result)
 *             if str(arg) in self.directives.filter:
 *                 custom_args = ['rfilter=%s' % self.directives.filter[str(arg)]]             # <<<<<<<<<<<<<<
 *             self.variables.add(str(arg))  # cast(str, arg.result)
 * 
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_directives); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1113, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_filter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1113, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_arg); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1113, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1113, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_rfilter_s, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1113, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1113, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_8);
      PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_8);
      __pyx_t_8 = 0;
      __Pyx_DECREF_SET(__pyx_v_custom_args, ((PyObject*)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "DHParser/ebnf.py":1112
 *                                     'and not a %s.') % (prefix, arg.tag_name))
 *                 return str(arg.result)
 *             if str(arg) in self.directives.filter:             # <<<<<<<<<<<<<<
 *                 custom_args = ['rfilter=%s' % self.directives.filter[str(arg)]]
 *             self.variables.add(str(arg))  # cast(str, arg.result)
 */
    }

    /* "DHParser/ebnf.py":1114
 *             if str(arg) in self.directives.filter:
 *                 custom_args = ['rfilter=%s' % self.directives.filter[str(arg)]]
 *             self.variables.add(str(arg))  # cast(str, arg.result)             # <<<<<<<<<<<<<<
 * 
 *         elif len(node.children) > 2:
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_variables); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_add); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_arg); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "DHParser/ebnf.py":1105
 *         custom_args = []  # type: List[str]
 * 
 *         if prefix in {'::', ':'}:             # <<<<<<<<<<<<<<
 *             assert len(node.children) == 2
 *             arg = node.children[-1]
 */
    goto __pyx_L3;
  }

  /* "DHParser/ebnf.py":1116
 *             self.variables.add(str(arg))  # cast(str, arg.result)
 * 
 *         elif len(node.children) > 2:             # <<<<<<<<<<<<<<
 *             # shift = (Node(node.parser, node.result[1].result),)
 *             # node.result[1].result = shift + node.result[2:]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1116, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_2) {

    /* "DHParser/ebnf.py":1119
 *             # shift = (Node(node.parser, node.result[1].result),)
 *             # node.result[1].result = shift + node.result[2:]
 *             node.children[1].result = (Node(node.children[1].tag_name, node.children[1].result),) \             # <<<<<<<<<<<<<<
 *                 + node.children[2:]
 *             node.children[1].tag_name = node.tag_name
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Node); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_8, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_tag_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_9, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_result_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_10 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_8, __pyx_t_9};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1119, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_8, __pyx_t_9};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1119, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    {
      __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1119, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_9);
      __pyx_t_8 = 0;
      __pyx_t_9 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1119, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "DHParser/ebnf.py":1120
 *             # node.result[1].result = shift + node.result[2:]
 *             node.children[1].result = (Node(node.children[1].tag_name, node.children[1].result),) \
 *                 + node.children[2:]             # <<<<<<<<<<<<<<
 *             node.children[1].tag_name = node.tag_name
 *             node.result = (node.children[0], node.children[1])
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_t_1, 2, 0, NULL, NULL, &__pyx_slice__50, 1, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Add(__pyx_t_5, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "DHParser/ebnf.py":1119
 *             # shift = (Node(node.parser, node.result[1].result),)
 *             # node.result[1].result = shift + node.result[2:]
 *             node.children[1].result = (Node(node.children[1].tag_name, node.children[1].result),) \             # <<<<<<<<<<<<<<
 *                 + node.children[2:]
 *             node.children[1].tag_name = node.tag_name
 */
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_11, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_5, __pyx_n_s_result_2, __pyx_t_1) < 0) __PYX_ERR(0, 1119, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "DHParser/ebnf.py":1121
 *             node.children[1].result = (Node(node.children[1].tag_name, node.children[1].result),) \
 *                 + node.children[2:]
 *             node.children[1].tag_name = node.tag_name             # <<<<<<<<<<<<<<
 *             node.result = (node.children[0], node.children[1])
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_tag_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_11, __pyx_n_s_tag_name, __pyx_t_5) < 0) __PYX_ERR(0, 1121, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "DHParser/ebnf.py":1122
 *                 + node.children[2:]
 *             node.children[1].tag_name = node.tag_name
 *             node.result = (node.children[0], node.children[1])             # <<<<<<<<<<<<<<
 * 
 *         node.result = node.children[1:]
 */
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_11, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_11, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_result_2, __pyx_t_11) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "DHParser/ebnf.py":1116
 *             self.variables.add(str(arg))  # cast(str, arg.result)
 * 
 *         elif len(node.children) > 2:             # <<<<<<<<<<<<<<
 *             # shift = (Node(node.parser, node.result[1].result),)
 *             # node.result[1].result = shift + node.result[2:]
 */
  }
  __pyx_L3:;

  /* "DHParser/ebnf.py":1124
 *             node.result = (node.children[0], node.children[1])
 * 
 *         node.result = node.children[1:]             # <<<<<<<<<<<<<<
 *         try:
 *             parser_class = self.PREFIX_TABLE[prefix]
 */
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_11, 1, 0, NULL, NULL, &__pyx_slice__23, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_result_2, __pyx_t_1) < 0) __PYX_ERR(0, 1124, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":1125
 * 
 *         node.result = node.children[1:]
 *         try:             # <<<<<<<<<<<<<<
 *             parser_class = self.PREFIX_TABLE[prefix]
 *             result = self.non_terminal(node, parser_class, custom_args)
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
    __Pyx_XGOTREF(__pyx_t_12);
    __Pyx_XGOTREF(__pyx_t_13);
    __Pyx_XGOTREF(__pyx_t_14);
    /*try:*/ {

      /* "DHParser/ebnf.py":1126
 *         node.result = node.children[1:]
 *         try:
 *             parser_class = self.PREFIX_TABLE[prefix]             # <<<<<<<<<<<<<<
 *             result = self.non_terminal(node, parser_class, custom_args)
 *             if prefix[:1] == '-':
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_PREFIX_TABLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1126, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_prefix); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1126, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_parser_class = __pyx_t_11;
      __pyx_t_11 = 0;

      /* "DHParser/ebnf.py":1127
 *         try:
 *             parser_class = self.PREFIX_TABLE[prefix]
 *             result = self.non_terminal(node, parser_class, custom_args)             # <<<<<<<<<<<<<<
 *             if prefix[:1] == '-':
 *                 def check(node):
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_non_terminal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = NULL;
      __pyx_t_10 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_10 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_node, __pyx_v_parser_class, __pyx_v_custom_args};
        __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1127, __pyx_L8_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_11);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_node, __pyx_v_parser_class, __pyx_v_custom_args};
        __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1127, __pyx_L8_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_11);
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1127, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (__pyx_t_5) {
          __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); __pyx_t_5 = NULL;
        }
        __Pyx_INCREF(__pyx_cur_scope->__pyx_v_node);
        __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_node);
        PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_10, __pyx_cur_scope->__pyx_v_node);
        __Pyx_INCREF(__pyx_v_parser_class);
        __Pyx_GIVEREF(__pyx_v_parser_class);
        PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_10, __pyx_v_parser_class);
        __Pyx_INCREF(__pyx_v_custom_args);
        __Pyx_GIVEREF(__pyx_v_custom_args);
        PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_10, __pyx_v_custom_args);
        __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1127, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_result = __pyx_t_11;
      __pyx_t_11 = 0;

      /* "DHParser/ebnf.py":1128
 *             parser_class = self.PREFIX_TABLE[prefix]
 *             result = self.non_terminal(node, parser_class, custom_args)
 *             if prefix[:1] == '-':             # <<<<<<<<<<<<<<
 *                 def check(node):
 *                     nd = node
 */
      __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_v_prefix, 0, 1, NULL, NULL, &__pyx_slice__46, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1128, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_11, __pyx_kp_u__51, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1128, __pyx_L8_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (__pyx_t_2) {

        /* "DHParser/ebnf.py":1129
 *             result = self.non_terminal(node, parser_class, custom_args)
 *             if prefix[:1] == '-':
 *                 def check(node):             # <<<<<<<<<<<<<<
 *                     nd = node
 *                     if len(nd.children) >= 1:
 */
        __pyx_t_11 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_9on_factor_1check, 0, __pyx_n_s_EBNFCompiler_on_factor_locals_ch, ((PyObject*)__pyx_cur_scope), __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1129, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_11);
        __pyx_cur_scope->__pyx_v_check = __pyx_t_11;
        __pyx_t_11 = 0;

        /* "DHParser/ebnf.py":1146
 *                                             "-parsers, not: " + nd.tag_name)
 * 
 *                 if not result.startswith('RegExp('):             # <<<<<<<<<<<<<<
 *                     self.deferred_tasks.append(lambda: check(node))
 *             return result
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1146, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_9 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
          }
        }
        __pyx_t_11 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_9, __pyx_kp_u_RegExp) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_kp_u_RegExp);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1146, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1146, __pyx_L8_error)
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_6 = ((!__pyx_t_2) != 0);
        if (__pyx_t_6) {

          /* "DHParser/ebnf.py":1147
 * 
 *                 if not result.startswith('RegExp('):
 *                     self.deferred_tasks.append(lambda: check(node))             # <<<<<<<<<<<<<<
 *             return result
 *         except KeyError:
 */
          __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_deferred_tasks); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1147, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_9on_factor_2lambda, 0, __pyx_n_s_EBNFCompiler_on_factor_locals_la, ((PyObject*)__pyx_cur_scope), __pyx_n_s_DHParser_ebnf, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1147, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_15 = __Pyx_PyObject_Append(__pyx_t_11, __pyx_t_1); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 1147, __pyx_L8_error)
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "DHParser/ebnf.py":1146
 *                                             "-parsers, not: " + nd.tag_name)
 * 
 *                 if not result.startswith('RegExp('):             # <<<<<<<<<<<<<<
 *                     self.deferred_tasks.append(lambda: check(node))
 *             return result
 */
        }

        /* "DHParser/ebnf.py":1128
 *             parser_class = self.PREFIX_TABLE[prefix]
 *             result = self.non_terminal(node, parser_class, custom_args)
 *             if prefix[:1] == '-':             # <<<<<<<<<<<<<<
 *                 def check(node):
 *                     nd = node
 */
      }

      /* "DHParser/ebnf.py":1148
 *                 if not result.startswith('RegExp('):
 *                     self.deferred_tasks.append(lambda: check(node))
 *             return result             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             self.tree.new_error(node, 'Unknown prefix "%s".' % prefix)
 */
      __Pyx_XDECREF(__pyx_r);
      if (!(likely(PyUnicode_CheckExact(__pyx_v_result))||((__pyx_v_result) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_result)->tp_name), 0))) __PYX_ERR(0, 1148, __pyx_L8_error)
      __Pyx_INCREF(__pyx_v_result);
      __pyx_r = ((PyObject*)__pyx_v_result);
      goto __pyx_L12_try_return;

      /* "DHParser/ebnf.py":1125
 * 
 *         node.result = node.children[1:]
 *         try:             # <<<<<<<<<<<<<<
 *             parser_class = self.PREFIX_TABLE[prefix]
 *             result = self.non_terminal(node, parser_class, custom_args)
 */
    }
    __pyx_L8_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "DHParser/ebnf.py":1149
 *                     self.deferred_tasks.append(lambda: check(node))
 *             return result
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             self.tree.new_error(node, 'Unknown prefix "%s".' % prefix)
 *         return ""
 */
    __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_10) {
      __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_factor", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_11, &__pyx_t_9) < 0) __PYX_ERR(0, 1149, __pyx_L10_except_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_GOTREF(__pyx_t_9);

      /* "DHParser/ebnf.py":1150
 *             return result
 *         except KeyError:
 *             self.tree.new_error(node, 'Unknown prefix "%s".' % prefix)             # <<<<<<<<<<<<<<
 *         return ""
 * 
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1150, __pyx_L10_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_new_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1150, __pyx_L10_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Unknown_prefix_s, __pyx_v_prefix); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1150, __pyx_L10_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_16 = NULL;
      __pyx_t_10 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_16)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_16);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_10 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_cur_scope->__pyx_v_node, __pyx_t_8};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1150, __pyx_L10_except_error)
        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_cur_scope->__pyx_v_node, __pyx_t_8};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1150, __pyx_L10_except_error)
        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else
      #endif
      {
        __pyx_t_17 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1150, __pyx_L10_except_error)
        __Pyx_GOTREF(__pyx_t_17);
        if (__pyx_t_16) {
          __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_16); __pyx_t_16 = NULL;
        }
        __Pyx_INCREF(__pyx_cur_scope->__pyx_v_node);
        __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_node);
        PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_10, __pyx_cur_scope->__pyx_v_node);
        __Pyx_GIVEREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_10, __pyx_t_8);
        __pyx_t_8 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_17, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1150, __pyx_L10_except_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L9_exception_handled;
    }
    goto __pyx_L10_except_error;
    __pyx_L10_except_error:;

    /* "DHParser/ebnf.py":1125
 * 
 *         node.result = node.children[1:]
 *         try:             # <<<<<<<<<<<<<<
 *             parser_class = self.PREFIX_TABLE[prefix]
 *             result = self.non_terminal(node, parser_class, custom_args)
 */
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
    goto __pyx_L1_error;
    __pyx_L12_try_return:;
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
    goto __pyx_L0;
    __pyx_L9_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  }

  /* "DHParser/ebnf.py":1151
 *         except KeyError:
 *             self.tree.new_error(node, 'Unknown prefix "%s".' % prefix)
 *         return ""             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_kp_u__2);
  __pyx_r = __pyx_kp_u__2;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":1099
 * 
 * 
 *     def on_factor(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         assert node.children
 *         assert len(node.children) >= 2, node.as_sxpr()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_factor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_prefix);
  __Pyx_XDECREF(__pyx_v_custom_args);
  __Pyx_XDECREF(__pyx_v_arg);
  __Pyx_XDECREF(__pyx_v_parser_class);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":1154
 * 
 * 
 *     def on_option(self, node) -> str:             # <<<<<<<<<<<<<<
 *         return self.non_terminal(node, 'Option')
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_45on_option(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_45on_option = {"on_option", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_45on_option, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_45on_option(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_node = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_option (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_option", 1, 2, 2, 1); __PYX_ERR(0, 1154, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_option") < 0)) __PYX_ERR(0, 1154, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_node = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("on_option", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1154, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_option", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_44on_option(__pyx_self, __pyx_v_self, __pyx_v_node);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_44on_option(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("on_option", 0);

  /* "DHParser/ebnf.py":1155
 * 
 *     def on_option(self, node) -> str:
 *         return self.non_terminal(node, 'Option')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_non_terminal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_node, __pyx_n_u_Option};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1155, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_node, __pyx_n_u_Option};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1155, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1155, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_node);
    __Pyx_GIVEREF(__pyx_v_node);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_node);
    __Pyx_INCREF(__pyx_n_u_Option);
    __Pyx_GIVEREF(__pyx_n_u_Option);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_Option);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1155, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1155, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":1154
 * 
 * 
 *     def on_option(self, node) -> str:             # <<<<<<<<<<<<<<
 *         return self.non_terminal(node, 'Option')
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_option", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":1158
 * 
 * 
 *     def on_repetition(self, node) -> str:             # <<<<<<<<<<<<<<
 *         return self.non_terminal(node, 'ZeroOrMore')
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_47on_repetition(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_47on_repetition = {"on_repetition", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_47on_repetition, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_47on_repetition(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_node = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_repetition (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_repetition", 1, 2, 2, 1); __PYX_ERR(0, 1158, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_repetition") < 0)) __PYX_ERR(0, 1158, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_node = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("on_repetition", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1158, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_repetition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_46on_repetition(__pyx_self, __pyx_v_self, __pyx_v_node);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_46on_repetition(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("on_repetition", 0);

  /* "DHParser/ebnf.py":1159
 * 
 *     def on_repetition(self, node) -> str:
 *         return self.non_terminal(node, 'ZeroOrMore')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_non_terminal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_node, __pyx_n_u_ZeroOrMore};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1159, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_node, __pyx_n_u_ZeroOrMore};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1159, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_node);
    __Pyx_GIVEREF(__pyx_v_node);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_node);
    __Pyx_INCREF(__pyx_n_u_ZeroOrMore);
    __Pyx_GIVEREF(__pyx_n_u_ZeroOrMore);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_ZeroOrMore);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1159, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":1158
 * 
 * 
 *     def on_repetition(self, node) -> str:             # <<<<<<<<<<<<<<
 *         return self.non_terminal(node, 'ZeroOrMore')
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_repetition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":1162
 * 
 * 
 *     def on_oneormore(self, node) -> str:             # <<<<<<<<<<<<<<
 *         return self.non_terminal(node, 'OneOrMore')
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_49on_oneormore(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_49on_oneormore = {"on_oneormore", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_49on_oneormore, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_49on_oneormore(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_node = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_oneormore (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_oneormore", 1, 2, 2, 1); __PYX_ERR(0, 1162, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_oneormore") < 0)) __PYX_ERR(0, 1162, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_node = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("on_oneormore", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1162, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_oneormore", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_48on_oneormore(__pyx_self, __pyx_v_self, __pyx_v_node);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_48on_oneormore(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("on_oneormore", 0);

  /* "DHParser/ebnf.py":1163
 * 
 *     def on_oneormore(self, node) -> str:
 *         return self.non_terminal(node, 'OneOrMore')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_non_terminal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_node, __pyx_n_u_OneOrMore};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1163, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_node, __pyx_n_u_OneOrMore};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1163, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_node);
    __Pyx_GIVEREF(__pyx_v_node);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_node);
    __Pyx_INCREF(__pyx_n_u_OneOrMore);
    __Pyx_GIVEREF(__pyx_n_u_OneOrMore);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_OneOrMore);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1163, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":1162
 * 
 * 
 *     def on_oneormore(self, node) -> str:             # <<<<<<<<<<<<<<
 *         return self.non_terminal(node, 'OneOrMore')
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_oneormore", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":1166
 * 
 * 
 *     def on_group(self, node) -> str:             # <<<<<<<<<<<<<<
 *         raise EBNFCompilerError("Group nodes should have been eliminated by "
 *                                 "AST transformation!")
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_51on_group(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_51on_group = {"on_group", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_51on_group, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_51on_group(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_node = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_group (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_group", 1, 2, 2, 1); __PYX_ERR(0, 1166, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_group") < 0)) __PYX_ERR(0, 1166, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_node = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("on_group", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1166, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_group", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_50on_group(__pyx_self, __pyx_v_self, __pyx_v_node);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_50on_group(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_node) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("on_group", 0);

  /* "DHParser/ebnf.py":1167
 * 
 *     def on_group(self, node) -> str:
 *         raise EBNFCompilerError("Group nodes should have been eliminated by "             # <<<<<<<<<<<<<<
 *                                 "AST transformation!")
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_EBNFCompilerError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_Group_nodes_should_have_been_eli) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_Group_nodes_should_have_been_eli);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 1167, __pyx_L1_error)

  /* "DHParser/ebnf.py":1166
 * 
 * 
 *     def on_group(self, node) -> str:             # <<<<<<<<<<<<<<
 *         raise EBNFCompilerError("Group nodes should have been eliminated by "
 *                                 "AST transformation!")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_group", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":1170
 *                                 "AST transformation!")
 * 
 *     def on_unordered(self, node) -> str:             # <<<<<<<<<<<<<<
 *         # return self.non_terminal(node, 'Unordered')
 *         assert len(node.children) == 1
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_53on_unordered(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_53on_unordered = {"on_unordered", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_53on_unordered, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_53on_unordered(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_node = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_unordered (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_unordered", 1, 2, 2, 1); __PYX_ERR(0, 1170, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_unordered") < 0)) __PYX_ERR(0, 1170, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_node = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("on_unordered", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1170, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_unordered", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_52on_unordered(__pyx_self, __pyx_v_self, __pyx_v_node);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_8DHParser_4ebnf_12EBNFCompiler_12on_unordered_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "DHParser/ebnf.py":1179
 *             return self.non_terminal(mock_node, 'AllOf', custom_args)
 *         elif nd.tag_name == "expression":
 *             if any(c.tag_name == TOKEN_PTYPE and nd.content == '' for c in nd.children):             # <<<<<<<<<<<<<<
 *                 self.tree.new_error(node, "No mandatory items  allowed in SomeOf-operator!")
 *             args = ', '.join(self.compile(child) for child in nd.children)
 */

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_12on_unordered_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_4_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_4_genexpr *)__pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct_4_genexpr(__pyx_ptype_8DHParser_4ebnf___pyx_scope_struct_4_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_4_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1179, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_8DHParser_4ebnf_12EBNFCompiler_12on_unordered_2generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_EBNFCompiler_on_unordered_locals, __pyx_n_s_DHParser_ebnf); if (unlikely(!gen)) __PYX_ERR(0, 1179, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_unordered.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_8DHParser_4ebnf_12EBNFCompiler_12on_unordered_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_4_genexpr *__pyx_cur_scope = ((struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_4_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1179, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nd)) { __Pyx_RaiseClosureNameError("nd"); __PYX_ERR(0, 1179, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nd, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1179, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1179, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1179, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1179, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_c);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_c, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_c, __pyx_n_s_tag_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_TOKEN_PTYPE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1179, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1179, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_8) {
    } else {
      __pyx_t_5 = __pyx_t_8;
      goto __pyx_L7_bool_binop_done;
    }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nd)) { __Pyx_RaiseClosureNameError("nd"); __PYX_ERR(0, 1179, __pyx_L1_error) }
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nd, __pyx_n_s_content); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_kp_u__45, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1179, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_5 = __pyx_t_8;
    __pyx_L7_bool_binop_done:;
    if (__pyx_t_5) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_8DHParser_4ebnf_12EBNFCompiler_12on_unordered_5generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "DHParser/ebnf.py":1181
 *             if any(c.tag_name == TOKEN_PTYPE and nd.content == '' for c in nd.children):
 *                 self.tree.new_error(node, "No mandatory items  allowed in SomeOf-operator!")
 *             args = ', '.join(self.compile(child) for child in nd.children)             # <<<<<<<<<<<<<<
 *             return "SomeOf(" + args + ")"
 *         else:
 */

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_12on_unordered_3genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_5_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_5_genexpr *)__pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct_5_genexpr(__pyx_ptype_8DHParser_4ebnf___pyx_scope_struct_5_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_5_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1181, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_8DHParser_4ebnf_12EBNFCompiler_12on_unordered_5generator1, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_EBNFCompiler_on_unordered_locals, __pyx_n_s_DHParser_ebnf); if (unlikely(!gen)) __PYX_ERR(0, 1181, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_unordered.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_8DHParser_4ebnf_12EBNFCompiler_12on_unordered_5generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_5_genexpr *__pyx_cur_scope = ((struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_5_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1181, __pyx_L1_error)
  __pyx_r = PyList_New(0); if (unlikely(!__pyx_r)) __PYX_ERR(0, 1181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nd)) { __Pyx_RaiseClosureNameError("nd"); __PYX_ERR(0, 1181, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nd, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1181, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1181, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1181, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1181, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1181, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1181, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_child);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_child, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1181, __pyx_L1_error) }
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, __pyx_n_s_compile); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_cur_scope->__pyx_v_child) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_cur_scope->__pyx_v_child);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_r, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 1181, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":1170
 *                                 "AST transformation!")
 * 
 *     def on_unordered(self, node) -> str:             # <<<<<<<<<<<<<<
 *         # return self.non_terminal(node, 'Unordered')
 *         assert len(node.children) == 1
 */

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_52on_unordered(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node) {
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered *__pyx_cur_scope;
  PyObject *__pyx_v_filtered_result = NULL;
  PyObject *__pyx_v_custom_args = NULL;
  PyObject *__pyx_v_mock_node = NULL;
  PyObject *__pyx_v_args = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("on_unordered", 0);
  __pyx_cur_scope = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered *)__pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered(__pyx_ptype_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1170, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);

  /* "DHParser/ebnf.py":1172
 *     def on_unordered(self, node) -> str:
 *         # return self.non_terminal(node, 'Unordered')
 *         assert len(node.children) == 1             # <<<<<<<<<<<<<<
 *         nd = node.children[0]
 *         if nd.tag_name == "term":
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1172, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!((__pyx_t_2 == 1) != 0))) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 1172, __pyx_L1_error)
    }
  }
  #endif

  /* "DHParser/ebnf.py":1173
 *         # return self.non_terminal(node, 'Unordered')
 *         assert len(node.children) == 1
 *         nd = node.children[0]             # <<<<<<<<<<<<<<
 *         if nd.tag_name == "term":
 *             filtered_result, custom_args = self._error_customization(nd)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_cur_scope->__pyx_v_nd = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "DHParser/ebnf.py":1174
 *         assert len(node.children) == 1
 *         nd = node.children[0]
 *         if nd.tag_name == "term":             # <<<<<<<<<<<<<<
 *             filtered_result, custom_args = self._error_customization(nd)
 *             mock_node = Node(nd.tag_name, filtered_result)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_nd, __pyx_n_s_tag_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_term, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1174, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "DHParser/ebnf.py":1175
 *         nd = node.children[0]
 *         if nd.tag_name == "term":
 *             filtered_result, custom_args = self._error_customization(nd)             # <<<<<<<<<<<<<<
 *             mock_node = Node(nd.tag_name, filtered_result)
 *             return self.non_terminal(mock_node, 'AllOf', custom_args)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_error_customization); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_cur_scope->__pyx_v_nd) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_cur_scope->__pyx_v_nd);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
      PyObject* sequence = __pyx_t_3;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 1175, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      #else
      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      #endif
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
      index = 0; __pyx_t_1 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_1);
      index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 1175, __pyx_L1_error)
      __pyx_t_7 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L5_unpacking_done;
      __pyx_L4_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 1175, __pyx_L1_error)
      __pyx_L5_unpacking_done:;
    }
    __pyx_v_filtered_result = __pyx_t_1;
    __pyx_t_1 = 0;
    __pyx_v_custom_args = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "DHParser/ebnf.py":1176
 *         if nd.tag_name == "term":
 *             filtered_result, custom_args = self._error_customization(nd)
 *             mock_node = Node(nd.tag_name, filtered_result)             # <<<<<<<<<<<<<<
 *             return self.non_terminal(mock_node, 'AllOf', custom_args)
 *         elif nd.tag_name == "expression":
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Node); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_nd, __pyx_n_s_tag_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_1, __pyx_v_filtered_result};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1176, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_1, __pyx_v_filtered_result};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1176, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1176, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_1);
      __Pyx_INCREF(__pyx_v_filtered_result);
      __Pyx_GIVEREF(__pyx_v_filtered_result);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_filtered_result);
      __pyx_t_1 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1176, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_mock_node = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "DHParser/ebnf.py":1177
 *             filtered_result, custom_args = self._error_customization(nd)
 *             mock_node = Node(nd.tag_name, filtered_result)
 *             return self.non_terminal(mock_node, 'AllOf', custom_args)             # <<<<<<<<<<<<<<
 *         elif nd.tag_name == "expression":
 *             if any(c.tag_name == TOKEN_PTYPE and nd.content == '' for c in nd.children):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_non_terminal); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_v_mock_node, __pyx_n_u_AllOf, __pyx_v_custom_args};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1177, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_v_mock_node, __pyx_n_u_AllOf, __pyx_v_custom_args};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1177, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    {
      __pyx_t_1 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1177, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (__pyx_t_9) {
        __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9); __pyx_t_9 = NULL;
      }
      __Pyx_INCREF(__pyx_v_mock_node);
      __Pyx_GIVEREF(__pyx_v_mock_node);
      PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_8, __pyx_v_mock_node);
      __Pyx_INCREF(__pyx_n_u_AllOf);
      __Pyx_GIVEREF(__pyx_n_u_AllOf);
      PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_8, __pyx_n_u_AllOf);
      __Pyx_INCREF(__pyx_v_custom_args);
      __Pyx_GIVEREF(__pyx_v_custom_args);
      PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_8, __pyx_v_custom_args);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1177, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1177, __pyx_L1_error)
    __pyx_r = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "DHParser/ebnf.py":1174
 *         assert len(node.children) == 1
 *         nd = node.children[0]
 *         if nd.tag_name == "term":             # <<<<<<<<<<<<<<
 *             filtered_result, custom_args = self._error_customization(nd)
 *             mock_node = Node(nd.tag_name, filtered_result)
 */
  }

  /* "DHParser/ebnf.py":1178
 *             mock_node = Node(nd.tag_name, filtered_result)
 *             return self.non_terminal(mock_node, 'AllOf', custom_args)
 *         elif nd.tag_name == "expression":             # <<<<<<<<<<<<<<
 *             if any(c.tag_name == TOKEN_PTYPE and nd.content == '' for c in nd.children):
 *                 self.tree.new_error(node, "No mandatory items  allowed in SomeOf-operator!")
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_nd, __pyx_n_s_tag_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_expression, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1178, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "DHParser/ebnf.py":1179
 *             return self.non_terminal(mock_node, 'AllOf', custom_args)
 *         elif nd.tag_name == "expression":
 *             if any(c.tag_name == TOKEN_PTYPE and nd.content == '' for c in nd.children):             # <<<<<<<<<<<<<<
 *                 self.tree.new_error(node, "No mandatory items  allowed in SomeOf-operator!")
 *             args = ', '.join(self.compile(child) for child in nd.children)
 */
    __pyx_t_3 = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_12on_unordered_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_Generator_Next(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1179, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_4) {

      /* "DHParser/ebnf.py":1180
 *         elif nd.tag_name == "expression":
 *             if any(c.tag_name == TOKEN_PTYPE and nd.content == '' for c in nd.children):
 *                 self.tree.new_error(node, "No mandatory items  allowed in SomeOf-operator!")             # <<<<<<<<<<<<<<
 *             args = ', '.join(self.compile(child) for child in nd.children)
 *             return "SomeOf(" + args + ")"
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1180, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_new_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1180, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_8 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_8 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_node, __pyx_kp_u_No_mandatory_items_allowed_in_So};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1180, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_5);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_node, __pyx_kp_u_No_mandatory_items_allowed_in_So};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1180, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_5);
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1180, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (__pyx_t_3) {
          __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); __pyx_t_3 = NULL;
        }
        __Pyx_INCREF(__pyx_v_node);
        __Pyx_GIVEREF(__pyx_v_node);
        PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_node);
        __Pyx_INCREF(__pyx_kp_u_No_mandatory_items_allowed_in_So);
        __Pyx_GIVEREF(__pyx_kp_u_No_mandatory_items_allowed_in_So);
        PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_kp_u_No_mandatory_items_allowed_in_So);
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1180, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "DHParser/ebnf.py":1179
 *             return self.non_terminal(mock_node, 'AllOf', custom_args)
 *         elif nd.tag_name == "expression":
 *             if any(c.tag_name == TOKEN_PTYPE and nd.content == '' for c in nd.children):             # <<<<<<<<<<<<<<
 *                 self.tree.new_error(node, "No mandatory items  allowed in SomeOf-operator!")
 *             args = ', '.join(self.compile(child) for child in nd.children)
 */
    }

    /* "DHParser/ebnf.py":1181
 *             if any(c.tag_name == TOKEN_PTYPE and nd.content == '' for c in nd.children):
 *                 self.tree.new_error(node, "No mandatory items  allowed in SomeOf-operator!")
 *             args = ', '.join(self.compile(child) for child in nd.children)             # <<<<<<<<<<<<<<
 *             return "SomeOf(" + args + ")"
 *         else:
 */
    __pyx_t_5 = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_12on_unordered_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_Generator_Next(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyUnicode_Join(__pyx_kp_u__40, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_args = ((PyObject*)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "DHParser/ebnf.py":1182
 *                 self.tree.new_error(node, "No mandatory items  allowed in SomeOf-operator!")
 *             args = ', '.join(self.compile(child) for child in nd.children)
 *             return "SomeOf(" + args + ")"             # <<<<<<<<<<<<<<
 *         else:
 *             self.tree.new_error(node, "Unordered sequence or alternative "
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_PyUnicode_ConcatSafe(__pyx_kp_u_SomeOf, __pyx_v_args); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_kp_u__15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "DHParser/ebnf.py":1178
 *             mock_node = Node(nd.tag_name, filtered_result)
 *             return self.non_terminal(mock_node, 'AllOf', custom_args)
 *         elif nd.tag_name == "expression":             # <<<<<<<<<<<<<<
 *             if any(c.tag_name == TOKEN_PTYPE and nd.content == '' for c in nd.children):
 *                 self.tree.new_error(node, "No mandatory items  allowed in SomeOf-operator!")
 */
  }

  /* "DHParser/ebnf.py":1184
 *             return "SomeOf(" + args + ")"
 *         else:
 *             self.tree.new_error(node, "Unordered sequence or alternative "             # <<<<<<<<<<<<<<
 *                                       "requires at least two elements.")
 *             return ""
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_new_error); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_9)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_node, __pyx_kp_u_Unordered_sequence_or_alternativ};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1184, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_node, __pyx_kp_u_Unordered_sequence_or_alternativ};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1184, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1184, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_v_node);
      __Pyx_GIVEREF(__pyx_v_node);
      PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_8, __pyx_v_node);
      __Pyx_INCREF(__pyx_kp_u_Unordered_sequence_or_alternativ);
      __Pyx_GIVEREF(__pyx_kp_u_Unordered_sequence_or_alternativ);
      PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_8, __pyx_kp_u_Unordered_sequence_or_alternativ);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1184, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "DHParser/ebnf.py":1186
 *             self.tree.new_error(node, "Unordered sequence or alternative "
 *                                       "requires at least two elements.")
 *             return ""             # <<<<<<<<<<<<<<
 * 
 *     def on_symbol(self, node: Node) -> str:     # called only for symbols on the right hand side!
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__2);
    __pyx_r = __pyx_kp_u__2;
    goto __pyx_L0;
  }

  /* "DHParser/ebnf.py":1170
 *                                 "AST transformation!")
 * 
 *     def on_unordered(self, node) -> str:             # <<<<<<<<<<<<<<
 *         # return self.non_terminal(node, 'Unordered')
 *         assert len(node.children) == 1
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_unordered", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_filtered_result);
  __Pyx_XDECREF(__pyx_v_custom_args);
  __Pyx_XDECREF(__pyx_v_mock_node);
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":1188
 *             return ""
 * 
 *     def on_symbol(self, node: Node) -> str:     # called only for symbols on the right hand side!             # <<<<<<<<<<<<<<
 *         symbol = node.content  # ; assert result == cast(str, node.result)
 *         if symbol in self.directives.tokens:
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_55on_symbol(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_55on_symbol = {"on_symbol", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_55on_symbol, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_55on_symbol(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_node = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_symbol (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_symbol", 1, 2, 2, 1); __PYX_ERR(0, 1188, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_symbol") < 0)) __PYX_ERR(0, 1188, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_node = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("on_symbol", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1188, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_symbol", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_54on_symbol(__pyx_self, __pyx_v_self, __pyx_v_node);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_54on_symbol(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node) {
  PyObject *__pyx_v_symbol = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("on_symbol", 0);

  /* "DHParser/ebnf.py":1189
 * 
 *     def on_symbol(self, node: Node) -> str:     # called only for symbols on the right hand side!
 *         symbol = node.content  # ; assert result == cast(str, node.result)             # <<<<<<<<<<<<<<
 *         if symbol in self.directives.tokens:
 *             return 'PreprocessorToken("' + symbol + '")'
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_content); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_symbol = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":1190
 *     def on_symbol(self, node: Node) -> str:     # called only for symbols on the right hand side!
 *         symbol = node.content  # ; assert result == cast(str, node.result)
 *         if symbol in self.directives.tokens:             # <<<<<<<<<<<<<<
 *             return 'PreprocessorToken("' + symbol + '")'
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_directives); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_tokens); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_symbol, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "DHParser/ebnf.py":1191
 *         symbol = node.content  # ; assert result == cast(str, node.result)
 *         if symbol in self.directives.tokens:
 *             return 'PreprocessorToken("' + symbol + '")'             # <<<<<<<<<<<<<<
 *         else:
 *             self.current_symbols.append(node)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyNumber_Add(__pyx_kp_u_PreprocessorToken, __pyx_v_symbol); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_kp_u__54); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1191, __pyx_L1_error)
    __pyx_r = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "DHParser/ebnf.py":1190
 *     def on_symbol(self, node: Node) -> str:     # called only for symbols on the right hand side!
 *         symbol = node.content  # ; assert result == cast(str, node.result)
 *         if symbol in self.directives.tokens:             # <<<<<<<<<<<<<<
 *             return 'PreprocessorToken("' + symbol + '")'
 *         else:
 */
  }

  /* "DHParser/ebnf.py":1193
 *             return 'PreprocessorToken("' + symbol + '")'
 *         else:
 *             self.current_symbols.append(node)             # <<<<<<<<<<<<<<
 *             if symbol not in self.symbols:
 *                 # remember first use of symbol, so that dangling references or
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_current_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_v_node); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1193, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "DHParser/ebnf.py":1194
 *         else:
 *             self.current_symbols.append(node)
 *             if symbol not in self.symbols:             # <<<<<<<<<<<<<<
 *                 # remember first use of symbol, so that dangling references or
 *                 # redundant definitions or usages of symbols can be detected later
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_v_symbol, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1194, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = (__pyx_t_4 != 0);
    if (__pyx_t_3) {

      /* "DHParser/ebnf.py":1197
 *                 # remember first use of symbol, so that dangling references or
 *                 # redundant definitions or usages of symbols can be detected later
 *                 self.symbols[symbol] = node             # <<<<<<<<<<<<<<
 *             if symbol in self.rules:
 *                 self.recursive.add(symbol)
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_symbol, __pyx_v_node) < 0)) __PYX_ERR(0, 1197, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "DHParser/ebnf.py":1194
 *         else:
 *             self.current_symbols.append(node)
 *             if symbol not in self.symbols:             # <<<<<<<<<<<<<<
 *                 # remember first use of symbol, so that dangling references or
 *                 # redundant definitions or usages of symbols can be detected later
 */
    }

    /* "DHParser/ebnf.py":1198
 *                 # redundant definitions or usages of symbols can be detected later
 *                 self.symbols[symbol] = node
 *             if symbol in self.rules:             # <<<<<<<<<<<<<<
 *                 self.recursive.add(symbol)
 *             if symbol in EBNFCompiler.RESERVED_SYMBOLS:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rules); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1198, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_symbol, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1198, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = (__pyx_t_3 != 0);
    if (__pyx_t_4) {

      /* "DHParser/ebnf.py":1199
 *                 self.symbols[symbol] = node
 *             if symbol in self.rules:
 *                 self.recursive.add(symbol)             # <<<<<<<<<<<<<<
 *             if symbol in EBNFCompiler.RESERVED_SYMBOLS:
 *                 # (EBNFCompiler.WHITESPACE_KEYWORD, EBNFCompiler.COMMENT_KEYWORD):
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recursive); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1199, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_add); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1199, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_2, __pyx_v_symbol) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_symbol);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1199, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "DHParser/ebnf.py":1198
 *                 # redundant definitions or usages of symbols can be detected later
 *                 self.symbols[symbol] = node
 *             if symbol in self.rules:             # <<<<<<<<<<<<<<
 *                 self.recursive.add(symbol)
 *             if symbol in EBNFCompiler.RESERVED_SYMBOLS:
 */
    }

    /* "DHParser/ebnf.py":1200
 *             if symbol in self.rules:
 *                 self.recursive.add(symbol)
 *             if symbol in EBNFCompiler.RESERVED_SYMBOLS:             # <<<<<<<<<<<<<<
 *                 # (EBNFCompiler.WHITESPACE_KEYWORD, EBNFCompiler.COMMENT_KEYWORD):
 *                 return "RegExp(%s)" % symbol
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_EBNFCompiler); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_RESERVED_SYMBOLS); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_v_symbol, __pyx_t_6, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1200, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_3 = (__pyx_t_4 != 0);
    if (__pyx_t_3) {

      /* "DHParser/ebnf.py":1202
 *             if symbol in EBNFCompiler.RESERVED_SYMBOLS:
 *                 # (EBNFCompiler.WHITESPACE_KEYWORD, EBNFCompiler.COMMENT_KEYWORD):
 *                 return "RegExp(%s)" % symbol             # <<<<<<<<<<<<<<
 *             return symbol
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_RegExp_s, __pyx_v_symbol); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1202, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_r = ((PyObject*)__pyx_t_6);
      __pyx_t_6 = 0;
      goto __pyx_L0;

      /* "DHParser/ebnf.py":1200
 *             if symbol in self.rules:
 *                 self.recursive.add(symbol)
 *             if symbol in EBNFCompiler.RESERVED_SYMBOLS:             # <<<<<<<<<<<<<<
 *                 # (EBNFCompiler.WHITESPACE_KEYWORD, EBNFCompiler.COMMENT_KEYWORD):
 *                 return "RegExp(%s)" % symbol
 */
    }

    /* "DHParser/ebnf.py":1203
 *                 # (EBNFCompiler.WHITESPACE_KEYWORD, EBNFCompiler.COMMENT_KEYWORD):
 *                 return "RegExp(%s)" % symbol
 *             return symbol             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    if (!(likely(PyUnicode_CheckExact(__pyx_v_symbol))||((__pyx_v_symbol) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_symbol)->tp_name), 0))) __PYX_ERR(0, 1203, __pyx_L1_error)
    __Pyx_INCREF(__pyx_v_symbol);
    __pyx_r = ((PyObject*)__pyx_v_symbol);
    goto __pyx_L0;
  }

  /* "DHParser/ebnf.py":1188
 *             return ""
 * 
 *     def on_symbol(self, node: Node) -> str:     # called only for symbols on the right hand side!             # <<<<<<<<<<<<<<
 *         symbol = node.content  # ; assert result == cast(str, node.result)
 *         if symbol in self.directives.tokens:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_symbol", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_symbol);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":1206
 * 
 * 
 *     def TOKEN_PARSER(self):             # <<<<<<<<<<<<<<
 *         if DROP_TOKEN in self.directives.drop and self.context[-2].tag_name != "definition":
 *             return 'DropToken('
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_57TOKEN_PARSER(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_57TOKEN_PARSER = {"TOKEN_PARSER", (PyCFunction)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_57TOKEN_PARSER, METH_O, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_57TOKEN_PARSER(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("TOKEN_PARSER (wrapper)", 0);
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_56TOKEN_PARSER(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_56TOKEN_PARSER(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("TOKEN_PARSER", 0);

  /* "DHParser/ebnf.py":1207
 * 
 *     def TOKEN_PARSER(self):
 *         if DROP_TOKEN in self.directives.drop and self.context[-2].tag_name != "definition":             # <<<<<<<<<<<<<<
 *             return 'DropToken('
 *         return 'Token('
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DROP_TOKEN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_directives); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_drop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_context); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_4, -2L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_tag_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_n_u_definition, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "DHParser/ebnf.py":1208
 *     def TOKEN_PARSER(self):
 *         if DROP_TOKEN in self.directives.drop and self.context[-2].tag_name != "definition":
 *             return 'DropToken('             # <<<<<<<<<<<<<<
 *         return 'Token('
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u_DropToken);
    __pyx_r = __pyx_kp_u_DropToken;
    goto __pyx_L0;

    /* "DHParser/ebnf.py":1207
 * 
 *     def TOKEN_PARSER(self):
 *         if DROP_TOKEN in self.directives.drop and self.context[-2].tag_name != "definition":             # <<<<<<<<<<<<<<
 *             return 'DropToken('
 *         return 'Token('
 */
  }

  /* "DHParser/ebnf.py":1209
 *         if DROP_TOKEN in self.directives.drop and self.context[-2].tag_name != "definition":
 *             return 'DropToken('
 *         return 'Token('             # <<<<<<<<<<<<<<
 * 
 *     def WSPC_PARSER(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_kp_u_Token);
  __pyx_r = __pyx_kp_u_Token;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":1206
 * 
 * 
 *     def TOKEN_PARSER(self):             # <<<<<<<<<<<<<<
 *         if DROP_TOKEN in self.directives.drop and self.context[-2].tag_name != "definition":
 *             return 'DropToken('
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.TOKEN_PARSER", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":1211
 *         return 'Token('
 * 
 *     def WSPC_PARSER(self):             # <<<<<<<<<<<<<<
 *         if DROP_WSPC in self.directives.drop and (self.context[-2].tag_name != "definition"
 *                                                   or self.context[-1].tag_name == 'literal'):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_59WSPC_PARSER(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_59WSPC_PARSER = {"WSPC_PARSER", (PyCFunction)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_59WSPC_PARSER, METH_O, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_59WSPC_PARSER(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("WSPC_PARSER (wrapper)", 0);
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_58WSPC_PARSER(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_58WSPC_PARSER(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("WSPC_PARSER", 0);

  /* "DHParser/ebnf.py":1212
 * 
 *     def WSPC_PARSER(self):
 *         if DROP_WSPC in self.directives.drop and (self.context[-2].tag_name != "definition"             # <<<<<<<<<<<<<<
 *                                                   or self.context[-1].tag_name == 'literal'):
 *             return 'dwsp__'
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DROP_WSPC); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_directives); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_drop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1212, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }

  /* "DHParser/ebnf.py":1213
 *     def WSPC_PARSER(self):
 *         if DROP_WSPC in self.directives.drop and (self.context[-2].tag_name != "definition"
 *                                                   or self.context[-1].tag_name == 'literal'):             # <<<<<<<<<<<<<<
 *             return 'dwsp__'
 *         return 'wsp__'
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_context); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "DHParser/ebnf.py":1212
 * 
 *     def WSPC_PARSER(self):
 *         if DROP_WSPC in self.directives.drop and (self.context[-2].tag_name != "definition"             # <<<<<<<<<<<<<<
 *                                                   or self.context[-1].tag_name == 'literal'):
 *             return 'dwsp__'
 */
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_4, -2L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_tag_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_n_u_definition, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1212, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (!__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }

  /* "DHParser/ebnf.py":1213
 *     def WSPC_PARSER(self):
 *         if DROP_WSPC in self.directives.drop and (self.context[-2].tag_name != "definition"
 *                                                   or self.context[-1].tag_name == 'literal'):             # <<<<<<<<<<<<<<
 *             return 'dwsp__'
 *         return 'wsp__'
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_context); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_4, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_tag_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_n_u_literal, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1213, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;

  /* "DHParser/ebnf.py":1212
 * 
 *     def WSPC_PARSER(self):
 *         if DROP_WSPC in self.directives.drop and (self.context[-2].tag_name != "definition"             # <<<<<<<<<<<<<<
 *                                                   or self.context[-1].tag_name == 'literal'):
 *             return 'dwsp__'
 */
  if (__pyx_t_1) {

    /* "DHParser/ebnf.py":1214
 *         if DROP_WSPC in self.directives.drop and (self.context[-2].tag_name != "definition"
 *                                                   or self.context[-1].tag_name == 'literal'):
 *             return 'dwsp__'             # <<<<<<<<<<<<<<
 *         return 'wsp__'
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_n_u_dwsp);
    __pyx_r = __pyx_n_u_dwsp;
    goto __pyx_L0;

    /* "DHParser/ebnf.py":1212
 * 
 *     def WSPC_PARSER(self):
 *         if DROP_WSPC in self.directives.drop and (self.context[-2].tag_name != "definition"             # <<<<<<<<<<<<<<
 *                                                   or self.context[-1].tag_name == 'literal'):
 *             return 'dwsp__'
 */
  }

  /* "DHParser/ebnf.py":1215
 *                                                   or self.context[-1].tag_name == 'literal'):
 *             return 'dwsp__'
 *         return 'wsp__'             # <<<<<<<<<<<<<<
 * 
 *     def on_literal(self, node: Node) -> str:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_n_u_wsp);
  __pyx_r = __pyx_n_u_wsp;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":1211
 *         return 'Token('
 * 
 *     def WSPC_PARSER(self):             # <<<<<<<<<<<<<<
 *         if DROP_WSPC in self.directives.drop and (self.context[-2].tag_name != "definition"
 *                                                   or self.context[-1].tag_name == 'literal'):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.WSPC_PARSER", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":1217
 *         return 'wsp__'
 * 
 *     def on_literal(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         center = self.TOKEN_PARSER() + node.content.replace('\\', r'\\') + ')'
 *         left = self.WSPC_PARSER() if 'left' in self.directives.literalws else ''
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_61on_literal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_61on_literal = {"on_literal", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_61on_literal, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_61on_literal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_node = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_literal (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_literal", 1, 2, 2, 1); __PYX_ERR(0, 1217, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_literal") < 0)) __PYX_ERR(0, 1217, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_node = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("on_literal", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1217, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_literal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_60on_literal(__pyx_self, __pyx_v_self, __pyx_v_node);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_8DHParser_4ebnf_12EBNFCompiler_10on_literal_2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "DHParser/ebnf.py":1222
 *         right = self.WSPC_PARSER() if 'right' in self.directives.literalws else ''
 *         if left or right:
 *             return 'Series(' + ", ".join(item for item in (left, center, right) if item) + ')'             # <<<<<<<<<<<<<<
 *         return center
 * 
 */

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_10on_literal_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_7_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_7_genexpr *)__pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct_7_genexpr(__pyx_ptype_8DHParser_4ebnf___pyx_scope_struct_7_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_7_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1222, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_6_on_literal *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_8DHParser_4ebnf_12EBNFCompiler_10on_literal_2generator2, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_EBNFCompiler_on_literal_locals_g, __pyx_n_s_DHParser_ebnf); if (unlikely(!gen)) __PYX_ERR(0, 1222, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_literal.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_8DHParser_4ebnf_12EBNFCompiler_10on_literal_2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_7_genexpr *__pyx_cur_scope = ((struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_7_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1222, __pyx_L1_error)
  __pyx_r = PyList_New(0); if (unlikely(!__pyx_r)) __PYX_ERR(0, 1222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_left)) { __Pyx_RaiseClosureNameError("left"); __PYX_ERR(0, 1222, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_center)) { __Pyx_RaiseClosureNameError("center"); __PYX_ERR(0, 1222, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_right)) { __Pyx_RaiseClosureNameError("right"); __PYX_ERR(0, 1222, __pyx_L1_error) }
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_left);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_left);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_left);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_center);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_center);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_center);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_right);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_right);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_right);
  __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (__pyx_t_3 >= 3) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1222, __pyx_L1_error)
    #else
    __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    #endif
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_item);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_item, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_item); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1222, __pyx_L1_error)
    if (__pyx_t_4) {
      if (unlikely(__Pyx_ListComp_Append(__pyx_r, (PyObject*)__pyx_cur_scope->__pyx_v_item))) __PYX_ERR(0, 1222, __pyx_L1_error)
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":1217
 *         return 'wsp__'
 * 
 *     def on_literal(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         center = self.TOKEN_PARSER() + node.content.replace('\\', r'\\') + ')'
 *         left = self.WSPC_PARSER() if 'left' in self.directives.literalws else ''
 */

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_60on_literal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node) {
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_6_on_literal *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("on_literal", 0);
  __pyx_cur_scope = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_6_on_literal *)__pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct_6_on_literal(__pyx_ptype_8DHParser_4ebnf___pyx_scope_struct_6_on_literal, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_6_on_literal *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1217, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }

  /* "DHParser/ebnf.py":1218
 * 
 *     def on_literal(self, node: Node) -> str:
 *         center = self.TOKEN_PARSER() + node.content.replace('\\', r'\\') + ')'             # <<<<<<<<<<<<<<
 *         left = self.WSPC_PARSER() if 'left' in self.directives.literalws else ''
 *         right = self.WSPC_PARSER() if 'right' in self.directives.literalws else ''
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_TOKEN_PARSER); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_content); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_replace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_kp_u__15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_cur_scope->__pyx_v_center = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":1219
 *     def on_literal(self, node: Node) -> str:
 *         center = self.TOKEN_PARSER() + node.content.replace('\\', r'\\') + ')'
 *         left = self.WSPC_PARSER() if 'left' in self.directives.literalws else ''             # <<<<<<<<<<<<<<
 *         right = self.WSPC_PARSER() if 'right' in self.directives.literalws else ''
 *         if left or right:
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_directives); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_literalws); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_left, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1219, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if ((__pyx_t_4 != 0)) {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_WSPC_PARSER); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __pyx_t_1;
    __pyx_t_1 = 0;
  } else {
    __Pyx_INCREF(__pyx_kp_u__2);
    __pyx_t_2 = __pyx_kp_u__2;
  }
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_cur_scope->__pyx_v_left = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":1220
 *         center = self.TOKEN_PARSER() + node.content.replace('\\', r'\\') + ')'
 *         left = self.WSPC_PARSER() if 'left' in self.directives.literalws else ''
 *         right = self.WSPC_PARSER() if 'right' in self.directives.literalws else ''             # <<<<<<<<<<<<<<
 *         if left or right:
 *             return 'Series(' + ", ".join(item for item in (left, center, right) if item) + ')'
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_directives); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_literalws); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_right, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1220, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if ((__pyx_t_4 != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_WSPC_PARSER); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_kp_u__2);
    __pyx_t_2 = __pyx_kp_u__2;
  }
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_cur_scope->__pyx_v_right = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":1221
 *         left = self.WSPC_PARSER() if 'left' in self.directives.literalws else ''
 *         right = self.WSPC_PARSER() if 'right' in self.directives.literalws else ''
 *         if left or right:             # <<<<<<<<<<<<<<
 *             return 'Series(' + ", ".join(item for item in (left, center, right) if item) + ')'
 *         return center
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_left); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1221, __pyx_L1_error)
  if (!__pyx_t_6) {
  } else {
    __pyx_t_4 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_right); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1221, __pyx_L1_error)
  __pyx_t_4 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_4) {

    /* "DHParser/ebnf.py":1222
 *         right = self.WSPC_PARSER() if 'right' in self.directives.literalws else ''
 *         if left or right:
 *             return 'Series(' + ", ".join(item for item in (left, center, right) if item) + ')'             # <<<<<<<<<<<<<<
 *         return center
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_10on_literal_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__40, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Series_2, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_kp_u__15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "DHParser/ebnf.py":1221
 *         left = self.WSPC_PARSER() if 'left' in self.directives.literalws else ''
 *         right = self.WSPC_PARSER() if 'right' in self.directives.literalws else ''
 *         if left or right:             # <<<<<<<<<<<<<<
 *             return 'Series(' + ", ".join(item for item in (left, center, right) if item) + ')'
 *         return center
 */
  }

  /* "DHParser/ebnf.py":1223
 *         if left or right:
 *             return 'Series(' + ", ".join(item for item in (left, center, right) if item) + ')'
 *         return center             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(PyUnicode_CheckExact(__pyx_cur_scope->__pyx_v_center))||((__pyx_cur_scope->__pyx_v_center) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_cur_scope->__pyx_v_center)->tp_name), 0))) __PYX_ERR(0, 1223, __pyx_L1_error)
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_center);
  __pyx_r = ((PyObject*)__pyx_cur_scope->__pyx_v_center);
  goto __pyx_L0;

  /* "DHParser/ebnf.py":1217
 *         return 'wsp__'
 * 
 *     def on_literal(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         center = self.TOKEN_PARSER() + node.content.replace('\\', r'\\') + ')'
 *         left = self.WSPC_PARSER() if 'left' in self.directives.literalws else ''
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_literal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":1226
 * 
 * 
 *     def on_plaintext(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         tk = node.content.replace('\\', r'\\')
 *         rpl = '"' if tk.find('"') < 0 else "'" if tk.find("'") < 0 else ''
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_63on_plaintext(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_63on_plaintext = {"on_plaintext", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_63on_plaintext, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_63on_plaintext(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_node = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_plaintext (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_plaintext", 1, 2, 2, 1); __PYX_ERR(0, 1226, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_plaintext") < 0)) __PYX_ERR(0, 1226, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_node = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("on_plaintext", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1226, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_plaintext", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_62on_plaintext(__pyx_self, __pyx_v_self, __pyx_v_node);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_62on_plaintext(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node) {
  PyObject *__pyx_v_tk = NULL;
  PyObject *__pyx_v_rpl = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("on_plaintext", 0);

  /* "DHParser/ebnf.py":1227
 * 
 *     def on_plaintext(self, node: Node) -> str:
 *         tk = node.content.replace('\\', r'\\')             # <<<<<<<<<<<<<<
 *         rpl = '"' if tk.find('"') < 0 else "'" if tk.find("'") < 0 else ''
 *         if rpl:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_content); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_replace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_tk = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":1228
 *     def on_plaintext(self, node: Node) -> str:
 *         tk = node.content.replace('\\', r'\\')
 *         rpl = '"' if tk.find('"') < 0 else "'" if tk.find("'") < 0 else ''             # <<<<<<<<<<<<<<
 *         if rpl:
 *             tk = rpl + tk[1:-1] + rpl
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_tk, __pyx_n_s_find); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u__21) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__21);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1228, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1228, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_5) {
    __Pyx_INCREF(__pyx_kp_u__21);
    __pyx_t_1 = __pyx_kp_u__21;
  } else {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_tk, __pyx_n_s_find); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1228, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_kp_u__22) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u__22);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1228, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1228, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1228, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_7) {
      __Pyx_INCREF(__pyx_kp_u__22);
      __pyx_t_3 = __pyx_kp_u__22;
    } else {
      __Pyx_INCREF(__pyx_kp_u__2);
      __pyx_t_3 = __pyx_kp_u__2;
    }
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_v_rpl = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":1229
 *         tk = node.content.replace('\\', r'\\')
 *         rpl = '"' if tk.find('"') < 0 else "'" if tk.find("'") < 0 else ''
 *         if rpl:             # <<<<<<<<<<<<<<
 *             tk = rpl + tk[1:-1] + rpl
 *         else:
 */
  __pyx_t_5 = (__pyx_v_rpl != Py_None)&&(__Pyx_PyUnicode_IS_TRUE(__pyx_v_rpl) != 0);
  if (__pyx_t_5) {

    /* "DHParser/ebnf.py":1230
 *         rpl = '"' if tk.find('"') < 0 else "'" if tk.find("'") < 0 else ''
 *         if rpl:
 *             tk = rpl + tk[1:-1] + rpl             # <<<<<<<<<<<<<<
 *         else:
 *             tk = rpl + tk.replace('"', '\\"')[1:-1] + rpl
 */
    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_tk, 1, -1L, NULL, NULL, &__pyx_slice__19, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyNumber_Add(__pyx_v_rpl, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_v_rpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_tk, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "DHParser/ebnf.py":1229
 *         tk = node.content.replace('\\', r'\\')
 *         rpl = '"' if tk.find('"') < 0 else "'" if tk.find("'") < 0 else ''
 *         if rpl:             # <<<<<<<<<<<<<<
 *             tk = rpl + tk[1:-1] + rpl
 *         else:
 */
    goto __pyx_L3;
  }

  /* "DHParser/ebnf.py":1232
 *             tk = rpl + tk[1:-1] + rpl
 *         else:
 *             tk = rpl + tk.replace('"', '\\"')[1:-1] + rpl             # <<<<<<<<<<<<<<
 *         return self.TOKEN_PARSER() + tk + ')'
 * 
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_tk, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_3, 1, -1L, NULL, NULL, &__pyx_slice__19, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Add(__pyx_v_rpl, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_v_rpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_tk, __pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "DHParser/ebnf.py":1233
 *         else:
 *             tk = rpl + tk.replace('"', '\\"')[1:-1] + rpl
 *         return self.TOKEN_PARSER() + tk + ')'             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_TOKEN_PARSER); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_v_tk); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_kp_u__15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1233, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":1226
 * 
 * 
 *     def on_plaintext(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         tk = node.content.replace('\\', r'\\')
 *         rpl = '"' if tk.find('"') < 0 else "'" if tk.find("'") < 0 else ''
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_plaintext", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tk);
  __Pyx_XDECREF(__pyx_v_rpl);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":1236
 * 
 * 
 *     def on_regexp(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         rx = node.content
 *         name = []   # type: List[str]
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_65on_regexp(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_65on_regexp = {"on_regexp", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_65on_regexp, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_65on_regexp(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_node = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_regexp (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_regexp", 1, 2, 2, 1); __PYX_ERR(0, 1236, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_regexp") < 0)) __PYX_ERR(0, 1236, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_node = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("on_regexp", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1236, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_regexp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_64on_regexp(__pyx_self, __pyx_v_self, __pyx_v_node);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_64on_regexp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node) {
  PyObject *__pyx_v_rx = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_parser = NULL;
  PyObject *__pyx_v_arg = NULL;
  PyObject *__pyx_v_error = NULL;
  PyObject *__pyx_v_extract_tb = NULL;
  PyObject *__pyx_v_trace = NULL;
  PyObject *__pyx_v_errmsg = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  Py_ssize_t __pyx_t_14;
  Py_UCS4 __pyx_t_15;
  int __pyx_t_16;
  char const *__pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  __Pyx_RefNannySetupContext("on_regexp", 0);

  /* "DHParser/ebnf.py":1237
 * 
 *     def on_regexp(self, node: Node) -> str:
 *         rx = node.content             # <<<<<<<<<<<<<<
 *         name = []   # type: List[str]
 *         assert rx[0] == '/' and rx[-1] == '/'
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_content); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_rx = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":1238
 *     def on_regexp(self, node: Node) -> str:
 *         rx = node.content
 *         name = []   # type: List[str]             # <<<<<<<<<<<<<<
 *         assert rx[0] == '/' and rx[-1] == '/'
 *         parser = 'RegExp('
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_name = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":1239
 *         rx = node.content
 *         name = []   # type: List[str]
 *         assert rx[0] == '/' and rx[-1] == '/'             # <<<<<<<<<<<<<<
 *         parser = 'RegExp('
 *         try:
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_rx, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_kp_u__47, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1239, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_3) {
    } else {
      __pyx_t_2 = __pyx_t_3;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_rx, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_kp_u__47, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1239, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __pyx_t_3;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!__pyx_t_2)) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 1239, __pyx_L1_error)
    }
  }
  #endif

  /* "DHParser/ebnf.py":1240
 *         name = []   # type: List[str]
 *         assert rx[0] == '/' and rx[-1] == '/'
 *         parser = 'RegExp('             # <<<<<<<<<<<<<<
 *         try:
 *             arg = repr(self._check_rx(node, rx[1:-1].replace(r'\/', '/')))
 */
  __Pyx_INCREF(__pyx_kp_u_RegExp);
  __pyx_v_parser = __pyx_kp_u_RegExp;

  /* "DHParser/ebnf.py":1241
 *         assert rx[0] == '/' and rx[-1] == '/'
 *         parser = 'RegExp('
 *         try:             # <<<<<<<<<<<<<<
 *             arg = repr(self._check_rx(node, rx[1:-1].replace(r'\/', '/')))
 *         except AttributeError as error:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_6);
    /*try:*/ {

      /* "DHParser/ebnf.py":1242
 *         parser = 'RegExp('
 *         try:
 *             arg = repr(self._check_rx(node, rx[1:-1].replace(r'\/', '/')))             # <<<<<<<<<<<<<<
 *         except AttributeError as error:
 *             from traceback import extract_tb
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_check_rx); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1242, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_v_rx, 1, -1L, NULL, NULL, &__pyx_slice__19, 1, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1242, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_replace); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1242, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1242, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = NULL;
      __pyx_t_10 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_10 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_node, __pyx_t_8};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1242, __pyx_L5_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_node, __pyx_t_8};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1242, __pyx_L5_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else
      #endif
      {
        __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1242, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (__pyx_t_9) {
          __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
        }
        __Pyx_INCREF(__pyx_v_node);
        __Pyx_GIVEREF(__pyx_v_node);
        PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_v_node);
        __Pyx_GIVEREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_8);
        __pyx_t_8 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1242, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1242, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_arg = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "DHParser/ebnf.py":1241
 *         assert rx[0] == '/' and rx[-1] == '/'
 *         parser = 'RegExp('
 *         try:             # <<<<<<<<<<<<<<
 *             arg = repr(self._check_rx(node, rx[1:-1].replace(r'\/', '/')))
 *         except AttributeError as error:
 */
    }
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L10_try_end;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "DHParser/ebnf.py":1243
 *         try:
 *             arg = repr(self._check_rx(node, rx[1:-1].replace(r'\/', '/')))
 *         except AttributeError as error:             # <<<<<<<<<<<<<<
 *             from traceback import extract_tb
 *             trace = str(extract_tb(error.__traceback__)[-1])
 */
    __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_t_10) {
      __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_regexp", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_1, &__pyx_t_11) < 0) __PYX_ERR(0, 1243, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_error = __pyx_t_1;
      /*try:*/ {

        /* "DHParser/ebnf.py":1244
 *             arg = repr(self._check_rx(node, rx[1:-1].replace(r'\/', '/')))
 *         except AttributeError as error:
 *             from traceback import extract_tb             # <<<<<<<<<<<<<<
 *             trace = str(extract_tb(error.__traceback__)[-1])
 *             errmsg = "%s (AttributeError: %s; %s)\n%s" \
 */
        __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1244, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_n_s_extract_tb);
        __Pyx_GIVEREF(__pyx_n_s_extract_tb);
        PyList_SET_ITEM(__pyx_t_8, 0, __pyx_n_s_extract_tb);
        __pyx_t_9 = __Pyx_Import(__pyx_n_s_traceback, __pyx_t_8, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1244, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_ImportFrom(__pyx_t_9, __pyx_n_s_extract_tb); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1244, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_8);
        __pyx_v_extract_tb = __pyx_t_8;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "DHParser/ebnf.py":1245
 *         except AttributeError as error:
 *             from traceback import extract_tb
 *             trace = str(extract_tb(error.__traceback__)[-1])             # <<<<<<<<<<<<<<
 *             errmsg = "%s (AttributeError: %s; %s)\n%s" \
 *                      % (EBNFCompiler.AST_ERROR, str(error), trace, node.as_sxpr())
 */
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_error, __pyx_n_s_traceback_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1245, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_v_extract_tb);
        __pyx_t_12 = __pyx_v_extract_tb; __pyx_t_13 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
          __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12);
          if (likely(__pyx_t_13)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
            __Pyx_INCREF(__pyx_t_13);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_12, function);
          }
        }
        __pyx_t_9 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_13, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_8);
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1245, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_9, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1245, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1245, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_v_trace = __pyx_t_9;
        __pyx_t_9 = 0;

        /* "DHParser/ebnf.py":1246
 *             from traceback import extract_tb
 *             trace = str(extract_tb(error.__traceback__)[-1])
 *             errmsg = "%s (AttributeError: %s; %s)\n%s" \             # <<<<<<<<<<<<<<
 *                      % (EBNFCompiler.AST_ERROR, str(error), trace, node.as_sxpr())
 *             self.tree.new_error(node, errmsg)
 */
        __pyx_t_9 = PyTuple_New(7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1246, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_14 = 0;
        __pyx_t_15 = 127;

        /* "DHParser/ebnf.py":1247
 *             trace = str(extract_tb(error.__traceback__)[-1])
 *             errmsg = "%s (AttributeError: %s; %s)\n%s" \
 *                      % (EBNFCompiler.AST_ERROR, str(error), trace, node.as_sxpr())             # <<<<<<<<<<<<<<
 *             self.tree.new_error(node, errmsg)
 *             return '"' + errmsg + '"'
 */
        __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_EBNFCompiler); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1247, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_AST_ERROR); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1247, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_8), __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1247, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_15;
        __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_12);
        __pyx_t_12 = 0;
        __Pyx_INCREF(__pyx_kp_u_AttributeError_2);
        __pyx_t_14 += 18;
        __Pyx_GIVEREF(__pyx_kp_u_AttributeError_2);
        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_kp_u_AttributeError_2);
        __pyx_t_12 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_error); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1247, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_15;
        __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_12);
        __pyx_t_12 = 0;
        __Pyx_INCREF(__pyx_kp_u__34);
        __pyx_t_14 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__34);
        PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_kp_u__34);
        __pyx_t_12 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_trace), __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1247, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_15;
        __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_t_12);
        __pyx_t_12 = 0;
        __Pyx_INCREF(__pyx_kp_u__35);
        __pyx_t_14 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__35);
        PyTuple_SET_ITEM(__pyx_t_9, 5, __pyx_kp_u__35);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_as_sxpr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1247, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_13 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_13)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_13);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
          }
        }
        __pyx_t_12 = (__pyx_t_13) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_13) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1247, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_12), __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1247, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_15;
        __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_9, 6, __pyx_t_8);
        __pyx_t_8 = 0;

        /* "DHParser/ebnf.py":1246
 *             from traceback import extract_tb
 *             trace = str(extract_tb(error.__traceback__)[-1])
 *             errmsg = "%s (AttributeError: %s; %s)\n%s" \             # <<<<<<<<<<<<<<
 *                      % (EBNFCompiler.AST_ERROR, str(error), trace, node.as_sxpr())
 *             self.tree.new_error(node, errmsg)
 */
        __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_9, 7, __pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1246, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_v_errmsg = ((PyObject*)__pyx_t_8);
        __pyx_t_8 = 0;

        /* "DHParser/ebnf.py":1248
 *             errmsg = "%s (AttributeError: %s; %s)\n%s" \
 *                      % (EBNFCompiler.AST_ERROR, str(error), trace, node.as_sxpr())
 *             self.tree.new_error(node, errmsg)             # <<<<<<<<<<<<<<
 *             return '"' + errmsg + '"'
 *         return parser + ', '.join([arg] + name) + ')'
 */
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tree); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1248, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_new_error); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1248, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = NULL;
        __pyx_t_10 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_12);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_12, function);
            __pyx_t_10 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_12)) {
          PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_node, __pyx_v_errmsg};
          __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1248, __pyx_L16_error)
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_GOTREF(__pyx_t_8);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
          PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_node, __pyx_v_errmsg};
          __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1248, __pyx_L16_error)
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_GOTREF(__pyx_t_8);
        } else
        #endif
        {
          __pyx_t_13 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1248, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_13);
          if (__pyx_t_9) {
            __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_9); __pyx_t_9 = NULL;
          }
          __Pyx_INCREF(__pyx_v_node);
          __Pyx_GIVEREF(__pyx_v_node);
          PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_10, __pyx_v_node);
          __Pyx_INCREF(__pyx_v_errmsg);
          __Pyx_GIVEREF(__pyx_v_errmsg);
          PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_10, __pyx_v_errmsg);
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_13, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1248, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "DHParser/ebnf.py":1249
 *                      % (EBNFCompiler.AST_ERROR, str(error), trace, node.as_sxpr())
 *             self.tree.new_error(node, errmsg)
 *             return '"' + errmsg + '"'             # <<<<<<<<<<<<<<
 *         return parser + ', '.join([arg] + name) + ')'
 * 
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_kp_u__21, __pyx_v_errmsg); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1249, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_12 = __Pyx_PyUnicode_Concat(__pyx_t_8, __pyx_kp_u__21); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1249, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_r = ((PyObject*)__pyx_t_12);
        __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L15_return;
      }

      /* "DHParser/ebnf.py":1243
 *         try:
 *             arg = repr(self._check_rx(node, rx[1:-1].replace(r'\/', '/')))
 *         except AttributeError as error:             # <<<<<<<<<<<<<<
 *             from traceback import extract_tb
 *             trace = str(extract_tb(error.__traceback__)[-1])
 */
      /*finally:*/ {
        __pyx_L16_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __pyx_t_10 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_error);
            __pyx_v_error = NULL;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
          }
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20);
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_17;
          goto __pyx_L7_except_error;
        }
        __pyx_L15_return: {
          __pyx_t_24 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_error);
          __pyx_v_error = NULL;
          __pyx_r = __pyx_t_24;
          __pyx_t_24 = 0;
          goto __pyx_L8_except_return;
        }
      }
    }
    goto __pyx_L7_except_error;
    __pyx_L7_except_error:;

    /* "DHParser/ebnf.py":1241
 *         assert rx[0] == '/' and rx[-1] == '/'
 *         parser = 'RegExp('
 *         try:             # <<<<<<<<<<<<<<
 *             arg = repr(self._check_rx(node, rx[1:-1].replace(r'\/', '/')))
 *         except AttributeError as error:
 */
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
    goto __pyx_L1_error;
    __pyx_L8_except_return:;
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
    goto __pyx_L0;
    __pyx_L10_try_end:;
  }

  /* "DHParser/ebnf.py":1250
 *             self.tree.new_error(node, errmsg)
 *             return '"' + errmsg + '"'
 *         return parser + ', '.join([arg] + name) + ')'             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_INCREF(__pyx_v_arg);
  __Pyx_GIVEREF(__pyx_v_arg);
  PyList_SET_ITEM(__pyx_t_11, 0, __pyx_v_arg);
  __pyx_t_1 = PyNumber_Add(__pyx_t_11, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = PyUnicode_Join(__pyx_kp_u__40, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_v_parser, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_kp_u__15); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((PyObject*)__pyx_t_11);
  __pyx_t_11 = 0;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":1236
 * 
 * 
 *     def on_regexp(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         rx = node.content
 *         name = []   # type: List[str]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_regexp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_rx);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_parser);
  __Pyx_XDECREF(__pyx_v_arg);
  __Pyx_XDECREF(__pyx_v_error);
  __Pyx_XDECREF(__pyx_v_extract_tb);
  __Pyx_XDECREF(__pyx_v_trace);
  __Pyx_XDECREF(__pyx_v_errmsg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":1253
 * 
 * 
 *     def on_whitespace(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         return self.WSPC_PARSER()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_67on_whitespace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_67on_whitespace = {"on_whitespace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_67on_whitespace, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_12EBNFCompiler_67on_whitespace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_node = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_whitespace (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("on_whitespace", 1, 2, 2, 1); __PYX_ERR(0, 1253, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "on_whitespace") < 0)) __PYX_ERR(0, 1253, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_node = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("on_whitespace", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1253, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_whitespace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12EBNFCompiler_66on_whitespace(__pyx_self, __pyx_v_self, __pyx_v_node);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12EBNFCompiler_66on_whitespace(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_node) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("on_whitespace", 0);

  /* "DHParser/ebnf.py":1254
 * 
 *     def on_whitespace(self, node: Node) -> str:
 *         return self.WSPC_PARSER()             # <<<<<<<<<<<<<<
 * 
 * def get_ebnf_compiler(grammar_name="", grammar_source="") -> EBNFCompiler:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_WSPC_PARSER); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1254, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":1253
 * 
 * 
 *     def on_whitespace(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         return self.WSPC_PARSER()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("DHParser.ebnf.EBNFCompiler.on_whitespace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":1256
 *         return self.WSPC_PARSER()
 * 
 * def get_ebnf_compiler(grammar_name="", grammar_source="") -> EBNFCompiler:             # <<<<<<<<<<<<<<
 *     try:
 *         compiler = GLOBALS.ebnf_compiler_singleton
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_11get_ebnf_compiler(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_11get_ebnf_compiler = {"get_ebnf_compiler", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_11get_ebnf_compiler, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_8DHParser_4ebnf_11get_ebnf_compiler(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_grammar_name = 0;
  PyObject *__pyx_v_grammar_source = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_ebnf_compiler (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grammar_name,&__pyx_n_s_grammar_source,0};
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)((PyObject*)__pyx_kp_u__2));
    values[1] = ((PyObject *)((PyObject*)__pyx_kp_u__2));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grammar_name);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grammar_source);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_ebnf_compiler") < 0)) __PYX_ERR(0, 1256, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_grammar_name = values[0];
    __pyx_v_grammar_source = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_ebnf_compiler", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1256, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.get_ebnf_compiler", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8DHParser_4ebnf_10get_ebnf_compiler(__pyx_self, __pyx_v_grammar_name, __pyx_v_grammar_source);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_10get_ebnf_compiler(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_grammar_name, PyObject *__pyx_v_grammar_source) {
  PyObject *__pyx_v_compiler = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_RefNannySetupContext("get_ebnf_compiler", 0);

  /* "DHParser/ebnf.py":1257
 * 
 * def get_ebnf_compiler(grammar_name="", grammar_source="") -> EBNFCompiler:
 *     try:             # <<<<<<<<<<<<<<
 *         compiler = GLOBALS.ebnf_compiler_singleton
 *         compiler.set_grammar_name(grammar_name, grammar_source)
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "DHParser/ebnf.py":1258
 * def get_ebnf_compiler(grammar_name="", grammar_source="") -> EBNFCompiler:
 *     try:
 *         compiler = GLOBALS.ebnf_compiler_singleton             # <<<<<<<<<<<<<<
 *         compiler.set_grammar_name(grammar_name, grammar_source)
 *         return compiler
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_GLOBALS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1258, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ebnf_compiler_singleton); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1258, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_compiler = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "DHParser/ebnf.py":1259
 *     try:
 *         compiler = GLOBALS.ebnf_compiler_singleton
 *         compiler.set_grammar_name(grammar_name, grammar_source)             # <<<<<<<<<<<<<<
 *         return compiler
 *     except AttributeError:
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_compiler, __pyx_n_s_set_grammar_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1259, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_7 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_grammar_name, __pyx_v_grammar_source};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1259, __pyx_L3_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_5);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_grammar_name, __pyx_v_grammar_source};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1259, __pyx_L3_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_5);
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1259, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (__pyx_t_6) {
          __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
        }
        __Pyx_INCREF(__pyx_v_grammar_name);
        __Pyx_GIVEREF(__pyx_v_grammar_name);
        PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_grammar_name);
        __Pyx_INCREF(__pyx_v_grammar_source);
        __Pyx_GIVEREF(__pyx_v_grammar_source);
        PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_grammar_source);
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1259, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "DHParser/ebnf.py":1260
 *         compiler = GLOBALS.ebnf_compiler_singleton
 *         compiler.set_grammar_name(grammar_name, grammar_source)
 *         return compiler             # <<<<<<<<<<<<<<
 *     except AttributeError:
 *         compiler = EBNFCompiler(grammar_name, grammar_source)
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_compiler);
      __pyx_r = __pyx_v_compiler;
      goto __pyx_L7_try_return;

      /* "DHParser/ebnf.py":1257
 * 
 * def get_ebnf_compiler(grammar_name="", grammar_source="") -> EBNFCompiler:
 *     try:             # <<<<<<<<<<<<<<
 *         compiler = GLOBALS.ebnf_compiler_singleton
 *         compiler.set_grammar_name(grammar_name, grammar_source)
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "DHParser/ebnf.py":1261
 *         compiler.set_grammar_name(grammar_name, grammar_source)
 *         return compiler
 *     except AttributeError:             # <<<<<<<<<<<<<<
 *         compiler = EBNFCompiler(grammar_name, grammar_source)
 *         compiler.set_grammar_name(grammar_name, grammar_source)
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_t_7) {
      __Pyx_AddTraceback("DHParser.ebnf.get_ebnf_compiler", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_8) < 0) __PYX_ERR(0, 1261, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_8);

      /* "DHParser/ebnf.py":1262
 *         return compiler
 *     except AttributeError:
 *         compiler = EBNFCompiler(grammar_name, grammar_source)             # <<<<<<<<<<<<<<
 *         compiler.set_grammar_name(grammar_name, grammar_source)
 *         GLOBALS.ebnf_compiler_singleton = compiler
 */
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_EBNFCompiler); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1262, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_7 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_grammar_name, __pyx_v_grammar_source};
        __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1262, __pyx_L5_except_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_grammar_name, __pyx_v_grammar_source};
        __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1262, __pyx_L5_except_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      {
        __pyx_t_11 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1262, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (__pyx_t_10) {
          __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
        }
        __Pyx_INCREF(__pyx_v_grammar_name);
        __Pyx_GIVEREF(__pyx_v_grammar_name);
        PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_7, __pyx_v_grammar_name);
        __Pyx_INCREF(__pyx_v_grammar_source);
        __Pyx_GIVEREF(__pyx_v_grammar_source);
        PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_7, __pyx_v_grammar_source);
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1262, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF_SET(__pyx_v_compiler, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "DHParser/ebnf.py":1263
 *     except AttributeError:
 *         compiler = EBNFCompiler(grammar_name, grammar_source)
 *         compiler.set_grammar_name(grammar_name, grammar_source)             # <<<<<<<<<<<<<<
 *         GLOBALS.ebnf_compiler_singleton = compiler
 *         return compiler
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_compiler, __pyx_n_s_set_grammar_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1263, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_11 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_7 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_v_grammar_name, __pyx_v_grammar_source};
        __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1263, __pyx_L5_except_error)
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_v_grammar_name, __pyx_v_grammar_source};
        __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1263, __pyx_L5_except_error)
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      {
        __pyx_t_10 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1263, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_10);
        if (__pyx_t_11) {
          __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11); __pyx_t_11 = NULL;
        }
        __Pyx_INCREF(__pyx_v_grammar_name);
        __Pyx_GIVEREF(__pyx_v_grammar_name);
        PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_7, __pyx_v_grammar_name);
        __Pyx_INCREF(__pyx_v_grammar_source);
        __Pyx_GIVEREF(__pyx_v_grammar_source);
        PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_7, __pyx_v_grammar_source);
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1263, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "DHParser/ebnf.py":1264
 *         compiler = EBNFCompiler(grammar_name, grammar_source)
 *         compiler.set_grammar_name(grammar_name, grammar_source)
 *         GLOBALS.ebnf_compiler_singleton = compiler             # <<<<<<<<<<<<<<
 *         return compiler
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_GLOBALS); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1264, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_PyObject_SetAttrStr(__pyx_t_6, __pyx_n_s_ebnf_compiler_singleton, __pyx_v_compiler) < 0) __PYX_ERR(0, 1264, __pyx_L5_except_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "DHParser/ebnf.py":1265
 *         compiler.set_grammar_name(grammar_name, grammar_source)
 *         GLOBALS.ebnf_compiler_singleton = compiler
 *         return compiler             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_compiler);
      __pyx_r = __pyx_v_compiler;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "DHParser/ebnf.py":1257
 * 
 * def get_ebnf_compiler(grammar_name="", grammar_source="") -> EBNFCompiler:
 *     try:             # <<<<<<<<<<<<<<
 *         compiler = GLOBALS.ebnf_compiler_singleton
 *         compiler.set_grammar_name(grammar_name, grammar_source)
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "DHParser/ebnf.py":1256
 *         return self.WSPC_PARSER()
 * 
 * def get_ebnf_compiler(grammar_name="", grammar_source="") -> EBNFCompiler:             # <<<<<<<<<<<<<<
 *     try:
 *         compiler = GLOBALS.ebnf_compiler_singleton
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("DHParser.ebnf.get_ebnf_compiler", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_compiler);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DHParser/ebnf.py":1274
 * ########################################################################
 * 
 * def compile_ebnf(ebnf_source: str, branding: str = 'DSL') \             # <<<<<<<<<<<<<<
 *         -> Tuple[Optional[Any], List[Error], Optional[Node]]:
 *     """
 */

/* Python wrapper */
static PyObject *__pyx_pw_8DHParser_4ebnf_13compile_ebnf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8DHParser_4ebnf_12compile_ebnf[] = "\n    Compiles an `ebnf_source` (file_name or EBNF-string) and returns\n    a tuple of the python code of the compiler, a list of warnings or errors\n    and the abstract syntax tree of the EBNF-source.\n    This function is merely syntactic sugar.\n    ";
static PyMethodDef __pyx_mdef_8DHParser_4ebnf_13compile_ebnf = {"compile_ebnf", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8DHParser_4ebnf_13compile_ebnf, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8DHParser_4ebnf_12compile_ebnf};
static PyObject *__pyx_pw_8DHParser_4ebnf_13compile_ebnf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ebnf_source = 0;
  PyObject *__pyx_v_branding = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("compile_ebnf (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ebnf_source,&__pyx_n_s_branding,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject*)((PyObject*)__pyx_n_u_DSL));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ebnf_source)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_branding);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compile_ebnf") < 0)) __PYX_ERR(0, 1274, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_ebnf_source = ((PyObject*)values[0]);
    __pyx_v_branding = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("compile_ebnf", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1274, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("DHParser.ebnf.compile_ebnf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebnf_source), (&PyUnicode_Type), 1, "ebnf_source", 1))) __PYX_ERR(0, 1274, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_branding), (&PyUnicode_Type), 1, "branding", 1))) __PYX_ERR(0, 1274, __pyx_L1_error)
  __pyx_r = __pyx_pf_8DHParser_4ebnf_12compile_ebnf(__pyx_self, __pyx_v_ebnf_source, __pyx_v_branding);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8DHParser_4ebnf_12compile_ebnf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ebnf_source, PyObject *__pyx_v_branding) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_RefNannySetupContext("compile_ebnf", 0);

  /* "DHParser/ebnf.py":1282
 *     This function is merely syntactic sugar.
 *     """
 *     return compile_source(ebnf_source,             # <<<<<<<<<<<<<<
 *                           get_ebnf_preprocessor(),
 *                           get_ebnf_grammar(),
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_compile_source); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "DHParser/ebnf.py":1283
 *     """
 *     return compile_source(ebnf_source,
 *                           get_ebnf_preprocessor(),             # <<<<<<<<<<<<<<
 *                           get_ebnf_grammar(),
 *                           get_ebnf_transformer(),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_ebnf_preprocessor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "DHParser/ebnf.py":1284
 *     return compile_source(ebnf_source,
 *                           get_ebnf_preprocessor(),
 *                           get_ebnf_grammar(),             # <<<<<<<<<<<<<<
 *                           get_ebnf_transformer(),
 *                           get_ebnf_compiler(branding, ebnf_source))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_get_ebnf_grammar); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "DHParser/ebnf.py":1285
 *                           get_ebnf_preprocessor(),
 *                           get_ebnf_grammar(),
 *                           get_ebnf_transformer(),             # <<<<<<<<<<<<<<
 *                           get_ebnf_compiler(branding, ebnf_source))
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_get_ebnf_transformer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "DHParser/ebnf.py":1286
 *                           get_ebnf_grammar(),
 *                           get_ebnf_transformer(),
 *                           get_ebnf_compiler(branding, ebnf_source))             # <<<<<<<<<<<<<<
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_get_ebnf_compiler); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_7)) {
    PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_branding, __pyx_v_ebnf_source};
    __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1286, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_6);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
    PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_branding, __pyx_v_ebnf_source};
    __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1286, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_6);
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_8) {
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
    }
    __Pyx_INCREF(__pyx_v_branding);
    __Pyx_GIVEREF(__pyx_v_branding);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_branding);
    __Pyx_INCREF(__pyx_v_ebnf_source);
    __Pyx_GIVEREF(__pyx_v_ebnf_source);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v_ebnf_source);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[6] = {__pyx_t_7, __pyx_v_ebnf_source, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 5+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1282, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[6] = {__pyx_t_7, __pyx_v_ebnf_source, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 5+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1282, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(5+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_INCREF(__pyx_v_ebnf_source);
    __Pyx_GIVEREF(__pyx_v_ebnf_source);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_ebnf_source);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_9, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_10, 4+__pyx_t_9, __pyx_t_6);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "DHParser/ebnf.py":1274
 * ########################################################################
 * 
 * def compile_ebnf(ebnf_source: str, branding: str = 'DSL') \             # <<<<<<<<<<<<<<
 *         -> Tuple[Optional[Any], List[Error], Optional[Node]]:
 *     """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("DHParser.ebnf.compile_ebnf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct__assemble_parser *__pyx_freelist_8DHParser_4ebnf___pyx_scope_struct__assemble_parser[8];
static int __pyx_freecount_8DHParser_4ebnf___pyx_scope_struct__assemble_parser = 0;

static PyObject *__pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct__assemble_parser(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct__assemble_parser > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct__assemble_parser)))) {
    o = (PyObject*)__pyx_freelist_8DHParser_4ebnf___pyx_scope_struct__assemble_parser[--__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct__assemble_parser];
    memset(o, 0, sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct__assemble_parser));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_8DHParser_4ebnf___pyx_scope_struct__assemble_parser(PyObject *o) {
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct__assemble_parser *p = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct__assemble_parser *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_defined_symbols);
  Py_CLEAR(p->__pyx_v_remove_connections);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct__assemble_parser < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct__assemble_parser)))) {
    __pyx_freelist_8DHParser_4ebnf___pyx_scope_struct__assemble_parser[__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct__assemble_parser++] = ((struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct__assemble_parser *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_8DHParser_4ebnf___pyx_scope_struct__assemble_parser(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct__assemble_parser *p = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct__assemble_parser *)o;
  if (p->__pyx_v_defined_symbols) {
    e = (*v)(p->__pyx_v_defined_symbols, a); if (e) return e;
  }
  if (p->__pyx_v_remove_connections) {
    e = (*v)(p->__pyx_v_remove_connections, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(p->__pyx_v_self, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_8DHParser_4ebnf___pyx_scope_struct__assemble_parser(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct__assemble_parser *p = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct__assemble_parser *)o;
  tmp = ((PyObject*)p->__pyx_v_defined_symbols);
  p->__pyx_v_defined_symbols = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_remove_connections);
  p->__pyx_v_remove_connections = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_8DHParser_4ebnf___pyx_scope_struct__assemble_parser = {
  PyVarObject_HEAD_INIT(0, 0)
  "DHParser.ebnf.__pyx_scope_struct__assemble_parser", /*tp_name*/
  sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct__assemble_parser), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8DHParser_4ebnf___pyx_scope_struct__assemble_parser, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_8DHParser_4ebnf___pyx_scope_struct__assemble_parser, /*tp_traverse*/
  __pyx_tp_clear_8DHParser_4ebnf___pyx_scope_struct__assemble_parser, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct__assemble_parser, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_1_on_directive *__pyx_freelist_8DHParser_4ebnf___pyx_scope_struct_1_on_directive[8];
static int __pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_1_on_directive = 0;

static PyObject *__pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct_1_on_directive(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_1_on_directive > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_1_on_directive)))) {
    o = (PyObject*)__pyx_freelist_8DHParser_4ebnf___pyx_scope_struct_1_on_directive[--__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_1_on_directive];
    memset(o, 0, sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_1_on_directive));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_8DHParser_4ebnf___pyx_scope_struct_1_on_directive(PyObject *o) {
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_1_on_directive *p = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_1_on_directive *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_key);
  Py_CLEAR(p->__pyx_v_node);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_1_on_directive < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_1_on_directive)))) {
    __pyx_freelist_8DHParser_4ebnf___pyx_scope_struct_1_on_directive[__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_1_on_directive++] = ((struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_1_on_directive *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_8DHParser_4ebnf___pyx_scope_struct_1_on_directive(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_1_on_directive *p = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_1_on_directive *)o;
  if (p->__pyx_v_key) {
    e = (*v)(p->__pyx_v_key, a); if (e) return e;
  }
  if (p->__pyx_v_node) {
    e = (*v)(p->__pyx_v_node, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(p->__pyx_v_self, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_8DHParser_4ebnf___pyx_scope_struct_1_on_directive(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_1_on_directive *p = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_1_on_directive *)o;
  tmp = ((PyObject*)p->__pyx_v_key);
  p->__pyx_v_key = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_node);
  p->__pyx_v_node = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_8DHParser_4ebnf___pyx_scope_struct_1_on_directive = {
  PyVarObject_HEAD_INIT(0, 0)
  "DHParser.ebnf.__pyx_scope_struct_1_on_directive", /*tp_name*/
  sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_1_on_directive), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8DHParser_4ebnf___pyx_scope_struct_1_on_directive, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_8DHParser_4ebnf___pyx_scope_struct_1_on_directive, /*tp_traverse*/
  __pyx_tp_clear_8DHParser_4ebnf___pyx_scope_struct_1_on_directive, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct_1_on_directive, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_2_on_factor *__pyx_freelist_8DHParser_4ebnf___pyx_scope_struct_2_on_factor[8];
static int __pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_2_on_factor = 0;

static PyObject *__pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct_2_on_factor(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_2_on_factor > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_2_on_factor)))) {
    o = (PyObject*)__pyx_freelist_8DHParser_4ebnf___pyx_scope_struct_2_on_factor[--__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_2_on_factor];
    memset(o, 0, sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_2_on_factor));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_8DHParser_4ebnf___pyx_scope_struct_2_on_factor(PyObject *o) {
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_2_on_factor *p = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_2_on_factor *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_check);
  Py_CLEAR(p->__pyx_v_node);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_2_on_factor < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_2_on_factor)))) {
    __pyx_freelist_8DHParser_4ebnf___pyx_scope_struct_2_on_factor[__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_2_on_factor++] = ((struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_2_on_factor *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_8DHParser_4ebnf___pyx_scope_struct_2_on_factor(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_2_on_factor *p = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_2_on_factor *)o;
  if (p->__pyx_v_check) {
    e = (*v)(p->__pyx_v_check, a); if (e) return e;
  }
  if (p->__pyx_v_node) {
    e = (*v)(p->__pyx_v_node, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(p->__pyx_v_self, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_8DHParser_4ebnf___pyx_scope_struct_2_on_factor(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_2_on_factor *p = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_2_on_factor *)o;
  tmp = ((PyObject*)p->__pyx_v_check);
  p->__pyx_v_check = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_node);
  p->__pyx_v_node = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_8DHParser_4ebnf___pyx_scope_struct_2_on_factor = {
  PyVarObject_HEAD_INIT(0, 0)
  "DHParser.ebnf.__pyx_scope_struct_2_on_factor", /*tp_name*/
  sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_2_on_factor), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8DHParser_4ebnf___pyx_scope_struct_2_on_factor, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_8DHParser_4ebnf___pyx_scope_struct_2_on_factor, /*tp_traverse*/
  __pyx_tp_clear_8DHParser_4ebnf___pyx_scope_struct_2_on_factor, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct_2_on_factor, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered *__pyx_freelist_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered[8];
static int __pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered = 0;

static PyObject *__pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered)))) {
    o = (PyObject*)__pyx_freelist_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered[--__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered];
    memset(o, 0, sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered(PyObject *o) {
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered *p = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_nd);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered)))) {
    __pyx_freelist_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered[__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered++] = ((struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered *p = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered *)o;
  if (p->__pyx_v_nd) {
    e = (*v)(p->__pyx_v_nd, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(p->__pyx_v_self, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered *p = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered *)o;
  tmp = ((PyObject*)p->__pyx_v_nd);
  p->__pyx_v_nd = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered = {
  PyVarObject_HEAD_INIT(0, 0)
  "DHParser.ebnf.__pyx_scope_struct_3_on_unordered", /*tp_name*/
  sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered, /*tp_traverse*/
  __pyx_tp_clear_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_4_genexpr *__pyx_freelist_8DHParser_4ebnf___pyx_scope_struct_4_genexpr[8];
static int __pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_4_genexpr = 0;

static PyObject *__pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct_4_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_4_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_4_genexpr)))) {
    o = (PyObject*)__pyx_freelist_8DHParser_4ebnf___pyx_scope_struct_4_genexpr[--__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_4_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_4_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_8DHParser_4ebnf___pyx_scope_struct_4_genexpr(PyObject *o) {
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_4_genexpr *p = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_4_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_c);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_4_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_4_genexpr)))) {
    __pyx_freelist_8DHParser_4ebnf___pyx_scope_struct_4_genexpr[__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_4_genexpr++] = ((struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_4_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_8DHParser_4ebnf___pyx_scope_struct_4_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_4_genexpr *p = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_4_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_c) {
    e = (*v)(p->__pyx_v_c, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_8DHParser_4ebnf___pyx_scope_struct_4_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "DHParser.ebnf.__pyx_scope_struct_4_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_4_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8DHParser_4ebnf___pyx_scope_struct_4_genexpr, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_8DHParser_4ebnf___pyx_scope_struct_4_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct_4_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_5_genexpr *__pyx_freelist_8DHParser_4ebnf___pyx_scope_struct_5_genexpr[8];
static int __pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_5_genexpr = 0;

static PyObject *__pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct_5_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_5_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_5_genexpr)))) {
    o = (PyObject*)__pyx_freelist_8DHParser_4ebnf___pyx_scope_struct_5_genexpr[--__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_5_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_5_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_8DHParser_4ebnf___pyx_scope_struct_5_genexpr(PyObject *o) {
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_5_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_child);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_5_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_5_genexpr)))) {
    __pyx_freelist_8DHParser_4ebnf___pyx_scope_struct_5_genexpr[__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_5_genexpr++] = ((struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_5_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_8DHParser_4ebnf___pyx_scope_struct_5_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_5_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_child) {
    e = (*v)(p->__pyx_v_child, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_8DHParser_4ebnf___pyx_scope_struct_5_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "DHParser.ebnf.__pyx_scope_struct_5_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_5_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8DHParser_4ebnf___pyx_scope_struct_5_genexpr, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_8DHParser_4ebnf___pyx_scope_struct_5_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct_5_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_6_on_literal *__pyx_freelist_8DHParser_4ebnf___pyx_scope_struct_6_on_literal[8];
static int __pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_6_on_literal = 0;

static PyObject *__pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct_6_on_literal(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_6_on_literal > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_6_on_literal)))) {
    o = (PyObject*)__pyx_freelist_8DHParser_4ebnf___pyx_scope_struct_6_on_literal[--__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_6_on_literal];
    memset(o, 0, sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_6_on_literal));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_8DHParser_4ebnf___pyx_scope_struct_6_on_literal(PyObject *o) {
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_6_on_literal *p = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_6_on_literal *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_center);
  Py_CLEAR(p->__pyx_v_left);
  Py_CLEAR(p->__pyx_v_right);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_6_on_literal < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_6_on_literal)))) {
    __pyx_freelist_8DHParser_4ebnf___pyx_scope_struct_6_on_literal[__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_6_on_literal++] = ((struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_6_on_literal *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_8DHParser_4ebnf___pyx_scope_struct_6_on_literal(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_6_on_literal *p = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_6_on_literal *)o;
  if (p->__pyx_v_center) {
    e = (*v)(p->__pyx_v_center, a); if (e) return e;
  }
  if (p->__pyx_v_left) {
    e = (*v)(p->__pyx_v_left, a); if (e) return e;
  }
  if (p->__pyx_v_right) {
    e = (*v)(p->__pyx_v_right, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_8DHParser_4ebnf___pyx_scope_struct_6_on_literal(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_6_on_literal *p = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_6_on_literal *)o;
  tmp = ((PyObject*)p->__pyx_v_center);
  p->__pyx_v_center = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_left);
  p->__pyx_v_left = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_right);
  p->__pyx_v_right = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_8DHParser_4ebnf___pyx_scope_struct_6_on_literal = {
  PyVarObject_HEAD_INIT(0, 0)
  "DHParser.ebnf.__pyx_scope_struct_6_on_literal", /*tp_name*/
  sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_6_on_literal), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8DHParser_4ebnf___pyx_scope_struct_6_on_literal, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_8DHParser_4ebnf___pyx_scope_struct_6_on_literal, /*tp_traverse*/
  __pyx_tp_clear_8DHParser_4ebnf___pyx_scope_struct_6_on_literal, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct_6_on_literal, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_7_genexpr *__pyx_freelist_8DHParser_4ebnf___pyx_scope_struct_7_genexpr[8];
static int __pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_7_genexpr = 0;

static PyObject *__pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct_7_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_7_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_7_genexpr)))) {
    o = (PyObject*)__pyx_freelist_8DHParser_4ebnf___pyx_scope_struct_7_genexpr[--__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_7_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_7_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_8DHParser_4ebnf___pyx_scope_struct_7_genexpr(PyObject *o) {
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_7_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_item);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_7_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_7_genexpr)))) {
    __pyx_freelist_8DHParser_4ebnf___pyx_scope_struct_7_genexpr[__pyx_freecount_8DHParser_4ebnf___pyx_scope_struct_7_genexpr++] = ((struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_7_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_8DHParser_4ebnf___pyx_scope_struct_7_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_7_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_item) {
    e = (*v)(p->__pyx_v_item, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_8DHParser_4ebnf___pyx_scope_struct_7_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "DHParser.ebnf.__pyx_scope_struct_7_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_8DHParser_4ebnf___pyx_scope_struct_7_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8DHParser_4ebnf___pyx_scope_struct_7_genexpr, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_8DHParser_4ebnf___pyx_scope_struct_7_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8DHParser_4ebnf___pyx_scope_struct_7_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_ebnf(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_ebnf},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "ebnf",
    __pyx_k_Module_ebnf_provides_a_self_hos, /* m_doc */
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    0, /* m_size */
  #else
    -1, /* m_size */
  #endif
    __pyx_methods /* m_methods */,
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    __pyx_moduledef_slots, /* m_slots */
  #else
    NULL, /* m_reload */
  #endif
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_u_82a7c668f86b83f86515078e6c9093ed, __pyx_k_82a7c668f86b83f86515078e6c9093ed, sizeof(__pyx_k_82a7c668f86b83f86515078e6c9093ed), 0, 1, 0, 0},
  {&__pyx_n_s_AMBIGUOUS_ERROR_HANDLING, __pyx_k_AMBIGUOUS_ERROR_HANDLING, sizeof(__pyx_k_AMBIGUOUS_ERROR_HANDLING), 0, 0, 1, 1},
  {&__pyx_n_s_AST_ERROR, __pyx_k_AST_ERROR, sizeof(__pyx_k_AST_ERROR), 0, 0, 1, 1},
  {&__pyx_kp_u_AST_Transformations_for_the, __pyx_k_AST_Transformations_for_the, sizeof(__pyx_k_AST_Transformations_for_the), 0, 1, 0, 0},
  {&__pyx_n_u_AST_transformation_table, __pyx_k_AST_transformation_table, sizeof(__pyx_k_AST_transformation_table), 0, 1, 0, 1},
  {&__pyx_kp_s_A_Record_that_keeps_information, __pyx_k_A_Record_that_keeps_information, sizeof(__pyx_k_A_Record_that_keeps_information), 0, 0, 1, 0},
  {&__pyx_kp_u_A_rule_s_has_already_been_define, __pyx_k_A_rule_s_has_already_been_define, sizeof(__pyx_k_A_rule_s_has_already_been_define), 0, 1, 0, 0},
  {&__pyx_n_u_AaEeIiOoUu, __pyx_k_AaEeIiOoUu, sizeof(__pyx_k_AaEeIiOoUu), 0, 1, 0, 1},
  {&__pyx_n_u_AllOf, __pyx_k_AllOf, sizeof(__pyx_k_AllOf), 0, 1, 0, 1},
  {&__pyx_n_s_Alternative, __pyx_k_Alternative, sizeof(__pyx_k_Alternative), 0, 0, 1, 1},
  {&__pyx_n_u_Alternative, __pyx_k_Alternative, sizeof(__pyx_k_Alternative), 0, 1, 0, 1},
  {&__pyx_n_s_Any, __pyx_k_Any, sizeof(__pyx_k_Any), 0, 0, 1, 1},
  {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
  {&__pyx_kp_u_AttributeError_2, __pyx_k_AttributeError_2, sizeof(__pyx_k_AttributeError_2), 0, 1, 0, 0},
  {&__pyx_kp_u_Badly_structured_syntax_tree_Pot, __pyx_k_Badly_structured_syntax_tree_Pot, sizeof(__pyx_k_Badly_structured_syntax_tree_Pot), 0, 1, 0, 0},
  {&__pyx_n_s_COMMENT, __pyx_k_COMMENT, sizeof(__pyx_k_COMMENT), 0, 0, 1, 1},
  {&__pyx_n_u_COMMENT, __pyx_k_COMMENT, sizeof(__pyx_k_COMMENT), 0, 1, 0, 1},
  {&__pyx_n_s_COMMENT_KEYWORD, __pyx_k_COMMENT_KEYWORD, sizeof(__pyx_k_COMMENT_KEYWORD), 0, 0, 1, 1},
  {&__pyx_n_s_COMPILER_FACTORY, __pyx_k_COMPILER_FACTORY, sizeof(__pyx_k_COMPILER_FACTORY), 0, 0, 1, 1},
  {&__pyx_n_s_CONFIG_PRESET, __pyx_k_CONFIG_PRESET, sizeof(__pyx_k_CONFIG_PRESET), 0, 0, 1, 1},
  {&__pyx_n_s_Callable, __pyx_k_Callable, sizeof(__pyx_k_Callable), 0, 0, 1, 1},
  {&__pyx_kp_u_Cannot_apply_customized_error_me, __pyx_k_Cannot_apply_customized_error_me, sizeof(__pyx_k_Cannot_apply_customized_error_me), 0, 1, 0, 0},
  {&__pyx_kp_u_Cannot_apply_skip_rules_unambigi, __pyx_k_Cannot_apply_skip_rules_unambigi, sizeof(__pyx_k_Cannot_apply_skip_rules_unambigi), 0, 1, 0, 0},
  {&__pyx_kp_u_Capture_s, __pyx_k_Capture_s, sizeof(__pyx_k_Capture_s), 0, 1, 0, 0},
  {&__pyx_n_s_Compiler, __pyx_k_Compiler, sizeof(__pyx_k_Compiler), 0, 0, 1, 1},
  {&__pyx_n_s_CompilerError, __pyx_k_CompilerError, sizeof(__pyx_k_CompilerError), 0, 0, 1, 1},
  {&__pyx_n_s_CompilerFactoryFunc, __pyx_k_CompilerFactoryFunc, sizeof(__pyx_k_CompilerFactoryFunc), 0, 0, 1, 1},
  {&__pyx_n_u_CompilerFactoryFunc, __pyx_k_CompilerFactoryFunc, sizeof(__pyx_k_CompilerFactoryFunc), 0, 1, 0, 1},
  {&__pyx_kp_u_Compiler_Compiler, __pyx_k_Compiler_Compiler, sizeof(__pyx_k_Compiler_Compiler), 0, 1, 0, 0},
  {&__pyx_kp_u_Compiler_for_the_abstract_synta, __pyx_k_Compiler_for_the_abstract_synta, sizeof(__pyx_k_Compiler_for_the_abstract_synta), 0, 1, 0, 0},
  {&__pyx_kp_u_Compiler_has_not_been_run_before, __pyx_k_Compiler_has_not_been_run_before, sizeof(__pyx_k_Compiler_has_not_been_run_before), 0, 1, 0, 0},
  {&__pyx_kp_u_Compiler_must_be_run_before_call, __pyx_k_Compiler_must_be_run_before_call, sizeof(__pyx_k_Compiler_must_be_run_before_call), 0, 1, 0, 0},
  {&__pyx_kp_u_Compiler_self___init, __pyx_k_Compiler_self___init, sizeof(__pyx_k_Compiler_self___init), 0, 1, 0, 0},
  {&__pyx_kp_u_Custom_error_message_for_symbol, __pyx_k_Custom_error_message_for_symbol, sizeof(__pyx_k_Custom_error_message_for_symbol), 0, 1, 0, 0},
  {&__pyx_kp_u_Customized_error_message_for_sym, __pyx_k_Customized_error_message_for_sym, sizeof(__pyx_k_Customized_error_message_for_sym), 0, 1, 0, 0},
  {&__pyx_n_s_DHParser_compile, __pyx_k_DHParser_compile, sizeof(__pyx_k_DHParser_compile), 0, 0, 1, 1},
  {&__pyx_n_s_DHParser_ebnf, __pyx_k_DHParser_ebnf, sizeof(__pyx_k_DHParser_ebnf), 0, 0, 1, 1},
  {&__pyx_kp_s_DHParser_ebnf_py, __pyx_k_DHParser_ebnf_py, sizeof(__pyx_k_DHParser_ebnf_py), 0, 0, 1, 0},
  {&__pyx_n_s_DHParser_error, __pyx_k_DHParser_error, sizeof(__pyx_k_DHParser_error), 0, 0, 1, 1},
  {&__pyx_n_s_DHParser_parse, __pyx_k_DHParser_parse, sizeof(__pyx_k_DHParser_parse), 0, 0, 1, 1},
  {&__pyx_n_s_DHParser_preprocess, __pyx_k_DHParser_preprocess, sizeof(__pyx_k_DHParser_preprocess), 0, 0, 1, 1},
  {&__pyx_n_s_DHParser_syntaxtree, __pyx_k_DHParser_syntaxtree, sizeof(__pyx_k_DHParser_syntaxtree), 0, 0, 1, 1},
  {&__pyx_n_s_DHParser_toolkit, __pyx_k_DHParser_toolkit, sizeof(__pyx_k_DHParser_toolkit), 0, 0, 1, 1},
  {&__pyx_n_s_DHParser_transform, __pyx_k_DHParser_transform, sizeof(__pyx_k_DHParser_transform), 0, 0, 1, 1},
  {&__pyx_n_s_DHParser_versionnumber, __pyx_k_DHParser_versionnumber, sizeof(__pyx_k_DHParser_versionnumber), 0, 0, 1, 1},
  {&__pyx_n_s_DROP_TOKEN, __pyx_k_DROP_TOKEN, sizeof(__pyx_k_DROP_TOKEN), 0, 0, 1, 1},
  {&__pyx_n_s_DROP_VALUES, __pyx_k_DROP_VALUES, sizeof(__pyx_k_DROP_VALUES), 0, 0, 1, 1},
  {&__pyx_n_s_DROP_WHITESPACE_PARSER_KEYWORD, __pyx_k_DROP_WHITESPACE_PARSER_KEYWORD, sizeof(__pyx_k_DROP_WHITESPACE_PARSER_KEYWORD), 0, 0, 1, 1},
  {&__pyx_n_s_DROP_WSPC, __pyx_k_DROP_WSPC, sizeof(__pyx_k_DROP_WSPC), 0, 0, 1, 1},
  {&__pyx_n_u_DSL, __pyx_k_DSL, sizeof(__pyx_k_DSL), 0, 1, 0, 1},
  {&__pyx_n_s_Dict, __pyx_k_Dict, sizeof(__pyx_k_Dict), 0, 0, 1, 1},
  {&__pyx_kp_u_Directive_literalws_allows_only, __pyx_k_Directive_literalws_allows_only, sizeof(__pyx_k_Directive_literalws_allows_only), 0, 1, 0, 0},
  {&__pyx_kp_u_Directive_s_allows_at_most_two_p, __pyx_k_Directive_s_allows_at_most_two_p, sizeof(__pyx_k_Directive_s_allows_at_most_two_p), 0, 1, 0, 0},
  {&__pyx_kp_u_Directive_s_can_have_at_most_i_v, __pyx_k_Directive_s_can_have_at_most_i_v, sizeof(__pyx_k_Directive_s_can_have_at_most_i_v), 0, 1, 0, 0},
  {&__pyx_kp_u_Directive_s_has_already_been_def, __pyx_k_Directive_s_has_already_been_def, sizeof(__pyx_k_Directive_s_has_already_been_def), 0, 1, 0, 0},
  {&__pyx_kp_u_Directive_s_requires_message_str, __pyx_k_Directive_s_requires_message_str, sizeof(__pyx_k_Directive_s_requires_message_str), 0, 1, 0, 0},
  {&__pyx_kp_u_DropToken, __pyx_k_DropToken, sizeof(__pyx_k_DropToken), 0, 1, 0, 0},
  {&__pyx_kp_u_DropWhitespace_s, __pyx_k_DropWhitespace_s, sizeof(__pyx_k_DropWhitespace_s), 0, 1, 0, 0},
  {&__pyx_n_s_EBNFCompiler, __pyx_k_EBNFCompiler, sizeof(__pyx_k_EBNFCompiler), 0, 0, 1, 1},
  {&__pyx_n_u_EBNFCompiler, __pyx_k_EBNFCompiler, sizeof(__pyx_k_EBNFCompiler), 0, 1, 0, 1},
  {&__pyx_n_s_EBNFCompilerError, __pyx_k_EBNFCompilerError, sizeof(__pyx_k_EBNFCompilerError), 0, 0, 1, 1},
  {&__pyx_n_u_EBNFCompilerError, __pyx_k_EBNFCompilerError, sizeof(__pyx_k_EBNFCompilerError), 0, 1, 0, 1},
  {&__pyx_n_s_EBNFCompiler_TOKEN_PARSER, __pyx_k_EBNFCompiler_TOKEN_PARSER, sizeof(__pyx_k_EBNFCompiler_TOKEN_PARSER), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_WSPC_PARSER, __pyx_k_EBNFCompiler_WSPC_PARSER, sizeof(__pyx_k_EBNFCompiler_WSPC_PARSER), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler___init, __pyx_k_EBNFCompiler___init, sizeof(__pyx_k_EBNFCompiler___init), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler__check_rx, __pyx_k_EBNFCompiler__check_rx, sizeof(__pyx_k_EBNFCompiler__check_rx), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler__error_customizatio, __pyx_k_EBNFCompiler__error_customizatio, sizeof(__pyx_k_EBNFCompiler__error_customizatio), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler__extract_regex, __pyx_k_EBNFCompiler__extract_regex, sizeof(__pyx_k_EBNFCompiler__extract_regex), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler__gen_search_list, __pyx_k_EBNFCompiler__gen_search_list, sizeof(__pyx_k_EBNFCompiler__gen_search_list), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler__gen_search_rule, __pyx_k_EBNFCompiler__gen_search_rule, sizeof(__pyx_k_EBNFCompiler__gen_search_rule), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler__reset, __pyx_k_EBNFCompiler__reset, sizeof(__pyx_k_EBNFCompiler__reset), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_assemble_parser, __pyx_k_EBNFCompiler_assemble_parser, sizeof(__pyx_k_EBNFCompiler_assemble_parser), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_assemble_parser_loc, __pyx_k_EBNFCompiler_assemble_parser_loc, sizeof(__pyx_k_EBNFCompiler_assemble_parser_loc), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_gen_compiler_skelet, __pyx_k_EBNFCompiler_gen_compiler_skelet, sizeof(__pyx_k_EBNFCompiler_gen_compiler_skelet), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_gen_preprocessor_sk, __pyx_k_EBNFCompiler_gen_preprocessor_sk, sizeof(__pyx_k_EBNFCompiler_gen_preprocessor_sk), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_gen_transformer_ske, __pyx_k_EBNFCompiler_gen_transformer_ske, sizeof(__pyx_k_EBNFCompiler_gen_transformer_ske), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_non_terminal, __pyx_k_EBNFCompiler_non_terminal, sizeof(__pyx_k_EBNFCompiler_non_terminal), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_on_definition, __pyx_k_EBNFCompiler_on_definition, sizeof(__pyx_k_EBNFCompiler_on_definition), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_on_directive, __pyx_k_EBNFCompiler_on_directive, sizeof(__pyx_k_EBNFCompiler_on_directive), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_on_directive_locals, __pyx_k_EBNFCompiler_on_directive_locals, sizeof(__pyx_k_EBNFCompiler_on_directive_locals), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_on_expression, __pyx_k_EBNFCompiler_on_expression, sizeof(__pyx_k_EBNFCompiler_on_expression), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_on_factor, __pyx_k_EBNFCompiler_on_factor, sizeof(__pyx_k_EBNFCompiler_on_factor), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_on_factor_locals_ch, __pyx_k_EBNFCompiler_on_factor_locals_ch, sizeof(__pyx_k_EBNFCompiler_on_factor_locals_ch), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_on_factor_locals_la, __pyx_k_EBNFCompiler_on_factor_locals_la, sizeof(__pyx_k_EBNFCompiler_on_factor_locals_la), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_on_group, __pyx_k_EBNFCompiler_on_group, sizeof(__pyx_k_EBNFCompiler_on_group), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_on_literal, __pyx_k_EBNFCompiler_on_literal, sizeof(__pyx_k_EBNFCompiler_on_literal), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_on_literal_locals_g, __pyx_k_EBNFCompiler_on_literal_locals_g, sizeof(__pyx_k_EBNFCompiler_on_literal_locals_g), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_on_oneormore, __pyx_k_EBNFCompiler_on_oneormore, sizeof(__pyx_k_EBNFCompiler_on_oneormore), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_on_option, __pyx_k_EBNFCompiler_on_option, sizeof(__pyx_k_EBNFCompiler_on_option), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_on_plaintext, __pyx_k_EBNFCompiler_on_plaintext, sizeof(__pyx_k_EBNFCompiler_on_plaintext), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_on_regexp, __pyx_k_EBNFCompiler_on_regexp, sizeof(__pyx_k_EBNFCompiler_on_regexp), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_on_repetition, __pyx_k_EBNFCompiler_on_repetition, sizeof(__pyx_k_EBNFCompiler_on_repetition), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_on_symbol, __pyx_k_EBNFCompiler_on_symbol, sizeof(__pyx_k_EBNFCompiler_on_symbol), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_on_syntax, __pyx_k_EBNFCompiler_on_syntax, sizeof(__pyx_k_EBNFCompiler_on_syntax), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_on_term, __pyx_k_EBNFCompiler_on_term, sizeof(__pyx_k_EBNFCompiler_on_term), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_on_unordered, __pyx_k_EBNFCompiler_on_unordered, sizeof(__pyx_k_EBNFCompiler_on_unordered), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_on_unordered_locals, __pyx_k_EBNFCompiler_on_unordered_locals, sizeof(__pyx_k_EBNFCompiler_on_unordered_locals), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_on_whitespace, __pyx_k_EBNFCompiler_on_whitespace, sizeof(__pyx_k_EBNFCompiler_on_whitespace), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_result, __pyx_k_EBNFCompiler_result, sizeof(__pyx_k_EBNFCompiler_result), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_set_grammar_name, __pyx_k_EBNFCompiler_set_grammar_name, sizeof(__pyx_k_EBNFCompiler_set_grammar_name), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_verify_compiler, __pyx_k_EBNFCompiler_verify_compiler, sizeof(__pyx_k_EBNFCompiler_verify_compiler), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFCompiler_verify_transformati, __pyx_k_EBNFCompiler_verify_transformati, sizeof(__pyx_k_EBNFCompiler_verify_transformati), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFDirectives, __pyx_k_EBNFDirectives, sizeof(__pyx_k_EBNFDirectives), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFDirectives___getitem, __pyx_k_EBNFDirectives___getitem, sizeof(__pyx_k_EBNFDirectives___getitem), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFDirectives___init, __pyx_k_EBNFDirectives___init, sizeof(__pyx_k_EBNFDirectives___init), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFDirectives___setitem, __pyx_k_EBNFDirectives___setitem, sizeof(__pyx_k_EBNFDirectives___setitem), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFDirectives_keys, __pyx_k_EBNFDirectives_keys, sizeof(__pyx_k_EBNFDirectives_keys), 0, 0, 1, 1},
  {&__pyx_n_s_EBNFGrammar, __pyx_k_EBNFGrammar, sizeof(__pyx_k_EBNFGrammar), 0, 0, 1, 1},
  {&__pyx_n_u_EBNFGrammar, __pyx_k_EBNFGrammar, sizeof(__pyx_k_EBNFGrammar), 0, 1, 0, 1},
  {&__pyx_n_s_EBNFTransform, __pyx_k_EBNFTransform, sizeof(__pyx_k_EBNFTransform), 0, 0, 1, 1},
  {&__pyx_n_u_EBNFTransform, __pyx_k_EBNFTransform, sizeof(__pyx_k_EBNFTransform), 0, 1, 0, 1},
  {&__pyx_n_s_EBNF_AST_transformation_table, __pyx_k_EBNF_AST_transformation_table, sizeof(__pyx_k_EBNF_AST_transformation_table), 0, 0, 1, 1},
  {&__pyx_n_s_EBNF_transformer_singleton, __pyx_k_EBNF_transformer_singleton, sizeof(__pyx_k_EBNF_transformer_singleton), 0, 0, 1, 1},
  {&__pyx_n_s_EOF, __pyx_k_EOF, sizeof(__pyx_k_EOF), 0, 0, 1, 1},
  {&__pyx_n_s_ERR_MSG_SUFFIX, __pyx_k_ERR_MSG_SUFFIX, sizeof(__pyx_k_ERR_MSG_SUFFIX), 0, 0, 1, 1},
  {&__pyx_n_s_Error, __pyx_k_Error, sizeof(__pyx_k_Error), 0, 0, 1, 1},
  {&__pyx_kp_s_Error_raised_by_EBNFCompiler_cla, __pyx_k_Error_raised_by_EBNFCompiler_cla, sizeof(__pyx_k_Error_raised_by_EBNFCompiler_cla), 0, 0, 1, 0},
  {&__pyx_kp_u_First_definition_of_rule_s_follo, __pyx_k_First_definition_of_rule_s_follo, sizeof(__pyx_k_First_definition_of_rule_s_follo), 0, 1, 0, 0},
  {&__pyx_kp_u_Forward, __pyx_k_Forward, sizeof(__pyx_k_Forward), 0, 1, 0, 0},
  {&__pyx_n_s_Forward_2, __pyx_k_Forward_2, sizeof(__pyx_k_Forward_2), 0, 0, 1, 1},
  {&__pyx_n_s_GLOBALS, __pyx_k_GLOBALS, sizeof(__pyx_k_GLOBALS), 0, 0, 1, 1},
  {&__pyx_n_s_GRAMMAR_FACTORY, __pyx_k_GRAMMAR_FACTORY, sizeof(__pyx_k_GRAMMAR_FACTORY), 0, 0, 1, 1},
  {&__pyx_kp_s_Generates_a_Parser_from_an_abst, __pyx_k_Generates_a_Parser_from_an_abst, sizeof(__pyx_k_Generates_a_Parser_from_an_abst), 0, 0, 1, 0},
  {&__pyx_kp_u_Grammar, __pyx_k_Grammar, sizeof(__pyx_k_Grammar), 0, 1, 0, 0},
  {&__pyx_n_s_Grammar_2, __pyx_k_Grammar_2, sizeof(__pyx_k_Grammar_2), 0, 0, 1, 1},
  {&__pyx_kp_u_Grammar_Grammar, __pyx_k_Grammar_Grammar, sizeof(__pyx_k_Grammar_Grammar), 0, 1, 0, 0},
  {&__pyx_kp_u_Group_nodes_should_have_been_eli, __pyx_k_Group_nodes_should_have_been_eli, sizeof(__pyx_k_Group_nodes_should_have_been_eli), 0, 1, 0, 0},
  {&__pyx_n_s_ID, __pyx_k_ID, sizeof(__pyx_k_ID), 0, 0, 1, 1},
  {&__pyx_kp_u_Illegal_symbol_s_Symbols_must_no, __pyx_k_Illegal_symbol_s_Symbols_must_no, sizeof(__pyx_k_Illegal_symbol_s_Symbols_must_no), 0, 1, 0, 0},
  {&__pyx_kp_u_Implicit_whitespace_should_alway, __pyx_k_Implicit_whitespace_should_alway, sizeof(__pyx_k_Implicit_whitespace_should_alway), 0, 1, 0, 0},
  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
  {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
  {&__pyx_kp_u_Known_ones_are, __pyx_k_Known_ones_are, sizeof(__pyx_k_Known_ones_are), 0, 1, 0, 0},
  {&__pyx_kp_u_Later_declaration_will_be_ignore, __pyx_k_Later_declaration_will_be_ignore, sizeof(__pyx_k_Later_declaration_will_be_ignore), 0, 1, 0, 0},
  {&__pyx_kp_u_Later_definition_will_be_ignored, __pyx_k_Later_definition_will_be_ignored, sizeof(__pyx_k_Later_definition_will_be_ignored), 0, 1, 0, 0},
  {&__pyx_n_s_List, __pyx_k_List, sizeof(__pyx_k_List), 0, 0, 1, 1},
  {&__pyx_n_u_Lookahead, __pyx_k_Lookahead, sizeof(__pyx_k_Lookahead), 0, 1, 0, 1},
  {&__pyx_n_u_Lookbehind, __pyx_k_Lookbehind, sizeof(__pyx_k_Lookbehind), 0, 1, 0, 1},
  {&__pyx_kp_u_Lookbehind_parser_can_only_be_us, __pyx_k_Lookbehind_parser_can_only_be_us, sizeof(__pyx_k_Lookbehind_parser_can_only_be_us), 0, 1, 0, 0},
  {&__pyx_kp_u_Missing_definition_for_symbol_s, __pyx_k_Missing_definition_for_symbol_s, sizeof(__pyx_k_Missing_definition_for_symbol_s), 0, 1, 0, 0},
  {&__pyx_n_s_NAME, __pyx_k_NAME, sizeof(__pyx_k_NAME), 0, 0, 1, 1},
  {&__pyx_n_s_NameError, __pyx_k_NameError, sizeof(__pyx_k_NameError), 0, 0, 1, 1},
  {&__pyx_n_s_NegativeLookahead, __pyx_k_NegativeLookahead, sizeof(__pyx_k_NegativeLookahead), 0, 0, 1, 1},
  {&__pyx_n_u_NegativeLookahead, __pyx_k_NegativeLookahead, sizeof(__pyx_k_NegativeLookahead), 0, 1, 0, 1},
  {&__pyx_n_u_NegativeLookbehind, __pyx_k_NegativeLookbehind, sizeof(__pyx_k_NegativeLookbehind), 0, 1, 0, 1},
  {&__pyx_kp_u_No_mandatory_items_allowed_in_So, __pyx_k_No_mandatory_items_allowed_in_So, sizeof(__pyx_k_No_mandatory_items_allowed_in_So), 0, 1, 0, 0},
  {&__pyx_n_s_Node, __pyx_k_Node, sizeof(__pyx_k_Node), 0, 0, 1, 1},
  {&__pyx_kp_u_None, __pyx_k_None, sizeof(__pyx_k_None), 0, 1, 0, 0},
  {&__pyx_n_s_OneOrMore, __pyx_k_OneOrMore, sizeof(__pyx_k_OneOrMore), 0, 0, 1, 1},
  {&__pyx_n_u_OneOrMore, __pyx_k_OneOrMore, sizeof(__pyx_k_OneOrMore), 0, 1, 0, 1},
  {&__pyx_kp_u_One_mandatory_marker_sufficient, __pyx_k_One_mandatory_marker_sufficient, sizeof(__pyx_k_One_mandatory_marker_sufficient), 0, 1, 0, 0},
  {&__pyx_n_s_Option, __pyx_k_Option, sizeof(__pyx_k_Option), 0, 0, 1, 1},
  {&__pyx_n_u_Option, __pyx_k_Option, sizeof(__pyx_k_Option), 0, 1, 0, 1},
  {&__pyx_n_s_Optional, __pyx_k_Optional, sizeof(__pyx_k_Optional), 0, 0, 1, 1},
  {&__pyx_n_s_OrderedDict, __pyx_k_OrderedDict, sizeof(__pyx_k_OrderedDict), 0, 0, 1, 1},
  {&__pyx_n_s_PREFIX_TABLE, __pyx_k_PREFIX_TABLE, sizeof(__pyx_k_PREFIX_TABLE), 0, 0, 1, 1},
  {&__pyx_n_s_PREPROCESSOR_FACTORY, __pyx_k_PREPROCESSOR_FACTORY, sizeof(__pyx_k_PREPROCESSOR_FACTORY), 0, 0, 1, 1},
  {&__pyx_n_s_ParserFactoryFunc, __pyx_k_ParserFactoryFunc, sizeof(__pyx_k_ParserFactoryFunc), 0, 0, 1, 1},
  {&__pyx_n_u_ParserFactoryFunc, __pyx_k_ParserFactoryFunc, sizeof(__pyx_k_ParserFactoryFunc), 0, 1, 0, 1},
  {&__pyx_kp_s_Parser_for_an_EBNF_source_file, __pyx_k_Parser_for_an_EBNF_source_file, sizeof(__pyx_k_Parser_for_an_EBNF_source_file), 0, 0, 1, 0},
  {&__pyx_n_u_Pop, __pyx_k_Pop, sizeof(__pyx_k_Pop), 0, 1, 0, 1},
  {&__pyx_n_u_Preprocessor, __pyx_k_Preprocessor, sizeof(__pyx_k_Preprocessor), 0, 1, 0, 1},
  {&__pyx_n_s_PreprocessorFactoryFunc, __pyx_k_PreprocessorFactoryFunc, sizeof(__pyx_k_PreprocessorFactoryFunc), 0, 0, 1, 1},
  {&__pyx_n_u_PreprocessorFactoryFunc, __pyx_k_PreprocessorFactoryFunc, sizeof(__pyx_k_PreprocessorFactoryFunc), 0, 1, 0, 1},
  {&__pyx_n_s_PreprocessorFunc, __pyx_k_PreprocessorFunc, sizeof(__pyx_k_PreprocessorFunc), 0, 0, 1, 1},
  {&__pyx_kp_u_PreprocessorToken, __pyx_k_PreprocessorToken, sizeof(__pyx_k_PreprocessorToken), 0, 1, 0, 0},
  {&__pyx_kp_u_Python_keyword_s_may_not_be_used, __pyx_k_Python_keyword_s_may_not_be_used, sizeof(__pyx_k_Python_keyword_s_may_not_be_used), 0, 1, 0, 0},
  {&__pyx_n_s_RAW_WS_KEYWORD, __pyx_k_RAW_WS_KEYWORD, sizeof(__pyx_k_RAW_WS_KEYWORD), 0, 0, 1, 1},
  {&__pyx_n_s_REDECLARED_TOKEN_WARNING, __pyx_k_REDECLARED_TOKEN_WARNING, sizeof(__pyx_k_REDECLARED_TOKEN_WARNING), 0, 0, 1, 1},
  {&__pyx_n_s_REDEFINED_DIRECTIVE, __pyx_k_REDEFINED_DIRECTIVE, sizeof(__pyx_k_REDEFINED_DIRECTIVE), 0, 0, 1, 1},
  {&__pyx_n_s_REPEATABLE_DIRECTIVES, __pyx_k_REPEATABLE_DIRECTIVES, sizeof(__pyx_k_REPEATABLE_DIRECTIVES), 0, 0, 1, 1},
  {&__pyx_n_s_RESERVED_SYMBOLS, __pyx_k_RESERVED_SYMBOLS, sizeof(__pyx_k_RESERVED_SYMBOLS), 0, 0, 1, 1},
  {&__pyx_n_s_RESUME_RULES_KEYWORD, __pyx_k_RESUME_RULES_KEYWORD, sizeof(__pyx_k_RESUME_RULES_KEYWORD), 0, 0, 1, 1},
  {&__pyx_kp_u_RegExp, __pyx_k_RegExp, sizeof(__pyx_k_RegExp), 0, 1, 0, 0},
  {&__pyx_n_s_RegExp_2, __pyx_k_RegExp_2, sizeof(__pyx_k_RegExp_2), 0, 0, 1, 1},
  {&__pyx_kp_u_RegExp_s, __pyx_k_RegExp_s, sizeof(__pyx_k_RegExp_s), 0, 1, 0, 0},
  {&__pyx_n_s_ReprType, __pyx_k_ReprType, sizeof(__pyx_k_ReprType), 0, 0, 1, 1},
  {&__pyx_n_u_Required, __pyx_k_Required, sizeof(__pyx_k_Required), 0, 1, 0, 1},
  {&__pyx_n_u_Retrieve, __pyx_k_Retrieve, sizeof(__pyx_k_Retrieve), 0, 1, 0, 1},
  {&__pyx_kp_u_Retrieve_Operator, __pyx_k_Retrieve_Operator, sizeof(__pyx_k_Retrieve_Operator), 0, 1, 0, 0},
  {&__pyx_kp_u_Rule, __pyx_k_Rule, sizeof(__pyx_k_Rule), 0, 1, 0, 0},
  {&__pyx_n_s_SKIP_RULES_SUFFIX, __pyx_k_SKIP_RULES_SUFFIX, sizeof(__pyx_k_SKIP_RULES_SUFFIX), 0, 0, 1, 1},
  {&__pyx_n_s_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
  {&__pyx_n_s_Series, __pyx_k_Series, sizeof(__pyx_k_Series), 0, 0, 1, 1},
  {&__pyx_n_u_Series, __pyx_k_Series, sizeof(__pyx_k_Series), 0, 1, 0, 1},
  {&__pyx_kp_u_Series_2, __pyx_k_Series_2, sizeof(__pyx_k_Series_2), 0, 1, 0, 0},
  {&__pyx_n_s_Set, __pyx_k_Set, sizeof(__pyx_k_Set), 0, 0, 1, 1},
  {&__pyx_kp_u_Skip_list_for_resuming_in_series, __pyx_k_Skip_list_for_resuming_in_series, sizeof(__pyx_k_Skip_list_for_resuming_in_series), 0, 1, 0, 0},
  {&__pyx_kp_u_Skip_rules_for_symbol_will_neve, __pyx_k_Skip_rules_for_symbol_will_neve, sizeof(__pyx_k_Skip_rules_for_symbol_will_neve), 0, 1, 0, 0},
  {&__pyx_kp_u_SomeOf, __pyx_k_SomeOf, sizeof(__pyx_k_SomeOf), 0, 1, 0, 0},
  {&__pyx_kp_u_Symbol, __pyx_k_Symbol, sizeof(__pyx_k_Symbol), 0, 1, 0, 0},
  {&__pyx_kp_u_Symbol_s_cannot_be_used_in_resum, __pyx_k_Symbol_s_cannot_be_used_in_resum, sizeof(__pyx_k_Symbol_s_cannot_be_used_in_resum), 0, 1, 0, 0},
  {&__pyx_kp_u_Symbol_s_has_already_been_define, __pyx_k_Symbol_s_has_already_been_define, sizeof(__pyx_k_Symbol_s_has_already_been_define), 0, 1, 0, 0},
  {&__pyx_kp_u_Symbol_s_is_a_reserved_symbol, __pyx_k_Symbol_s_is_a_reserved_symbol, sizeof(__pyx_k_Symbol_s_is_a_reserved_symbol), 0, 1, 0, 0},
  {&__pyx_kp_u_Synonym_s, __pyx_k_Synonym_s, sizeof(__pyx_k_Synonym_s), 0, 1, 0, 0},
  {&__pyx_n_s_TOKEN_PARSER, __pyx_k_TOKEN_PARSER, sizeof(__pyx_k_TOKEN_PARSER), 0, 0, 1, 1},
  {&__pyx_n_s_TOKEN_PTYPE, __pyx_k_TOKEN_PTYPE, sizeof(__pyx_k_TOKEN_PTYPE), 0, 0, 1, 1},
  {&__pyx_n_s_TRANSFORMER_FACTORY, __pyx_k_TRANSFORMER_FACTORY, sizeof(__pyx_k_TRANSFORMER_FACTORY), 0, 0, 1, 1},
  {&__pyx_kp_u_This_may_change_in_the_future, __pyx_k_This_may_change_in_the_future, sizeof(__pyx_k_This_may_change_in_the_future), 0, 1, 0, 0},
  {&__pyx_kp_u_Token, __pyx_k_Token, sizeof(__pyx_k_Token), 0, 1, 0, 0},
  {&__pyx_n_s_Token_2, __pyx_k_Token_2, sizeof(__pyx_k_Token_2), 0, 0, 1, 1},
  {&__pyx_kp_u_Tokens_s_have_already_been_decla, __pyx_k_Tokens_s_have_already_been_decla, sizeof(__pyx_k_Tokens_s_have_already_been_decla), 0, 1, 0, 0},
  {&__pyx_n_s_TransformationFunc, __pyx_k_TransformationFunc, sizeof(__pyx_k_TransformationFunc), 0, 0, 1, 1},
  {&__pyx_n_s_TransformerFactoryFunc, __pyx_k_TransformerFactoryFunc, sizeof(__pyx_k_TransformerFactoryFunc), 0, 0, 1, 1},
  {&__pyx_n_u_TransformerFactoryFunc, __pyx_k_TransformerFactoryFunc, sizeof(__pyx_k_TransformerFactoryFunc), 0, 1, 0, 1},
  {&__pyx_n_s_Tuple, __pyx_k_Tuple, sizeof(__pyx_k_Tuple), 0, 0, 1, 1},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_kp_u_TypeError_2, __pyx_k_TypeError_2, sizeof(__pyx_k_TypeError_2), 0, 1, 0, 0},
  {&__pyx_n_s_UNDEFINED_SYMBOL_IN_TRANSTABLE_W, __pyx_k_UNDEFINED_SYMBOL_IN_TRANSTABLE_W, sizeof(__pyx_k_UNDEFINED_SYMBOL_IN_TRANSTABLE_W), 0, 0, 1, 1},
  {&__pyx_n_s_UNUSED_ERROR_HANDLING_WARNING, __pyx_k_UNUSED_ERROR_HANDLING_WARNING, sizeof(__pyx_k_UNUSED_ERROR_HANDLING_WARNING), 0, 0, 1, 1},
  {&__pyx_n_s_Union, __pyx_k_Union, sizeof(__pyx_k_Union), 0, 0, 1, 1},
  {&__pyx_kp_u_Unknown_directive, __pyx_k_Unknown_directive, sizeof(__pyx_k_Unknown_directive), 0, 1, 0, 0},
  {&__pyx_kp_u_Unknown_prefix_s, __pyx_k_Unknown_prefix_s, sizeof(__pyx_k_Unknown_prefix_s), 0, 1, 0, 0},
  {&__pyx_kp_u_Unordered_sequence_or_alternativ, __pyx_k_Unordered_sequence_or_alternativ, sizeof(__pyx_k_Unordered_sequence_or_alternativ), 0, 1, 0, 0},
  {&__pyx_kp_u_Value, __pyx_k_Value, sizeof(__pyx_k_Value), 0, 1, 0, 0},
  {&__pyx_n_s_WARNING, __pyx_k_WARNING, sizeof(__pyx_k_WARNING), 0, 0, 1, 1},
  {&__pyx_n_s_WHITESPACE, __pyx_k_WHITESPACE, sizeof(__pyx_k_WHITESPACE), 0, 0, 1, 1},
  {&__pyx_n_u_WHITESPACE, __pyx_k_WHITESPACE, sizeof(__pyx_k_WHITESPACE), 0, 1, 0, 1},
  {&__pyx_n_s_WHITESPACE_KEYWORD, __pyx_k_WHITESPACE_KEYWORD, sizeof(__pyx_k_WHITESPACE_KEYWORD), 0, 0, 1, 1},
  {&__pyx_n_s_WHITESPACE_PARSER_KEYWORD, __pyx_k_WHITESPACE_PARSER_KEYWORD, sizeof(__pyx_k_WHITESPACE_PARSER_KEYWORD), 0, 0, 1, 1},
  {&__pyx_n_s_WHITESPACE_PTYPE, __pyx_k_WHITESPACE_PTYPE, sizeof(__pyx_k_WHITESPACE_PTYPE), 0, 0, 1, 1},
  {&__pyx_n_s_WHITESPACE_TYPES, __pyx_k_WHITESPACE_TYPES, sizeof(__pyx_k_WHITESPACE_TYPES), 0, 0, 1, 1},
  {&__pyx_n_s_WSPC_PARSER, __pyx_k_WSPC_PARSER, sizeof(__pyx_k_WSPC_PARSER), 0, 0, 1, 1},
  {&__pyx_n_s_WSP_RE, __pyx_k_WSP_RE, sizeof(__pyx_k_WSP_RE), 0, 0, 1, 1},
  {&__pyx_n_u_WSP_RE, __pyx_k_WSP_RE, sizeof(__pyx_k_WSP_RE), 0, 1, 0, 1},
  {&__pyx_n_s_Whitespace, __pyx_k_Whitespace, sizeof(__pyx_k_Whitespace), 0, 0, 1, 1},
  {&__pyx_kp_u_Whitespace_s, __pyx_k_Whitespace_s, sizeof(__pyx_k_Whitespace_s), 0, 1, 0, 0},
  {&__pyx_n_s_ZeroOrMore, __pyx_k_ZeroOrMore, sizeof(__pyx_k_ZeroOrMore), 0, 0, 1, 1},
  {&__pyx_n_u_ZeroOrMore, __pyx_k_ZeroOrMore, sizeof(__pyx_k_ZeroOrMore), 0, 1, 0, 1},
  {&__pyx_kp_u__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 1, 0, 0},
  {&__pyx_kp_u__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 1, 0, 0},
  {&__pyx_kp_u__12, __pyx_k__12, sizeof(__pyx_k__12), 0, 1, 0, 0},
  {&__pyx_kp_u__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 1, 0, 0},
  {&__pyx_kp_u__14, __pyx_k__14, sizeof(__pyx_k__14), 0, 1, 0, 0},
  {&__pyx_kp_u__15, __pyx_k__15, sizeof(__pyx_k__15), 0, 1, 0, 0},
  {&__pyx_kp_u__16, __pyx_k__16, sizeof(__pyx_k__16), 0, 1, 0, 0},
  {&__pyx_kp_u__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 1, 0, 0},
  {&__pyx_kp_u__18, __pyx_k__18, sizeof(__pyx_k__18), 0, 1, 0, 0},
  {&__pyx_kp_u__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0, 0},
  {&__pyx_kp_u__20, __pyx_k__20, sizeof(__pyx_k__20), 0, 1, 0, 0},
  {&__pyx_kp_u__21, __pyx_k__21, sizeof(__pyx_k__21), 0, 1, 0, 0},
  {&__pyx_kp_u__22, __pyx_k__22, sizeof(__pyx_k__22), 0, 1, 0, 0},
  {&__pyx_kp_u__25, __pyx_k__25, sizeof(__pyx_k__25), 0, 1, 0, 0},
  {&__pyx_kp_u__27, __pyx_k__27, sizeof(__pyx_k__27), 0, 1, 0, 0},
  {&__pyx_kp_u__28, __pyx_k__28, sizeof(__pyx_k__28), 0, 1, 0, 0},
  {&__pyx_kp_u__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 1, 0, 0},
  {&__pyx_kp_u__31, __pyx_k__31, sizeof(__pyx_k__31), 0, 1, 0, 0},
  {&__pyx_kp_u__32, __pyx_k__32, sizeof(__pyx_k__32), 0, 1, 0, 0},
  {&__pyx_kp_u__33, __pyx_k__33, sizeof(__pyx_k__33), 0, 1, 0, 0},
  {&__pyx_kp_u__34, __pyx_k__34, sizeof(__pyx_k__34), 0, 1, 0, 0},
  {&__pyx_kp_u__35, __pyx_k__35, sizeof(__pyx_k__35), 0, 1, 0, 0},
  {&__pyx_kp_u__39, __pyx_k__39, sizeof(__pyx_k__39), 0, 1, 0, 0},
  {&__pyx_kp_u__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 1, 0, 0},
  {&__pyx_kp_u__40, __pyx_k__40, sizeof(__pyx_k__40), 0, 1, 0, 0},
  {&__pyx_kp_u__44, __pyx_k__44, sizeof(__pyx_k__44), 0, 1, 0, 0},
  {&__pyx_kp_u__45, __pyx_k__45, sizeof(__pyx_k__45), 0, 1, 0, 0},
  {&__pyx_kp_u__47, __pyx_k__47, sizeof(__pyx_k__47), 0, 1, 0, 0},
  {&__pyx_kp_u__49, __pyx_k__49, sizeof(__pyx_k__49), 0, 1, 0, 0},
  {&__pyx_kp_u__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 1, 0, 0},
  {&__pyx_kp_u__51, __pyx_k__51, sizeof(__pyx_k__51), 0, 1, 0, 0},
  {&__pyx_kp_u__54, __pyx_k__54, sizeof(__pyx_k__54), 0, 1, 0, 0},
  {&__pyx_kp_u__55, __pyx_k__55, sizeof(__pyx_k__55), 0, 1, 0, 0},
  {&__pyx_kp_u__56, __pyx_k__56, sizeof(__pyx_k__56), 0, 1, 0, 0},
  {&__pyx_kp_u__58, __pyx_k__58, sizeof(__pyx_k__58), 0, 1, 0, 0},
  {&__pyx_kp_u__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 1, 0, 0},
  {&__pyx_kp_u__60, __pyx_k__60, sizeof(__pyx_k__60), 0, 1, 0, 0},
  {&__pyx_kp_u__64, __pyx_k__64, sizeof(__pyx_k__64), 0, 1, 0, 0},
  {&__pyx_kp_u__65, __pyx_k__65, sizeof(__pyx_k__65), 0, 1, 0, 0},
  {&__pyx_kp_u__66, __pyx_k__66, sizeof(__pyx_k__66), 0, 1, 0, 0},
  {&__pyx_kp_u__67, __pyx_k__67, sizeof(__pyx_k__67), 0, 1, 0, 0},
  {&__pyx_kp_u__68, __pyx_k__68, sizeof(__pyx_k__68), 0, 1, 0, 0},
  {&__pyx_kp_u__69, __pyx_k__69, sizeof(__pyx_k__69), 0, 1, 0, 0},
  {&__pyx_kp_u__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 1, 0, 0},
  {&__pyx_kp_u__70, __pyx_k__70, sizeof(__pyx_k__70), 0, 1, 0, 0},
  {&__pyx_kp_u__71, __pyx_k__71, sizeof(__pyx_k__71), 0, 1, 0, 0},
  {&__pyx_kp_u__72, __pyx_k__72, sizeof(__pyx_k__72), 0, 1, 0, 0},
  {&__pyx_kp_u__73, __pyx_k__73, sizeof(__pyx_k__73), 0, 1, 0, 0},
  {&__pyx_kp_u__74, __pyx_k__74, sizeof(__pyx_k__74), 0, 1, 0, 0},
  {&__pyx_kp_u__75, __pyx_k__75, sizeof(__pyx_k__75), 0, 1, 0, 0},
  {&__pyx_kp_u__76, __pyx_k__76, sizeof(__pyx_k__76), 0, 1, 0, 0},
  {&__pyx_kp_u__77, __pyx_k__77, sizeof(__pyx_k__77), 0, 1, 0, 0},
  {&__pyx_kp_u__78, __pyx_k__78, sizeof(__pyx_k__78), 0, 1, 0, 0},
  {&__pyx_kp_u__79, __pyx_k__79, sizeof(__pyx_k__79), 0, 1, 0, 0},
  {&__pyx_kp_u__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 1, 0, 0},
  {&__pyx_kp_u__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 1, 0, 0},
  {&__pyx_kp_u_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 1, 0, 0},
  {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1},
  {&__pyx_n_u_add_grammar_source_to_parser_doc, __pyx_k_add_grammar_source_to_parser_doc, sizeof(__pyx_k_add_grammar_source_to_parser_doc), 0, 1, 0, 1},
  {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
  {&__pyx_kp_u_an, __pyx_k_an, sizeof(__pyx_k_an), 0, 1, 0, 0},
  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
  {&__pyx_n_s_arg, __pyx_k_arg, sizeof(__pyx_k_arg), 0, 0, 1, 1},
  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  {&__pyx_n_s_arguments, __pyx_k_arguments, sizeof(__pyx_k_arguments), 0, 0, 1, 1},
  {&__pyx_n_s_article, __pyx_k_article, sizeof(__pyx_k_article), 0, 0, 1, 1},
  {&__pyx_n_s_as_sxpr, __pyx_k_as_sxpr, sizeof(__pyx_k_as_sxpr), 0, 0, 1, 1},
  {&__pyx_n_s_assemble_parser, __pyx_k_assemble_parser, sizeof(__pyx_k_assemble_parser), 0, 0, 1, 1},
  {&__pyx_n_s_assert_content, __pyx_k_assert_content, sizeof(__pyx_k_assert_content), 0, 0, 1, 1},
  {&__pyx_n_s_basename, __pyx_k_basename, sizeof(__pyx_k_basename), 0, 0, 1, 1},
  {&__pyx_n_u_both, __pyx_k_both, sizeof(__pyx_k_both), 0, 1, 0, 1},
  {&__pyx_n_s_branding, __pyx_k_branding, sizeof(__pyx_k_branding), 0, 0, 1, 1},
  {&__pyx_kp_u_but_appears_in_the_transformati, __pyx_k_but_appears_in_the_transformati, sizeof(__pyx_k_but_appears_in_the_transformati), 0, 1, 0, 0},
  {&__pyx_n_s_cast, __pyx_k_cast, sizeof(__pyx_k_cast), 0, 0, 1, 1},
  {&__pyx_n_s_center, __pyx_k_center, sizeof(__pyx_k_center), 0, 0, 1, 1},
  {&__pyx_n_s_check, __pyx_k_check, sizeof(__pyx_k_check), 0, 0, 1, 1},
  {&__pyx_n_s_check_argnum, __pyx_k_check_argnum, sizeof(__pyx_k_check_argnum), 0, 0, 1, 1},
  {&__pyx_n_s_check_rx, __pyx_k_check_rx, sizeof(__pyx_k_check_rx), 0, 0, 1, 1},
  {&__pyx_n_s_child, __pyx_k_child, sizeof(__pyx_k_child), 0, 0, 1, 1},
  {&__pyx_n_s_children, __pyx_k_children, sizeof(__pyx_k_children), 0, 0, 1, 1},
  {&__pyx_n_s_chksum, __pyx_k_chksum, sizeof(__pyx_k_chksum), 0, 0, 1, 1},
  {&__pyx_kp_u_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 1, 0, 0},
  {&__pyx_kp_u_class_w_Grammar, __pyx_k_class_w_Grammar, sizeof(__pyx_k_class_w_Grammar), 0, 1, 0, 0},
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  {&__pyx_n_s_code, __pyx_k_code, sizeof(__pyx_k_code), 0, 0, 1, 1},
  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
  {&__pyx_n_s_comment, __pyx_k_comment, sizeof(__pyx_k_comment), 0, 0, 1, 1},
  {&__pyx_n_u_comment, __pyx_k_comment, sizeof(__pyx_k_comment), 0, 1, 0, 1},
  {&__pyx_kp_u_comment_2, __pyx_k_comment_2, sizeof(__pyx_k_comment_2), 0, 1, 0, 0},
  {&__pyx_n_s_compile, __pyx_k_compile, sizeof(__pyx_k_compile), 0, 0, 1, 1},
  {&__pyx_n_s_compile_ebnf, __pyx_k_compile_ebnf, sizeof(__pyx_k_compile_ebnf), 0, 0, 1, 1},
  {&__pyx_n_u_compile_ebnf, __pyx_k_compile_ebnf, sizeof(__pyx_k_compile_ebnf), 0, 1, 0, 1},
  {&__pyx_n_s_compile_source, __pyx_k_compile_source, sizeof(__pyx_k_compile_source), 0, 0, 1, 1},
  {&__pyx_n_s_compiler, __pyx_k_compiler, sizeof(__pyx_k_compiler), 0, 0, 1, 1},
  {&__pyx_n_s_consumed_custom_errors, __pyx_k_consumed_custom_errors, sizeof(__pyx_k_consumed_custom_errors), 0, 0, 1, 1},
  {&__pyx_n_s_consumed_skip_rules, __pyx_k_consumed_skip_rules, sizeof(__pyx_k_consumed_skip_rules), 0, 0, 1, 1},
  {&__pyx_n_s_content, __pyx_k_content, sizeof(__pyx_k_content), 0, 0, 1, 1},
  {&__pyx_n_s_context, __pyx_k_context, sizeof(__pyx_k_context), 0, 0, 1, 1},
  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
  {&__pyx_n_s_current_symbol, __pyx_k_current_symbol, sizeof(__pyx_k_current_symbol), 0, 0, 1, 1},
  {&__pyx_n_s_current_symbols, __pyx_k_current_symbols, sizeof(__pyx_k_current_symbols), 0, 0, 1, 1},
  {&__pyx_n_s_custom_args, __pyx_k_custom_args, sizeof(__pyx_k_custom_args), 0, 0, 1, 1},
  {&__pyx_n_s_custom_errors, __pyx_k_custom_errors, sizeof(__pyx_k_custom_errors), 0, 0, 1, 1},
  {&__pyx_kp_u_d_w, __pyx_k_d_w, sizeof(__pyx_k_d_w), 0, 1, 0, 0},
  {&__pyx_n_s_declarations, __pyx_k_declarations, sizeof(__pyx_k_declarations), 0, 0, 1, 1},
  {&__pyx_kp_u_def, __pyx_k_def, sizeof(__pyx_k_def), 0, 1, 0, 0},
  {&__pyx_kp_u_def_2, __pyx_k_def_2, sizeof(__pyx_k_def_2), 0, 1, 0, 0},
  {&__pyx_kp_u_def_NAME_Transform_Transformati, __pyx_k_def_NAME_Transform_Transformati, sizeof(__pyx_k_def_NAME_Transform_Transformati), 0, 1, 0, 0},
  {&__pyx_kp_u_def___init___self, __pyx_k_def___init___self, sizeof(__pyx_k_def___init___self), 0, 1, 0, 0},
  {&__pyx_kp_u_def__reset_self, __pyx_k_def__reset_self, sizeof(__pyx_k_def__reset_self), 0, 1, 0, 0},
  {&__pyx_kp_u_def_get_compiler_NAME_Compiler, __pyx_k_def_get_compiler_NAME_Compiler, sizeof(__pyx_k_def_get_compiler_NAME_Compiler), 0, 1, 0, 0},
  {&__pyx_kp_u_def_get_grammar_NAME_Grammar_gl, __pyx_k_def_get_grammar_NAME_Grammar_gl, sizeof(__pyx_k_def_get_grammar_NAME_Grammar_gl), 0, 1, 0, 0},
  {&__pyx_kp_u_def_get_preprocessor_Preprocess, __pyx_k_def_get_preprocessor_Preprocess, sizeof(__pyx_k_def_get_preprocessor_Preprocess), 0, 1, 0, 0},
  {&__pyx_n_s_def_node, __pyx_k_def_node, sizeof(__pyx_k_def_node), 0, 0, 1, 1},
  {&__pyx_kp_u_def_s_text_return_text_lambda_i, __pyx_k_def_s_text_return_text_lambda_i, sizeof(__pyx_k_def_s_text_return_text_lambda_i), 0, 1, 0, 0},
  {&__pyx_n_s_deferred_tasks, __pyx_k_deferred_tasks, sizeof(__pyx_k_deferred_tasks), 0, 0, 1, 1},
  {&__pyx_n_s_defined_directives, __pyx_k_defined_directives, sizeof(__pyx_k_defined_directives), 0, 0, 1, 1},
  {&__pyx_n_s_defined_symbols, __pyx_k_defined_symbols, sizeof(__pyx_k_defined_symbols), 0, 0, 1, 1},
  {&__pyx_n_s_definition, __pyx_k_definition, sizeof(__pyx_k_definition), 0, 0, 1, 1},
  {&__pyx_n_u_definition, __pyx_k_definition, sizeof(__pyx_k_definition), 0, 1, 0, 1},
  {&__pyx_n_s_definitions, __pyx_k_definitions, sizeof(__pyx_k_definitions), 0, 0, 1, 1},
  {&__pyx_n_s_defn, __pyx_k_defn, sizeof(__pyx_k_defn), 0, 0, 1, 1},
  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  {&__pyx_n_s_difference_update, __pyx_k_difference_update, sizeof(__pyx_k_difference_update), 0, 0, 1, 1},
  {&__pyx_n_s_directive, __pyx_k_directive, sizeof(__pyx_k_directive), 0, 0, 1, 1},
  {&__pyx_n_u_directive, __pyx_k_directive, sizeof(__pyx_k_directive), 0, 1, 0, 1},
  {&__pyx_kp_u_directive_definition, __pyx_k_directive_definition, sizeof(__pyx_k_directive_definition), 0, 1, 0, 0},
  {&__pyx_n_s_directives, __pyx_k_directives, sizeof(__pyx_k_directives), 0, 0, 1, 1},
  {&__pyx_n_s_dirty_flag, __pyx_k_dirty_flag, sizeof(__pyx_k_dirty_flag), 0, 0, 1, 1},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {&__pyx_n_s_drop, __pyx_k_drop, sizeof(__pyx_k_drop), 0, 0, 1, 1},
  {&__pyx_n_u_drop, __pyx_k_drop, sizeof(__pyx_k_drop), 0, 1, 0, 1},
  {&__pyx_n_u_dwsp, __pyx_k_dwsp, sizeof(__pyx_k_dwsp), 0, 1, 0, 1},
  {&__pyx_n_s_ebnf_compiler_singleton, __pyx_k_ebnf_compiler_singleton, sizeof(__pyx_k_ebnf_compiler_singleton), 0, 0, 1, 1},
  {&__pyx_n_s_ebnf_grammar_singleton, __pyx_k_ebnf_grammar_singleton, sizeof(__pyx_k_ebnf_grammar_singleton), 0, 0, 1, 1},
  {&__pyx_n_s_ebnf_source, __pyx_k_ebnf_source, sizeof(__pyx_k_ebnf_source), 0, 0, 1, 1},
  {&__pyx_n_s_encoding, __pyx_k_encoding, sizeof(__pyx_k_encoding), 0, 0, 1, 1},
  {&__pyx_n_s_endswith, __pyx_k_endswith, sizeof(__pyx_k_endswith), 0, 0, 1, 1},
  {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1},
  {&__pyx_n_s_entry, __pyx_k_entry, sizeof(__pyx_k_entry), 0, 0, 1, 1},
  {&__pyx_n_u_err_msg, __pyx_k_err_msg, sizeof(__pyx_k_err_msg), 0, 1, 0, 1},
  {&__pyx_kp_u_err_msgs, __pyx_k_err_msgs, sizeof(__pyx_k_err_msgs), 0, 1, 0, 0},
  {&__pyx_n_s_err_msgs_2, __pyx_k_err_msgs_2, sizeof(__pyx_k_err_msgs_2), 0, 0, 1, 1},
  {&__pyx_n_s_errmsg, __pyx_k_errmsg, sizeof(__pyx_k_errmsg), 0, 0, 1, 1},
  {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
  {&__pyx_n_u_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 1, 0, 1},
  {&__pyx_kp_u_error_2, __pyx_k_error_2, sizeof(__pyx_k_error_2), 0, 1, 0, 0},
  {&__pyx_n_u_error_3, __pyx_k_error_3, sizeof(__pyx_k_error_3), 0, 1, 0, 1},
  {&__pyx_n_s_error_customization, __pyx_k_error_customization, sizeof(__pyx_k_error_customization), 0, 0, 1, 1},
  {&__pyx_n_s_error_msgs, __pyx_k_error_msgs, sizeof(__pyx_k_error_msgs), 0, 0, 1, 1},
  {&__pyx_n_s_errors, __pyx_k_errors, sizeof(__pyx_k_errors), 0, 0, 1, 1},
  {&__pyx_n_s_escape_re, __pyx_k_escape_re, sizeof(__pyx_k_escape_re), 0, 0, 1, 1},
  {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
  {&__pyx_n_s_expand_table, __pyx_k_expand_table, sizeof(__pyx_k_expand_table), 0, 0, 1, 1},
  {&__pyx_n_s_expression, __pyx_k_expression, sizeof(__pyx_k_expression), 0, 0, 1, 1},
  {&__pyx_n_u_expression, __pyx_k_expression, sizeof(__pyx_k_expression), 0, 1, 0, 1},
  {&__pyx_n_s_extract_regex, __pyx_k_extract_regex, sizeof(__pyx_k_extract_regex), 0, 0, 1, 1},
  {&__pyx_n_s_extract_tb, __pyx_k_extract_tb, sizeof(__pyx_k_extract_tb), 0, 0, 1, 1},
  {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1},
  {&__pyx_n_s_factor, __pyx_k_factor, sizeof(__pyx_k_factor), 0, 0, 1, 1},
  {&__pyx_kp_u_factor_flowmarker_retrieveop, __pyx_k_factor_flowmarker_retrieveop, sizeof(__pyx_k_factor_flowmarker_retrieveop), 0, 1, 0, 0},
  {&__pyx_n_u_false, __pyx_k_false, sizeof(__pyx_k_false), 0, 1, 0, 1},
  {&__pyx_n_s_filter, __pyx_k_filter, sizeof(__pyx_k_filter), 0, 0, 1, 1},
  {&__pyx_n_u_filter, __pyx_k_filter, sizeof(__pyx_k_filter), 0, 1, 0, 1},
  {&__pyx_n_u_filter_2, __pyx_k_filter_2, sizeof(__pyx_k_filter_2), 0, 1, 0, 1},
  {&__pyx_n_s_filtered_children, __pyx_k_filtered_children, sizeof(__pyx_k_filtered_children), 0, 0, 1, 1},
  {&__pyx_n_s_filtered_result, __pyx_k_filtered_result, sizeof(__pyx_k_filtered_result), 0, 0, 1, 1},
  {&__pyx_n_s_find, __pyx_k_find, sizeof(__pyx_k_find), 0, 0, 1, 1},
  {&__pyx_n_s_first, __pyx_k_first, sizeof(__pyx_k_first), 0, 0, 1, 1},
  {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
  {&__pyx_n_s_flatten, __pyx_k_flatten, sizeof(__pyx_k_flatten), 0, 0, 1, 1},
  {&__pyx_kp_u_flatten_anonymous_nodes, __pyx_k_flatten_anonymous_nodes, sizeof(__pyx_k_flatten_anonymous_nodes), 0, 1, 0, 0},
  {&__pyx_n_s_flowmarker, __pyx_k_flowmarker, sizeof(__pyx_k_flowmarker), 0, 0, 1, 1},
  {&__pyx_n_s_forbid, __pyx_k_forbid, sizeof(__pyx_k_forbid), 0, 0, 1, 1},
  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  {&__pyx_n_s_fullmatch, __pyx_k_fullmatch, sizeof(__pyx_k_fullmatch), 0, 0, 1, 1},
  {&__pyx_n_s_functools, __pyx_k_functools, sizeof(__pyx_k_functools), 0, 0, 1, 1},
  {&__pyx_n_s_gen_compiler_skeleton, __pyx_k_gen_compiler_skeleton, sizeof(__pyx_k_gen_compiler_skeleton), 0, 0, 1, 1},
  {&__pyx_n_s_gen_preprocessor_skeleton, __pyx_k_gen_preprocessor_skeleton, sizeof(__pyx_k_gen_preprocessor_skeleton), 0, 0, 1, 1},
  {&__pyx_n_s_gen_search_list, __pyx_k_gen_search_list, sizeof(__pyx_k_gen_search_list), 0, 0, 1, 1},
  {&__pyx_n_s_gen_search_rule, __pyx_k_gen_search_rule, sizeof(__pyx_k_gen_search_rule), 0, 0, 1, 1},
  {&__pyx_n_s_gen_transformer_skeleton, __pyx_k_gen_transformer_skeleton, sizeof(__pyx_k_gen_transformer_skeleton), 0, 0, 1, 1},
  {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1},
  {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
  {&__pyx_n_s_get_config_value, __pyx_k_get_config_value, sizeof(__pyx_k_get_config_value), 0, 0, 1, 1},
  {&__pyx_n_s_get_ebnf_compiler, __pyx_k_get_ebnf_compiler, sizeof(__pyx_k_get_ebnf_compiler), 0, 0, 1, 1},
  {&__pyx_n_u_get_ebnf_compiler, __pyx_k_get_ebnf_compiler, sizeof(__pyx_k_get_ebnf_compiler), 0, 1, 0, 1},
  {&__pyx_n_s_get_ebnf_grammar, __pyx_k_get_ebnf_grammar, sizeof(__pyx_k_get_ebnf_grammar), 0, 0, 1, 1},
  {&__pyx_n_u_get_ebnf_grammar, __pyx_k_get_ebnf_grammar, sizeof(__pyx_k_get_ebnf_grammar), 0, 1, 0, 1},
  {&__pyx_n_s_get_ebnf_preprocessor, __pyx_k_get_ebnf_preprocessor, sizeof(__pyx_k_get_ebnf_preprocessor), 0, 0, 1, 1},
  {&__pyx_n_u_get_ebnf_preprocessor, __pyx_k_get_ebnf_preprocessor, sizeof(__pyx_k_get_ebnf_preprocessor), 0, 1, 0, 1},
  {&__pyx_n_s_get_ebnf_transformer, __pyx_k_get_ebnf_transformer, sizeof(__pyx_k_get_ebnf_transformer), 0, 0, 1, 1},
  {&__pyx_n_u_get_ebnf_transformer, __pyx_k_get_ebnf_transformer, sizeof(__pyx_k_get_ebnf_transformer), 0, 1, 0, 1},
  {&__pyx_n_s_getitem, __pyx_k_getitem, sizeof(__pyx_k_getitem), 0, 0, 1, 1},
  {&__pyx_kp_u_grammar, __pyx_k_grammar, sizeof(__pyx_k_grammar), 0, 1, 0, 0},
  {&__pyx_n_s_grammar_2, __pyx_k_grammar_2, sizeof(__pyx_k_grammar_2), 0, 0, 1, 1},
  {&__pyx_n_s_grammar_changed, __pyx_k_grammar_changed, sizeof(__pyx_k_grammar_changed), 0, 0, 1, 1},
  {&__pyx_n_u_grammar_changed, __pyx_k_grammar_changed, sizeof(__pyx_k_grammar_changed), 0, 1, 0, 1},
  {&__pyx_n_s_grammar_class, __pyx_k_grammar_class, sizeof(__pyx_k_grammar_class), 0, 0, 1, 1},
  {&__pyx_n_s_grammar_id, __pyx_k_grammar_id, sizeof(__pyx_k_grammar_id), 0, 0, 1, 1},
  {&__pyx_n_s_grammar_name, __pyx_k_grammar_name, sizeof(__pyx_k_grammar_name), 0, 0, 1, 1},
  {&__pyx_n_s_grammar_source, __pyx_k_grammar_source, sizeof(__pyx_k_grammar_source), 0, 0, 1, 1},
  {&__pyx_n_s_group, __pyx_k_group, sizeof(__pyx_k_group), 0, 0, 1, 1},
  {&__pyx_n_u_group, __pyx_k_group, sizeof(__pyx_k_group), 0, 1, 0, 1},
  {&__pyx_n_s_groups, __pyx_k_groups, sizeof(__pyx_k_groups), 0, 0, 1, 1},
  {&__pyx_n_u_horizontal, __pyx_k_horizontal, sizeof(__pyx_k_horizontal), 0, 1, 0, 1},
  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {&__pyx_n_u_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 1, 0, 1},
  {&__pyx_n_u_ignorecase, __pyx_k_ignorecase, sizeof(__pyx_k_ignorecase), 0, 1, 0, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {&__pyx_kp_u_initialize_your_variables_here, __pyx_k_initialize_your_variables_here, sizeof(__pyx_k_initialize_your_variables_here), 0, 1, 0, 0},
  {&__pyx_n_u_int, __pyx_k_int, sizeof(__pyx_k_int), 0, 1, 0, 1},
  {&__pyx_n_s_is_anonymous, __pyx_k_is_anonymous, sizeof(__pyx_k_is_anonymous), 0, 0, 1, 1},
  {&__pyx_kp_u_is_not_connected_to_parser_root, __pyx_k_is_not_connected_to_parser_root, sizeof(__pyx_k_is_not_connected_to_parser_root), 0, 1, 0, 0},
  {&__pyx_kp_u_is_not_defined_in_grammar, __pyx_k_is_not_defined_in_grammar, sizeof(__pyx_k_is_not_defined_in_grammar), 0, 1, 0, 0},
  {&__pyx_n_s_isidentifier, __pyx_k_isidentifier, sizeof(__pyx_k_isidentifier), 0, 0, 1, 1},
  {&__pyx_n_s_iskeyword, __pyx_k_iskeyword, sizeof(__pyx_k_iskeyword), 0, 0, 1, 1},
  {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
  {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
  {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
  {&__pyx_n_s_keyword, __pyx_k_keyword, sizeof(__pyx_k_keyword), 0, 0, 1, 1},
  {&__pyx_n_s_left, __pyx_k_left, sizeof(__pyx_k_left), 0, 0, 1, 1},
  {&__pyx_n_u_left, __pyx_k_left, sizeof(__pyx_k_left), 0, 1, 0, 1},
  {&__pyx_n_s_leftover, __pyx_k_leftover, sizeof(__pyx_k_leftover), 0, 0, 1, 1},
  {&__pyx_n_s_line, __pyx_k_line, sizeof(__pyx_k_line), 0, 0, 1, 1},
  {&__pyx_n_u_linefeed, __pyx_k_linefeed, sizeof(__pyx_k_linefeed), 0, 1, 0, 1},
  {&__pyx_n_s_literal, __pyx_k_literal, sizeof(__pyx_k_literal), 0, 0, 1, 1},
  {&__pyx_n_u_literal, __pyx_k_literal, sizeof(__pyx_k_literal), 0, 1, 0, 1},
  {&__pyx_n_s_literalws, __pyx_k_literalws, sizeof(__pyx_k_literalws), 0, 0, 1, 1},
  {&__pyx_n_u_literalws, __pyx_k_literalws, sizeof(__pyx_k_literalws), 0, 1, 0, 1},
  {&__pyx_n_s_load_if_file, __pyx_k_load_if_file, sizeof(__pyx_k_load_if_file), 0, 0, 1, 1},
  {&__pyx_n_s_lower, __pyx_k_lower, sizeof(__pyx_k_lower), 0, 0, 1, 1},
  {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_kp_u_malformed_regular_expression, __pyx_k_malformed_regular_expression, sizeof(__pyx_k_malformed_regular_expression), 0, 1, 0, 0},
  {&__pyx_n_s_mandatory, __pyx_k_mandatory, sizeof(__pyx_k_mandatory), 0, 0, 1, 1},
  {&__pyx_kp_u_mandatory_i, __pyx_k_mandatory_i, sizeof(__pyx_k_mandatory_i), 0, 1, 0, 0},
  {&__pyx_n_s_mandatory_marker, __pyx_k_mandatory_marker, sizeof(__pyx_k_mandatory_marker), 0, 0, 1, 1},
  {&__pyx_n_s_match, __pyx_k_match, sizeof(__pyx_k_match), 0, 0, 1, 1},
  {&__pyx_n_s_md5, __pyx_k_md5, sizeof(__pyx_k_md5), 0, 0, 1, 1},
  {&__pyx_n_s_message, __pyx_k_message, sizeof(__pyx_k_message), 0, 0, 1, 1},
  {&__pyx_n_s_messages, __pyx_k_messages, sizeof(__pyx_k_messages), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_method_name, __pyx_k_method_name, sizeof(__pyx_k_method_name), 0, 0, 1, 1},
  {&__pyx_n_s_mixin_comment, __pyx_k_mixin_comment, sizeof(__pyx_k_mixin_comment), 0, 0, 1, 1},
  {&__pyx_kp_u_mixin_comment_whitespace, __pyx_k_mixin_comment_whitespace, sizeof(__pyx_k_mixin_comment_whitespace), 0, 1, 0, 0},
  {&__pyx_n_s_mock_node, __pyx_k_mock_node, sizeof(__pyx_k_mock_node), 0, 0, 1, 1},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {&__pyx_kp_u_must_be_defined_before_the_symbo, __pyx_k_must_be_defined_before_the_symbo, sizeof(__pyx_k_must_be_defined_before_the_symbo), 0, 1, 0, 0},
  {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1},
  {&__pyx_kp_u_n_2, __pyx_k_n_2, sizeof(__pyx_k_n_2), 0, 1, 0, 0},
  {&__pyx_kp_u_n_3, __pyx_k_n_3, sizeof(__pyx_k_n_3), 0, 1, 0, 0},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
  {&__pyx_n_s_nd, __pyx_k_nd, sizeof(__pyx_k_nd), 0, 0, 1, 1},
  {&__pyx_n_s_new_error, __pyx_k_new_error, sizeof(__pyx_k_new_error), 0, 0, 1, 1},
  {&__pyx_n_s_nil_preprocessor, __pyx_k_nil_preprocessor, sizeof(__pyx_k_nil_preprocessor), 0, 0, 1, 1},
  {&__pyx_n_u_no, __pyx_k_no, sizeof(__pyx_k_no), 0, 1, 0, 1},
  {&__pyx_n_s_node, __pyx_k_node, sizeof(__pyx_k_node), 0, 0, 1, 1},
  {&__pyx_n_s_node_type, __pyx_k_node_type, sizeof(__pyx_k_node_type), 0, 0, 1, 1},
  {&__pyx_n_s_nodes, __pyx_k_nodes, sizeof(__pyx_k_nodes), 0, 0, 1, 1},
  {&__pyx_n_s_non_terminal, __pyx_k_non_terminal, sizeof(__pyx_k_non_terminal), 0, 0, 1, 1},
  {&__pyx_n_u_none, __pyx_k_none, sizeof(__pyx_k_none), 0, 1, 0, 1},
  {&__pyx_kp_u_not_allowed_for_directive, __pyx_k_not_allowed_for_directive, sizeof(__pyx_k_not_allowed_for_directive), 0, 1, 0, 0},
  {&__pyx_n_u_off, __pyx_k_off, sizeof(__pyx_k_off), 0, 1, 0, 1},
  {&__pyx_n_s_on_definition, __pyx_k_on_definition, sizeof(__pyx_k_on_definition), 0, 0, 1, 1},
  {&__pyx_n_s_on_directive, __pyx_k_on_directive, sizeof(__pyx_k_on_directive), 0, 0, 1, 1},
  {&__pyx_n_s_on_expression, __pyx_k_on_expression, sizeof(__pyx_k_on_expression), 0, 0, 1, 1},
  {&__pyx_n_s_on_factor, __pyx_k_on_factor, sizeof(__pyx_k_on_factor), 0, 0, 1, 1},
  {&__pyx_n_s_on_group, __pyx_k_on_group, sizeof(__pyx_k_on_group), 0, 0, 1, 1},
  {&__pyx_n_s_on_literal, __pyx_k_on_literal, sizeof(__pyx_k_on_literal), 0, 0, 1, 1},
  {&__pyx_n_s_on_oneormore, __pyx_k_on_oneormore, sizeof(__pyx_k_on_oneormore), 0, 0, 1, 1},
  {&__pyx_n_s_on_option, __pyx_k_on_option, sizeof(__pyx_k_on_option), 0, 0, 1, 1},
  {&__pyx_n_s_on_plaintext, __pyx_k_on_plaintext, sizeof(__pyx_k_on_plaintext), 0, 0, 1, 1},
  {&__pyx_n_s_on_regexp, __pyx_k_on_regexp, sizeof(__pyx_k_on_regexp), 0, 0, 1, 1},
  {&__pyx_n_s_on_repetition, __pyx_k_on_repetition, sizeof(__pyx_k_on_repetition), 0, 0, 1, 1},
  {&__pyx_n_s_on_symbol, __pyx_k_on_symbol, sizeof(__pyx_k_on_symbol), 0, 0, 1, 1},
  {&__pyx_n_s_on_syntax, __pyx_k_on_syntax, sizeof(__pyx_k_on_syntax), 0, 0, 1, 1},
  {&__pyx_n_s_on_term, __pyx_k_on_term, sizeof(__pyx_k_on_term), 0, 0, 1, 1},
  {&__pyx_n_s_on_unordered, __pyx_k_on_unordered, sizeof(__pyx_k_on_unordered), 0, 0, 1, 1},
  {&__pyx_n_s_on_whitespace, __pyx_k_on_whitespace, sizeof(__pyx_k_on_whitespace), 0, 0, 1, 1},
  {&__pyx_n_s_oneormore, __pyx_k_oneormore, sizeof(__pyx_k_oneormore), 0, 0, 1, 1},
  {&__pyx_n_u_oneormore, __pyx_k_oneormore, sizeof(__pyx_k_oneormore), 0, 1, 0, 1},
  {&__pyx_kp_u_oneormore_repetition_option, __pyx_k_oneormore_repetition_option, sizeof(__pyx_k_oneormore_repetition_option), 0, 1, 0, 0},
  {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1},
  {&__pyx_n_s_option, __pyx_k_option, sizeof(__pyx_k_option), 0, 0, 1, 1},
  {&__pyx_n_u_option, __pyx_k_option, sizeof(__pyx_k_option), 0, 1, 0, 1},
  {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
  {&__pyx_n_s_parser, __pyx_k_parser, sizeof(__pyx_k_parser), 0, 0, 1, 1},
  {&__pyx_n_s_parser_class, __pyx_k_parser_class, sizeof(__pyx_k_parser_class), 0, 0, 1, 1},
  {&__pyx_n_s_parser_initialization, __pyx_k_parser_initialization, sizeof(__pyx_k_parser_initialization), 0, 0, 1, 1},
  {&__pyx_n_u_parser_initialization, __pyx_k_parser_initialization, sizeof(__pyx_k_parser_initialization), 0, 1, 0, 1},
  {&__pyx_n_s_partial, __pyx_k_partial, sizeof(__pyx_k_partial), 0, 0, 1, 1},
  {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
  {&__pyx_n_s_plaintext, __pyx_k_plaintext, sizeof(__pyx_k_plaintext), 0, 0, 1, 1},
  {&__pyx_n_s_prefix, __pyx_k_prefix, sizeof(__pyx_k_prefix), 0, 0, 1, 1},
  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
  {&__pyx_n_u_preprocessor_tokens, __pyx_k_preprocessor_tokens, sizeof(__pyx_k_preprocessor_tokens), 0, 1, 0, 1},
  {&__pyx_n_s_processing_table, __pyx_k_processing_table, sizeof(__pyx_k_processing_table), 0, 0, 1, 1},
  {&__pyx_n_s_property, __pyx_k_property, sizeof(__pyx_k_property), 0, 0, 1, 1},
  {&__pyx_n_s_pycode, __pyx_k_pycode, sizeof(__pyx_k_pycode), 0, 0, 1, 1},
  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
  {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1},
  {&__pyx_n_u_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 1, 0, 1},
  {&__pyx_kp_u_r_2, __pyx_k_r_2, sizeof(__pyx_k_r_2), 0, 1, 0, 0},
  {&__pyx_kp_u_r_Parser_for, __pyx_k_r_Parser_for, sizeof(__pyx_k_r_Parser_for), 0, 1, 0, 0},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_raw_rules, __pyx_k_raw_rules, sizeof(__pyx_k_raw_rules), 0, 0, 1, 1},
  {&__pyx_n_s_re, __pyx_k_re, sizeof(__pyx_k_re), 0, 0, 1, 1},
  {&__pyx_kp_u_re_compile_r_s, __pyx_k_re_compile_r_s, sizeof(__pyx_k_re_compile_r_s), 0, 1, 0, 0},
  {&__pyx_n_s_re_error, __pyx_k_re_error, sizeof(__pyx_k_re_error), 0, 0, 1, 1},
  {&__pyx_n_s_re_flags, __pyx_k_re_flags, sizeof(__pyx_k_re_flags), 0, 0, 1, 1},
  {&__pyx_n_s_read, __pyx_k_read, sizeof(__pyx_k_read), 0, 0, 1, 1},
  {&__pyx_n_s_recursive, __pyx_k_recursive, sizeof(__pyx_k_recursive), 0, 0, 1, 1},
  {&__pyx_n_s_redeclared, __pyx_k_redeclared, sizeof(__pyx_k_redeclared), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_single_child, __pyx_k_reduce_single_child, sizeof(__pyx_k_reduce_single_child), 0, 0, 1, 1},
  {&__pyx_n_s_refined, __pyx_k_refined, sizeof(__pyx_k_refined), 0, 0, 1, 1},
  {&__pyx_n_s_refined_rules, __pyx_k_refined_rules, sizeof(__pyx_k_refined_rules), 0, 0, 1, 1},
  {&__pyx_n_s_regexp, __pyx_k_regexp, sizeof(__pyx_k_regexp), 0, 0, 1, 1},
  {&__pyx_n_u_regexp, __pyx_k_regexp, sizeof(__pyx_k_regexp), 0, 1, 0, 1},
  {&__pyx_kp_u_regular_expression_or_search_st, __pyx_k_regular_expression_or_search_st, sizeof(__pyx_k_regular_expression_or_search_st), 0, 1, 0, 0},
  {&__pyx_n_s_related, __pyx_k_related, sizeof(__pyx_k_related), 0, 0, 1, 1},
  {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1},
  {&__pyx_n_s_remove_brackets, __pyx_k_remove_brackets, sizeof(__pyx_k_remove_brackets), 0, 0, 1, 1},
  {&__pyx_n_s_remove_connections, __pyx_k_remove_connections, sizeof(__pyx_k_remove_connections), 0, 0, 1, 1},
  {&__pyx_n_s_remove_expendables, __pyx_k_remove_expendables, sizeof(__pyx_k_remove_expendables), 0, 0, 1, 1},
  {&__pyx_n_s_remove_tokens, __pyx_k_remove_tokens, sizeof(__pyx_k_remove_tokens), 0, 0, 1, 1},
  {&__pyx_n_s_repetition, __pyx_k_repetition, sizeof(__pyx_k_repetition), 0, 0, 1, 1},
  {&__pyx_n_u_repetition, __pyx_k_repetition, sizeof(__pyx_k_repetition), 0, 1, 0, 1},
  {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1},
  {&__pyx_kp_u_replace_by_single_child, __pyx_k_replace_by_single_child, sizeof(__pyx_k_replace_by_single_child), 0, 1, 0, 0},
  {&__pyx_n_s_replace_by_single_child_2, __pyx_k_replace_by_single_child_2, sizeof(__pyx_k_replace_by_single_child_2), 0, 0, 1, 1},
  {&__pyx_kp_u_requires_a_symbol_and_not_a, __pyx_k_requires_a_symbol_and_not_a, sizeof(__pyx_k_requires_a_symbol_and_not_a), 0, 1, 0, 0},
  {&__pyx_n_s_reset, __pyx_k_reset, sizeof(__pyx_k_reset), 0, 0, 1, 1},
  {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
  {&__pyx_n_s_result_2, __pyx_k_result_2, sizeof(__pyx_k_result_2), 0, 0, 1, 1},
  {&__pyx_n_s_resume, __pyx_k_resume, sizeof(__pyx_k_resume), 0, 0, 1, 1},
  {&__pyx_n_u_resume, __pyx_k_resume, sizeof(__pyx_k_resume), 0, 1, 0, 1},
  {&__pyx_n_u_resume_2, __pyx_k_resume_2, sizeof(__pyx_k_resume_2), 0, 1, 0, 1},
  {&__pyx_n_u_resume_rules, __pyx_k_resume_rules, sizeof(__pyx_k_resume_rules), 0, 1, 0, 1},
  {&__pyx_n_s_resume_rules_2, __pyx_k_resume_rules_2, sizeof(__pyx_k_resume_rules_2), 0, 0, 1, 1},
  {&__pyx_n_s_retrieveop, __pyx_k_retrieveop, sizeof(__pyx_k_retrieveop), 0, 0, 1, 1},
  {&__pyx_n_s_return, __pyx_k_return, sizeof(__pyx_k_return), 0, 0, 1, 1},
  {&__pyx_kp_u_return_node, __pyx_k_return_node, sizeof(__pyx_k_return_node), 0, 1, 0, 0},
  {&__pyx_kp_u_return_self_fallback_compiler_n, __pyx_k_return_self_fallback_compiler_n, sizeof(__pyx_k_return_self_fallback_compiler_n), 0, 1, 0, 0},
  {&__pyx_n_s_reverse, __pyx_k_reverse, sizeof(__pyx_k_reverse), 0, 0, 1, 1},
  {&__pyx_n_s_reversed, __pyx_k_reversed, sizeof(__pyx_k_reversed), 0, 0, 1, 1},
  {&__pyx_kp_u_rfilter_s, __pyx_k_rfilter_s, sizeof(__pyx_k_rfilter_s), 0, 1, 0, 0},
  {&__pyx_n_s_right, __pyx_k_right, sizeof(__pyx_k_right), 0, 0, 1, 1},
  {&__pyx_n_u_right, __pyx_k_right, sizeof(__pyx_k_right), 0, 1, 0, 1},
  {&__pyx_n_s_root, __pyx_k_root, sizeof(__pyx_k_root), 0, 0, 1, 1},
  {&__pyx_n_u_root, __pyx_k_root, sizeof(__pyx_k_root), 0, 1, 0, 1},
  {&__pyx_kp_u_root_2, __pyx_k_root_2, sizeof(__pyx_k_root_2), 0, 1, 0, 0},
  {&__pyx_n_s_root_node, __pyx_k_root_node, sizeof(__pyx_k_root_node), 0, 0, 1, 1},
  {&__pyx_n_s_root_symbol, __pyx_k_root_symbol, sizeof(__pyx_k_root_symbol), 0, 0, 1, 1},
  {&__pyx_n_s_rpl, __pyx_k_rpl, sizeof(__pyx_k_rpl), 0, 0, 1, 1},
  {&__pyx_n_s_rule, __pyx_k_rule, sizeof(__pyx_k_rule), 0, 0, 1, 1},
  {&__pyx_n_s_rules, __pyx_k_rules, sizeof(__pyx_k_rules), 0, 0, 1, 1},
  {&__pyx_n_s_rx, __pyx_k_rx, sizeof(__pyx_k_rx), 0, 0, 1, 1},
  {&__pyx_kp_u_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 1, 0, 0},
  {&__pyx_n_s_s_2, __pyx_k_s_2, sizeof(__pyx_k_s_2), 0, 0, 1, 1},
  {&__pyx_kp_u_s_3, __pyx_k_s_3, sizeof(__pyx_k_s_3), 0, 1, 0, 0},
  {&__pyx_kp_u_s_4, __pyx_k_s_4, sizeof(__pyx_k_s_4), 0, 1, 0, 0},
  {&__pyx_n_s_sane_parser_name, __pyx_k_sane_parser_name, sizeof(__pyx_k_sane_parser_name), 0, 0, 1, 1},
  {&__pyx_n_s_search, __pyx_k_search, sizeof(__pyx_k_search), 0, 0, 1, 1},
  {&__pyx_n_s_search_list, __pyx_k_search_list, sizeof(__pyx_k_search_list), 0, 0, 1, 1},
  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {&__pyx_kp_u_self_node, __pyx_k_self_node, sizeof(__pyx_k_self_node), 0, 1, 0, 0},
  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
  {&__pyx_kp_u_set, __pyx_k_set, sizeof(__pyx_k_set), 0, 1, 0, 0},
  {&__pyx_n_s_set_2, __pyx_k_set_2, sizeof(__pyx_k_set_2), 0, 0, 1, 1},
  {&__pyx_n_s_set_grammar_name, __pyx_k_set_grammar_name, sizeof(__pyx_k_set_grammar_name), 0, 0, 1, 1},
  {&__pyx_n_s_setitem, __pyx_k_setitem, sizeof(__pyx_k_setitem), 0, 0, 1, 1},
  {&__pyx_n_s_show_source, __pyx_k_show_source, sizeof(__pyx_k_show_source), 0, 0, 1, 1},
  {&__pyx_n_s_skip, __pyx_k_skip, sizeof(__pyx_k_skip), 0, 0, 1, 1},
  {&__pyx_n_u_skip, __pyx_k_skip, sizeof(__pyx_k_skip), 0, 1, 0, 1},
  {&__pyx_n_u_skip_2, __pyx_k_skip_2, sizeof(__pyx_k_skip_2), 0, 1, 0, 1},
  {&__pyx_kp_u_skip_3, __pyx_k_skip_3, sizeof(__pyx_k_skip_3), 0, 1, 0, 0},
  {&__pyx_n_u_skip_4, __pyx_k_skip_4, sizeof(__pyx_k_skip_4), 0, 1, 0, 1},
  {&__pyx_n_s_skip_rules, __pyx_k_skip_rules, sizeof(__pyx_k_skip_rules), 0, 0, 1, 1},
  {&__pyx_n_s_slots, __pyx_k_slots, sizeof(__pyx_k_slots), 0, 0, 1, 1},
  {&__pyx_kp_u_source_file, __pyx_k_source_file, sizeof(__pyx_k_source_file), 0, 1, 0, 0},
  {&__pyx_kp_u_source_file_2, __pyx_k_source_file_2, sizeof(__pyx_k_source_file_2), 0, 1, 0, 0},
  {&__pyx_n_s_source_hash, __pyx_k_source_hash, sizeof(__pyx_k_source_hash), 0, 0, 1, 1},
  {&__pyx_n_u_source_hash, __pyx_k_source_hash, sizeof(__pyx_k_source_hash), 0, 1, 0, 1},
  {&__pyx_kp_u_source_hash___a_z0_9, __pyx_k_source_hash___a_z0_9, sizeof(__pyx_k_source_hash___a_z0_9), 0, 1, 0, 0},
  {&__pyx_n_s_span, __pyx_k_span, sizeof(__pyx_k_span), 0, 0, 1, 1},
  {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
  {&__pyx_n_s_splitext, __pyx_k_splitext, sizeof(__pyx_k_splitext), 0, 0, 1, 1},
  {&__pyx_n_s_startswith, __pyx_k_startswith, sizeof(__pyx_k_startswith), 0, 0, 1, 1},
  {&__pyx_n_s_statement, __pyx_k_statement, sizeof(__pyx_k_statement), 0, 0, 1, 1},
  {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1},
  {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
  {&__pyx_kp_u_super_2, __pyx_k_super_2, sizeof(__pyx_k_super_2), 0, 1, 0, 0},
  {&__pyx_kp_u_super__reset, __pyx_k_super__reset, sizeof(__pyx_k_super__reset), 0, 1, 0, 0},
  {&__pyx_n_s_symbol, __pyx_k_symbol, sizeof(__pyx_k_symbol), 0, 0, 1, 1},
  {&__pyx_n_u_symbol, __pyx_k_symbol, sizeof(__pyx_k_symbol), 0, 1, 0, 1},
  {&__pyx_kp_u_symbol_literal_regexp, __pyx_k_symbol_literal_regexp, sizeof(__pyx_k_symbol_literal_regexp), 0, 1, 0, 0},
  {&__pyx_n_s_symbols, __pyx_k_symbols, sizeof(__pyx_k_symbols), 0, 0, 1, 1},
  {&__pyx_n_s_symlist, __pyx_k_symlist, sizeof(__pyx_k_symlist), 0, 0, 1, 1},
  {&__pyx_n_s_syntax, __pyx_k_syntax, sizeof(__pyx_k_syntax), 0, 0, 1, 1},
  {&__pyx_n_u_syntax, __pyx_k_syntax, sizeof(__pyx_k_syntax), 0, 1, 0, 1},
  {&__pyx_kp_u_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 1, 0, 0},
  {&__pyx_kp_u_t_n_s_n_t, __pyx_k_t_n_s_n_t, sizeof(__pyx_k_t_n_s_n_t), 0, 1, 0, 0},
  {&__pyx_n_s_table_entries, __pyx_k_table_entries, sizeof(__pyx_k_table_entries), 0, 0, 1, 1},
  {&__pyx_n_s_tag_name, __pyx_k_tag_name, sizeof(__pyx_k_tag_name), 0, 0, 1, 1},
  {&__pyx_n_s_task, __pyx_k_task, sizeof(__pyx_k_task), 0, 0, 1, 1},
  {&__pyx_n_s_term, __pyx_k_term, sizeof(__pyx_k_term), 0, 0, 1, 1},
  {&__pyx_n_u_term, __pyx_k_term, sizeof(__pyx_k_term), 0, 1, 0, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
  {&__pyx_n_s_tk, __pyx_k_tk, sizeof(__pyx_k_tk), 0, 0, 1, 1},
  {&__pyx_n_u_token, __pyx_k_token, sizeof(__pyx_k_token), 0, 1, 0, 1},
  {&__pyx_n_s_tokens, __pyx_k_tokens, sizeof(__pyx_k_tokens), 0, 0, 1, 1},
  {&__pyx_n_u_tokens, __pyx_k_tokens, sizeof(__pyx_k_tokens), 0, 1, 0, 1},
  {&__pyx_n_s_trace, __pyx_k_trace, sizeof(__pyx_k_trace), 0, 0, 1, 1},
  {&__pyx_n_s_traceback, __pyx_k_traceback, sizeof(__pyx_k_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_traceback_2, __pyx_k_traceback_2, sizeof(__pyx_k_traceback_2), 0, 0, 1, 1},
  {&__pyx_n_s_transformations, __pyx_k_transformations, sizeof(__pyx_k_transformations), 0, 0, 1, 1},
  {&__pyx_n_s_transformer, __pyx_k_transformer, sizeof(__pyx_k_transformer), 0, 0, 1, 1},
  {&__pyx_n_s_transtable, __pyx_k_transtable, sizeof(__pyx_k_transtable), 0, 0, 1, 1},
  {&__pyx_n_s_traverse, __pyx_k_traverse, sizeof(__pyx_k_traverse), 0, 0, 1, 1},
  {&__pyx_n_s_tree, __pyx_k_tree, sizeof(__pyx_k_tree), 0, 0, 1, 1},
  {&__pyx_n_s_tt_name, __pyx_k_tt_name, sizeof(__pyx_k_tt_name), 0, 0, 1, 1},
  {&__pyx_n_s_typing, __pyx_k_typing, sizeof(__pyx_k_typing), 0, 0, 1, 1},
  {&__pyx_n_u_unicode, __pyx_k_unicode, sizeof(__pyx_k_unicode), 0, 1, 0, 1},
  {&__pyx_n_s_unordered, __pyx_k_unordered, sizeof(__pyx_k_unordered), 0, 0, 1, 1},
  {&__pyx_n_u_unordered, __pyx_k_unordered, sizeof(__pyx_k_unordered), 0, 1, 0, 1},
  {&__pyx_n_s_unrepr, __pyx_k_unrepr, sizeof(__pyx_k_unrepr), 0, 0, 1, 1},
  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  {&__pyx_kp_u_upon_instantiation, __pyx_k_upon_instantiation, sizeof(__pyx_k_upon_instantiation), 0, 1, 0, 0},
  {&__pyx_kp_u_upon_instantiation_2, __pyx_k_upon_instantiation_2, sizeof(__pyx_k_upon_instantiation_2), 0, 1, 0, 0},
  {&__pyx_n_u_utf8, __pyx_k_utf8, sizeof(__pyx_k_utf8), 0, 1, 0, 1},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
  {&__pyx_n_s_variables, __pyx_k_variables, sizeof(__pyx_k_variables), 0, 0, 1, 1},
  {&__pyx_n_s_verify_compiler, __pyx_k_verify_compiler, sizeof(__pyx_k_verify_compiler), 0, 0, 1, 1},
  {&__pyx_n_s_verify_transformation_table, __pyx_k_verify_transformation_table, sizeof(__pyx_k_verify_transformation_table), 0, 0, 1, 1},
  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
  {&__pyx_n_u_vertical, __pyx_k_vertical, sizeof(__pyx_k_vertical), 0, 1, 0, 1},
  {&__pyx_n_s_visitor_name, __pyx_k_visitor_name, sizeof(__pyx_k_visitor_name), 0, 0, 1, 1},
  {&__pyx_kp_u_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 1, 0, 0},
  {&__pyx_kp_u_w_Z, __pyx_k_w_Z, sizeof(__pyx_k_w_Z), 0, 1, 0, 0},
  {&__pyx_n_s_whitespace, __pyx_k_whitespace, sizeof(__pyx_k_whitespace), 0, 0, 1, 1},
  {&__pyx_n_u_whitespace, __pyx_k_whitespace, sizeof(__pyx_k_whitespace), 0, 1, 0, 1},
  {&__pyx_n_s_wsp, __pyx_k_wsp, sizeof(__pyx_k_wsp), 0, 0, 1, 1},
  {&__pyx_n_u_wsp, __pyx_k_wsp, sizeof(__pyx_k_wsp), 0, 1, 0, 1},
  {&__pyx_n_s_wsp_2, __pyx_k_wsp_2, sizeof(__pyx_k_wsp_2), 0, 0, 1, 1},
  {&__pyx_n_u_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 1, 0, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_n_s_property); if (!__pyx_builtin_property) __PYX_ERR(0, 530, __pyx_L1_error)
  __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s_open); if (!__pyx_builtin_open) __PYX_ERR(0, 189, __pyx_L1_error)
  __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 206, __pyx_L1_error)
  __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 507, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 708, __pyx_L1_error)
  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 735, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 912, __pyx_L1_error)
  __pyx_builtin_NameError = __Pyx_GetBuiltinName(__pyx_n_s_NameError); if (!__pyx_builtin_NameError) __PYX_ERR(0, 1031, __pyx_L1_error)
  __pyx_builtin_reversed = __Pyx_GetBuiltinName(__pyx_n_s_reversed); if (!__pyx_builtin_reversed) __PYX_ERR(0, 1065, __pyx_L1_error)
  __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 1149, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "DHParser/ebnf.py":189
 *     if isinstance(grammar_class, str):
 *         # grammar_class = load_compiler_suite(grammar_class)[1]
 *         with open(grammar_class, 'r', encoding='utf8') as f:             # <<<<<<<<<<<<<<
 *             pycode = f.read()
 *         m = re.search(r'class \w*\(Grammar\)', pycode)
 */
  __pyx_tuple_ = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);

  /* "DHParser/ebnf.py":666
 *         value = node.content.strip("~")
 *         if value[0] + value[-1] in {'""', "''"}:
 *             value = escape_re(value[1:-1])             # <<<<<<<<<<<<<<
 *         elif value[0] + value[-1] == '//':
 *             value = self._check_rx(node, value[1:-1])
 */
  __pyx_slice__19 = PySlice_New(__pyx_int_1, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__19)) __PYX_ERR(0, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__19);
  __Pyx_GIVEREF(__pyx_slice__19);

  /* "DHParser/ebnf.py":842
 *             if symbol in defined_symbols:
 *                 defined_symbols.remove(symbol)
 *                 for related in self.rules[symbol][1:]:             # <<<<<<<<<<<<<<
 *                     remove_connections(str(related))
 * 
 */
  __pyx_slice__23 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__23)) __PYX_ERR(0, 842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__23);
  __Pyx_GIVEREF(__pyx_slice__23);

  /* "DHParser/ebnf.py":794
 *         # add EBNF grammar to the doc string of the parser class
 * 
 *         article = 'an ' if self.grammar_name[0:1] in "AaEeIiOoUu" else 'a '  # what about 'hour', 'universe' etc.?             # <<<<<<<<<<<<<<
 *         show_source = get_config_value('add_grammar_source_to_parser_docstring')
 *         declarations = ['class ' + self.grammar_name
 */
  __pyx_slice__24 = PySlice_New(__pyx_int_0, __pyx_int_1, Py_None); if (unlikely(!__pyx_slice__24)) __PYX_ERR(0, 794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__24);
  __Pyx_GIVEREF(__pyx_slice__24);

  /* "DHParser/ebnf.py":801
 *                         + ' source file'
 *                         + ('. Grammar:' if self.grammar_source and show_source else '.')]
 *         definitions.append(('parser_initialization__', '["upon instantiation"]'))             # <<<<<<<<<<<<<<
 *         if self.grammar_source:
 *             definitions.append(('source_hash__',
 */
  __pyx_tuple__26 = PyTuple_Pack(2, __pyx_n_u_parser_initialization, __pyx_kp_u_upon_instantiation); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);

  /* "DHParser/ebnf.py":837
 *         defined_symbols.difference_update(self.RESERVED_SYMBOLS)
 * 
 *         def remove_connections(symbol):             # <<<<<<<<<<<<<<
 *             """Recursively removes all symbols which appear in the
 *             definiens of a particular symbol."""
 */
  __pyx_tuple__29 = PyTuple_Pack(2, __pyx_n_s_symbol, __pyx_n_s_related); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);
  __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_remove_connections, 837, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 837, __pyx_L1_error)

  /* "DHParser/ebnf.py":934
 *             self.defined_directives.add(key)
 * 
 *         def check_argnum(n: int = 1):             # <<<<<<<<<<<<<<
 *             if len(node.children) > n + 1:
 *                 self.tree.new_error(node, 'Directive "%s" can have at most %i values.' % (key, n))
 */
  __pyx_tuple__36 = PyTuple_Pack(1, __pyx_n_s_n); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);
  __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_check_argnum, 934, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 934, __pyx_L1_error)
  __pyx_tuple__38 = PyTuple_Pack(1, ((PyObject *)__pyx_int_1)); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);

  /* "DHParser/ebnf.py":987
 *         elif key.endswith('_filter'):
 *             check_argnum()
 *             symbol = key[:-7]             # <<<<<<<<<<<<<<
 *             self.directives.filter[symbol] = node.children[1].content.strip()
 * 
 */
  __pyx_slice__41 = PySlice_New(Py_None, __pyx_int_neg_7, Py_None); if (unlikely(!__pyx_slice__41)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__41);
  __Pyx_GIVEREF(__pyx_slice__41);

  /* "DHParser/ebnf.py":992
 *         elif key.endswith('_error'):
 *             check_argnum(2)
 *             symbol = key[:-6]             # <<<<<<<<<<<<<<
 *             error_msgs = self.directives.error.get(symbol, [])
 *             if symbol in self.rules:
 */
  __pyx_slice__42 = PySlice_New(Py_None, __pyx_int_neg_6, Py_None); if (unlikely(!__pyx_slice__42)) __PYX_ERR(0, 992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__42);
  __Pyx_GIVEREF(__pyx_slice__42);

  /* "DHParser/ebnf.py":1012
 * 
 *         elif key.endswith('_skip'):
 *             symbol = key[:-5]             # <<<<<<<<<<<<<<
 *             if symbol in self.rules:
 *                 self.tree.new_error(node, 'Skip list for resuming in series for symbol "{}"'
 */
  __pyx_slice__43 = PySlice_New(Py_None, __pyx_int_neg_5, Py_None); if (unlikely(!__pyx_slice__43)) __PYX_ERR(0, 1012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__43);
  __Pyx_GIVEREF(__pyx_slice__43);

  /* "DHParser/ebnf.py":1141
 *                                 nd = symlist[0].children[1]
 *                             break
 *                     if (nd.tag_name != "regexp" or nd.content[:1] != '/'             # <<<<<<<<<<<<<<
 *                             or nd.content[-1:] != '/'):
 *                         self.tree.new_error(node, "Lookbehind-parser can only be used with RegExp"
 */
  __pyx_slice__46 = PySlice_New(Py_None, __pyx_int_1, Py_None); if (unlikely(!__pyx_slice__46)) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__46);
  __Pyx_GIVEREF(__pyx_slice__46);

  /* "DHParser/ebnf.py":1142
 *                             break
 *                     if (nd.tag_name != "regexp" or nd.content[:1] != '/'
 *                             or nd.content[-1:] != '/'):             # <<<<<<<<<<<<<<
 *                         self.tree.new_error(node, "Lookbehind-parser can only be used with RegExp"
 *                                             "-parsers, not: " + nd.tag_name)
 */
  __pyx_slice__48 = PySlice_New(__pyx_int_neg_1, Py_None, Py_None); if (unlikely(!__pyx_slice__48)) __PYX_ERR(0, 1142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__48);
  __Pyx_GIVEREF(__pyx_slice__48);

  /* "DHParser/ebnf.py":1120
 *             # node.result[1].result = shift + node.result[2:]
 *             node.children[1].result = (Node(node.children[1].tag_name, node.children[1].result),) \
 *                 + node.children[2:]             # <<<<<<<<<<<<<<
 *             node.children[1].tag_name = node.tag_name
 *             node.result = (node.children[0], node.children[1])
 */
  __pyx_slice__50 = PySlice_New(__pyx_int_2, Py_None, Py_None); if (unlikely(!__pyx_slice__50)) __PYX_ERR(0, 1120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__50);
  __Pyx_GIVEREF(__pyx_slice__50);

  /* "DHParser/ebnf.py":1129
 *             result = self.non_terminal(node, parser_class, custom_args)
 *             if prefix[:1] == '-':
 *                 def check(node):             # <<<<<<<<<<<<<<
 *                     nd = node
 *                     if len(nd.children) >= 1:
 */
  __pyx_tuple__52 = PyTuple_Pack(3, __pyx_n_s_node, __pyx_n_s_nd, __pyx_n_s_symlist); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 1129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);
  __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_check, 1129, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 1129, __pyx_L1_error)

  /* "DHParser/ebnf.py":1218
 * 
 *     def on_literal(self, node: Node) -> str:
 *         center = self.TOKEN_PARSER() + node.content.replace('\\', r'\\') + ')'             # <<<<<<<<<<<<<<
 *         left = self.WSPC_PARSER() if 'left' in self.directives.literalws else ''
 *         right = self.WSPC_PARSER() if 'right' in self.directives.literalws else ''
 */
  __pyx_tuple__57 = PyTuple_Pack(2, __pyx_kp_u__55, __pyx_kp_u__56); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__57);
  __Pyx_GIVEREF(__pyx_tuple__57);

  /* "DHParser/ebnf.py":1232
 *             tk = rpl + tk[1:-1] + rpl
 *         else:
 *             tk = rpl + tk.replace('"', '\\"')[1:-1] + rpl             # <<<<<<<<<<<<<<
 *         return self.TOKEN_PARSER() + tk + ')'
 * 
 */
  __pyx_tuple__59 = PyTuple_Pack(2, __pyx_kp_u__21, __pyx_kp_u__58); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 1232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);

  /* "DHParser/ebnf.py":1242
 *         parser = 'RegExp('
 *         try:
 *             arg = repr(self._check_rx(node, rx[1:-1].replace(r'\/', '/')))             # <<<<<<<<<<<<<<
 *         except AttributeError as error:
 *             from traceback import extract_tb
 */
  __pyx_tuple__61 = PyTuple_Pack(2, __pyx_kp_u__60, __pyx_kp_u__47); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 1242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__61);
  __Pyx_GIVEREF(__pyx_tuple__61);

  /* "DHParser/ebnf.py":47
 * 
 * 
 * __all__ = ('get_ebnf_preprocessor',             # <<<<<<<<<<<<<<
 *            'get_ebnf_grammar',
 *            'get_ebnf_transformer',
 */
  __pyx_tuple__62 = PyTuple_Pack(14, __pyx_n_u_get_ebnf_preprocessor, __pyx_n_u_get_ebnf_grammar, __pyx_n_u_get_ebnf_transformer, __pyx_n_u_get_ebnf_compiler, __pyx_n_u_EBNFGrammar, __pyx_n_u_EBNFTransform, __pyx_n_u_EBNFCompilerError, __pyx_n_u_EBNFCompiler, __pyx_n_u_grammar_changed, __pyx_n_u_compile_ebnf, __pyx_n_u_PreprocessorFactoryFunc, __pyx_n_u_ParserFactoryFunc, __pyx_n_u_TransformerFactoryFunc, __pyx_n_u_CompilerFactoryFunc); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);

  /* "DHParser/ebnf.py":79
 * 
 * 
 * def get_ebnf_preprocessor() -> PreprocessorFunc:             # <<<<<<<<<<<<<<
 *     return nil_preprocessor
 * 
 */
  __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_get_ebnf_preprocessor, 79, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 79, __pyx_L1_error)

  /* "DHParser/ebnf.py":170
 * 
 * 
 * def grammar_changed(grammar_class, grammar_source: str) -> bool:             # <<<<<<<<<<<<<<
 *     """
 *     Returns ``True`` if ``grammar_class`` does not reflect the latest
 */
  __pyx_tuple__80 = PyTuple_Pack(7, __pyx_n_s_grammar_class, __pyx_n_s_grammar_source, __pyx_n_s_grammar_2, __pyx_n_s_chksum, __pyx_n_s_f, __pyx_n_s_pycode, __pyx_n_s_m); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__80);
  __Pyx_GIVEREF(__pyx_tuple__80);
  __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__80, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_grammar_changed, 170, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(0, 170, __pyx_L1_error)

  /* "DHParser/ebnf.py":202
 * 
 * 
 * def get_ebnf_grammar() -> EBNFGrammar:             # <<<<<<<<<<<<<<
 *     try:
 *         grammar = GLOBALS.ebnf_grammar_singleton
 */
  __pyx_tuple__82 = PyTuple_Pack(1, __pyx_n_s_grammar_2); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__82);
  __Pyx_GIVEREF(__pyx_tuple__82);
  __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__82, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_get_ebnf_grammar, 202, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(0, 202, __pyx_L1_error)

  /* "DHParser/ebnf.py":225
 *         [],  # otherwise '"*": replace_by_single_child' would be applied
 *     "directive, definition":
 *         [flatten, remove_tokens('@', '=', ',')],             # <<<<<<<<<<<<<<
 *     "expression":
 *         [replace_by_single_child, flatten, remove_tokens('|')],  # remove_infix_operator],
 */
  __pyx_tuple__84 = PyTuple_Pack(3, __pyx_kp_u__78, __pyx_kp_u__76, __pyx_kp_u__79); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__84);
  __Pyx_GIVEREF(__pyx_tuple__84);

  /* "DHParser/ebnf.py":227
 *         [flatten, remove_tokens('@', '=', ',')],
 *     "expression":
 *         [replace_by_single_child, flatten, remove_tokens('|')],  # remove_infix_operator],             # <<<<<<<<<<<<<<
 *     "term":
 *         [replace_by_single_child, flatten],  # supports both idioms:
 */
  __pyx_tuple__85 = PyTuple_Pack(1, __pyx_kp_u__77); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__85);
  __Pyx_GIVEREF(__pyx_tuple__85);

  /* "DHParser/ebnf.py":239
 *     "oneormore, repetition, option":
 *         [reduce_single_child, remove_brackets,
 *          forbid('repetition', 'option', 'oneormore'), assert_content(r'(?!)(?:.|\n)*')],             # <<<<<<<<<<<<<<
 *     "symbol, literal, regexp":
 *         reduce_single_child,
 */
  __pyx_tuple__86 = PyTuple_Pack(3, __pyx_n_u_repetition, __pyx_n_u_option, __pyx_n_u_oneormore); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__86);
  __Pyx_GIVEREF(__pyx_tuple__86);
  __pyx_tuple__87 = PyTuple_Pack(1, __pyx_kp_u_n_3); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__87);
  __Pyx_GIVEREF(__pyx_tuple__87);

  /* "DHParser/ebnf.py":251
 * 
 * 
 * def EBNFTransform() -> TransformationFunc:             # <<<<<<<<<<<<<<
 *     return partial(traverse, processing_table=EBNF_AST_transformation_table.copy())
 * 
 */
  __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_EBNFTransform, 251, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(0, 251, __pyx_L1_error)

  /* "DHParser/ebnf.py":255
 * 
 * 
 * def get_ebnf_transformer() -> TransformationFunc:             # <<<<<<<<<<<<<<
 *     try:
 *         transformer = GLOBALS.EBNF_transformer_singleton
 */
  __pyx_tuple__89 = PyTuple_Pack(1, __pyx_n_s_transformer); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__89);
  __Pyx_GIVEREF(__pyx_tuple__89);
  __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__89, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_get_ebnf_transformer, 255, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(0, 255, __pyx_L1_error)

  /* "DHParser/ebnf.py":376
 *                  'resume', 'drop']
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.whitespace = WHITESPACE_TYPES['vertical']  # type: str
 *         self.comment = ''     # type: str
 */
  __pyx_tuple__91 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__91);
  __Pyx_GIVEREF(__pyx_tuple__91);
  __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__91, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_init, 376, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(0, 376, __pyx_L1_error)

  /* "DHParser/ebnf.py":387
 *         self.drop = set()     # type: Set[str]
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         return getattr(self, key)
 * 
 */
  __pyx_tuple__93 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_key); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__93);
  __Pyx_GIVEREF(__pyx_tuple__93);
  __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__93, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_getitem, 387, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 387, __pyx_L1_error)

  /* "DHParser/ebnf.py":390
 *         return getattr(self, key)
 * 
 *     def __setitem__(self, key, value):             # <<<<<<<<<<<<<<
 *         assert hasattr(self, key)
 *         setattr(self, key, value)
 */
  __pyx_tuple__95 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_value); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__95);
  __Pyx_GIVEREF(__pyx_tuple__95);
  __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_setitem, 390, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 390, __pyx_L1_error)

  /* "DHParser/ebnf.py":394
 *         setattr(self, key, value)
 * 
 *     def keys(self):             # <<<<<<<<<<<<<<
 *         return self.__dict__.keys()
 * 
 */
  __pyx_tuple__97 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__97);
  __Pyx_GIVEREF(__pyx_tuple__97);
  __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__97, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_keys, 394, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 394, __pyx_L1_error)

  /* "DHParser/ebnf.py":505
 * 
 * 
 *     def __init__(self, grammar_name="DSL", grammar_source=""):             # <<<<<<<<<<<<<<
 *         self.grammar_id = 0
 *         super(EBNFCompiler, self).__init__()  # calls the _reset()-method
 */
  __pyx_tuple__99 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_grammar_name, __pyx_n_s_grammar_source); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(0, 505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__99);
  __Pyx_GIVEREF(__pyx_tuple__99);
  __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__99, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_init, 505, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 505, __pyx_L1_error)
  __pyx_tuple__101 = PyTuple_Pack(2, ((PyObject*)__pyx_n_u_DSL), ((PyObject*)__pyx_kp_u__2)); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__101);
  __Pyx_GIVEREF(__pyx_tuple__101);

  /* "DHParser/ebnf.py":511
 * 
 * 
 *     def _reset(self):             # <<<<<<<<<<<<<<
 *         super(EBNFCompiler, self)._reset()
 *         self._result = ''           # type: str
 */
  __pyx_tuple__102 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__102);
  __Pyx_GIVEREF(__pyx_tuple__102);
  __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__102, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_reset, 511, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(0, 511, __pyx_L1_error)

  /* "DHParser/ebnf.py":531
 * 
 *     @property
 *     def result(self) -> str:             # <<<<<<<<<<<<<<
 *         return self._result
 * 
 */
  __pyx_tuple__104 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__104);
  __Pyx_GIVEREF(__pyx_tuple__104);
  __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__104, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_result_2, 531, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(0, 531, __pyx_L1_error)

  /* "DHParser/ebnf.py":535
 * 
 * 
 *     def set_grammar_name(self, grammar_name: str = "", grammar_source: str = ""):             # <<<<<<<<<<<<<<
 *         """
 *         Changes the grammar name and source.
 */
  __pyx_tuple__106 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_grammar_name, __pyx_n_s_grammar_source); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__106);
  __Pyx_GIVEREF(__pyx_tuple__106);
  __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_set_grammar_name, 535, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(0, 535, __pyx_L1_error)
  __pyx_tuple__108 = PyTuple_Pack(2, ((PyObject*)__pyx_kp_u__2), ((PyObject*)__pyx_kp_u__2)); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__108);
  __Pyx_GIVEREF(__pyx_tuple__108);

  /* "DHParser/ebnf.py":553
 *     # methods for generating skeleton code for preprocessor, transformer, and compiler
 * 
 *     def gen_preprocessor_skeleton(self) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Returns Python-skeleton-code for a preprocessor-function for
 */
  __pyx_tuple__109 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_name_2); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(0, 553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__109);
  __Pyx_GIVEREF(__pyx_tuple__109);
  __pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__109, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_gen_preprocessor_skeleton, 553, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) __PYX_ERR(0, 553, __pyx_L1_error)

  /* "DHParser/ebnf.py":563
 * 
 * 
 *     def gen_transformer_skeleton(self) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Returns Python-skeleton-code for the AST-transformation for the
 */
  __pyx_tuple__111 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_tt_name, __pyx_n_s_transtable, __pyx_n_s_name_2, __pyx_n_s_transformations); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__111);
  __Pyx_GIVEREF(__pyx_tuple__111);
  __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__111, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_gen_transformer_skeleton, 563, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(0, 563, __pyx_L1_error)

  /* "DHParser/ebnf.py":589
 * 
 * 
 *     def gen_compiler_skeleton(self) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Returns Python-skeleton-code for a Compiler-class for the
 */
  __pyx_tuple__113 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_compiler, __pyx_n_s_name_2, __pyx_n_s_method_name); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__113);
  __Pyx_GIVEREF(__pyx_tuple__113);
  __pyx_codeobj__114 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__113, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_gen_compiler_skeleton, 589, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__114)) __PYX_ERR(0, 589, __pyx_L1_error)

  /* "DHParser/ebnf.py":618
 *         return '\n'.join(compiler)
 * 
 *     def verify_transformation_table(self, transtable):             # <<<<<<<<<<<<<<
 *         """
 *         Checks for symbols that occur in the transformation-table but have
 */
  __pyx_tuple__115 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_transtable, __pyx_n_s_table_entries, __pyx_n_s_symbols, __pyx_n_s_messages, __pyx_n_s_entry); if (unlikely(!__pyx_tuple__115)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__115);
  __Pyx_GIVEREF(__pyx_tuple__115);
  __pyx_codeobj__116 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__115, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_verify_transformation_table, 618, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__116)) __PYX_ERR(0, 618, __pyx_L1_error)

  /* "DHParser/ebnf.py":636
 *         return messages
 * 
 *     def verify_compiler(self, compiler):             # <<<<<<<<<<<<<<
 *         """
 *         Checks for on_XXXX()-methods that occur in the compiler, although XXXX
 */
  __pyx_tuple__117 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_compiler); if (unlikely(!__pyx_tuple__117)) __PYX_ERR(0, 636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__117);
  __Pyx_GIVEREF(__pyx_tuple__117);
  __pyx_codeobj__118 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__117, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_verify_compiler, 636, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__118)) __PYX_ERR(0, 636, __pyx_L1_error)

  /* "DHParser/ebnf.py":645
 * 
 * 
 *     def _check_rx(self, node: Node, rx: str) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Checks whether the string `rx` represents a valid regular
 */
  __pyx_tuple__119 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_node, __pyx_n_s_rx, __pyx_n_s_flags, __pyx_n_s_re_error); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__119);
  __Pyx_GIVEREF(__pyx_tuple__119);
  __pyx_codeobj__120 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__119, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_check_rx, 645, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__120)) __PYX_ERR(0, 645, __pyx_L1_error)

  /* "DHParser/ebnf.py":662
 * 
 * 
 *     def _extract_regex(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         """Extracts regular expression string from regexp-Node."""
 *         value = node.content.strip("~")
 */
  __pyx_tuple__121 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_node, __pyx_n_s_value); if (unlikely(!__pyx_tuple__121)) __PYX_ERR(0, 662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__121);
  __Pyx_GIVEREF(__pyx_tuple__121);
  __pyx_codeobj__122 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__121, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_extract_regex, 662, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__122)) __PYX_ERR(0, 662, __pyx_L1_error)

  /* "DHParser/ebnf.py":672
 * 
 * 
 *     def _gen_search_rule(self, nd: Node) -> ReprType:             # <<<<<<<<<<<<<<
 *         """Generates a search rule, which can be either a string for simple
 *         string search or a regular expression from the nodes content. Returns
 */
  __pyx_tuple__123 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_nd, __pyx_n_s_s_2); if (unlikely(!__pyx_tuple__123)) __PYX_ERR(0, 672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__123);
  __Pyx_GIVEREF(__pyx_tuple__123);
  __pyx_codeobj__124 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__123, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_gen_search_rule, 672, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__124)) __PYX_ERR(0, 672, __pyx_L1_error)

  /* "DHParser/ebnf.py":684
 *         return ''
 * 
 *     def _gen_search_list(self, nodes: Sequence[Node]) -> List[Union[unrepr, str]]:             # <<<<<<<<<<<<<<
 *         search_list = []  # type: List[Union[unrepr, str]]
 *         for child in nodes:
 */
  __pyx_tuple__125 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_nodes, __pyx_n_s_search_list, __pyx_n_s_child, __pyx_n_s_rule); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__125);
  __Pyx_GIVEREF(__pyx_tuple__125);
  __pyx_codeobj__126 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__125, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_gen_search_list, 684, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__126)) __PYX_ERR(0, 684, __pyx_L1_error)

  /* "DHParser/ebnf.py":692
 * 
 * 
 *     def assemble_parser(self, definitions: List[Tuple[str, str]], root_node: Node) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Creates the Python code for the parser after compilation of
 */
  __pyx_tuple__127 = PyTuple_Pack(29, __pyx_n_s_self, __pyx_n_s_definitions, __pyx_n_s_root_node, __pyx_n_s_task, __pyx_n_s_i, __pyx_n_s_resume_rules_2, __pyx_n_s_symbol, __pyx_n_s_raw_rules, __pyx_n_s_refined_rules, __pyx_n_s_rule, __pyx_n_s_nd, __pyx_n_s_refined, __pyx_n_s_err_msgs_2, __pyx_n_s_custom_errors, __pyx_n_s_search, __pyx_n_s_message, __pyx_n_s_def_node, __pyx_n_s_skip, __pyx_n_s_skip_rules, __pyx_n_s_article, __pyx_n_s_show_source, __pyx_n_s_declarations, __pyx_n_s_statement, __pyx_n_s_defined_symbols, __pyx_n_s_remove_connections, __pyx_n_s_remove_connections, __pyx_n_s_leftover, __pyx_n_s_line, __pyx_n_s_symbol); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(0, 692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__127);
  __Pyx_GIVEREF(__pyx_tuple__127);
  __pyx_codeobj__128 = (PyObject*)__Pyx_PyCode_New(3, 0, 29, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__127, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_assemble_parser, 692, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__128)) __PYX_ERR(0, 692, __pyx_L1_error)

  /* "DHParser/ebnf.py":863
 *     ## compilation methods
 * 
 *     def on_syntax(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         definitions = []  # type: List[Tuple[str, str]]
 * 
 */
  __pyx_tuple__129 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_node, __pyx_n_s_definitions, __pyx_n_s_nd); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(0, 863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__129);
  __Pyx_GIVEREF(__pyx_tuple__129);
  __pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__129, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_on_syntax, 863, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) __PYX_ERR(0, 863, __pyx_L1_error)

  /* "DHParser/ebnf.py":883
 * 
 * 
 *     def on_definition(self, node: Node) -> Tuple[str, str]:             # <<<<<<<<<<<<<<
 *         rule = node.children[0].content
 *         if rule in self.rules:
 */
  __pyx_tuple__131 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_node, __pyx_n_s_rule, __pyx_n_s_first, __pyx_n_s_defn, __pyx_n_s_error, __pyx_n_s_extract_tb, __pyx_n_s_trace, __pyx_n_s_errmsg); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(0, 883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__131);
  __Pyx_GIVEREF(__pyx_tuple__131);
  __pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__131, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_on_definition, 883, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) __PYX_ERR(0, 883, __pyx_L1_error)

  /* "DHParser/ebnf.py":922
 * 
 * 
 *     def on_directive(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         key = node.children[0].content
 *         assert key not in self.directives.tokens
 */
  __pyx_tuple__133 = PyTuple_Pack(17, __pyx_n_s_self, __pyx_n_s_node, __pyx_n_s_key, __pyx_n_s_check_argnum, __pyx_n_s_check_argnum, __pyx_n_s_value, __pyx_n_s_child, __pyx_n_s_node_type, __pyx_n_s_values, __pyx_n_s_wsp_2, __pyx_n_s_tokens, __pyx_n_s_redeclared, __pyx_n_s_symbol, __pyx_n_s_error_msgs, __pyx_n_s_rule, __pyx_n_s_child, __pyx_n_s_child); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(0, 922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__133);
  __Pyx_GIVEREF(__pyx_tuple__133);
  __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(2, 0, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__133, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_on_directive, 922, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) __PYX_ERR(0, 922, __pyx_L1_error)

  /* "DHParser/ebnf.py":1037
 * 
 * 
 *     def non_terminal(self, node: Node, parser_class: str, custom_args: List[str] = []) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Compiles any non-terminal, where `parser_class` indicates the Parser class
 */
  __pyx_tuple__135 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_node, __pyx_n_s_parser_class, __pyx_n_s_custom_args, __pyx_n_s_arguments, __pyx_n_s_r); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(0, 1037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__135);
  __Pyx_GIVEREF(__pyx_tuple__135);
  __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_non_terminal, 1037, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) __PYX_ERR(0, 1037, __pyx_L1_error)

  /* "DHParser/ebnf.py":1046
 * 
 * 
 *     def on_expression(self, node) -> str:             # <<<<<<<<<<<<<<
 *         # TODO: Add check for errors like "a" | "ab" (which will always yield a, even for ab)
 *         return self.non_terminal(node, 'Alternative')
 */
  __pyx_tuple__137 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_node); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__137);
  __Pyx_GIVEREF(__pyx_tuple__137);
  __pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__137, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_on_expression, 1046, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) __PYX_ERR(0, 1046, __pyx_L1_error)

  /* "DHParser/ebnf.py":1051
 * 
 * 
 *     def _error_customization(self, node) -> Tuple[Tuple[Node, ...], List[str]]:             # <<<<<<<<<<<<<<
 *         mandatory_marker = []
 *         filtered_children = []  # type: List[Node]
 */
  __pyx_tuple__139 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_node, __pyx_n_s_mandatory_marker, __pyx_n_s_filtered_children, __pyx_n_s_nd, __pyx_n_s_custom_args, __pyx_n_s_current_symbol); if (unlikely(!__pyx_tuple__139)) __PYX_ERR(0, 1051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__139);
  __Pyx_GIVEREF(__pyx_tuple__139);
  __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__139, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_error_customization, 1051, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) __PYX_ERR(0, 1051, __pyx_L1_error)

  /* "DHParser/ebnf.py":1093
 * 
 * 
 *     def on_term(self, node) -> str:             # <<<<<<<<<<<<<<
 *         filtered_result, custom_args = self._error_customization(node)
 *         mock_node = Node(node.tag_name, filtered_result)
 */
  __pyx_tuple__141 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_node, __pyx_n_s_filtered_result, __pyx_n_s_custom_args, __pyx_n_s_mock_node); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__141);
  __Pyx_GIVEREF(__pyx_tuple__141);
  __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_on_term, 1093, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(0, 1093, __pyx_L1_error)

  /* "DHParser/ebnf.py":1099
 * 
 * 
 *     def on_factor(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         assert node.children
 *         assert len(node.children) >= 2, node.as_sxpr()
 */
  __pyx_tuple__143 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_node, __pyx_n_s_prefix, __pyx_n_s_custom_args, __pyx_n_s_arg, __pyx_n_s_parser_class, __pyx_n_s_result_2, __pyx_n_s_check, __pyx_n_s_check); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(0, 1099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__143);
  __Pyx_GIVEREF(__pyx_tuple__143);
  __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_on_factor, 1099, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(0, 1099, __pyx_L1_error)

  /* "DHParser/ebnf.py":1154
 * 
 * 
 *     def on_option(self, node) -> str:             # <<<<<<<<<<<<<<
 *         return self.non_terminal(node, 'Option')
 * 
 */
  __pyx_tuple__145 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_node); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(0, 1154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__145);
  __Pyx_GIVEREF(__pyx_tuple__145);
  __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_on_option, 1154, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(0, 1154, __pyx_L1_error)

  /* "DHParser/ebnf.py":1158
 * 
 * 
 *     def on_repetition(self, node) -> str:             # <<<<<<<<<<<<<<
 *         return self.non_terminal(node, 'ZeroOrMore')
 * 
 */
  __pyx_tuple__147 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_node); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(0, 1158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__147);
  __Pyx_GIVEREF(__pyx_tuple__147);
  __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_on_repetition, 1158, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(0, 1158, __pyx_L1_error)

  /* "DHParser/ebnf.py":1162
 * 
 * 
 *     def on_oneormore(self, node) -> str:             # <<<<<<<<<<<<<<
 *         return self.non_terminal(node, 'OneOrMore')
 * 
 */
  __pyx_tuple__149 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_node); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(0, 1162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__149);
  __Pyx_GIVEREF(__pyx_tuple__149);
  __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__149, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_on_oneormore, 1162, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(0, 1162, __pyx_L1_error)

  /* "DHParser/ebnf.py":1166
 * 
 * 
 *     def on_group(self, node) -> str:             # <<<<<<<<<<<<<<
 *         raise EBNFCompilerError("Group nodes should have been eliminated by "
 *                                 "AST transformation!")
 */
  __pyx_tuple__151 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_node); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(0, 1166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__151);
  __Pyx_GIVEREF(__pyx_tuple__151);
  __pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__151, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_on_group, 1166, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) __PYX_ERR(0, 1166, __pyx_L1_error)

  /* "DHParser/ebnf.py":1170
 *                                 "AST transformation!")
 * 
 *     def on_unordered(self, node) -> str:             # <<<<<<<<<<<<<<
 *         # return self.non_terminal(node, 'Unordered')
 *         assert len(node.children) == 1
 */
  __pyx_tuple__153 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_node, __pyx_n_s_nd, __pyx_n_s_filtered_result, __pyx_n_s_custom_args, __pyx_n_s_mock_node, __pyx_n_s_args, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__153);
  __Pyx_GIVEREF(__pyx_tuple__153);
  __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(2, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_on_unordered, 1170, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(0, 1170, __pyx_L1_error)

  /* "DHParser/ebnf.py":1188
 *             return ""
 * 
 *     def on_symbol(self, node: Node) -> str:     # called only for symbols on the right hand side!             # <<<<<<<<<<<<<<
 *         symbol = node.content  # ; assert result == cast(str, node.result)
 *         if symbol in self.directives.tokens:
 */
  __pyx_tuple__155 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_node, __pyx_n_s_symbol); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__155);
  __Pyx_GIVEREF(__pyx_tuple__155);
  __pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__155, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_on_symbol, 1188, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) __PYX_ERR(0, 1188, __pyx_L1_error)

  /* "DHParser/ebnf.py":1206
 * 
 * 
 *     def TOKEN_PARSER(self):             # <<<<<<<<<<<<<<
 *         if DROP_TOKEN in self.directives.drop and self.context[-2].tag_name != "definition":
 *             return 'DropToken('
 */
  __pyx_tuple__157 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__157)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__157);
  __Pyx_GIVEREF(__pyx_tuple__157);
  __pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__157, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_TOKEN_PARSER, 1206, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) __PYX_ERR(0, 1206, __pyx_L1_error)

  /* "DHParser/ebnf.py":1211
 *         return 'Token('
 * 
 *     def WSPC_PARSER(self):             # <<<<<<<<<<<<<<
 *         if DROP_WSPC in self.directives.drop and (self.context[-2].tag_name != "definition"
 *                                                   or self.context[-1].tag_name == 'literal'):
 */
  __pyx_tuple__159 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__159)) __PYX_ERR(0, 1211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__159);
  __Pyx_GIVEREF(__pyx_tuple__159);
  __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_WSPC_PARSER, 1211, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(0, 1211, __pyx_L1_error)

  /* "DHParser/ebnf.py":1217
 *         return 'wsp__'
 * 
 *     def on_literal(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         center = self.TOKEN_PARSER() + node.content.replace('\\', r'\\') + ')'
 *         left = self.WSPC_PARSER() if 'left' in self.directives.literalws else ''
 */
  __pyx_tuple__161 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_node, __pyx_n_s_center, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(0, 1217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__161);
  __Pyx_GIVEREF(__pyx_tuple__161);
  __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_on_literal, 1217, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(0, 1217, __pyx_L1_error)

  /* "DHParser/ebnf.py":1226
 * 
 * 
 *     def on_plaintext(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         tk = node.content.replace('\\', r'\\')
 *         rpl = '"' if tk.find('"') < 0 else "'" if tk.find("'") < 0 else ''
 */
  __pyx_tuple__163 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_node, __pyx_n_s_tk, __pyx_n_s_rpl); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(0, 1226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__163);
  __Pyx_GIVEREF(__pyx_tuple__163);
  __pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__163, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_on_plaintext, 1226, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) __PYX_ERR(0, 1226, __pyx_L1_error)

  /* "DHParser/ebnf.py":1236
 * 
 * 
 *     def on_regexp(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         rx = node.content
 *         name = []   # type: List[str]
 */
  __pyx_tuple__165 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_node, __pyx_n_s_rx, __pyx_n_s_name_2, __pyx_n_s_parser, __pyx_n_s_arg, __pyx_n_s_error, __pyx_n_s_extract_tb, __pyx_n_s_trace, __pyx_n_s_errmsg); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(0, 1236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__165);
  __Pyx_GIVEREF(__pyx_tuple__165);
  __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(2, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__165, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_on_regexp, 1236, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) __PYX_ERR(0, 1236, __pyx_L1_error)

  /* "DHParser/ebnf.py":1253
 * 
 * 
 *     def on_whitespace(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         return self.WSPC_PARSER()
 * 
 */
  __pyx_tuple__167 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_node); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(0, 1253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__167);
  __Pyx_GIVEREF(__pyx_tuple__167);
  __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_on_whitespace, 1253, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) __PYX_ERR(0, 1253, __pyx_L1_error)

  /* "DHParser/ebnf.py":1256
 *         return self.WSPC_PARSER()
 * 
 * def get_ebnf_compiler(grammar_name="", grammar_source="") -> EBNFCompiler:             # <<<<<<<<<<<<<<
 *     try:
 *         compiler = GLOBALS.ebnf_compiler_singleton
 */
  __pyx_tuple__169 = PyTuple_Pack(3, __pyx_n_s_grammar_name, __pyx_n_s_grammar_source, __pyx_n_s_compiler); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(0, 1256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__169);
  __Pyx_GIVEREF(__pyx_tuple__169);
  __pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__169, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_get_ebnf_compiler, 1256, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) __PYX_ERR(0, 1256, __pyx_L1_error)
  __pyx_tuple__171 = PyTuple_Pack(2, ((PyObject*)__pyx_kp_u__2), ((PyObject*)__pyx_kp_u__2)); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(0, 1256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__171);
  __Pyx_GIVEREF(__pyx_tuple__171);

  /* "DHParser/ebnf.py":1274
 * ########################################################################
 * 
 * def compile_ebnf(ebnf_source: str, branding: str = 'DSL') \             # <<<<<<<<<<<<<<
 *         -> Tuple[Optional[Any], List[Error], Optional[Node]]:
 *     """
 */
  __pyx_tuple__172 = PyTuple_Pack(2, __pyx_n_s_ebnf_source, __pyx_n_s_branding); if (unlikely(!__pyx_tuple__172)) __PYX_ERR(0, 1274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__172);
  __Pyx_GIVEREF(__pyx_tuple__172);
  __pyx_codeobj__173 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__172, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_DHParser_ebnf_py, __pyx_n_s_compile_ebnf, 1274, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__173)) __PYX_ERR(0, 1274, __pyx_L1_error)
  __pyx_tuple__174 = PyTuple_Pack(1, ((PyObject*)__pyx_n_u_DSL)); if (unlikely(!__pyx_tuple__174)) __PYX_ERR(0, 1274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__174);
  __Pyx_GIVEREF(__pyx_tuple__174);
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_5 = PyInt_FromLong(-5); if (unlikely(!__pyx_int_neg_5)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_6 = PyInt_FromLong(-6); if (unlikely(!__pyx_int_neg_6)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_7 = PyInt_FromLong(-7); if (unlikely(!__pyx_int_neg_7)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  if (PyType_Ready(&__pyx_type_8DHParser_4ebnf___pyx_scope_struct__assemble_parser) < 0) __PYX_ERR(0, 692, __pyx_L1_error)
  __pyx_type_8DHParser_4ebnf___pyx_scope_struct__assemble_parser.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8DHParser_4ebnf___pyx_scope_struct__assemble_parser.tp_dictoffset && __pyx_type_8DHParser_4ebnf___pyx_scope_struct__assemble_parser.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_8DHParser_4ebnf___pyx_scope_struct__assemble_parser.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_8DHParser_4ebnf___pyx_scope_struct__assemble_parser = &__pyx_type_8DHParser_4ebnf___pyx_scope_struct__assemble_parser;
  if (PyType_Ready(&__pyx_type_8DHParser_4ebnf___pyx_scope_struct_1_on_directive) < 0) __PYX_ERR(0, 922, __pyx_L1_error)
  __pyx_type_8DHParser_4ebnf___pyx_scope_struct_1_on_directive.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8DHParser_4ebnf___pyx_scope_struct_1_on_directive.tp_dictoffset && __pyx_type_8DHParser_4ebnf___pyx_scope_struct_1_on_directive.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_8DHParser_4ebnf___pyx_scope_struct_1_on_directive.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_8DHParser_4ebnf___pyx_scope_struct_1_on_directive = &__pyx_type_8DHParser_4ebnf___pyx_scope_struct_1_on_directive;
  if (PyType_Ready(&__pyx_type_8DHParser_4ebnf___pyx_scope_struct_2_on_factor) < 0) __PYX_ERR(0, 1099, __pyx_L1_error)
  __pyx_type_8DHParser_4ebnf___pyx_scope_struct_2_on_factor.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8DHParser_4ebnf___pyx_scope_struct_2_on_factor.tp_dictoffset && __pyx_type_8DHParser_4ebnf___pyx_scope_struct_2_on_factor.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_8DHParser_4ebnf___pyx_scope_struct_2_on_factor.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_8DHParser_4ebnf___pyx_scope_struct_2_on_factor = &__pyx_type_8DHParser_4ebnf___pyx_scope_struct_2_on_factor;
  if (PyType_Ready(&__pyx_type_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered) < 0) __PYX_ERR(0, 1170, __pyx_L1_error)
  __pyx_type_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered.tp_dictoffset && __pyx_type_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered = &__pyx_type_8DHParser_4ebnf___pyx_scope_struct_3_on_unordered;
  if (PyType_Ready(&__pyx_type_8DHParser_4ebnf___pyx_scope_struct_4_genexpr) < 0) __PYX_ERR(0, 1179, __pyx_L1_error)
  __pyx_type_8DHParser_4ebnf___pyx_scope_struct_4_genexpr.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8DHParser_4ebnf___pyx_scope_struct_4_genexpr.tp_dictoffset && __pyx_type_8DHParser_4ebnf___pyx_scope_struct_4_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_8DHParser_4ebnf___pyx_scope_struct_4_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_8DHParser_4ebnf___pyx_scope_struct_4_genexpr = &__pyx_type_8DHParser_4ebnf___pyx_scope_struct_4_genexpr;
  if (PyType_Ready(&__pyx_type_8DHParser_4ebnf___pyx_scope_struct_5_genexpr) < 0) __PYX_ERR(0, 1181, __pyx_L1_error)
  __pyx_type_8DHParser_4ebnf___pyx_scope_struct_5_genexpr.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8DHParser_4ebnf___pyx_scope_struct_5_genexpr.tp_dictoffset && __pyx_type_8DHParser_4ebnf___pyx_scope_struct_5_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_8DHParser_4ebnf___pyx_scope_struct_5_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_8DHParser_4ebnf___pyx_scope_struct_5_genexpr = &__pyx_type_8DHParser_4ebnf___pyx_scope_struct_5_genexpr;
  if (PyType_Ready(&__pyx_type_8DHParser_4ebnf___pyx_scope_struct_6_on_literal) < 0) __PYX_ERR(0, 1217, __pyx_L1_error)
  __pyx_type_8DHParser_4ebnf___pyx_scope_struct_6_on_literal.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8DHParser_4ebnf___pyx_scope_struct_6_on_literal.tp_dictoffset && __pyx_type_8DHParser_4ebnf___pyx_scope_struct_6_on_literal.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_8DHParser_4ebnf___pyx_scope_struct_6_on_literal.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_8DHParser_4ebnf___pyx_scope_struct_6_on_literal = &__pyx_type_8DHParser_4ebnf___pyx_scope_struct_6_on_literal;
  if (PyType_Ready(&__pyx_type_8DHParser_4ebnf___pyx_scope_struct_7_genexpr) < 0) __PYX_ERR(0, 1222, __pyx_L1_error)
  __pyx_type_8DHParser_4ebnf___pyx_scope_struct_7_genexpr.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8DHParser_4ebnf___pyx_scope_struct_7_genexpr.tp_dictoffset && __pyx_type_8DHParser_4ebnf___pyx_scope_struct_7_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_8DHParser_4ebnf___pyx_scope_struct_7_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_8DHParser_4ebnf___pyx_scope_struct_7_genexpr = &__pyx_type_8DHParser_4ebnf___pyx_scope_struct_7_genexpr;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}


#if PY_MAJOR_VERSION < 3
#ifdef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC void
#else
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#endif
#else
#ifdef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC initebnf(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initebnf(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_ebnf(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_ebnf(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    #if PY_VERSION_HEX >= 0x030700A1
    static PY_INT64_T main_interpreter_id = -1;
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return (unlikely(current_id == -1)) ? -1 : 0;
    } else if (unlikely(main_interpreter_id != current_id))
    #else
    static PyInterpreterState *main_interpreter = NULL;
    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
    if (!main_interpreter) {
        main_interpreter = current_interpreter;
    } else if (unlikely(main_interpreter != current_interpreter))
    #endif
    {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
            result = PyDict_SetItemString(moddict, to_name, value);
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    if (__Pyx_check_single_interpreter())
        return NULL;
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec_ebnf(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'ebnf' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #elif PY_MAJOR_VERSION >= 3
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  #if CYTHON_REFNANNY
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
if (!__Pyx_RefNanny) {
  PyErr_Clear();
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  if (!__Pyx_RefNanny)
      Py_FatalError("failed to import 'refnanny' module");
}
#endif
  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_ebnf(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("ebnf", __pyx_methods, __pyx_k_Module_ebnf_provides_a_self_hos, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  #if CYTHON_COMPILING_IN_PYPY
  Py_INCREF(__pyx_b);
  #endif
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_DHParser__ebnf) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "DHParser.ebnf")) {
      if (unlikely(PyDict_SetItemString(modules, "DHParser.ebnf", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  (void)__Pyx_modinit_function_export_code();
  if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
  (void)__Pyx_modinit_type_import_code();
  (void)__Pyx_modinit_variable_import_code();
  (void)__Pyx_modinit_function_import_code();
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif

  /* "DHParser/ebnf.py":27
 * 
 * 
 * from collections import OrderedDict             # <<<<<<<<<<<<<<
 * from functools import partial
 * import keyword
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_OrderedDict);
  __Pyx_GIVEREF(__pyx_n_s_OrderedDict);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_OrderedDict);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OrderedDict, __pyx_t_1) < 0) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":28
 * 
 * from collections import OrderedDict
 * from functools import partial             # <<<<<<<<<<<<<<
 * import keyword
 * import os
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_partial);
  __Pyx_GIVEREF(__pyx_n_s_partial);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_partial);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_functools, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_partial); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_partial, __pyx_t_2) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":29
 * from collections import OrderedDict
 * from functools import partial
 * import keyword             # <<<<<<<<<<<<<<
 * import os
 * 
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_keyword, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_keyword, __pyx_t_1) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":30
 * from functools import partial
 * import keyword
 * import os             # <<<<<<<<<<<<<<
 * 
 * from DHParser.compile import CompilerError, Compiler, compile_source, visitor_name
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":32
 * import os
 * 
 * from DHParser.compile import CompilerError, Compiler, compile_source, visitor_name             # <<<<<<<<<<<<<<
 * from DHParser.error import Error
 * from DHParser.parse import Grammar, mixin_comment, Forward, RegExp, Whitespace, \
 */
  __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_CompilerError);
  __Pyx_GIVEREF(__pyx_n_s_CompilerError);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_CompilerError);
  __Pyx_INCREF(__pyx_n_s_Compiler);
  __Pyx_GIVEREF(__pyx_n_s_Compiler);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_Compiler);
  __Pyx_INCREF(__pyx_n_s_compile_source);
  __Pyx_GIVEREF(__pyx_n_s_compile_source);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_compile_source);
  __Pyx_INCREF(__pyx_n_s_visitor_name);
  __Pyx_GIVEREF(__pyx_n_s_visitor_name);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_visitor_name);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_DHParser_compile, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_CompilerError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CompilerError, __pyx_t_1) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Compiler); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Compiler, __pyx_t_1) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_compile_source); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_compile_source, __pyx_t_1) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_visitor_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_visitor_name, __pyx_t_1) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":33
 * 
 * from DHParser.compile import CompilerError, Compiler, compile_source, visitor_name
 * from DHParser.error import Error             # <<<<<<<<<<<<<<
 * from DHParser.parse import Grammar, mixin_comment, Forward, RegExp, Whitespace, \
 *     NegativeLookahead, Alternative, Series, Option, OneOrMore, ZeroOrMore, Token
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Error);
  __Pyx_GIVEREF(__pyx_n_s_Error);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Error);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_DHParser_error, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Error, __pyx_t_2) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":34
 * from DHParser.compile import CompilerError, Compiler, compile_source, visitor_name
 * from DHParser.error import Error
 * from DHParser.parse import Grammar, mixin_comment, Forward, RegExp, Whitespace, \             # <<<<<<<<<<<<<<
 *     NegativeLookahead, Alternative, Series, Option, OneOrMore, ZeroOrMore, Token
 * from DHParser.preprocess import nil_preprocessor, PreprocessorFunc
 */
  __pyx_t_1 = PyList_New(12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Grammar_2);
  __Pyx_GIVEREF(__pyx_n_s_Grammar_2);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Grammar_2);
  __Pyx_INCREF(__pyx_n_s_mixin_comment);
  __Pyx_GIVEREF(__pyx_n_s_mixin_comment);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_mixin_comment);
  __Pyx_INCREF(__pyx_n_s_Forward_2);
  __Pyx_GIVEREF(__pyx_n_s_Forward_2);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_Forward_2);
  __Pyx_INCREF(__pyx_n_s_RegExp_2);
  __Pyx_GIVEREF(__pyx_n_s_RegExp_2);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_RegExp_2);
  __Pyx_INCREF(__pyx_n_s_Whitespace);
  __Pyx_GIVEREF(__pyx_n_s_Whitespace);
  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_Whitespace);
  __Pyx_INCREF(__pyx_n_s_NegativeLookahead);
  __Pyx_GIVEREF(__pyx_n_s_NegativeLookahead);
  PyList_SET_ITEM(__pyx_t_1, 5, __pyx_n_s_NegativeLookahead);
  __Pyx_INCREF(__pyx_n_s_Alternative);
  __Pyx_GIVEREF(__pyx_n_s_Alternative);
  PyList_SET_ITEM(__pyx_t_1, 6, __pyx_n_s_Alternative);
  __Pyx_INCREF(__pyx_n_s_Series);
  __Pyx_GIVEREF(__pyx_n_s_Series);
  PyList_SET_ITEM(__pyx_t_1, 7, __pyx_n_s_Series);
  __Pyx_INCREF(__pyx_n_s_Option);
  __Pyx_GIVEREF(__pyx_n_s_Option);
  PyList_SET_ITEM(__pyx_t_1, 8, __pyx_n_s_Option);
  __Pyx_INCREF(__pyx_n_s_OneOrMore);
  __Pyx_GIVEREF(__pyx_n_s_OneOrMore);
  PyList_SET_ITEM(__pyx_t_1, 9, __pyx_n_s_OneOrMore);
  __Pyx_INCREF(__pyx_n_s_ZeroOrMore);
  __Pyx_GIVEREF(__pyx_n_s_ZeroOrMore);
  PyList_SET_ITEM(__pyx_t_1, 10, __pyx_n_s_ZeroOrMore);
  __Pyx_INCREF(__pyx_n_s_Token_2);
  __Pyx_GIVEREF(__pyx_n_s_Token_2);
  PyList_SET_ITEM(__pyx_t_1, 11, __pyx_n_s_Token_2);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_DHParser_parse, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Grammar_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Grammar_2, __pyx_t_1) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_mixin_comment); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mixin_comment, __pyx_t_1) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Forward_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Forward_2, __pyx_t_1) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_RegExp_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_RegExp_2, __pyx_t_1) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Whitespace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Whitespace, __pyx_t_1) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_NegativeLookahead); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NegativeLookahead, __pyx_t_1) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Alternative); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Alternative, __pyx_t_1) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Series); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Series, __pyx_t_1) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Option); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Option, __pyx_t_1) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_OneOrMore); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OneOrMore, __pyx_t_1) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_ZeroOrMore); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ZeroOrMore, __pyx_t_1) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Token_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Token_2, __pyx_t_1) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":36
 * from DHParser.parse import Grammar, mixin_comment, Forward, RegExp, Whitespace, \
 *     NegativeLookahead, Alternative, Series, Option, OneOrMore, ZeroOrMore, Token
 * from DHParser.preprocess import nil_preprocessor, PreprocessorFunc             # <<<<<<<<<<<<<<
 * from DHParser.syntaxtree import Node, WHITESPACE_PTYPE, TOKEN_PTYPE
 * from DHParser.toolkit import load_if_file, escape_re, md5, sane_parser_name, re, expand_table, \
 */
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_nil_preprocessor);
  __Pyx_GIVEREF(__pyx_n_s_nil_preprocessor);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_nil_preprocessor);
  __Pyx_INCREF(__pyx_n_s_PreprocessorFunc);
  __Pyx_GIVEREF(__pyx_n_s_PreprocessorFunc);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_PreprocessorFunc);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_DHParser_preprocess, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_nil_preprocessor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nil_preprocessor, __pyx_t_2) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_PreprocessorFunc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PreprocessorFunc, __pyx_t_2) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":37
 *     NegativeLookahead, Alternative, Series, Option, OneOrMore, ZeroOrMore, Token
 * from DHParser.preprocess import nil_preprocessor, PreprocessorFunc
 * from DHParser.syntaxtree import Node, WHITESPACE_PTYPE, TOKEN_PTYPE             # <<<<<<<<<<<<<<
 * from DHParser.toolkit import load_if_file, escape_re, md5, sane_parser_name, re, expand_table, \
 *     GLOBALS, CONFIG_PRESET, get_config_value, unrepr, typing
 */
  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Node);
  __Pyx_GIVEREF(__pyx_n_s_Node);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Node);
  __Pyx_INCREF(__pyx_n_s_WHITESPACE_PTYPE);
  __Pyx_GIVEREF(__pyx_n_s_WHITESPACE_PTYPE);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_WHITESPACE_PTYPE);
  __Pyx_INCREF(__pyx_n_s_TOKEN_PTYPE);
  __Pyx_GIVEREF(__pyx_n_s_TOKEN_PTYPE);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_TOKEN_PTYPE);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_DHParser_syntaxtree, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Node, __pyx_t_1) < 0) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_WHITESPACE_PTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_WHITESPACE_PTYPE, __pyx_t_1) < 0) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_TOKEN_PTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TOKEN_PTYPE, __pyx_t_1) < 0) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":38
 * from DHParser.preprocess import nil_preprocessor, PreprocessorFunc
 * from DHParser.syntaxtree import Node, WHITESPACE_PTYPE, TOKEN_PTYPE
 * from DHParser.toolkit import load_if_file, escape_re, md5, sane_parser_name, re, expand_table, \             # <<<<<<<<<<<<<<
 *     GLOBALS, CONFIG_PRESET, get_config_value, unrepr, typing
 * from DHParser.transform import TransformationFunc, traverse, remove_brackets, \
 */
  __pyx_t_2 = PyList_New(11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_load_if_file);
  __Pyx_GIVEREF(__pyx_n_s_load_if_file);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_load_if_file);
  __Pyx_INCREF(__pyx_n_s_escape_re);
  __Pyx_GIVEREF(__pyx_n_s_escape_re);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_escape_re);
  __Pyx_INCREF(__pyx_n_s_md5);
  __Pyx_GIVEREF(__pyx_n_s_md5);
  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_md5);
  __Pyx_INCREF(__pyx_n_s_sane_parser_name);
  __Pyx_GIVEREF(__pyx_n_s_sane_parser_name);
  PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_sane_parser_name);
  __Pyx_INCREF(__pyx_n_s_re);
  __Pyx_GIVEREF(__pyx_n_s_re);
  PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_s_re);
  __Pyx_INCREF(__pyx_n_s_expand_table);
  __Pyx_GIVEREF(__pyx_n_s_expand_table);
  PyList_SET_ITEM(__pyx_t_2, 5, __pyx_n_s_expand_table);
  __Pyx_INCREF(__pyx_n_s_GLOBALS);
  __Pyx_GIVEREF(__pyx_n_s_GLOBALS);
  PyList_SET_ITEM(__pyx_t_2, 6, __pyx_n_s_GLOBALS);
  __Pyx_INCREF(__pyx_n_s_CONFIG_PRESET);
  __Pyx_GIVEREF(__pyx_n_s_CONFIG_PRESET);
  PyList_SET_ITEM(__pyx_t_2, 7, __pyx_n_s_CONFIG_PRESET);
  __Pyx_INCREF(__pyx_n_s_get_config_value);
  __Pyx_GIVEREF(__pyx_n_s_get_config_value);
  PyList_SET_ITEM(__pyx_t_2, 8, __pyx_n_s_get_config_value);
  __Pyx_INCREF(__pyx_n_s_unrepr);
  __Pyx_GIVEREF(__pyx_n_s_unrepr);
  PyList_SET_ITEM(__pyx_t_2, 9, __pyx_n_s_unrepr);
  __Pyx_INCREF(__pyx_n_s_typing);
  __Pyx_GIVEREF(__pyx_n_s_typing);
  PyList_SET_ITEM(__pyx_t_2, 10, __pyx_n_s_typing);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_DHParser_toolkit, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_load_if_file); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_load_if_file, __pyx_t_2) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_escape_re); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_escape_re, __pyx_t_2) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_md5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_md5, __pyx_t_2) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_sane_parser_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sane_parser_name, __pyx_t_2) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_re); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_re, __pyx_t_2) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_expand_table); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_expand_table, __pyx_t_2) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_GLOBALS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_GLOBALS, __pyx_t_2) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CONFIG_PRESET); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CONFIG_PRESET, __pyx_t_2) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_get_config_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_config_value, __pyx_t_2) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_unrepr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_unrepr, __pyx_t_2) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_typing); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_typing, __pyx_t_2) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":40
 * from DHParser.toolkit import load_if_file, escape_re, md5, sane_parser_name, re, expand_table, \
 *     GLOBALS, CONFIG_PRESET, get_config_value, unrepr, typing
 * from DHParser.transform import TransformationFunc, traverse, remove_brackets, \             # <<<<<<<<<<<<<<
 *     reduce_single_child, replace_by_single_child, remove_expendables, \
 *     remove_tokens, flatten, forbid, assert_content
 */
  __pyx_t_1 = PyList_New(10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_TransformationFunc);
  __Pyx_GIVEREF(__pyx_n_s_TransformationFunc);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_TransformationFunc);
  __Pyx_INCREF(__pyx_n_s_traverse);
  __Pyx_GIVEREF(__pyx_n_s_traverse);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_traverse);
  __Pyx_INCREF(__pyx_n_s_remove_brackets);
  __Pyx_GIVEREF(__pyx_n_s_remove_brackets);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_remove_brackets);
  __Pyx_INCREF(__pyx_n_s_reduce_single_child);
  __Pyx_GIVEREF(__pyx_n_s_reduce_single_child);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_reduce_single_child);
  __Pyx_INCREF(__pyx_n_s_replace_by_single_child_2);
  __Pyx_GIVEREF(__pyx_n_s_replace_by_single_child_2);
  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_replace_by_single_child_2);
  __Pyx_INCREF(__pyx_n_s_remove_expendables);
  __Pyx_GIVEREF(__pyx_n_s_remove_expendables);
  PyList_SET_ITEM(__pyx_t_1, 5, __pyx_n_s_remove_expendables);
  __Pyx_INCREF(__pyx_n_s_remove_tokens);
  __Pyx_GIVEREF(__pyx_n_s_remove_tokens);
  PyList_SET_ITEM(__pyx_t_1, 6, __pyx_n_s_remove_tokens);
  __Pyx_INCREF(__pyx_n_s_flatten);
  __Pyx_GIVEREF(__pyx_n_s_flatten);
  PyList_SET_ITEM(__pyx_t_1, 7, __pyx_n_s_flatten);
  __Pyx_INCREF(__pyx_n_s_forbid);
  __Pyx_GIVEREF(__pyx_n_s_forbid);
  PyList_SET_ITEM(__pyx_t_1, 8, __pyx_n_s_forbid);
  __Pyx_INCREF(__pyx_n_s_assert_content);
  __Pyx_GIVEREF(__pyx_n_s_assert_content);
  PyList_SET_ITEM(__pyx_t_1, 9, __pyx_n_s_assert_content);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_DHParser_transform, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_TransformationFunc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TransformationFunc, __pyx_t_1) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_traverse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_traverse, __pyx_t_1) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_remove_brackets); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_remove_brackets, __pyx_t_1) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_reduce_single_child); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_single_child, __pyx_t_1) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_replace_by_single_child_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_replace_by_single_child_2, __pyx_t_1) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_remove_expendables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_remove_expendables, __pyx_t_1) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_remove_tokens); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_remove_tokens, __pyx_t_1) < 0) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_flatten); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_flatten, __pyx_t_1) < 0) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_forbid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_forbid, __pyx_t_1) < 0) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_assert_content); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_assert_content, __pyx_t_1) < 0) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":43
 *     reduce_single_child, replace_by_single_child, remove_expendables, \
 *     remove_tokens, flatten, forbid, assert_content
 * from DHParser.versionnumber import __version__             # <<<<<<<<<<<<<<
 * from typing import Callable, Dict, List, Set, Tuple, Sequence, Union, Optional, Any, cast
 * 
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_version);
  __Pyx_GIVEREF(__pyx_n_s_version);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_version);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_DHParser_versionnumber, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_t_2) < 0) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":44
 *     remove_tokens, flatten, forbid, assert_content
 * from DHParser.versionnumber import __version__
 * from typing import Callable, Dict, List, Set, Tuple, Sequence, Union, Optional, Any, cast             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = PyList_New(10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Callable);
  __Pyx_GIVEREF(__pyx_n_s_Callable);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Callable);
  __Pyx_INCREF(__pyx_n_s_Dict);
  __Pyx_GIVEREF(__pyx_n_s_Dict);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_Dict);
  __Pyx_INCREF(__pyx_n_s_List);
  __Pyx_GIVEREF(__pyx_n_s_List);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_List);
  __Pyx_INCREF(__pyx_n_s_Set);
  __Pyx_GIVEREF(__pyx_n_s_Set);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_Set);
  __Pyx_INCREF(__pyx_n_s_Tuple);
  __Pyx_GIVEREF(__pyx_n_s_Tuple);
  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_Tuple);
  __Pyx_INCREF(__pyx_n_s_Sequence);
  __Pyx_GIVEREF(__pyx_n_s_Sequence);
  PyList_SET_ITEM(__pyx_t_1, 5, __pyx_n_s_Sequence);
  __Pyx_INCREF(__pyx_n_s_Union);
  __Pyx_GIVEREF(__pyx_n_s_Union);
  PyList_SET_ITEM(__pyx_t_1, 6, __pyx_n_s_Union);
  __Pyx_INCREF(__pyx_n_s_Optional);
  __Pyx_GIVEREF(__pyx_n_s_Optional);
  PyList_SET_ITEM(__pyx_t_1, 7, __pyx_n_s_Optional);
  __Pyx_INCREF(__pyx_n_s_Any);
  __Pyx_GIVEREF(__pyx_n_s_Any);
  PyList_SET_ITEM(__pyx_t_1, 8, __pyx_n_s_Any);
  __Pyx_INCREF(__pyx_n_s_cast);
  __Pyx_GIVEREF(__pyx_n_s_cast);
  PyList_SET_ITEM(__pyx_t_1, 9, __pyx_n_s_cast);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Callable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Callable, __pyx_t_1) < 0) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Dict, __pyx_t_1) < 0) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_List); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_List, __pyx_t_1) < 0) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Set); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Set, __pyx_t_1) < 0) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Tuple, __pyx_t_1) < 0) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Sequence); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Sequence, __pyx_t_1) < 0) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Union); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Union, __pyx_t_1) < 0) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Optional); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Optional, __pyx_t_1) < 0) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Any); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Any, __pyx_t_1) < 0) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_cast); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cast, __pyx_t_1) < 0) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":47
 * 
 * 
 * __all__ = ('get_ebnf_preprocessor',             # <<<<<<<<<<<<<<
 *            'get_ebnf_grammar',
 *            'get_ebnf_transformer',
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_tuple__62) < 0) __PYX_ERR(0, 47, __pyx_L1_error)

  /* "DHParser/ebnf.py":69
 * ########################################################################
 * 
 * CONFIG_PRESET['add_grammar_source_to_parser_docstring'] = False             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONFIG_PRESET); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_n_u_add_grammar_source_to_parser_doc, Py_False) < 0)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":79
 * 
 * 
 * def get_ebnf_preprocessor() -> PreprocessorFunc:             # <<<<<<<<<<<<<<
 *     return nil_preprocessor
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PreprocessorFunc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_return, __pyx_t_1) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_1get_ebnf_preprocessor, 0, __pyx_n_s_get_ebnf_preprocessor, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_ebnf_preprocessor, __pyx_t_1) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":90
 * 
 * 
 * class EBNFGrammar(Grammar):             # <<<<<<<<<<<<<<
 *     r"""
 *     Parser for an EBNF source file, with this grammar:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Grammar_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_EBNFGrammar, __pyx_n_s_EBNFGrammar, (PyObject *) NULL, __pyx_n_s_DHParser_ebnf, __pyx_kp_s_Parser_for_an_EBNF_source_file); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "DHParser/ebnf.py":134
 *     EOF = !/./
 *     """
 *     expression = Forward()             # <<<<<<<<<<<<<<
 *     source_hash__ = "82a7c668f86b83f86515078e6c9093ed"
 *     parser_initialization__ = ["upon instantiation"]
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Forward_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_expression, __pyx_t_4) < 0) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "DHParser/ebnf.py":135
 *     """
 *     expression = Forward()
 *     source_hash__ = "82a7c668f86b83f86515078e6c9093ed"             # <<<<<<<<<<<<<<
 *     parser_initialization__ = ["upon instantiation"]
 *     COMMENT__ = r'#.*(?:\n|$)'
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_source_hash, __pyx_kp_u_82a7c668f86b83f86515078e6c9093ed) < 0) __PYX_ERR(0, 135, __pyx_L1_error)

  /* "DHParser/ebnf.py":136
 *     expression = Forward()
 *     source_hash__ = "82a7c668f86b83f86515078e6c9093ed"
 *     parser_initialization__ = ["upon instantiation"]             # <<<<<<<<<<<<<<
 *     COMMENT__ = r'#.*(?:\n|$)'
 *     WHITESPACE__ = r'\s*'
 */
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_kp_u_upon_instantiation_2);
  __Pyx_GIVEREF(__pyx_kp_u_upon_instantiation_2);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_upon_instantiation_2);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_parser_initialization, __pyx_t_4) < 0) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "DHParser/ebnf.py":137
 *     source_hash__ = "82a7c668f86b83f86515078e6c9093ed"
 *     parser_initialization__ = ["upon instantiation"]
 *     COMMENT__ = r'#.*(?:\n|$)'             # <<<<<<<<<<<<<<
 *     WHITESPACE__ = r'\s*'
 *     WSP_RE__ = mixin_comment(whitespace=WHITESPACE__, comment=COMMENT__)
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_COMMENT, __pyx_kp_u_n_2) < 0) __PYX_ERR(0, 137, __pyx_L1_error)

  /* "DHParser/ebnf.py":138
 *     parser_initialization__ = ["upon instantiation"]
 *     COMMENT__ = r'#.*(?:\n|$)'
 *     WHITESPACE__ = r'\s*'             # <<<<<<<<<<<<<<
 *     WSP_RE__ = mixin_comment(whitespace=WHITESPACE__, comment=COMMENT__)
 *     wsp__ = Whitespace(WSP_RE__)
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_WHITESPACE, __pyx_kp_u_s_4) < 0) __PYX_ERR(0, 138, __pyx_L1_error)

  /* "DHParser/ebnf.py":139
 *     COMMENT__ = r'#.*(?:\n|$)'
 *     WHITESPACE__ = r'\s*'
 *     WSP_RE__ = mixin_comment(whitespace=WHITESPACE__, comment=COMMENT__)             # <<<<<<<<<<<<<<
 *     wsp__ = Whitespace(WSP_RE__)
 *     EOF = NegativeLookahead(RegExp('.'))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_mixin_comment); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_WHITESPACE);
  if (unlikely(!__pyx_t_6)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_WHITESPACE);
  }
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_whitespace, __pyx_t_6) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_COMMENT);
  if (unlikely(!__pyx_t_6)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_COMMENT);
  }
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_comment, __pyx_t_6) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_WSP_RE, __pyx_t_6) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "DHParser/ebnf.py":140
 *     WHITESPACE__ = r'\s*'
 *     WSP_RE__ = mixin_comment(whitespace=WHITESPACE__, comment=COMMENT__)
 *     wsp__ = Whitespace(WSP_RE__)             # <<<<<<<<<<<<<<
 *     EOF = NegativeLookahead(RegExp('.'))
 *     whitespace = Series(RegExp('~'), wsp__)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Whitespace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_WSP_RE);
  if (unlikely(!__pyx_t_4)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_WSP_RE);
  }
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_wsp, __pyx_t_6) < 0) __PYX_ERR(0, 140, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "DHParser/ebnf.py":141
 *     WSP_RE__ = mixin_comment(whitespace=WHITESPACE__, comment=COMMENT__)
 *     wsp__ = Whitespace(WSP_RE__)
 *     EOF = NegativeLookahead(RegExp('.'))             # <<<<<<<<<<<<<<
 *     whitespace = Series(RegExp('~'), wsp__)
 *     regexp = Series(RegExp('/(?:\\\\/|[^/])*?/'), wsp__)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_NegativeLookahead); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_RegExp_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_kp_u__25) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_kp_u__25);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_EOF, __pyx_t_6) < 0) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "DHParser/ebnf.py":142
 *     wsp__ = Whitespace(WSP_RE__)
 *     EOF = NegativeLookahead(RegExp('.'))
 *     whitespace = Series(RegExp('~'), wsp__)             # <<<<<<<<<<<<<<
 *     regexp = Series(RegExp('/(?:\\\\/|[^/])*?/'), wsp__)
 *     plaintext = Series(RegExp('`(?:[^"]|\\\\")*?`'), wsp__)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Series); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_RegExp_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_kp_u__12) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_kp_u__12);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wsp);
  if (unlikely(!__pyx_t_7)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_wsp);
  }
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_4, __pyx_t_7};
    __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 142, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_4, __pyx_t_7};
    __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 142, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_8) {
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7);
    __pyx_t_4 = 0;
    __pyx_t_7 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_whitespace, __pyx_t_6) < 0) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "DHParser/ebnf.py":143
 *     EOF = NegativeLookahead(RegExp('.'))
 *     whitespace = Series(RegExp('~'), wsp__)
 *     regexp = Series(RegExp('/(?:\\\\/|[^/])*?/'), wsp__)             # <<<<<<<<<<<<<<
 *     plaintext = Series(RegExp('`(?:[^"]|\\\\")*?`'), wsp__)
 *     literal = Alternative(Series(RegExp('"(?:[^"]|\\\\")*?"'), wsp__), Series(RegExp("'(?:[^']|\\\\')*?'"), wsp__))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Series); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_RegExp_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_10 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_4, __pyx_kp_u__64) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_kp_u__64);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wsp);
  if (unlikely(!__pyx_t_7)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_wsp);
  }
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_10, __pyx_t_7};
    __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 143, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_10, __pyx_t_7};
    __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 143, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_9, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_9, __pyx_t_7);
    __pyx_t_10 = 0;
    __pyx_t_7 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_regexp, __pyx_t_6) < 0) __PYX_ERR(0, 143, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "DHParser/ebnf.py":144
 *     whitespace = Series(RegExp('~'), wsp__)
 *     regexp = Series(RegExp('/(?:\\\\/|[^/])*?/'), wsp__)
 *     plaintext = Series(RegExp('`(?:[^"]|\\\\")*?`'), wsp__)             # <<<<<<<<<<<<<<
 *     literal = Alternative(Series(RegExp('"(?:[^"]|\\\\")*?"'), wsp__), Series(RegExp("'(?:[^']|\\\\')*?'"), wsp__))
 *     symbol = Series(RegExp('(?!\\d)\\w+'), wsp__)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Series); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_RegExp_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_10 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_10, __pyx_kp_u__65) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_kp_u__65);
  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wsp);
  if (unlikely(!__pyx_t_7)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_wsp);
  }
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_10 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_8, __pyx_t_7};
    __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 144, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_8, __pyx_t_7};
    __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 144, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  {
    __pyx_t_4 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__pyx_t_10) {
      __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_10); __pyx_t_10 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_9, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_9, __pyx_t_7);
    __pyx_t_8 = 0;
    __pyx_t_7 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_plaintext, __pyx_t_6) < 0) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "DHParser/ebnf.py":145
 *     regexp = Series(RegExp('/(?:\\\\/|[^/])*?/'), wsp__)
 *     plaintext = Series(RegExp('`(?:[^"]|\\\\")*?`'), wsp__)
 *     literal = Alternative(Series(RegExp('"(?:[^"]|\\\\")*?"'), wsp__), Series(RegExp("'(?:[^']|\\\\')*?'"), wsp__))             # <<<<<<<<<<<<<<
 *     symbol = Series(RegExp('(?!\\d)\\w+'), wsp__)
 *     option = Series(Series(Token("["), wsp__), expression, Series(Token("]"), wsp__), mandatory=1)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Alternative); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Series); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_RegExp_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_10, function);
    }
  }
  __pyx_t_8 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_11, __pyx_kp_u__66) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_kp_u__66);
  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wsp);
  if (unlikely(!__pyx_t_10)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_wsp);
  }
  if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_7)) {
    PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_8, __pyx_t_10};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 145, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
    PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_8, __pyx_t_10};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 145, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  } else
  #endif
  {
    __pyx_t_12 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    if (__pyx_t_11) {
      __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_9, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_9, __pyx_t_10);
    __pyx_t_8 = 0;
    __pyx_t_10 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Series); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_RegExp_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_11 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  __pyx_t_10 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_11, __pyx_kp_u__67) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_kp_u__67);
  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wsp);
  if (unlikely(!__pyx_t_8)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_wsp);
  }
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_11 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_12, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_12)) {
    PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_10, __pyx_t_8};
    __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 145, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
    PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_10, __pyx_t_8};
    __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 145, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  } else
  #endif
  {
    __pyx_t_13 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    if (__pyx_t_11) {
      __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11); __pyx_t_11 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_9, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_9, __pyx_t_8);
    __pyx_t_10 = 0;
    __pyx_t_8 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_13, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_t_4, __pyx_t_7};
    __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 145, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_t_4, __pyx_t_7};
    __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 145, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  {
    __pyx_t_13 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    if (__pyx_t_12) {
      __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_9, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_9, __pyx_t_7);
    __pyx_t_4 = 0;
    __pyx_t_7 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_literal, __pyx_t_6) < 0) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "DHParser/ebnf.py":146
 *     plaintext = Series(RegExp('`(?:[^"]|\\\\")*?`'), wsp__)
 *     literal = Alternative(Series(RegExp('"(?:[^"]|\\\\")*?"'), wsp__), Series(RegExp("'(?:[^']|\\\\')*?'"), wsp__))
 *     symbol = Series(RegExp('(?!\\d)\\w+'), wsp__)             # <<<<<<<<<<<<<<
 *     option = Series(Series(Token("["), wsp__), expression, Series(Token("]"), wsp__), mandatory=1)
 *     repetition = Series(Series(Token("{"), wsp__), expression, Series(Token("}"), wsp__), mandatory=1)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Series); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_RegExp_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_13 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_4, __pyx_kp_u_d_w) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_kp_u_d_w);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wsp);
  if (unlikely(!__pyx_t_7)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_wsp);
  }
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_13, __pyx_t_7};
    __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 146, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_13, __pyx_t_7};
    __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 146, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  {
    __pyx_t_12 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_9, __pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_9, __pyx_t_7);
    __pyx_t_13 = 0;
    __pyx_t_7 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_symbol, __pyx_t_6) < 0) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "DHParser/ebnf.py":147
 *     literal = Alternative(Series(RegExp('"(?:[^"]|\\\\")*?"'), wsp__), Series(RegExp("'(?:[^']|\\\\')*?'"), wsp__))
 *     symbol = Series(RegExp('(?!\\d)\\w+'), wsp__)
 *     option = Series(Series(Token("["), wsp__), expression, Series(Token("]"), wsp__), mandatory=1)             # <<<<<<<<<<<<<<
 *     repetition = Series(Series(Token("{"), wsp__), expression, Series(Token("}"), wsp__), mandatory=1)
 *     oneormore = Series(Series(Token("{"), wsp__), expression, Series(Token("}+"), wsp__))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Series); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Series); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_Token_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_13);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_13, function);
    }
  }
  __pyx_t_7 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_4, __pyx_kp_u__68) : __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_kp_u__68);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_t_13 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wsp);
  if (unlikely(!__pyx_t_13)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_wsp);
  }
  if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_4 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_12);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_12, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_12)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_7, __pyx_t_13};
    __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 147, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_7, __pyx_t_13};
    __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 147, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_9, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_9, __pyx_t_13);
    __pyx_t_7 = 0;
    __pyx_t_13 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_expression);
  if (unlikely(!__pyx_t_12)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_expression);
  }
  if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_Series); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Token_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_10, __pyx_kp_u__69) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u__69);
  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wsp);
  if (unlikely(!__pyx_t_4)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_wsp);
  }
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_13);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_13, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_13)) {
    PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_7, __pyx_t_4};
    __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 147, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) {
    PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_7, __pyx_t_4};
    __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 147, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_11 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (__pyx_t_10) {
      __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_9, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_9, __pyx_t_4);
    __pyx_t_7 = 0;
    __pyx_t_4 = 0;
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_t_13 = PyTuple_New(3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_12);
  PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_t_8);
  __pyx_t_5 = 0;
  __pyx_t_12 = 0;
  __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_mandatory, __pyx_int_1) < 0) __PYX_ERR(0, 147, __pyx_L1_error)
  __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_13, __pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_option, __pyx_t_12) < 0) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "DHParser/ebnf.py":148
 *     symbol = Series(RegExp('(?!\\d)\\w+'), wsp__)
 *     option = Series(Series(Token("["), wsp__), expression, Series(Token("]"), wsp__), mandatory=1)
 *     repetition = Series(Series(Token("{"), wsp__), expression, Series(Token("}"), wsp__), mandatory=1)             # <<<<<<<<<<<<<<
 *     oneormore = Series(Series(Token("{"), wsp__), expression, Series(Token("}+"), wsp__))
 *     unordered = Series(Series(Token("<"), wsp__), expression, Series(Token(">"), wsp__), mandatory=1)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Series); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_Series); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Token_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_11 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_6 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_11, __pyx_kp_u__70) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__70);
  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wsp);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_wsp);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_11 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_13);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_13, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_13)) {
    PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_6, __pyx_t_5};
    __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) {
    PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_6, __pyx_t_5};
    __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_4 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__pyx_t_11) {
      __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_11); __pyx_t_11 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_9, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_9, __pyx_t_5);
    __pyx_t_6 = 0;
    __pyx_t_5 = 0;
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_t_13 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_expression);
  if (unlikely(!__pyx_t_13)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_expression);
  }
  if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Series); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_Token_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
    }
  }
  __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_7, __pyx_kp_u__6) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_kp_u__6);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wsp);
  if (unlikely(!__pyx_t_11)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_wsp);
  }
  if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_7 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_t_11};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_t_11};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_11);
    __pyx_t_6 = 0;
    __pyx_t_11 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_13);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_13);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
  __pyx_t_8 = 0;
  __pyx_t_13 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_mandatory, __pyx_int_1) < 0) __PYX_ERR(0, 148, __pyx_L1_error)
  __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_repetition, __pyx_t_13) < 0) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "DHParser/ebnf.py":149
 *     option = Series(Series(Token("["), wsp__), expression, Series(Token("]"), wsp__), mandatory=1)
 *     repetition = Series(Series(Token("{"), wsp__), expression, Series(Token("}"), wsp__), mandatory=1)
 *     oneormore = Series(Series(Token("{"), wsp__), expression, Series(Token("}+"), wsp__))             # <<<<<<<<<<<<<<
 *     unordered = Series(Series(Token("<"), wsp__), expression, Series(Token(">"), wsp__), mandatory=1)
 *     group = Series(Series(Token("("), wsp__), expression, Series(Token(")"), wsp__), mandatory=1)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Series); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Series); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Token_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_10, function);
    }
  }
  __pyx_t_8 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_11, __pyx_kp_u__70) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_kp_u__70);
  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wsp);
  if (unlikely(!__pyx_t_10)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_wsp);
  }
  if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_12, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_12)) {
    PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_8, __pyx_t_10};
    __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 149, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
    PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_8, __pyx_t_10};
    __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 149, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_11) {
      __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_11); __pyx_t_11 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_9, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_9, __pyx_t_10);
    __pyx_t_8 = 0;
    __pyx_t_10 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_expression);
  if (unlikely(!__pyx_t_12)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_expression);
  }
  if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Series); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_Token_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
    }
  }
  __pyx_t_8 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_7, __pyx_kp_u__71) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_kp_u__71);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wsp);
  if (unlikely(!__pyx_t_11)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_wsp);
  }
  if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_7 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_10);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_10, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_10)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_8, __pyx_t_11};
    __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 149, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_8, __pyx_t_11};
    __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 149, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  } else
  #endif
  {
    __pyx_t_14 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_9, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_9, __pyx_t_11);
    __pyx_t_8 = 0;
    __pyx_t_11 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_14, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_t_5, __pyx_t_12, __pyx_t_6};
    __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 149, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_t_5, __pyx_t_12, __pyx_t_6};
    __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 149, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_14 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    if (__pyx_t_10) {
      __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_10); __pyx_t_10 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_9, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_9, __pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_9, __pyx_t_6);
    __pyx_t_5 = 0;
    __pyx_t_12 = 0;
    __pyx_t_6 = 0;
    __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_oneormore, __pyx_t_13) < 0) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "DHParser/ebnf.py":150
 *     repetition = Series(Series(Token("{"), wsp__), expression, Series(Token("}"), wsp__), mandatory=1)
 *     oneormore = Series(Series(Token("{"), wsp__), expression, Series(Token("}+"), wsp__))
 *     unordered = Series(Series(Token("<"), wsp__), expression, Series(Token(">"), wsp__), mandatory=1)             # <<<<<<<<<<<<<<
 *     group = Series(Series(Token("("), wsp__), expression, Series(Token(")"), wsp__), mandatory=1)
 *     retrieveop = Alternative(Series(Token("::"), wsp__), Series(Token(":"), wsp__))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_Series); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_Series); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Token_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_12);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_12, function);
    }
  }
  __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_5, __pyx_kp_u__10) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_kp_u__10);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wsp);
  if (unlikely(!__pyx_t_12)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_wsp);
  }
  if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_5 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_14);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_14, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_14)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_6, __pyx_t_12};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 150, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_6, __pyx_t_12};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 150, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_12);
    __pyx_t_6 = 0;
    __pyx_t_12 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __pyx_t_14 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_expression);
  if (unlikely(!__pyx_t_14)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_expression);
  }
  if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Series); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Token_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_11 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_6 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_11, __pyx_kp_u__11) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__11);
  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wsp);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_wsp);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_11 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_12, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_12)) {
    PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_6, __pyx_t_5};
    __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 150, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
    PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_6, __pyx_t_5};
    __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 150, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_11) {
      __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_11); __pyx_t_11 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_9, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_9, __pyx_t_5);
    __pyx_t_6 = 0;
    __pyx_t_5 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_8, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_14);
  PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_14);
  __Pyx_GIVEREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_10);
  __pyx_t_4 = 0;
  __pyx_t_14 = 0;
  __pyx_t_10 = 0;
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_mandatory, __pyx_int_1) < 0) __PYX_ERR(0, 150, __pyx_L1_error)
  __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_12, __pyx_t_10); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_unordered, __pyx_t_14) < 0) __PYX_ERR(0, 150, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "DHParser/ebnf.py":151
 *     oneormore = Series(Series(Token("{"), wsp__), expression, Series(Token("}+"), wsp__))
 *     unordered = Series(Series(Token("<"), wsp__), expression, Series(Token(">"), wsp__), mandatory=1)
 *     group = Series(Series(Token("("), wsp__), expression, Series(Token(")"), wsp__), mandatory=1)             # <<<<<<<<<<<<<<
 *     retrieveop = Alternative(Series(Token("::"), wsp__), Series(Token(":"), wsp__))
 *     flowmarker = Alternative(Series(Token("!"), wsp__), Series(Token("&"), wsp__),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_Series); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Series); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Token_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_13 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_kp_u__33) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u__33);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wsp);
  if (unlikely(!__pyx_t_4)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_wsp);
  }
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_12);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_12, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_12)) {
    PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_13, __pyx_t_4};
    __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 151, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
    PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_13, __pyx_t_4};
    __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 151, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_8) {
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); __pyx_t_8 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_9, __pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_9, __pyx_t_4);
    __pyx_t_13 = 0;
    __pyx_t_4 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_5, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_expression);
  if (unlikely(!__pyx_t_12)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_expression);
  }
  if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Series); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_Token_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  __pyx_t_13 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_6, __pyx_kp_u__15) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_kp_u__15);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wsp);
  if (unlikely(!__pyx_t_8)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_wsp);
  }
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_13, __pyx_t_8};
    __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 151, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_13, __pyx_t_8};
    __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 151, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  } else
  #endif
  {
    __pyx_t_11 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_9, __pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_9, __pyx_t_8);
    __pyx_t_13 = 0;
    __pyx_t_8 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_12);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_5);
  __pyx_t_10 = 0;
  __pyx_t_12 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_mandatory, __pyx_int_1) < 0) __PYX_ERR(0, 151, __pyx_L1_error)
  __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_group, __pyx_t_12) < 0) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "DHParser/ebnf.py":152
 *     unordered = Series(Series(Token("<"), wsp__), expression, Series(Token(">"), wsp__), mandatory=1)
 *     group = Series(Series(Token("("), wsp__), expression, Series(Token(")"), wsp__), mandatory=1)
 *     retrieveop = Alternative(Series(Token("::"), wsp__), Series(Token(":"), wsp__))             # <<<<<<<<<<<<<<
 *     flowmarker = Alternative(Series(Token("!"), wsp__), Series(Token("&"), wsp__),
 *                              Series(Token("-!"), wsp__), Series(Token("-&"), wsp__))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Alternative); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_Series); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_Token_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
    }
  }
  __pyx_t_10 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_8, __pyx_kp_u__49) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_kp_u__49);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wsp);
  if (unlikely(!__pyx_t_11)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_wsp);
  }
  if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_8 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_14);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_14, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_14)) {
    PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_10, __pyx_t_11};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 152, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
    PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_10, __pyx_t_11};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 152, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  } else
  #endif
  {
    __pyx_t_13 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    if (__pyx_t_8) {
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_8); __pyx_t_8 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_9, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_9, __pyx_t_11);
    __pyx_t_10 = 0;
    __pyx_t_11 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  }
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_Series); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Token_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_10, function);
    }
  }
  __pyx_t_11 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_8, __pyx_kp_u__13) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_kp_u__13);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wsp);
  if (unlikely(!__pyx_t_10)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_wsp);
  }
  if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_8 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_13);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_13, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_13)) {
    PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_11, __pyx_t_10};
    __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 152, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) {
    PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_11, __pyx_t_10};
    __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 152, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_8) {
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_9, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_9, __pyx_t_10);
    __pyx_t_11 = 0;
    __pyx_t_10 = 0;
    __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_6, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_t_13 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_13)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_13);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_t_4, __pyx_t_14};
    __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 152, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_t_4, __pyx_t_14};
    __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 152, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_13) {
      __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_13); __pyx_t_13 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_9, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_14);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_9, __pyx_t_14);
    __pyx_t_4 = 0;
    __pyx_t_14 = 0;
    __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_retrieveop, __pyx_t_12) < 0) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "DHParser/ebnf.py":153
 *     group = Series(Series(Token("("), wsp__), expression, Series(Token(")"), wsp__), mandatory=1)
 *     retrieveop = Alternative(Series(Token("::"), wsp__), Series(Token(":"), wsp__))
 *     flowmarker = Alternative(Series(Token("!"), wsp__), Series(Token("&"), wsp__),             # <<<<<<<<<<<<<<
 *                              Series(Token("-!"), wsp__), Series(Token("-&"), wsp__))
 *     factor = Alternative(Series(Option(flowmarker), Option(retrieveop), symbol,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Alternative); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_Series); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_Token_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_10 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_13);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_13, function);
    }
  }
  __pyx_t_4 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_10, __pyx_kp_u__72) : __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_kp_u__72);
  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_t_13 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wsp);
  if (unlikely(!__pyx_t_13)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_wsp);
  }
  if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_10 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_14);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_14, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_14)) {
    PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_4, __pyx_t_13};
    __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
    PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_4, __pyx_t_13};
    __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  } else
  #endif
  {
    __pyx_t_11 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (__pyx_t_10) {
      __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_9, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_9, __pyx_t_13);
    __pyx_t_4 = 0;
    __pyx_t_13 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_Series); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Token_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_13 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_10, __pyx_kp_u__73) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u__73);
  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wsp);
  if (unlikely(!__pyx_t_4)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_wsp);
  }
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_11)) {
    PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_13, __pyx_t_4};
    __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 153, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
    PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_13, __pyx_t_4};
    __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 153, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_10) {
      __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10); __pyx_t_10 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_9, __pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_9, __pyx_t_4);
    __pyx_t_13 = 0;
    __pyx_t_4 = 0;
    __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_8, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "DHParser/ebnf.py":154
 *     retrieveop = Alternative(Series(Token("::"), wsp__), Series(Token(":"), wsp__))
 *     flowmarker = Alternative(Series(Token("!"), wsp__), Series(Token("&"), wsp__),
 *                              Series(Token("-!"), wsp__), Series(Token("-&"), wsp__))             # <<<<<<<<<<<<<<
 *     factor = Alternative(Series(Option(flowmarker), Option(retrieveop), symbol,
 *                                 NegativeLookahead(Series(Token("="), wsp__))), Series(Option(flowmarker), literal),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_Series); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_Token_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_10 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_13);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_13, function);
    }
  }
  __pyx_t_4 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_10, __pyx_kp_u__74) : __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_kp_u__74);
  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_t_13 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wsp);
  if (unlikely(!__pyx_t_13)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_wsp);
  }
  if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_10 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_8)) {
    PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_4, __pyx_t_13};
    __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 154, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
    PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_4, __pyx_t_13};
    __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 154, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_10) {
      __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_10); __pyx_t_10 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_9, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_9, __pyx_t_13);
    __pyx_t_4 = 0;
    __pyx_t_13 = 0;
    __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Series); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Token_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_13 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_10, __pyx_kp_u__75) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u__75);
  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wsp);
  if (unlikely(!__pyx_t_4)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_wsp);
  }
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_7)) {
    PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_13, __pyx_t_4};
    __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 154, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
    PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_13, __pyx_t_4};
    __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 154, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_15 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    if (__pyx_t_10) {
      __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_10); __pyx_t_10 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_9, __pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_9, __pyx_t_4);
    __pyx_t_13 = 0;
    __pyx_t_4 = 0;
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_15, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_t_6, __pyx_t_14, __pyx_t_11, __pyx_t_8};
    __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 153, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_t_6, __pyx_t_14, __pyx_t_11, __pyx_t_8};
    __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 153, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  } else
  #endif
  {
    __pyx_t_15 = PyTuple_New(4+__pyx_t_9); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_9, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_14);
    PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_9, __pyx_t_14);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_9, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_15, 3+__pyx_t_9, __pyx_t_8);
    __pyx_t_6 = 0;
    __pyx_t_14 = 0;
    __pyx_t_11 = 0;
    __pyx_t_8 = 0;
    __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_15, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_flowmarker, __pyx_t_12) < 0) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "DHParser/ebnf.py":155
 *     flowmarker = Alternative(Series(Token("!"), wsp__), Series(Token("&"), wsp__),
 *                              Series(Token("-!"), wsp__), Series(Token("-&"), wsp__))
 *     factor = Alternative(Series(Option(flowmarker), Option(retrieveop), symbol,             # <<<<<<<<<<<<<<
 *                                 NegativeLookahead(Series(Token("="), wsp__))), Series(Option(flowmarker), literal),
 *                          Series(Option(flowmarker), plaintext), Series(Option(flowmarker), regexp),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Alternative); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_Series); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_Option); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_6 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_flowmarker);
  if (unlikely(!__pyx_t_6)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_flowmarker);
  }
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_14);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_14, function);
    }
  }
  __pyx_t_11 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Option); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_retrieveop);
  if (unlikely(!__pyx_t_7)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_retrieveop);
  }
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_14 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_4, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_symbol);
  if (unlikely(!__pyx_t_6)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_symbol);
  }
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "DHParser/ebnf.py":156
 *                              Series(Token("-!"), wsp__), Series(Token("-&"), wsp__))
 *     factor = Alternative(Series(Option(flowmarker), Option(retrieveop), symbol,
 *                                 NegativeLookahead(Series(Token("="), wsp__))), Series(Option(flowmarker), literal),             # <<<<<<<<<<<<<<
 *                          Series(Option(flowmarker), plaintext), Series(Option(flowmarker), regexp),
 *                          Series(Option(flowmarker), whitespace), Series(Option(flowmarker), oneormore),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_NegativeLookahead); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Series); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_Token_2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __pyx_t_18 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_17))) {
    __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_17);
    if (likely(__pyx_t_18)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
      __Pyx_INCREF(__pyx_t_18);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_17, function);
    }
  }
  __pyx_t_16 = (__pyx_t_18) ? __Pyx_PyObject_Call2Args(__pyx_t_17, __pyx_t_18, __pyx_kp_u__76) : __Pyx_PyObject_CallOneArg(__pyx_t_17, __pyx_kp_u__76);
  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  __pyx_t_17 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wsp);
  if (unlikely(!__pyx_t_17)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_wsp);
  }
  if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __pyx_t_18 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
    __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_10);
    if (likely(__pyx_t_18)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_18);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_10, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_10)) {
    PyObject *__pyx_temp[3] = {__pyx_t_18, __pyx_t_16, __pyx_t_17};
    __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
    PyObject *__pyx_temp[3] = {__pyx_t_18, __pyx_t_16, __pyx_t_17};
    __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  } else
  #endif
  {
    __pyx_t_19 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    if (__pyx_t_18) {
      __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_18); __pyx_t_18 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_16);
    PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_9, __pyx_t_16);
    __Pyx_GIVEREF(__pyx_t_17);
    PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_9, __pyx_t_17);
    __pyx_t_16 = 0;
    __pyx_t_17 = 0;
    __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_19, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_10, __pyx_t_13) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_13);
  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_8)) {
    PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_t_11, __pyx_t_14, __pyx_t_6, __pyx_t_7};
    __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 155, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
    PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_t_11, __pyx_t_14, __pyx_t_6, __pyx_t_7};
    __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 155, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  {
    __pyx_t_13 = PyTuple_New(4+__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 155, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_9, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_14);
    PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_9, __pyx_t_14);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_13, 2+__pyx_t_9, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_13, 3+__pyx_t_9, __pyx_t_7);
    __pyx_t_11 = 0;
    __pyx_t_14 = 0;
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_13, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 155, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_Series); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Option); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_14 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_flowmarker);
  if (unlikely(!__pyx_t_14)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_flowmarker);
  }
  if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_11 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_7 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_11, __pyx_t_14) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_14);
  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_literal);
  if (unlikely(!__pyx_t_6)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_literal);
  }
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_14 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) {
    __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13);
    if (likely(__pyx_t_14)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
      __Pyx_INCREF(__pyx_t_14);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_13, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_13)) {
    PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_7, __pyx_t_6};
    __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) {
    PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_7, __pyx_t_6};
    __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_11 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (__pyx_t_14) {
      __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_14); __pyx_t_14 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_9, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_9, __pyx_t_6);
    __pyx_t_7 = 0;
    __pyx_t_6 = 0;
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "DHParser/ebnf.py":157
 *     factor = Alternative(Series(Option(flowmarker), Option(retrieveop), symbol,
 *                                 NegativeLookahead(Series(Token("="), wsp__))), Series(Option(flowmarker), literal),
 *                          Series(Option(flowmarker), plaintext), Series(Option(flowmarker), regexp),             # <<<<<<<<<<<<<<
 *                          Series(Option(flowmarker), whitespace), Series(Option(flowmarker), oneormore),
 *                          Series(Option(flowmarker), group), Series(Option(flowmarker), unordered), repetition, option)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_Series); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Option); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_14 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_flowmarker);
  if (unlikely(!__pyx_t_14)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_flowmarker);
  }
  if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_4, __pyx_t_14) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_14);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_plaintext);
  if (unlikely(!__pyx_t_7)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_plaintext);
  }
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_14 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_14)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_14);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_11)) {
    PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_6, __pyx_t_7};
    __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 157, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
    PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_6, __pyx_t_7};
    __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 157, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  {
    __pyx_t_4 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__pyx_t_14) {
      __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_14); __pyx_t_14 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_9, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_9, __pyx_t_7);
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_4, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Series); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Option); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_14 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_flowmarker);
  if (unlikely(!__pyx_t_14)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_flowmarker);
  }
  if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_10 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_10, __pyx_t_14) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_14);
  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_regexp);
  if (unlikely(!__pyx_t_6)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_regexp);
  }
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_14 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_14)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_14);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_7, __pyx_t_6};
    __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 157, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_7, __pyx_t_6};
    __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 157, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_14) {
      __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_14); __pyx_t_14 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_6);
    __pyx_t_7 = 0;
    __pyx_t_6 = 0;
    __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "DHParser/ebnf.py":158
 *                                 NegativeLookahead(Series(Token("="), wsp__))), Series(Option(flowmarker), literal),
 *                          Series(Option(flowmarker), plaintext), Series(Option(flowmarker), regexp),
 *                          Series(Option(flowmarker), whitespace), Series(Option(flowmarker), oneormore),             # <<<<<<<<<<<<<<
 *                          Series(Option(flowmarker), group), Series(Option(flowmarker), unordered), repetition, option)
 *     term = OneOrMore(Series(Option(Series(Token(""), wsp__)), factor))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Series); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Option); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_14 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_flowmarker);
  if (unlikely(!__pyx_t_14)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_flowmarker);
  }
  if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_19 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_19)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_19);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_6 = (__pyx_t_19) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_19, __pyx_t_14) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_14);
  __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_whitespace);
  if (unlikely(!__pyx_t_7)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_whitespace);
  }
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_14 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
    __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_10);
    if (likely(__pyx_t_14)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_14);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_10, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_10)) {
    PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_6, __pyx_t_7};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 158, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
    PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_6, __pyx_t_7};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 158, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  {
    __pyx_t_19 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 158, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    if (__pyx_t_14) {
      __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_14); __pyx_t_14 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_9, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_9, __pyx_t_7);
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_19, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 158, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_Series); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Option); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_14 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_flowmarker);
  if (unlikely(!__pyx_t_14)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_flowmarker);
  }
  if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_17 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_17)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_17);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_7 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_17, __pyx_t_14) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_14);
  __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_oneormore);
  if (unlikely(!__pyx_t_6)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_oneormore);
  }
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_14 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_19))) {
    __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_19);
    if (likely(__pyx_t_14)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_19);
      __Pyx_INCREF(__pyx_t_14);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_19, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_19)) {
    PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_7, __pyx_t_6};
    __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_19, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 158, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_19)) {
    PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_7, __pyx_t_6};
    __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_19, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 158, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_17 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 158, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    if (__pyx_t_14) {
      __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_14); __pyx_t_14 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_9, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_9, __pyx_t_6);
    __pyx_t_7 = 0;
    __pyx_t_6 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_19, __pyx_t_17, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 158, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  }
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "DHParser/ebnf.py":159
 *                          Series(Option(flowmarker), plaintext), Series(Option(flowmarker), regexp),
 *                          Series(Option(flowmarker), whitespace), Series(Option(flowmarker), oneormore),
 *                          Series(Option(flowmarker), group), Series(Option(flowmarker), unordered), repetition, option)             # <<<<<<<<<<<<<<
 *     term = OneOrMore(Series(Option(Series(Token(""), wsp__)), factor))
 *     expression.set(Series(term, ZeroOrMore(Series(Series(Token("|"), wsp__), term))))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_Series); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Option); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_14 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_flowmarker);
  if (unlikely(!__pyx_t_14)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_flowmarker);
  }
  if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_16 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_16)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_16);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_6 = (__pyx_t_16) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_16, __pyx_t_14) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_14);
  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_group);
  if (unlikely(!__pyx_t_7)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_group);
  }
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_14 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_17))) {
    __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_17);
    if (likely(__pyx_t_14)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
      __Pyx_INCREF(__pyx_t_14);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_17, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_17)) {
    PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_6, __pyx_t_7};
    __pyx_t_19 = __Pyx_PyFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_17)) {
    PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_6, __pyx_t_7};
    __pyx_t_19 = __Pyx_PyCFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  {
    __pyx_t_16 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    if (__pyx_t_14) {
      __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_14); __pyx_t_14 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_9, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_9, __pyx_t_7);
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_t_16, NULL); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  }
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_Series); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Option); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_14 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_flowmarker);
  if (unlikely(!__pyx_t_14)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_flowmarker);
  }
  if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_18 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_18)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_18);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_7 = (__pyx_t_18) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_18, __pyx_t_14) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_14);
  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_unordered);
  if (unlikely(!__pyx_t_6)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_unordered);
  }
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_14 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_16))) {
    __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_16);
    if (likely(__pyx_t_14)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
      __Pyx_INCREF(__pyx_t_14);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_16, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_16)) {
    PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_7, __pyx_t_6};
    __pyx_t_17 = __Pyx_PyFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_16)) {
    PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_7, __pyx_t_6};
    __pyx_t_17 = __Pyx_PyCFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_18 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    if (__pyx_t_14) {
      __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_14); __pyx_t_14 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_9, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_9, __pyx_t_6);
    __pyx_t_7 = 0;
    __pyx_t_6 = 0;
    __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_18, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  }
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  __pyx_t_16 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_repetition);
  if (unlikely(!__pyx_t_16)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_repetition);
  }
  if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_18 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_option);
  if (unlikely(!__pyx_t_18)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_n_s_option);
  }
  if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __pyx_t_6 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[11] = {__pyx_t_6, __pyx_t_15, __pyx_t_8, __pyx_t_13, __pyx_t_11, __pyx_t_4, __pyx_t_10, __pyx_t_19, __pyx_t_17, __pyx_t_16, __pyx_t_18};
    __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 10+__pyx_t_9); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 155, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[11] = {__pyx_t_6, __pyx_t_15, __pyx_t_8, __pyx_t_13, __pyx_t_11, __pyx_t_4, __pyx_t_10, __pyx_t_19, __pyx_t_17, __pyx_t_16, __pyx_t_18};
    __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 10+__pyx_t_9); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 155, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(10+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 155, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_15);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_9, __pyx_t_15);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_9, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_9, __pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_9, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_7, 4+__pyx_t_9, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_7, 5+__pyx_t_9, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_19);
    PyTuple_SET_ITEM(__pyx_t_7, 6+__pyx_t_9, __pyx_t_19);
    __Pyx_GIVEREF(__pyx_t_17);
    PyTuple_SET_ITEM(__pyx_t_7, 7+__pyx_t_9, __pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_16);
    PyTuple_SET_ITEM(__pyx_t_7, 8+__pyx_t_9, __pyx_t_16);
    __Pyx_GIVEREF(__pyx_t_18);
    PyTuple_SET_ITEM(__pyx_t_7, 9+__pyx_t_9, __pyx_t_18);
    __pyx_t_15 = 0;
    __pyx_t_8 = 0;
    __pyx_t_13 = 0;
    __pyx_t_11 = 0;
    __pyx_t_4 = 0;
    __pyx_t_10 = 0;
    __pyx_t_19 = 0;
    __pyx_t_17 = 0;
    __pyx_t_16 = 0;
    __pyx_t_18 = 0;
    __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 155, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_factor, __pyx_t_12) < 0) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "DHParser/ebnf.py":160
 *                          Series(Option(flowmarker), whitespace), Series(Option(flowmarker), oneormore),
 *                          Series(Option(flowmarker), group), Series(Option(flowmarker), unordered), repetition, option)
 *     term = OneOrMore(Series(Option(Series(Token(""), wsp__)), factor))             # <<<<<<<<<<<<<<
 *     expression.set(Series(term, ZeroOrMore(Series(Series(Token("|"), wsp__), term))))
 *     directive = Series(Series(Token("@"), wsp__), symbol, Series(Token("="), wsp__),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_OneOrMore); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_n_s_Series); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_Option); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Series); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_Token_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_13 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_13)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_13);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
    }
  }
  __pyx_t_4 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_13, __pyx_kp_u__45) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_kp_u__45);
  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wsp);
  if (unlikely(!__pyx_t_11)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_wsp);
  }
  if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_13 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_10);
    if (likely(__pyx_t_13)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_13);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_10, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_10)) {
    PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_t_4, __pyx_t_11};
    __pyx_t_19 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 160, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
    PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_t_4, __pyx_t_11};
    __pyx_t_19 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 160, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_13) {
      __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_13); __pyx_t_13 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_9, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_9, __pyx_t_11);
    __pyx_t_4 = 0;
    __pyx_t_11 = 0;
    __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_8, NULL); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_17))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_17);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_17, function);
    }
  }
  __pyx_t_16 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_17, __pyx_t_10, __pyx_t_19) : __Pyx_PyObject_CallOneArg(__pyx_t_17, __pyx_t_19);
  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  __pyx_t_17 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_factor);
  if (unlikely(!__pyx_t_17)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_factor);
  }
  if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __pyx_t_19 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_18))) {
    __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_18);
    if (likely(__pyx_t_19)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18);
      __Pyx_INCREF(__pyx_t_19);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_18, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_18)) {
    PyObject *__pyx_temp[3] = {__pyx_t_19, __pyx_t_16, __pyx_t_17};
    __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_18, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 160, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_18)) {
    PyObject *__pyx_temp[3] = {__pyx_t_19, __pyx_t_16, __pyx_t_17};
    __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_18, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 160, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_19) {
      __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_19); __pyx_t_19 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_16);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_16);
    __Pyx_GIVEREF(__pyx_t_17);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_17);
    __pyx_t_16 = 0;
    __pyx_t_17 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __pyx_t_18 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_18)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_18);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_12 = (__pyx_t_18) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_18, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_term, __pyx_t_12) < 0) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "DHParser/ebnf.py":161
 *                          Series(Option(flowmarker), group), Series(Option(flowmarker), unordered), repetition, option)
 *     term = OneOrMore(Series(Option(Series(Token(""), wsp__)), factor))
 *     expression.set(Series(term, ZeroOrMore(Series(Series(Token("|"), wsp__), term))))             # <<<<<<<<<<<<<<
 *     directive = Series(Series(Token("@"), wsp__), symbol, Series(Token("="), wsp__),
 *                        Alternative(regexp, literal, symbol),
 */
  __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_expression);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_expression);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_set_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_n_s_Series); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __pyx_t_10 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_term);
  if (unlikely(!__pyx_t_10)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_term);
  }
  if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_ZeroOrMore); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_Series); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Series); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_Token_2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_15);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_15, function);
    }
  }
  __pyx_t_13 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_15, __pyx_t_6, __pyx_kp_u__77) : __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_kp_u__77);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __pyx_t_15 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wsp);
  if (unlikely(!__pyx_t_15)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_wsp);
  }
  if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_t_6 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_13, __pyx_t_15};
    __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_13, __pyx_t_15};
    __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  } else
  #endif
  {
    __pyx_t_14 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_9, __pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_15);
    PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_9, __pyx_t_15);
    __pyx_t_13 = 0;
    __pyx_t_15 = 0;
    __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_14, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_term);
  if (unlikely(!__pyx_t_4)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_term);
  }
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_14)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_14);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_8)) {
    PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_11, __pyx_t_4};
    __pyx_t_19 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
    PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_11, __pyx_t_4};
    __pyx_t_19 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_15 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    if (__pyx_t_14) {
      __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14); __pyx_t_14 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_9, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_9, __pyx_t_4);
    __pyx_t_11 = 0;
    __pyx_t_4 = 0;
    __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_15, NULL); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_16))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_16);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_16, function);
    }
  }
  __pyx_t_17 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_16, __pyx_t_8, __pyx_t_19) : __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_19);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  __pyx_t_16 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_18))) {
    __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_18);
    if (likely(__pyx_t_16)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18);
      __Pyx_INCREF(__pyx_t_16);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_18, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_18)) {
    PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_10, __pyx_t_17};
    __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_18, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_18)) {
    PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_10, __pyx_t_17};
    __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_18, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  } else
  #endif
  {
    __pyx_t_19 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    if (__pyx_t_16) {
      __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_16); __pyx_t_16 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_9, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_17);
    PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_9, __pyx_t_17);
    __pyx_t_10 = 0;
    __pyx_t_17 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_19, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  }
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __pyx_t_18 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_18)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_18);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_12 = (__pyx_t_18) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_18, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "DHParser/ebnf.py":162
 *     term = OneOrMore(Series(Option(Series(Token(""), wsp__)), factor))
 *     expression.set(Series(term, ZeroOrMore(Series(Series(Token("|"), wsp__), term))))
 *     directive = Series(Series(Token("@"), wsp__), symbol, Series(Token("="), wsp__),             # <<<<<<<<<<<<<<
 *                        Alternative(regexp, literal, symbol),
 *                        ZeroOrMore(Series(Series(Token(","), wsp__), Alternative(regexp, literal, symbol))), mandatory=1)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Series); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Series); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_Token_2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_17 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_19))) {
    __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_19);
    if (likely(__pyx_t_17)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_19);
      __Pyx_INCREF(__pyx_t_17);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_19, function);
    }
  }
  __pyx_t_18 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_19, __pyx_t_17, __pyx_kp_u__78) : __Pyx_PyObject_CallOneArg(__pyx_t_19, __pyx_kp_u__78);
  __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
  if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __pyx_t_19 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wsp);
  if (unlikely(!__pyx_t_19)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_wsp);
  }
  if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_17 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_17)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_17);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_17, __pyx_t_18, __pyx_t_19};
    __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 162, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_17, __pyx_t_18, __pyx_t_19};
    __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 162, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 162, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_17) {
      __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_17); __pyx_t_17 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_18);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_18);
    __Pyx_GIVEREF(__pyx_t_19);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_19);
    __pyx_t_18 = 0;
    __pyx_t_19 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 162, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_symbol);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_symbol);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_Series); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_Token_2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __pyx_t_16 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_17))) {
    __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_17);
    if (likely(__pyx_t_16)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
      __Pyx_INCREF(__pyx_t_16);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_17, function);
    }
  }
  __pyx_t_18 = (__pyx_t_16) ? __Pyx_PyObject_Call2Args(__pyx_t_17, __pyx_t_16, __pyx_kp_u__76) : __Pyx_PyObject_CallOneArg(__pyx_t_17, __pyx_kp_u__76);
  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
  if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  __pyx_t_17 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wsp);
  if (unlikely(!__pyx_t_17)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_wsp);
  }
  if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __pyx_t_16 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_19))) {
    __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_19);
    if (likely(__pyx_t_16)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_19);
      __Pyx_INCREF(__pyx_t_16);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_19, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_19)) {
    PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_18, __pyx_t_17};
    __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_19, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 162, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_19)) {
    PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_18, __pyx_t_17};
    __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_19, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 162, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 162, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_16) {
      __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_16); __pyx_t_16 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_18);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_9, __pyx_t_18);
    __Pyx_GIVEREF(__pyx_t_17);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_9, __pyx_t_17);
    __pyx_t_18 = 0;
    __pyx_t_17 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_19, __pyx_t_8, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 162, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "DHParser/ebnf.py":163
 *     expression.set(Series(term, ZeroOrMore(Series(Series(Token("|"), wsp__), term))))
 *     directive = Series(Series(Token("@"), wsp__), symbol, Series(Token("="), wsp__),
 *                        Alternative(regexp, literal, symbol),             # <<<<<<<<<<<<<<
 *                        ZeroOrMore(Series(Series(Token(","), wsp__), Alternative(regexp, literal, symbol))), mandatory=1)
 *     definition = Series(symbol, Series(Token("="), wsp__), expression, mandatory=1)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_Alternative); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_17 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_regexp);
  if (unlikely(!__pyx_t_17)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_regexp);
  }
  if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __pyx_t_18 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_literal);
  if (unlikely(!__pyx_t_18)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_n_s_literal);
  }
  if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __pyx_t_16 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_symbol);
  if (unlikely(!__pyx_t_16)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_symbol);
  }
  if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_15 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_15)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_15);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_8)) {
    PyObject *__pyx_temp[4] = {__pyx_t_15, __pyx_t_17, __pyx_t_18, __pyx_t_16};
    __pyx_t_19 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 163, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
    PyObject *__pyx_temp[4] = {__pyx_t_15, __pyx_t_17, __pyx_t_18, __pyx_t_16};
    __pyx_t_19 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 163, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  } else
  #endif
  {
    __pyx_t_4 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__pyx_t_15) {
      __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_15); __pyx_t_15 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_17);
    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_9, __pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_18);
    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_9, __pyx_t_18);
    __Pyx_GIVEREF(__pyx_t_16);
    PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_9, __pyx_t_16);
    __pyx_t_17 = 0;
    __pyx_t_18 = 0;
    __pyx_t_16 = 0;
    __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_4, NULL); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "DHParser/ebnf.py":164
 *     directive = Series(Series(Token("@"), wsp__), symbol, Series(Token("="), wsp__),
 *                        Alternative(regexp, literal, symbol),
 *                        ZeroOrMore(Series(Series(Token(","), wsp__), Alternative(regexp, literal, symbol))), mandatory=1)             # <<<<<<<<<<<<<<
 *     definition = Series(symbol, Series(Token("="), wsp__), expression, mandatory=1)
 *     syntax = Series(Option(Series(wsp__, RegExp(''))), ZeroOrMore(Alternative(definition, directive)), EOF, mandatory=2)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ZeroOrMore); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_n_s_Series); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_Series); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_Token_2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_13 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_14);
    if (likely(__pyx_t_13)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
      __Pyx_INCREF(__pyx_t_13);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_14, function);
    }
  }
  __pyx_t_11 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_13, __pyx_kp_u__79) : __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_kp_u__79);
  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __pyx_t_14 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wsp);
  if (unlikely(!__pyx_t_14)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_wsp);
  }
  if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_13 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_15);
    if (likely(__pyx_t_13)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
      __Pyx_INCREF(__pyx_t_13);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_15, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_15)) {
    PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_t_11, __pyx_t_14};
    __pyx_t_17 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 164, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
    PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_t_11, __pyx_t_14};
    __pyx_t_17 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 164, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_13) {
      __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_13); __pyx_t_13 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_9, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_14);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_9, __pyx_t_14);
    __pyx_t_11 = 0;
    __pyx_t_14 = 0;
    __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_6, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Alternative); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_14 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_regexp);
  if (unlikely(!__pyx_t_14)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_regexp);
  }
  if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_11 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_literal);
  if (unlikely(!__pyx_t_11)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_literal);
  }
  if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_13 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_symbol);
  if (unlikely(!__pyx_t_13)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_symbol);
  }
  if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_20 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_20 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_20)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_20);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[4] = {__pyx_t_20, __pyx_t_14, __pyx_t_11, __pyx_t_13};
    __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 164, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[4] = {__pyx_t_20, __pyx_t_14, __pyx_t_11, __pyx_t_13};
    __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 164, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  } else
  #endif
  {
    __pyx_t_21 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
    if (__pyx_t_20) {
      __Pyx_GIVEREF(__pyx_t_20); PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_20); __pyx_t_20 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_14);
    PyTuple_SET_ITEM(__pyx_t_21, 0+__pyx_t_9, __pyx_t_14);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_21, 1+__pyx_t_9, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_21, 2+__pyx_t_9, __pyx_t_13);
    __pyx_t_14 = 0;
    __pyx_t_11 = 0;
    __pyx_t_13 = 0;
    __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_21, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_18))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_18);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_18, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_18)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_17, __pyx_t_15};
    __pyx_t_16 = __Pyx_PyFunction_FastCall(__pyx_t_18, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 164, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_18)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_17, __pyx_t_15};
    __pyx_t_16 = __Pyx_PyCFunction_FastCall(__pyx_t_18, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 164, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  } else
  #endif
  {
    __pyx_t_21 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_17);
    PyTuple_SET_ITEM(__pyx_t_21, 0+__pyx_t_9, __pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_15);
    PyTuple_SET_ITEM(__pyx_t_21, 1+__pyx_t_9, __pyx_t_15);
    __pyx_t_17 = 0;
    __pyx_t_15 = 0;
    __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_21, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  }
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __pyx_t_18 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_18)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_18);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_8 = (__pyx_t_18) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_18, __pyx_t_16) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_16);
  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "DHParser/ebnf.py":162
 *     term = OneOrMore(Series(Option(Series(Token(""), wsp__)), factor))
 *     expression.set(Series(term, ZeroOrMore(Series(Series(Token("|"), wsp__), term))))
 *     directive = Series(Series(Token("@"), wsp__), symbol, Series(Token("="), wsp__),             # <<<<<<<<<<<<<<
 *                        Alternative(regexp, literal, symbol),
 *                        ZeroOrMore(Series(Series(Token(","), wsp__), Alternative(regexp, literal, symbol))), mandatory=1)
 */
  __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_19);
  PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_19);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_t_8);
  __pyx_t_7 = 0;
  __pyx_t_5 = 0;
  __pyx_t_10 = 0;
  __pyx_t_19 = 0;
  __pyx_t_8 = 0;

  /* "DHParser/ebnf.py":164
 *     directive = Series(Series(Token("@"), wsp__), symbol, Series(Token("="), wsp__),
 *                        Alternative(regexp, literal, symbol),
 *                        ZeroOrMore(Series(Series(Token(","), wsp__), Alternative(regexp, literal, symbol))), mandatory=1)             # <<<<<<<<<<<<<<
 *     definition = Series(symbol, Series(Token("="), wsp__), expression, mandatory=1)
 *     syntax = Series(Option(Series(wsp__, RegExp(''))), ZeroOrMore(Alternative(definition, directive)), EOF, mandatory=2)
 */
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_mandatory, __pyx_int_1) < 0) __PYX_ERR(0, 164, __pyx_L1_error)

  /* "DHParser/ebnf.py":162
 *     term = OneOrMore(Series(Option(Series(Token(""), wsp__)), factor))
 *     expression.set(Series(term, ZeroOrMore(Series(Series(Token("|"), wsp__), term))))
 *     directive = Series(Series(Token("@"), wsp__), symbol, Series(Token("="), wsp__),             # <<<<<<<<<<<<<<
 *                        Alternative(regexp, literal, symbol),
 *                        ZeroOrMore(Series(Series(Token(","), wsp__), Alternative(regexp, literal, symbol))), mandatory=1)
 */
  __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_directive, __pyx_t_19) < 0) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "DHParser/ebnf.py":165
 *                        Alternative(regexp, literal, symbol),
 *                        ZeroOrMore(Series(Series(Token(","), wsp__), Alternative(regexp, literal, symbol))), mandatory=1)
 *     definition = Series(symbol, Series(Token("="), wsp__), expression, mandatory=1)             # <<<<<<<<<<<<<<
 *     syntax = Series(Option(Series(wsp__, RegExp(''))), ZeroOrMore(Alternative(definition, directive)), EOF, mandatory=2)
 *     root__ = syntax
 */
  __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_Series); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_8 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_symbol);
  if (unlikely(!__pyx_t_8)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_symbol);
  }
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Series); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Token_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_10 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_kp_u__76) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__76);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wsp);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_wsp);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_12);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_12, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_12)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_10, __pyx_t_5};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_10, __pyx_t_5};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_16 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_9, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_9, __pyx_t_5);
    __pyx_t_10 = 0;
    __pyx_t_5 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_16, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_expression);
  if (unlikely(!__pyx_t_12)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_expression);
  }
  if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_16 = PyTuple_New(3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_12);
  PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_12);
  __pyx_t_8 = 0;
  __pyx_t_4 = 0;
  __pyx_t_12 = 0;
  __pyx_t_12 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_mandatory, __pyx_int_1) < 0) __PYX_ERR(0, 165, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_19, __pyx_t_16, __pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_definition, __pyx_t_4) < 0) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "DHParser/ebnf.py":166
 *                        ZeroOrMore(Series(Series(Token(","), wsp__), Alternative(regexp, literal, symbol))), mandatory=1)
 *     definition = Series(symbol, Series(Token("="), wsp__), expression, mandatory=1)
 *     syntax = Series(Option(Series(wsp__, RegExp(''))), ZeroOrMore(Alternative(definition, directive)), EOF, mandatory=2)             # <<<<<<<<<<<<<<
 *     root__ = syntax
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Series); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_Option); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_Series); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_wsp);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_wsp);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_RegExp_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_18 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_18)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_18);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_10 = (__pyx_t_18) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_18, __pyx_kp_u__2) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_kp_u__2);
  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_8)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_5, __pyx_t_10};
    __pyx_t_19 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 166, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_5, __pyx_t_10};
    __pyx_t_19 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 166, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  } else
  #endif
  {
    __pyx_t_18 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 166, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_9, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_9, __pyx_t_10);
    __pyx_t_5 = 0;
    __pyx_t_10 = 0;
    __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_18, NULL); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 166, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_16))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_16);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_16, function);
    }
  }
  __pyx_t_12 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_16, __pyx_t_8, __pyx_t_19) : __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_19);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_ZeroOrMore); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_n_s_Alternative); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __pyx_t_10 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_definition);
  if (unlikely(!__pyx_t_10)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_definition);
  }
  if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_directive);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_directive);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_18))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_18);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_18, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_18)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_10, __pyx_t_5};
    __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_18, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 166, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_18)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_10, __pyx_t_5};
    __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_18, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 166, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_21 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 166, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_21, 0+__pyx_t_9, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_21, 1+__pyx_t_9, __pyx_t_5);
    __pyx_t_10 = 0;
    __pyx_t_5 = 0;
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_21, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 166, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  }
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __pyx_t_18 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_19))) {
    __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_19);
    if (likely(__pyx_t_18)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_19);
      __Pyx_INCREF(__pyx_t_18);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_19, function);
    }
  }
  __pyx_t_16 = (__pyx_t_18) ? __Pyx_PyObject_Call2Args(__pyx_t_19, __pyx_t_18, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_19, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __pyx_t_19 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_EOF);
  if (unlikely(!__pyx_t_19)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_EOF);
  }
  if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_12);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_16);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_16);
  __Pyx_GIVEREF(__pyx_t_19);
  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_19);
  __pyx_t_12 = 0;
  __pyx_t_16 = 0;
  __pyx_t_19 = 0;
  __pyx_t_19 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_mandatory, __pyx_int_2) < 0) __PYX_ERR(0, 166, __pyx_L1_error)
  __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, __pyx_t_19); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_syntax, __pyx_t_16) < 0) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  /* "DHParser/ebnf.py":167
 *     definition = Series(symbol, Series(Token("="), wsp__), expression, mandatory=1)
 *     syntax = Series(Option(Series(wsp__, RegExp(''))), ZeroOrMore(Alternative(definition, directive)), EOF, mandatory=2)
 *     root__ = syntax             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_16 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_syntax);
  if (unlikely(!__pyx_t_16)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_syntax);
  }
  if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_root, __pyx_t_16) < 0) __PYX_ERR(0, 167, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  /* "DHParser/ebnf.py":90
 * 
 * 
 * class EBNFGrammar(Grammar):             # <<<<<<<<<<<<<<
 *     r"""
 *     Parser for an EBNF source file, with this grammar:
 */
  __pyx_t_16 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_EBNFGrammar, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_EBNFGrammar, __pyx_t_16) < 0) __PYX_ERR(0, 90, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":170
 * 
 * 
 * def grammar_changed(grammar_class, grammar_source: str) -> bool:             # <<<<<<<<<<<<<<
 *     """
 *     Returns ``True`` if ``grammar_class`` does not reflect the latest
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_grammar_source, __pyx_n_u_unicode) < 0) __PYX_ERR(0, 170, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_return, ((PyObject*)&PyBool_Type)) < 0) __PYX_ERR(0, 170, __pyx_L1_error)
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_3grammar_changed, 0, __pyx_n_s_grammar_changed, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__81)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_grammar_changed, __pyx_t_1) < 0) __PYX_ERR(0, 170, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":202
 * 
 * 
 * def get_ebnf_grammar() -> EBNFGrammar:             # <<<<<<<<<<<<<<
 *     try:
 *         grammar = GLOBALS.ebnf_grammar_singleton
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_EBNFGrammar); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_return, __pyx_t_2) < 0) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_5get_ebnf_grammar, 0, __pyx_n_s_get_ebnf_grammar, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__83)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_ebnf_grammar, __pyx_t_2) < 0) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":220
 * EBNF_AST_transformation_table = {
 *     # AST Transformations for EBNF-grammar
 *     "<":             # <<<<<<<<<<<<<<
 *         remove_expendables,
 *     "syntax":
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "DHParser/ebnf.py":221
 *     # AST Transformations for EBNF-grammar
 *     "<":
 *         remove_expendables,             # <<<<<<<<<<<<<<
 *     "syntax":
 *         [],  # otherwise '"*": replace_by_single_child' would be applied
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_remove_expendables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u__10, __pyx_t_1) < 0) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":223
 *         remove_expendables,
 *     "syntax":
 *         [],  # otherwise '"*": replace_by_single_child' would be applied             # <<<<<<<<<<<<<<
 *     "directive, definition":
 *         [flatten, remove_tokens('@', '=', ',')],
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_syntax, __pyx_t_1) < 0) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":225
 *         [],  # otherwise '"*": replace_by_single_child' would be applied
 *     "directive, definition":
 *         [flatten, remove_tokens('@', '=', ',')],             # <<<<<<<<<<<<<<
 *     "expression":
 *         [replace_by_single_child, flatten, remove_tokens('|')],  # remove_infix_operator],
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_flatten); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_remove_tokens); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__84, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_16);
  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_16);
  __pyx_t_1 = 0;
  __pyx_t_16 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_directive_definition, __pyx_t_3) < 0) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "DHParser/ebnf.py":227
 *         [flatten, remove_tokens('@', '=', ',')],
 *     "expression":
 *         [replace_by_single_child, flatten, remove_tokens('|')],  # remove_infix_operator],             # <<<<<<<<<<<<<<
 *     "term":
 *         [replace_by_single_child, flatten],  # supports both idioms:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_replace_by_single_child_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_flatten); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_remove_tokens); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__85, NULL); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_16);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_t_16);
  __Pyx_GIVEREF(__pyx_t_19);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_t_19);
  __pyx_t_3 = 0;
  __pyx_t_16 = 0;
  __pyx_t_19 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_expression, __pyx_t_1) < 0) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":229
 *         [replace_by_single_child, flatten, remove_tokens('|')],  # remove_infix_operator],
 *     "term":
 *         [replace_by_single_child, flatten],  # supports both idioms:             # <<<<<<<<<<<<<<
 *                                              # "{ factor }+" and "factor { factor }"
 *     "factor, flowmarker, retrieveop":
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_replace_by_single_child_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_flatten); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_16 = PyList_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_GIVEREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_16, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_19);
  PyList_SET_ITEM(__pyx_t_16, 1, __pyx_t_19);
  __pyx_t_1 = 0;
  __pyx_t_19 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_term, __pyx_t_16) < 0) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  /* "DHParser/ebnf.py":232
 *                                              # "{ factor }+" and "factor { factor }"
 *     "factor, flowmarker, retrieveop":
 *         replace_by_single_child,             # <<<<<<<<<<<<<<
 *     "group":
 *         [remove_brackets, replace_by_single_child],
 */
  __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_replace_by_single_child_2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_factor_flowmarker_retrieveop, __pyx_t_16) < 0) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  /* "DHParser/ebnf.py":234
 *         replace_by_single_child,
 *     "group":
 *         [remove_brackets, replace_by_single_child],             # <<<<<<<<<<<<<<
 *     "unordered":
 *         remove_brackets,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_remove_brackets); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_replace_by_single_child_2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_16);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_16);
  __Pyx_GIVEREF(__pyx_t_19);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_t_19);
  __pyx_t_16 = 0;
  __pyx_t_19 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_group, __pyx_t_1) < 0) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":236
 *         [remove_brackets, replace_by_single_child],
 *     "unordered":
 *         remove_brackets,             # <<<<<<<<<<<<<<
 *     "oneormore, repetition, option":
 *         [reduce_single_child, remove_brackets,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_remove_brackets); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_unordered, __pyx_t_1) < 0) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":238
 *         remove_brackets,
 *     "oneormore, repetition, option":
 *         [reduce_single_child, remove_brackets,             # <<<<<<<<<<<<<<
 *          forbid('repetition', 'option', 'oneormore'), assert_content(r'(?!)(?:.|\n)*')],
 *     "symbol, literal, regexp":
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_reduce_single_child); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_remove_brackets); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);

  /* "DHParser/ebnf.py":239
 *     "oneormore, repetition, option":
 *         [reduce_single_child, remove_brackets,
 *          forbid('repetition', 'option', 'oneormore'), assert_content(r'(?!)(?:.|\n)*')],             # <<<<<<<<<<<<<<
 *     "symbol, literal, regexp":
 *         reduce_single_child,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_forbid); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_tuple__86, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_assert_content); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  /* "DHParser/ebnf.py":238
 *         remove_brackets,
 *     "oneormore, repetition, option":
 *         [reduce_single_child, remove_brackets,             # <<<<<<<<<<<<<<
 *          forbid('repetition', 'option', 'oneormore'), assert_content(r'(?!)(?:.|\n)*')],
 *     "symbol, literal, regexp":
 */
  __pyx_t_16 = PyList_New(4); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_GIVEREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_16, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_19);
  PyList_SET_ITEM(__pyx_t_16, 1, __pyx_t_19);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_16, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_8);
  PyList_SET_ITEM(__pyx_t_16, 3, __pyx_t_8);
  __pyx_t_1 = 0;
  __pyx_t_19 = 0;
  __pyx_t_3 = 0;
  __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_oneormore_repetition_option, __pyx_t_16) < 0) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  /* "DHParser/ebnf.py":241
 *          forbid('repetition', 'option', 'oneormore'), assert_content(r'(?!)(?:.|\n)*')],
 *     "symbol, literal, regexp":
 *         reduce_single_child,             # <<<<<<<<<<<<<<
 *     (TOKEN_PTYPE, WHITESPACE_PTYPE):
 *         reduce_single_child,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_reduce_single_child); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_symbol_literal_regexp, __pyx_t_16) < 0) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  /* "DHParser/ebnf.py":242
 *     "symbol, literal, regexp":
 *         reduce_single_child,
 *     (TOKEN_PTYPE, WHITESPACE_PTYPE):             # <<<<<<<<<<<<<<
 *         reduce_single_child,
 *     # "list_":
 */
  __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_TOKEN_PTYPE); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_WHITESPACE_PTYPE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_16);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_16);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_8);
  __pyx_t_16 = 0;
  __pyx_t_8 = 0;

  /* "DHParser/ebnf.py":243
 *         reduce_single_child,
 *     (TOKEN_PTYPE, WHITESPACE_PTYPE):
 *         reduce_single_child,             # <<<<<<<<<<<<<<
 *     # "list_":
 *     #     [flatten, remove_infix_operator],
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_reduce_single_child); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, __pyx_t_8) < 0) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "DHParser/ebnf.py":247
 *     #     [flatten, remove_infix_operator],
 *     "*":
 *         replace_by_single_child             # <<<<<<<<<<<<<<
 * }
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_replace_by_single_child_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u__9, __pyx_t_8) < 0) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_EBNF_AST_transformation_table, __pyx_t_2) < 0) __PYX_ERR(0, 218, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":251
 * 
 * 
 * def EBNFTransform() -> TransformationFunc:             # <<<<<<<<<<<<<<
 *     return partial(traverse, processing_table=EBNF_AST_transformation_table.copy())
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_TransformationFunc); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_return, __pyx_t_8) < 0) __PYX_ERR(0, 251, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_7EBNFTransform, 0, __pyx_n_s_EBNFTransform, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__88)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_EBNFTransform, __pyx_t_8) < 0) __PYX_ERR(0, 251, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "DHParser/ebnf.py":255
 * 
 * 
 * def get_ebnf_transformer() -> TransformationFunc:             # <<<<<<<<<<<<<<
 *     try:
 *         transformer = GLOBALS.EBNF_transformer_singleton
 */
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_TransformationFunc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_return, __pyx_t_2) < 0) __PYX_ERR(0, 255, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_9get_ebnf_transformer, 0, __pyx_n_s_get_ebnf_transformer, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__90)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_ebnf_transformer, __pyx_t_2) < 0) __PYX_ERR(0, 255, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":271
 * 
 * 
 * PreprocessorFactoryFunc = Callable[[], PreprocessorFunc]             # <<<<<<<<<<<<<<
 * ParserFactoryFunc = Callable[[], Grammar]
 * TransformerFactoryFunc = Callable[[], TransformationFunc]
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Callable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PreprocessorFunc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_3);
  __pyx_t_8 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PreprocessorFactoryFunc, __pyx_t_3) < 0) __PYX_ERR(0, 271, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "DHParser/ebnf.py":272
 * 
 * PreprocessorFactoryFunc = Callable[[], PreprocessorFunc]
 * ParserFactoryFunc = Callable[[], Grammar]             # <<<<<<<<<<<<<<
 * TransformerFactoryFunc = Callable[[], TransformationFunc]
 * CompilerFactoryFunc = Callable[[], Compiler]
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Callable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_16 = PyList_New(0); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Grammar_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_16);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_16);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_2);
  __pyx_t_16 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ParserFactoryFunc, __pyx_t_2) < 0) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":273
 * PreprocessorFactoryFunc = Callable[[], PreprocessorFunc]
 * ParserFactoryFunc = Callable[[], Grammar]
 * TransformerFactoryFunc = Callable[[], TransformationFunc]             # <<<<<<<<<<<<<<
 * CompilerFactoryFunc = Callable[[], Compiler]
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Callable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_TransformationFunc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_3);
  __pyx_t_8 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TransformerFactoryFunc, __pyx_t_3) < 0) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "DHParser/ebnf.py":274
 * ParserFactoryFunc = Callable[[], Grammar]
 * TransformerFactoryFunc = Callable[[], TransformationFunc]
 * CompilerFactoryFunc = Callable[[], Compiler]             # <<<<<<<<<<<<<<
 * 
 * PREPROCESSOR_FACTORY = '''
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Callable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_16 = PyList_New(0); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Compiler); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_16);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_16);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_2);
  __pyx_t_16 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CompilerFactoryFunc, __pyx_t_2) < 0) __PYX_ERR(0, 274, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":276
 * CompilerFactoryFunc = Callable[[], Compiler]
 * 
 * PREPROCESSOR_FACTORY = '''             # <<<<<<<<<<<<<<
 * def get_preprocessor() -> PreprocessorFunc:
 *     return {NAME}Preprocessor
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PREPROCESSOR_FACTORY, __pyx_kp_u_def_get_preprocessor_Preprocess) < 0) __PYX_ERR(0, 276, __pyx_L1_error)

  /* "DHParser/ebnf.py":282
 * 
 * 
 * GRAMMAR_FACTORY = '''             # <<<<<<<<<<<<<<
 * def get_grammar() -> {NAME}Grammar:
 *     global GLOBALS
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_GRAMMAR_FACTORY, __pyx_kp_u_def_get_grammar_NAME_Grammar_gl) < 0) __PYX_ERR(0, 282, __pyx_L1_error)

  /* "DHParser/ebnf.py":296
 * 
 * 
 * TRANSFORMER_FACTORY = '''             # <<<<<<<<<<<<<<
 * def {NAME}Transform() -> TransformationDict:
 *     return partial(traverse, processing_table={NAME}_AST_transformation_table.copy())
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TRANSFORMER_FACTORY, __pyx_kp_u_def_NAME_Transform_Transformati) < 0) __PYX_ERR(0, 296, __pyx_L1_error)

  /* "DHParser/ebnf.py":310
 * 
 * 
 * COMPILER_FACTORY = '''             # <<<<<<<<<<<<<<
 * def get_compiler() -> {NAME}Compiler:
 *     try:
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMPILER_FACTORY, __pyx_kp_u_def_get_compiler_NAME_Compiler) < 0) __PYX_ERR(0, 310, __pyx_L1_error)

  /* "DHParser/ebnf.py":321
 * 
 * 
 * WHITESPACE_TYPES = {'horizontal': r'[\t ]*',  # default: horizontal             # <<<<<<<<<<<<<<
 *                     'linefeed': r'[ \t]*\n?(?!\s*\n)[ \t]*',
 *                     'vertical': r'\s*'}
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_horizontal, __pyx_kp_u_t) < 0) __PYX_ERR(0, 321, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_linefeed, __pyx_kp_u_t_n_s_n_t) < 0) __PYX_ERR(0, 321, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_vertical, __pyx_kp_u_s_4) < 0) __PYX_ERR(0, 321, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_WHITESPACE_TYPES, __pyx_t_2) < 0) __PYX_ERR(0, 321, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":325
 *                     'vertical': r'\s*'}
 * 
 * DROP_TOKEN  = 'token'             # <<<<<<<<<<<<<<
 * DROP_WSPC   = 'whitespace'
 * DROP_VALUES = {DROP_TOKEN, DROP_WSPC}
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DROP_TOKEN, __pyx_n_u_token) < 0) __PYX_ERR(0, 325, __pyx_L1_error)

  /* "DHParser/ebnf.py":326
 * 
 * DROP_TOKEN  = 'token'
 * DROP_WSPC   = 'whitespace'             # <<<<<<<<<<<<<<
 * DROP_VALUES = {DROP_TOKEN, DROP_WSPC}
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DROP_WSPC, __pyx_n_u_whitespace) < 0) __PYX_ERR(0, 326, __pyx_L1_error)

  /* "DHParser/ebnf.py":327
 * DROP_TOKEN  = 'token'
 * DROP_WSPC   = 'whitespace'
 * DROP_VALUES = {DROP_TOKEN, DROP_WSPC}             # <<<<<<<<<<<<<<
 * 
 * # Representation of Python code or, rather, something that will be output as Python code
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DROP_TOKEN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_DROP_WSPC); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_3 = PySet_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PySet_Add(__pyx_t_3, __pyx_t_2) < 0) __PYX_ERR(0, 327, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PySet_Add(__pyx_t_3, __pyx_t_8) < 0) __PYX_ERR(0, 327, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DROP_VALUES, __pyx_t_3) < 0) __PYX_ERR(0, 327, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "DHParser/ebnf.py":330
 * 
 * # Representation of Python code or, rather, something that will be output as Python code
 * ReprType = Union[str, unrepr]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Union); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_unrepr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)(&PyUnicode_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyUnicode_Type)));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)(&PyUnicode_Type)));
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_8);
  __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReprType, __pyx_t_8) < 0) __PYX_ERR(0, 330, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "DHParser/ebnf.py":333
 * 
 * 
 * class EBNFDirectives:             # <<<<<<<<<<<<<<
 *     """
 *     A Record that keeps information about compiler directives
 */
  __pyx_t_8 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_EBNFDirectives, __pyx_n_s_EBNFDirectives, (PyObject *) NULL, __pyx_n_s_DHParser_ebnf, __pyx_kp_s_A_Record_that_keeps_information); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "DHParser/ebnf.py":373
 *                 the failing parser has returned.
 *     """
 *     __slots__ = ['whitespace', 'comment', 'literalws', 'tokens', 'filter', 'error', 'skip',             # <<<<<<<<<<<<<<
 *                  'resume', 'drop']
 * 
 */
  __pyx_t_2 = PyList_New(9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_u_whitespace);
  __Pyx_GIVEREF(__pyx_n_u_whitespace);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_whitespace);
  __Pyx_INCREF(__pyx_n_u_comment);
  __Pyx_GIVEREF(__pyx_n_u_comment);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_u_comment);
  __Pyx_INCREF(__pyx_n_u_literalws);
  __Pyx_GIVEREF(__pyx_n_u_literalws);
  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_u_literalws);
  __Pyx_INCREF(__pyx_n_u_tokens);
  __Pyx_GIVEREF(__pyx_n_u_tokens);
  PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_u_tokens);
  __Pyx_INCREF(__pyx_n_u_filter);
  __Pyx_GIVEREF(__pyx_n_u_filter);
  PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_u_filter);
  __Pyx_INCREF(__pyx_n_u_error);
  __Pyx_GIVEREF(__pyx_n_u_error);
  PyList_SET_ITEM(__pyx_t_2, 5, __pyx_n_u_error);
  __Pyx_INCREF(__pyx_n_u_skip);
  __Pyx_GIVEREF(__pyx_n_u_skip);
  PyList_SET_ITEM(__pyx_t_2, 6, __pyx_n_u_skip);
  __Pyx_INCREF(__pyx_n_u_resume);
  __Pyx_GIVEREF(__pyx_n_u_resume);
  PyList_SET_ITEM(__pyx_t_2, 7, __pyx_n_u_resume);
  __Pyx_INCREF(__pyx_n_u_drop);
  __Pyx_GIVEREF(__pyx_n_u_drop);
  PyList_SET_ITEM(__pyx_t_2, 8, __pyx_n_u_drop);
  if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_slots, __pyx_t_2) < 0) __PYX_ERR(0, 373, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":376
 *                  'resume', 'drop']
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.whitespace = WHITESPACE_TYPES['vertical']  # type: str
 *         self.comment = ''     # type: str
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_14EBNFDirectives_1__init__, 0, __pyx_n_s_EBNFDirectives___init, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__92)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_init, __pyx_t_2) < 0) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":387
 *         self.drop = set()     # type: Set[str]
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         return getattr(self, key)
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_14EBNFDirectives_3__getitem__, 0, __pyx_n_s_EBNFDirectives___getitem, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__94)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_getitem, __pyx_t_2) < 0) __PYX_ERR(0, 387, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":390
 *         return getattr(self, key)
 * 
 *     def __setitem__(self, key, value):             # <<<<<<<<<<<<<<
 *         assert hasattr(self, key)
 *         setattr(self, key, value)
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_14EBNFDirectives_5__setitem__, 0, __pyx_n_s_EBNFDirectives___setitem, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_setitem, __pyx_t_2) < 0) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":394
 *         setattr(self, key, value)
 * 
 *     def keys(self):             # <<<<<<<<<<<<<<
 *         return self.__dict__.keys()
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_14EBNFDirectives_7keys, 0, __pyx_n_s_EBNFDirectives_keys, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__98)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_keys, __pyx_t_2) < 0) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":333
 * 
 * 
 * class EBNFDirectives:             # <<<<<<<<<<<<<<
 *     """
 *     A Record that keeps information about compiler directives
 */
  __pyx_t_2 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_EBNFDirectives, __pyx_empty_tuple, __pyx_t_8, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_EBNFDirectives, __pyx_t_2) < 0) __PYX_ERR(0, 333, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "DHParser/ebnf.py":398
 * 
 * 
 * class EBNFCompilerError(CompilerError):             # <<<<<<<<<<<<<<
 *     """Error raised by `EBNFCompiler` class. (Not compilation errors
 *     in the strict sense, see `CompilationError` in module ``dsl.py``)"""
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_CompilerError); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8);
  __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_8, __pyx_t_2, __pyx_n_s_EBNFCompilerError, __pyx_n_s_EBNFCompilerError, (PyObject *) NULL, __pyx_n_s_DHParser_ebnf, __pyx_kp_s_Error_raised_by_EBNFCompiler_cla); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_16 = __Pyx_Py3ClassCreate(__pyx_t_8, __pyx_n_s_EBNFCompilerError, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_EBNFCompilerError, __pyx_t_16) < 0) __PYX_ERR(0, 398, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":404
 * 
 * 
 * class EBNFCompiler(Compiler):             # <<<<<<<<<<<<<<
 *     """
 *     Generates a Parser from an abstract syntax tree of a grammar specified
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Compiler); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_8, __pyx_n_s_EBNFCompiler, __pyx_n_s_EBNFCompiler, (PyObject *) NULL, __pyx_n_s_DHParser_ebnf, __pyx_kp_s_Generates_a_Parser_from_an_abst); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "DHParser/ebnf.py":486
 *                 compiled texts.)
 *     """
 *     COMMENT_KEYWORD = "COMMENT__"             # <<<<<<<<<<<<<<
 *     WHITESPACE_KEYWORD = "WSP_RE__"
 *     RAW_WS_KEYWORD = "WHITESPACE__"
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_COMMENT_KEYWORD, __pyx_n_u_COMMENT) < 0) __PYX_ERR(0, 486, __pyx_L1_error)

  /* "DHParser/ebnf.py":487
 *     """
 *     COMMENT_KEYWORD = "COMMENT__"
 *     WHITESPACE_KEYWORD = "WSP_RE__"             # <<<<<<<<<<<<<<
 *     RAW_WS_KEYWORD = "WHITESPACE__"
 *     WHITESPACE_PARSER_KEYWORD = "wsp__"
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_WHITESPACE_KEYWORD, __pyx_n_u_WSP_RE) < 0) __PYX_ERR(0, 487, __pyx_L1_error)

  /* "DHParser/ebnf.py":488
 *     COMMENT_KEYWORD = "COMMENT__"
 *     WHITESPACE_KEYWORD = "WSP_RE__"
 *     RAW_WS_KEYWORD = "WHITESPACE__"             # <<<<<<<<<<<<<<
 *     WHITESPACE_PARSER_KEYWORD = "wsp__"
 *     DROP_WHITESPACE_PARSER_KEYWORD = "dwsp__"
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RAW_WS_KEYWORD, __pyx_n_u_WHITESPACE) < 0) __PYX_ERR(0, 488, __pyx_L1_error)

  /* "DHParser/ebnf.py":489
 *     WHITESPACE_KEYWORD = "WSP_RE__"
 *     RAW_WS_KEYWORD = "WHITESPACE__"
 *     WHITESPACE_PARSER_KEYWORD = "wsp__"             # <<<<<<<<<<<<<<
 *     DROP_WHITESPACE_PARSER_KEYWORD = "dwsp__"
 *     RESUME_RULES_KEYWORD = "resume_rules__"
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_WHITESPACE_PARSER_KEYWORD, __pyx_n_u_wsp) < 0) __PYX_ERR(0, 489, __pyx_L1_error)

  /* "DHParser/ebnf.py":490
 *     RAW_WS_KEYWORD = "WHITESPACE__"
 *     WHITESPACE_PARSER_KEYWORD = "wsp__"
 *     DROP_WHITESPACE_PARSER_KEYWORD = "dwsp__"             # <<<<<<<<<<<<<<
 *     RESUME_RULES_KEYWORD = "resume_rules__"
 *     SKIP_RULES_SUFFIX = '_skip__'
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_DROP_WHITESPACE_PARSER_KEYWORD, __pyx_n_u_dwsp) < 0) __PYX_ERR(0, 490, __pyx_L1_error)

  /* "DHParser/ebnf.py":491
 *     WHITESPACE_PARSER_KEYWORD = "wsp__"
 *     DROP_WHITESPACE_PARSER_KEYWORD = "dwsp__"
 *     RESUME_RULES_KEYWORD = "resume_rules__"             # <<<<<<<<<<<<<<
 *     SKIP_RULES_SUFFIX = '_skip__'
 *     ERR_MSG_SUFFIX = '_err_msg__'
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RESUME_RULES_KEYWORD, __pyx_n_u_resume_rules) < 0) __PYX_ERR(0, 491, __pyx_L1_error)

  /* "DHParser/ebnf.py":492
 *     DROP_WHITESPACE_PARSER_KEYWORD = "dwsp__"
 *     RESUME_RULES_KEYWORD = "resume_rules__"
 *     SKIP_RULES_SUFFIX = '_skip__'             # <<<<<<<<<<<<<<
 *     ERR_MSG_SUFFIX = '_err_msg__'
 *     RESERVED_SYMBOLS = {WHITESPACE_KEYWORD, RAW_WS_KEYWORD, COMMENT_KEYWORD,
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_SKIP_RULES_SUFFIX, __pyx_n_u_skip_4) < 0) __PYX_ERR(0, 492, __pyx_L1_error)

  /* "DHParser/ebnf.py":493
 *     RESUME_RULES_KEYWORD = "resume_rules__"
 *     SKIP_RULES_SUFFIX = '_skip__'
 *     ERR_MSG_SUFFIX = '_err_msg__'             # <<<<<<<<<<<<<<
 *     RESERVED_SYMBOLS = {WHITESPACE_KEYWORD, RAW_WS_KEYWORD, COMMENT_KEYWORD,
 *                         RESUME_RULES_KEYWORD, ERR_MSG_SUFFIX}
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_ERR_MSG_SUFFIX, __pyx_n_u_err_msg) < 0) __PYX_ERR(0, 493, __pyx_L1_error)

  /* "DHParser/ebnf.py":494
 *     SKIP_RULES_SUFFIX = '_skip__'
 *     ERR_MSG_SUFFIX = '_err_msg__'
 *     RESERVED_SYMBOLS = {WHITESPACE_KEYWORD, RAW_WS_KEYWORD, COMMENT_KEYWORD,             # <<<<<<<<<<<<<<
 *                         RESUME_RULES_KEYWORD, ERR_MSG_SUFFIX}
 *     AST_ERROR = "Badly structured syntax tree. " \
 */
  __pyx_t_16 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_WHITESPACE_KEYWORD);
  if (unlikely(!__pyx_t_16)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_WHITESPACE_KEYWORD);
  }
  if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_19 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_RAW_WS_KEYWORD);
  if (unlikely(!__pyx_t_19)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_RAW_WS_KEYWORD);
  }
  if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_1 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_COMMENT_KEYWORD);
  if (unlikely(!__pyx_t_1)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_COMMENT_KEYWORD);
  }
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "DHParser/ebnf.py":495
 *     ERR_MSG_SUFFIX = '_err_msg__'
 *     RESERVED_SYMBOLS = {WHITESPACE_KEYWORD, RAW_WS_KEYWORD, COMMENT_KEYWORD,
 *                         RESUME_RULES_KEYWORD, ERR_MSG_SUFFIX}             # <<<<<<<<<<<<<<
 *     AST_ERROR = "Badly structured syntax tree. " \
 *                 "Potentially due to erroneous AST transformation."
 */
  __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_RESUME_RULES_KEYWORD);
  if (unlikely(!__pyx_t_4)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_RESUME_RULES_KEYWORD);
  }
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_ERR_MSG_SUFFIX);
  if (unlikely(!__pyx_t_12)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_ERR_MSG_SUFFIX);
  }
  if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_18 = PySet_New(0); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (PySet_Add(__pyx_t_18, __pyx_t_16) < 0) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  if (PySet_Add(__pyx_t_18, __pyx_t_19) < 0) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (PySet_Add(__pyx_t_18, __pyx_t_1) < 0) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PySet_Add(__pyx_t_18, __pyx_t_4) < 0) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PySet_Add(__pyx_t_18, __pyx_t_12) < 0) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RESERVED_SYMBOLS, __pyx_t_18) < 0) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

  /* "DHParser/ebnf.py":496
 *     RESERVED_SYMBOLS = {WHITESPACE_KEYWORD, RAW_WS_KEYWORD, COMMENT_KEYWORD,
 *                         RESUME_RULES_KEYWORD, ERR_MSG_SUFFIX}
 *     AST_ERROR = "Badly structured syntax tree. " \             # <<<<<<<<<<<<<<
 *                 "Potentially due to erroneous AST transformation."
 *     PREFIX_TABLE = {'': 'Required',
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_AST_ERROR, __pyx_kp_u_Badly_structured_syntax_tree_Pot) < 0) __PYX_ERR(0, 496, __pyx_L1_error)

  /* "DHParser/ebnf.py":498
 *     AST_ERROR = "Badly structured syntax tree. " \
 *                 "Potentially due to erroneous AST transformation."
 *     PREFIX_TABLE = {'': 'Required',             # <<<<<<<<<<<<<<
 *                     '&': 'Lookahead', '!': 'NegativeLookahead',
 *                     '-&': 'Lookbehind', '-!': 'NegativeLookbehind',
 */
  __pyx_t_18 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (PyDict_SetItem(__pyx_t_18, __pyx_kp_u__45, __pyx_n_u_Required) < 0) __PYX_ERR(0, 498, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_18, __pyx_kp_u__73, __pyx_n_u_Lookahead) < 0) __PYX_ERR(0, 498, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_18, __pyx_kp_u__72, __pyx_n_u_NegativeLookahead) < 0) __PYX_ERR(0, 498, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_18, __pyx_kp_u__75, __pyx_n_u_Lookbehind) < 0) __PYX_ERR(0, 498, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_18, __pyx_kp_u__74, __pyx_n_u_NegativeLookbehind) < 0) __PYX_ERR(0, 498, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_18, __pyx_kp_u__49, __pyx_n_u_Pop) < 0) __PYX_ERR(0, 498, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_18, __pyx_kp_u__13, __pyx_n_u_Retrieve) < 0) __PYX_ERR(0, 498, __pyx_L1_error)
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_PREFIX_TABLE, __pyx_t_18) < 0) __PYX_ERR(0, 498, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

  /* "DHParser/ebnf.py":502
 *                     '-&': 'Lookbehind', '-!': 'NegativeLookbehind',
 *                     '::': 'Pop', ':': 'Retrieve'}
 *     REPEATABLE_DIRECTIVES = {'tokens'}             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_18 = PySet_New(0); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (PySet_Add(__pyx_t_18, __pyx_n_u_tokens) < 0) __PYX_ERR(0, 502, __pyx_L1_error)
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_REPEATABLE_DIRECTIVES, __pyx_t_18) < 0) __PYX_ERR(0, 502, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

  /* "DHParser/ebnf.py":505
 * 
 * 
 *     def __init__(self, grammar_name="DSL", grammar_source=""):             # <<<<<<<<<<<<<<
 *         self.grammar_id = 0
 *         super(EBNFCompiler, self).__init__()  # calls the _reset()-method
 */
  __pyx_t_18 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_1__init__, 0, __pyx_n_s_EBNFCompiler___init, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__100)); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_18, __pyx_tuple__101);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_18) < 0) __PYX_ERR(0, 505, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

  /* "DHParser/ebnf.py":511
 * 
 * 
 *     def _reset(self):             # <<<<<<<<<<<<<<
 *         super(EBNFCompiler, self)._reset()
 *         self._result = ''           # type: str
 */
  __pyx_t_18 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_3_reset, 0, __pyx_n_s_EBNFCompiler__reset, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__103)); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_reset, __pyx_t_18) < 0) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

  /* "DHParser/ebnf.py":531
 * 
 *     @property
 *     def result(self) -> str:             # <<<<<<<<<<<<<<
 *         return self._result
 * 
 */
  __pyx_t_18 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_return, __pyx_n_u_unicode) < 0) __PYX_ERR(0, 531, __pyx_L1_error)
  __pyx_t_12 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_5result, 0, __pyx_n_s_EBNFCompiler_result, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_12, __pyx_t_18);
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

  /* "DHParser/ebnf.py":530
 * 
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def result(self) -> str:
 *         return self._result
 */
  __pyx_t_18 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_12); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_result_2, __pyx_t_18) < 0) __PYX_ERR(0, 531, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

  /* "DHParser/ebnf.py":535
 * 
 * 
 *     def set_grammar_name(self, grammar_name: str = "", grammar_source: str = ""):             # <<<<<<<<<<<<<<
 *         """
 *         Changes the grammar name and source.
 */
  __pyx_t_18 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_grammar_name, __pyx_n_u_unicode) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_grammar_source, __pyx_n_u_unicode) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
  __pyx_t_12 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_7set_grammar_name, 0, __pyx_n_s_EBNFCompiler_set_grammar_name, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__107)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_tuple__108);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_12, __pyx_t_18);
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_set_grammar_name, __pyx_t_12) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "DHParser/ebnf.py":553
 *     # methods for generating skeleton code for preprocessor, transformer, and compiler
 * 
 *     def gen_preprocessor_skeleton(self) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Returns Python-skeleton-code for a preprocessor-function for
 */
  __pyx_t_12 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_return, __pyx_n_u_unicode) < 0) __PYX_ERR(0, 553, __pyx_L1_error)
  __pyx_t_18 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_9gen_preprocessor_skeleton, 0, __pyx_n_s_EBNFCompiler_gen_preprocessor_sk, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__110)); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_18, __pyx_t_12);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_gen_preprocessor_skeleton, __pyx_t_18) < 0) __PYX_ERR(0, 553, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

  /* "DHParser/ebnf.py":563
 * 
 * 
 *     def gen_transformer_skeleton(self) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Returns Python-skeleton-code for the AST-transformation for the
 */
  __pyx_t_18 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_return, __pyx_n_u_unicode) < 0) __PYX_ERR(0, 563, __pyx_L1_error)
  __pyx_t_12 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_11gen_transformer_skeleton, 0, __pyx_n_s_EBNFCompiler_gen_transformer_ske, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__112)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_12, __pyx_t_18);
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_gen_transformer_skeleton, __pyx_t_12) < 0) __PYX_ERR(0, 563, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "DHParser/ebnf.py":589
 * 
 * 
 *     def gen_compiler_skeleton(self) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Returns Python-skeleton-code for a Compiler-class for the
 */
  __pyx_t_12 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_return, __pyx_n_u_unicode) < 0) __PYX_ERR(0, 589, __pyx_L1_error)
  __pyx_t_18 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_13gen_compiler_skeleton, 0, __pyx_n_s_EBNFCompiler_gen_compiler_skelet, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__114)); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_18, __pyx_t_12);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_gen_compiler_skeleton, __pyx_t_18) < 0) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

  /* "DHParser/ebnf.py":618
 *         return '\n'.join(compiler)
 * 
 *     def verify_transformation_table(self, transtable):             # <<<<<<<<<<<<<<
 *         """
 *         Checks for symbols that occur in the transformation-table but have
 */
  __pyx_t_18 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_15verify_transformation_table, 0, __pyx_n_s_EBNFCompiler_verify_transformati, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__116)); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_verify_transformation_table, __pyx_t_18) < 0) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

  /* "DHParser/ebnf.py":636
 *         return messages
 * 
 *     def verify_compiler(self, compiler):             # <<<<<<<<<<<<<<
 *         """
 *         Checks for on_XXXX()-methods that occur in the compiler, although XXXX
 */
  __pyx_t_18 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_17verify_compiler, 0, __pyx_n_s_EBNFCompiler_verify_compiler, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__118)); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_verify_compiler, __pyx_t_18) < 0) __PYX_ERR(0, 636, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

  /* "DHParser/ebnf.py":645
 * 
 * 
 *     def _check_rx(self, node: Node, rx: str) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Checks whether the string `rx` represents a valid regular
 */
  __pyx_t_18 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Node); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_node, __pyx_t_12) < 0) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_rx, __pyx_n_u_unicode) < 0) __PYX_ERR(0, 645, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_return, __pyx_n_u_unicode) < 0) __PYX_ERR(0, 645, __pyx_L1_error)
  __pyx_t_12 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_19_check_rx, 0, __pyx_n_s_EBNFCompiler__check_rx, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__120)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_12, __pyx_t_18);
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_check_rx, __pyx_t_12) < 0) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "DHParser/ebnf.py":662
 * 
 * 
 *     def _extract_regex(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         """Extracts regular expression string from regexp-Node."""
 *         value = node.content.strip("~")
 */
  __pyx_t_12 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_n_s_Node); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_node, __pyx_t_18) < 0) __PYX_ERR(0, 662, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_return, __pyx_n_u_unicode) < 0) __PYX_ERR(0, 662, __pyx_L1_error)
  __pyx_t_18 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_21_extract_regex, 0, __pyx_n_s_EBNFCompiler__extract_regex, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__122)); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_18, __pyx_t_12);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_extract_regex, __pyx_t_18) < 0) __PYX_ERR(0, 662, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

  /* "DHParser/ebnf.py":672
 * 
 * 
 *     def _gen_search_rule(self, nd: Node) -> ReprType:             # <<<<<<<<<<<<<<
 *         """Generates a search rule, which can be either a string for simple
 *         string search or a regular expression from the nodes content. Returns
 */
  __pyx_t_18 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Node); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_nd, __pyx_t_12) < 0) __PYX_ERR(0, 672, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_ReprType); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_return, __pyx_t_12) < 0) __PYX_ERR(0, 672, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_23_gen_search_rule, 0, __pyx_n_s_EBNFCompiler__gen_search_rule, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__124)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_12, __pyx_t_18);
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_gen_search_rule, __pyx_t_12) < 0) __PYX_ERR(0, 672, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "DHParser/ebnf.py":684
 *         return ''
 * 
 *     def _gen_search_list(self, nodes: Sequence[Node]) -> List[Union[unrepr, str]]:             # <<<<<<<<<<<<<<
 *         search_list = []  # type: List[Union[unrepr, str]]
 *         for child in nodes:
 */
  __pyx_t_12 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_n_s_Sequence); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Node); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_18, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_nodes, __pyx_t_1) < 0) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_List); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Union); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_n_s_unrepr); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __pyx_t_19 = PyTuple_New(2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_GIVEREF(__pyx_t_18);
  PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_18);
  __Pyx_INCREF(((PyObject *)(&PyUnicode_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyUnicode_Type)));
  PyTuple_SET_ITEM(__pyx_t_19, 1, ((PyObject *)(&PyUnicode_Type)));
  __pyx_t_18 = 0;
  __pyx_t_18 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_19); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __pyx_t_19 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_18); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_return, __pyx_t_19) < 0) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __pyx_t_19 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_25_gen_search_list, 0, __pyx_n_s_EBNFCompiler__gen_search_list, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__126)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_19, __pyx_t_12);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_gen_search_list, __pyx_t_19) < 0) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "DHParser/ebnf.py":692
 * 
 * 
 *     def assemble_parser(self, definitions: List[Tuple[str, str]], root_node: Node) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Creates the Python code for the parser after compilation of
 */
  __pyx_t_19 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_List); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_n_s_Tuple); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)(&PyUnicode_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyUnicode_Type)));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)(&PyUnicode_Type)));
  __Pyx_INCREF(((PyObject *)(&PyUnicode_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyUnicode_Type)));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)(&PyUnicode_Type)));
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_18, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_12, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_definitions, __pyx_t_1) < 0) __PYX_ERR(0, 692, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_root_node, __pyx_t_1) < 0) __PYX_ERR(0, 692, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_return, __pyx_n_u_unicode) < 0) __PYX_ERR(0, 692, __pyx_L1_error)
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_27assemble_parser, 0, __pyx_n_s_EBNFCompiler_assemble_parser, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__128)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_19);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_assemble_parser, __pyx_t_1) < 0) __PYX_ERR(0, 692, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "DHParser/ebnf.py":863
 *     ## compilation methods
 * 
 *     def on_syntax(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         definitions = []  # type: List[Tuple[str, str]]
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_Node); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_node, __pyx_t_19) < 0) __PYX_ERR(0, 863, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_return, __pyx_n_u_unicode) < 0) __PYX_ERR(0, 863, __pyx_L1_error)
  __pyx_t_19 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_29on_syntax, 0, __pyx_n_s_EBNFCompiler_on_syntax, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__130)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_19, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_syntax, __pyx_t_19) < 0) __PYX_ERR(0, 863, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "DHParser/ebnf.py":883
 * 
 * 
 *     def on_definition(self, node: Node) -> Tuple[str, str]:             # <<<<<<<<<<<<<<
 *         rule = node.children[0].content
 *         if rule in self.rules:
 */
  __pyx_t_19 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_node, __pyx_t_1) < 0) __PYX_ERR(0, 883, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)(&PyUnicode_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyUnicode_Type)));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)(&PyUnicode_Type)));
  __Pyx_INCREF(((PyObject *)(&PyUnicode_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyUnicode_Type)));
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)(&PyUnicode_Type)));
  __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_return, __pyx_t_12) < 0) __PYX_ERR(0, 883, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_31on_definition, 0, __pyx_n_s_EBNFCompiler_on_definition, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__132)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_12, __pyx_t_19);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_definition, __pyx_t_12) < 0) __PYX_ERR(0, 883, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "DHParser/ebnf.py":922
 * 
 * 
 *     def on_directive(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         key = node.children[0].content
 *         assert key not in self.directives.tokens
 */
  __pyx_t_12 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_Node); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_node, __pyx_t_19) < 0) __PYX_ERR(0, 922, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_return, __pyx_n_u_unicode) < 0) __PYX_ERR(0, 922, __pyx_L1_error)
  __pyx_t_19 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_33on_directive, 0, __pyx_n_s_EBNFCompiler_on_directive, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__134)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_19, __pyx_t_12);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_directive, __pyx_t_19) < 0) __PYX_ERR(0, 922, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "DHParser/ebnf.py":1037
 * 
 * 
 *     def non_terminal(self, node: Node, parser_class: str, custom_args: List[str] = []) -> str:             # <<<<<<<<<<<<<<
 *         """
 *         Compiles any non-terminal, where `parser_class` indicates the Parser class
 */
  __pyx_t_19 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Node); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_node, __pyx_t_12) < 0) __PYX_ERR(0, 1037, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_parser_class, __pyx_n_u_unicode) < 0) __PYX_ERR(0, 1037, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_List); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_12, ((PyObject *)(&PyUnicode_Type))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_custom_args, __pyx_t_4) < 0) __PYX_ERR(0, 1037, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_return, __pyx_n_u_unicode) < 0) __PYX_ERR(0, 1037, __pyx_L1_error)
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_35non_terminal, 0, __pyx_n_s_EBNFCompiler_non_terminal, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__136)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults), 1)) __PYX_ERR(0, 1037, __pyx_L1_error)
  __pyx_t_12 = PyList_New(0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_4)->__pyx_arg_custom_args = __pyx_t_12;
  __Pyx_GIVEREF(__pyx_t_12);
  __pyx_t_12 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_4, __pyx_pf_8DHParser_4ebnf_14__defaults__);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_19);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_non_terminal, __pyx_t_4) < 0) __PYX_ERR(0, 1037, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "DHParser/ebnf.py":1046
 * 
 * 
 *     def on_expression(self, node) -> str:             # <<<<<<<<<<<<<<
 *         # TODO: Add check for errors like "a" | "ab" (which will always yield a, even for ab)
 *         return self.non_terminal(node, 'Alternative')
 */
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_return, __pyx_n_u_unicode) < 0) __PYX_ERR(0, 1046, __pyx_L1_error)
  __pyx_t_19 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_37on_expression, 0, __pyx_n_s_EBNFCompiler_on_expression, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__138)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_19, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_expression, __pyx_t_19) < 0) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "DHParser/ebnf.py":1051
 * 
 * 
 *     def _error_customization(self, node) -> Tuple[Tuple[Node, ...], List[str]]:             # <<<<<<<<<<<<<<
 *         mandatory_marker = []
 *         filtered_children = []  # type: List[Node]
 */
  __pyx_t_19 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Tuple); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Tuple); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_18 = PyTuple_New(2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_1);
  __Pyx_INCREF(Py_Ellipsis);
  __Pyx_GIVEREF(Py_Ellipsis);
  PyTuple_SET_ITEM(__pyx_t_18, 1, Py_Ellipsis);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_12, __pyx_t_18); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_n_s_List); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_t_18, ((PyObject *)(&PyUnicode_Type))); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __pyx_t_18 = PyTuple_New(2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_12);
  PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_12);
  __pyx_t_1 = 0;
  __pyx_t_12 = 0;
  __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_18); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_return, __pyx_t_12) < 0) __PYX_ERR(0, 1051, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_39_error_customization, 0, __pyx_n_s_EBNFCompiler__error_customizatio, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__140)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_12, __pyx_t_19);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_error_customization, __pyx_t_12) < 0) __PYX_ERR(0, 1051, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "DHParser/ebnf.py":1093
 * 
 * 
 *     def on_term(self, node) -> str:             # <<<<<<<<<<<<<<
 *         filtered_result, custom_args = self._error_customization(node)
 *         mock_node = Node(node.tag_name, filtered_result)
 */
  __pyx_t_12 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_return, __pyx_n_u_unicode) < 0) __PYX_ERR(0, 1093, __pyx_L1_error)
  __pyx_t_19 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_41on_term, 0, __pyx_n_s_EBNFCompiler_on_term, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__142)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_19, __pyx_t_12);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_term, __pyx_t_19) < 0) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "DHParser/ebnf.py":1099
 * 
 * 
 *     def on_factor(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         assert node.children
 *         assert len(node.children) >= 2, node.as_sxpr()
 */
  __pyx_t_19 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Node); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_node, __pyx_t_12) < 0) __PYX_ERR(0, 1099, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_return, __pyx_n_u_unicode) < 0) __PYX_ERR(0, 1099, __pyx_L1_error)
  __pyx_t_12 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_43on_factor, 0, __pyx_n_s_EBNFCompiler_on_factor, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__144)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_12, __pyx_t_19);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_factor, __pyx_t_12) < 0) __PYX_ERR(0, 1099, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "DHParser/ebnf.py":1154
 * 
 * 
 *     def on_option(self, node) -> str:             # <<<<<<<<<<<<<<
 *         return self.non_terminal(node, 'Option')
 * 
 */
  __pyx_t_12 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_return, __pyx_n_u_unicode) < 0) __PYX_ERR(0, 1154, __pyx_L1_error)
  __pyx_t_19 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_45on_option, 0, __pyx_n_s_EBNFCompiler_on_option, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__146)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_19, __pyx_t_12);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_option, __pyx_t_19) < 0) __PYX_ERR(0, 1154, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "DHParser/ebnf.py":1158
 * 
 * 
 *     def on_repetition(self, node) -> str:             # <<<<<<<<<<<<<<
 *         return self.non_terminal(node, 'ZeroOrMore')
 * 
 */
  __pyx_t_19 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_return, __pyx_n_u_unicode) < 0) __PYX_ERR(0, 1158, __pyx_L1_error)
  __pyx_t_12 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_47on_repetition, 0, __pyx_n_s_EBNFCompiler_on_repetition, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__148)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_12, __pyx_t_19);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_repetition, __pyx_t_12) < 0) __PYX_ERR(0, 1158, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "DHParser/ebnf.py":1162
 * 
 * 
 *     def on_oneormore(self, node) -> str:             # <<<<<<<<<<<<<<
 *         return self.non_terminal(node, 'OneOrMore')
 * 
 */
  __pyx_t_12 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_return, __pyx_n_u_unicode) < 0) __PYX_ERR(0, 1162, __pyx_L1_error)
  __pyx_t_19 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_49on_oneormore, 0, __pyx_n_s_EBNFCompiler_on_oneormore, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__150)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_19, __pyx_t_12);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_oneormore, __pyx_t_19) < 0) __PYX_ERR(0, 1162, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "DHParser/ebnf.py":1166
 * 
 * 
 *     def on_group(self, node) -> str:             # <<<<<<<<<<<<<<
 *         raise EBNFCompilerError("Group nodes should have been eliminated by "
 *                                 "AST transformation!")
 */
  __pyx_t_19 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_return, __pyx_n_u_unicode) < 0) __PYX_ERR(0, 1166, __pyx_L1_error)
  __pyx_t_12 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_51on_group, 0, __pyx_n_s_EBNFCompiler_on_group, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__152)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_12, __pyx_t_19);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_group, __pyx_t_12) < 0) __PYX_ERR(0, 1166, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "DHParser/ebnf.py":1170
 *                                 "AST transformation!")
 * 
 *     def on_unordered(self, node) -> str:             # <<<<<<<<<<<<<<
 *         # return self.non_terminal(node, 'Unordered')
 *         assert len(node.children) == 1
 */
  __pyx_t_12 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_return, __pyx_n_u_unicode) < 0) __PYX_ERR(0, 1170, __pyx_L1_error)
  __pyx_t_19 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_53on_unordered, 0, __pyx_n_s_EBNFCompiler_on_unordered, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__154)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_19, __pyx_t_12);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_unordered, __pyx_t_19) < 0) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "DHParser/ebnf.py":1188
 *             return ""
 * 
 *     def on_symbol(self, node: Node) -> str:     # called only for symbols on the right hand side!             # <<<<<<<<<<<<<<
 *         symbol = node.content  # ; assert result == cast(str, node.result)
 *         if symbol in self.directives.tokens:
 */
  __pyx_t_19 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Node); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_node, __pyx_t_12) < 0) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_return, __pyx_n_u_unicode) < 0) __PYX_ERR(0, 1188, __pyx_L1_error)
  __pyx_t_12 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_55on_symbol, 0, __pyx_n_s_EBNFCompiler_on_symbol, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__156)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_12, __pyx_t_19);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_symbol, __pyx_t_12) < 0) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "DHParser/ebnf.py":1206
 * 
 * 
 *     def TOKEN_PARSER(self):             # <<<<<<<<<<<<<<
 *         if DROP_TOKEN in self.directives.drop and self.context[-2].tag_name != "definition":
 *             return 'DropToken('
 */
  __pyx_t_12 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_57TOKEN_PARSER, 0, __pyx_n_s_EBNFCompiler_TOKEN_PARSER, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__158)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_TOKEN_PARSER, __pyx_t_12) < 0) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "DHParser/ebnf.py":1211
 *         return 'Token('
 * 
 *     def WSPC_PARSER(self):             # <<<<<<<<<<<<<<
 *         if DROP_WSPC in self.directives.drop and (self.context[-2].tag_name != "definition"
 *                                                   or self.context[-1].tag_name == 'literal'):
 */
  __pyx_t_12 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_59WSPC_PARSER, 0, __pyx_n_s_EBNFCompiler_WSPC_PARSER, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__160)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_WSPC_PARSER, __pyx_t_12) < 0) __PYX_ERR(0, 1211, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "DHParser/ebnf.py":1217
 *         return 'wsp__'
 * 
 *     def on_literal(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         center = self.TOKEN_PARSER() + node.content.replace('\\', r'\\') + ')'
 *         left = self.WSPC_PARSER() if 'left' in self.directives.literalws else ''
 */
  __pyx_t_12 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_Node); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_node, __pyx_t_19) < 0) __PYX_ERR(0, 1217, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_return, __pyx_n_u_unicode) < 0) __PYX_ERR(0, 1217, __pyx_L1_error)
  __pyx_t_19 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_61on_literal, 0, __pyx_n_s_EBNFCompiler_on_literal, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__162)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_19, __pyx_t_12);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_literal, __pyx_t_19) < 0) __PYX_ERR(0, 1217, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "DHParser/ebnf.py":1226
 * 
 * 
 *     def on_plaintext(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         tk = node.content.replace('\\', r'\\')
 *         rpl = '"' if tk.find('"') < 0 else "'" if tk.find("'") < 0 else ''
 */
  __pyx_t_19 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Node); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_node, __pyx_t_12) < 0) __PYX_ERR(0, 1226, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_return, __pyx_n_u_unicode) < 0) __PYX_ERR(0, 1226, __pyx_L1_error)
  __pyx_t_12 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_63on_plaintext, 0, __pyx_n_s_EBNFCompiler_on_plaintext, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__164)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_12, __pyx_t_19);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_plaintext, __pyx_t_12) < 0) __PYX_ERR(0, 1226, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "DHParser/ebnf.py":1236
 * 
 * 
 *     def on_regexp(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         rx = node.content
 *         name = []   # type: List[str]
 */
  __pyx_t_12 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_Node); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_node, __pyx_t_19) < 0) __PYX_ERR(0, 1236, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_return, __pyx_n_u_unicode) < 0) __PYX_ERR(0, 1236, __pyx_L1_error)
  __pyx_t_19 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_65on_regexp, 0, __pyx_n_s_EBNFCompiler_on_regexp, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__166)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_19, __pyx_t_12);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_regexp, __pyx_t_19) < 0) __PYX_ERR(0, 1236, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "DHParser/ebnf.py":1253
 * 
 * 
 *     def on_whitespace(self, node: Node) -> str:             # <<<<<<<<<<<<<<
 *         return self.WSPC_PARSER()
 * 
 */
  __pyx_t_19 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Node); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_node, __pyx_t_12) < 0) __PYX_ERR(0, 1253, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_return, __pyx_n_u_unicode) < 0) __PYX_ERR(0, 1253, __pyx_L1_error)
  __pyx_t_12 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_12EBNFCompiler_67on_whitespace, 0, __pyx_n_s_EBNFCompiler_on_whitespace, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__168)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_12, __pyx_t_19);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_on_whitespace, __pyx_t_12) < 0) __PYX_ERR(0, 1253, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "DHParser/ebnf.py":404
 * 
 * 
 * class EBNFCompiler(Compiler):             # <<<<<<<<<<<<<<
 *     """
 *     Generates a Parser from an abstract syntax tree of a grammar specified
 */
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_EBNFCompiler, __pyx_t_8, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_EBNFCompiler, __pyx_t_12) < 0) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "DHParser/ebnf.py":1256
 *         return self.WSPC_PARSER()
 * 
 * def get_ebnf_compiler(grammar_name="", grammar_source="") -> EBNFCompiler:             # <<<<<<<<<<<<<<
 *     try:
 *         compiler = GLOBALS.ebnf_compiler_singleton
 */
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_EBNFCompiler); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_return, __pyx_t_2) < 0) __PYX_ERR(0, 1256, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_11get_ebnf_compiler, 0, __pyx_n_s_get_ebnf_compiler, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__170)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__171);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_ebnf_compiler, __pyx_t_2) < 0) __PYX_ERR(0, 1256, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DHParser/ebnf.py":1274
 * ########################################################################
 * 
 * def compile_ebnf(ebnf_source: str, branding: str = 'DSL') \             # <<<<<<<<<<<<<<
 *         -> Tuple[Optional[Any], List[Error], Optional[Node]]:
 *     """
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ebnf_source, __pyx_n_u_unicode) < 0) __PYX_ERR(0, 1274, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_branding, __pyx_n_u_unicode) < 0) __PYX_ERR(0, 1274, __pyx_L1_error)

  /* "DHParser/ebnf.py":1275
 * 
 * def compile_ebnf(ebnf_source: str, branding: str = 'DSL') \
 *         -> Tuple[Optional[Any], List[Error], Optional[Node]]:             # <<<<<<<<<<<<<<
 *     """
 *     Compiles an `ebnf_source` (file_name or EBNF-string) and returns
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_Tuple); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Optional); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Any); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_19 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_12); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_List); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_18 = __Pyx_PyObject_GetItem(__pyx_t_12, __pyx_t_3); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Optional); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_Node); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_19);
  PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_19);
  __Pyx_GIVEREF(__pyx_t_18);
  PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_18);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_4);
  __pyx_t_19 = 0;
  __pyx_t_18 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_return, __pyx_t_4) < 0) __PYX_ERR(0, 1274, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "DHParser/ebnf.py":1274
 * ########################################################################
 * 
 * def compile_ebnf(ebnf_source: str, branding: str = 'DSL') \             # <<<<<<<<<<<<<<
 *         -> Tuple[Optional[Any], List[Error], Optional[Node]]:
 *     """
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8DHParser_4ebnf_13compile_ebnf, 0, __pyx_n_s_compile_ebnf, NULL, __pyx_n_s_DHParser_ebnf, __pyx_d, ((PyObject *)__pyx_codeobj__173)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__174);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_compile_ebnf, __pyx_t_4) < 0) __PYX_ERR(0, 1274, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "DHParser/ebnf.py":1
 * # ebnf.py - EBNF -> Python-Parser compilation for DHParser             # <<<<<<<<<<<<<<
 * #
 * # Copyright 2016  by Eckhart Arnold (arnold@badw.de)
 */
  __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_4) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_XDECREF(__pyx_t_21);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init DHParser.ebnf", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_CLEAR(__pyx_m);
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init DHParser.ebnf");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* PyDictVersioning */
#if CYTHON_USE_DICT_VERSIONS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    return dict ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
    PyObject **dictptr = NULL;
    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
    if (offset) {
        dictptr = (offset > 0) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
    }
    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    if (!dict || tp_dict_version != __PYX_GET_DICT_VERSION(dict))
        return 0;
    return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif

/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    } else if (unlikely(PyErr_Occurred())) {
        return NULL;
    }
#else
    result = PyDict_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

/* ArgTypeTest */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (exact) {
        #if PY_MAJOR_VERSION == 2
        if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    }
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
    return 0;
}

/* PyCFunctionFastCall */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    int flags = PyCFunction_GET_FLAGS(func);
    assert(PyCFunction_Check(func));
    assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
    assert(nargs >= 0);
    assert(nargs == 0 || args != NULL);
    /* _PyCFunction_FastCallDict() must not be called with an exception set,
       because it may clear it (directly or indirectly) and so the
       caller loses its exception */
    assert(!PyErr_Occurred());
    if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
        return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
    } else {
        return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
    }
}
#endif

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif
#endif

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = func->ob_type->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCall2Args */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args, *result = NULL;
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyFunction_FastCall(function, args, 2);
    }
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyCFunction_FastCall(function, args, 2);
    }
    #endif
    args = PyTuple_New(2);
    if (unlikely(!args)) goto done;
    Py_INCREF(arg1);
    PyTuple_SET_ITEM(args, 0, arg1);
    Py_INCREF(arg2);
    PyTuple_SET_ITEM(args, 1, arg2);
    Py_INCREF(function);
    result = __Pyx_PyObject_Call(function, args, NULL);
    Py_DECREF(args);
    Py_DECREF(function);
done:
    return result;
}

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallOneArg */
#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, &arg, 1);
    }
#endif
    if (likely(PyCFunction_Check(func))) {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
        } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
            return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

/* PyObjectCallNoArg */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, NULL, 0);
    }
#endif
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
#else
    if (likely(PyCFunction_Check(func)))
#endif
    {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#endif

/* GetTopmostException */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    #endif
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
#endif

/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
    }
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

/* PyErrFetchRestore */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}
#endif

/* None */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* SliceObject */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
        Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
#if CYTHON_USE_TYPE_SLOTS
    PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
    if (likely(ms && ms->sq_slice)) {
        if (!has_cstart) {
            if (_py_start && (*_py_start != Py_None)) {
                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstart = 0;
        }
        if (!has_cstop) {
            if (_py_stop && (*_py_stop != Py_None)) {
                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstop = PY_SSIZE_T_MAX;
        }
        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
            Py_ssize_t l = ms->sq_length(obj);
            if (likely(l >= 0)) {
                if (cstop < 0) {
                    cstop += l;
                    if (cstop < 0) cstop = 0;
                }
                if (cstart < 0) {
                    cstart += l;
                    if (cstart < 0) cstart = 0;
                }
            } else {
                if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                    goto bad;
                PyErr_Clear();
            }
        }
        return ms->sq_slice(obj, cstart, cstop);
    }
#endif
    mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_subscript))
#endif
    {
        PyObject* result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyInt_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_USE_TYPE_SLOTS
        result = mp->mp_subscript(obj, py_slice);
#else
        result = PyObject_GetItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    PyErr_Format(PyExc_TypeError,
        "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
bad:
    return NULL;
}

/* PyErrExceptionMatches */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    if (unlikely(PyTuple_Check(err)))
        return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* PyObjectSetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_setattr))
        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
#endif
    return PyObject_SetAttr(obj, attr_name, value);
}
#endif

/* DictGetItem */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (!PyErr_Occurred()) {
            if (unlikely(PyTuple_Check(key))) {
                PyObject* args = PyTuple_Pack(1, key);
                if (likely(args)) {
                    PyErr_SetObject(PyExc_KeyError, args);
                    Py_DECREF(args);
                }
            } else {
                PyErr_SetObject(PyExc_KeyError, key);
            }
        }
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#endif

/* GetAttr */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* HasAttr */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!__Pyx_PyBaseString_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_GetAttr(o, n);
    if (unlikely(!r)) {
        PyErr_Clear();
        return 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a + b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* BytesEquals */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
        #if CYTHON_PEP393_ENABLED
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
        #else
            hash1 = ((PyUnicodeObject*)s1)->hash;
            hash2 = ((PyUnicodeObject*)s2)->hash;
        #endif
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        #if PY_MAJOR_VERSION < 3
        Py_XDECREF(owned_ref);
        #endif
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

/* RaiseException */
#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    __Pyx_PyThreadState_declare
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if CYTHON_COMPILING_IN_PYPY
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#else
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* PyObjectFormatAndDecref */
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) {
    if (unlikely(!s)) return NULL;
    if (likely(PyUnicode_CheckExact(s))) return s;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyString_CheckExact(s))) {
        PyObject *result = PyUnicode_FromEncodedObject(s, NULL, "strict");
        Py_DECREF(s);
        return result;
    }
    #endif
    return __Pyx_PyObject_FormatAndDecref(s, f);
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) {
    PyObject *result = PyObject_Format(s, f);
    Py_DECREF(s);
    return result;
}

/* JoinPyUnicode */
static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      CYTHON_UNUSED Py_UCS4 max_char) {
#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    PyObject *result_uval;
    int result_ukind;
    Py_ssize_t i, char_pos;
    void *result_udata;
#if CYTHON_PEP393_ENABLED
    result_uval = PyUnicode_New(result_ulength, max_char);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
    result_udata = PyUnicode_DATA(result_uval);
#else
    result_uval = PyUnicode_FromUnicode(NULL, result_ulength);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = sizeof(Py_UNICODE);
    result_udata = PyUnicode_AS_UNICODE(result_uval);
#endif
    char_pos = 0;
    for (i=0; i < value_count; i++) {
        int ukind;
        Py_ssize_t ulength;
        void *udata;
        PyObject *uval = PyTuple_GET_ITEM(value_tuple, i);
        if (unlikely(__Pyx_PyUnicode_READY(uval)))
            goto bad;
        ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
        if (unlikely(!ulength))
            continue;
        if (unlikely(char_pos + ulength < 0))
            goto overflow;
        ukind = __Pyx_PyUnicode_KIND(uval);
        udata = __Pyx_PyUnicode_DATA(uval);
        if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) {
            memcpy((char *)result_udata + char_pos * result_ukind, udata, (size_t) (ulength * result_ukind));
        } else {
            #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters)
            _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
            #else
            Py_ssize_t j;
            for (j=0; j < ulength; j++) {
                Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
                __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
            }
            #endif
        }
        char_pos += ulength;
    }
    return result_uval;
overflow:
    PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
bad:
    Py_DECREF(result_uval);
    return NULL;
#else
    result_ulength++;
    value_count++;
    return PyUnicode_Join(__pyx_empty_unicode, value_tuple);
#endif
}

/* PyUnicode_Unicode */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj) {
    if (unlikely(obj == Py_None))
        obj = __pyx_kp_u_None;
    return __Pyx_NewRef(obj);
}

/* SwapException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = *type;
    exc_info->exc_value = *value;
    exc_info->exc_traceback = *tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
    #endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* None */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

/* ObjectGetItem */
#if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
    PyObject *runerr;
    Py_ssize_t key_value;
    PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
    if (unlikely(!(m && m->sq_item))) {
        PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
        return NULL;
    }
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
    PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
    if (likely(m && m->mp_subscript)) {
        return m->mp_subscript(obj, key);
    }
    return __Pyx_PyObject_GetIndex(obj, key);
}
#endif

/* SetItemInt */
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
    int r;
    if (!j) return -1;
    r = PyObject_SetItem(o, j, v);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
                                               CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
            PyObject* old = PyList_GET_ITEM(o, n);
            Py_INCREF(v);
            PyList_SET_ITEM(o, n, v);
            Py_DECREF(old);
            return 1;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_ass_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return -1;
                    PyErr_Clear();
                }
            }
            return m->sq_ass_item(o, i, v);
        }
    }
#else
#if CYTHON_COMPILING_IN_PYPY
    if (is_list || (PySequence_Check(o) && !PyDict_Check(o)))
#else
    if (is_list || PySequence_Check(o))
#endif
    {
        return PySequence_SetItem(o, i, v);
    }
#endif
    return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
}

/* PyObjectGetMethod */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if PY_MAJOR_VERSION >= 3
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
        #endif
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (descr != NULL) {
        *method = descr;
        return 0;
    }
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(name));
#endif
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}

/* PyObjectCallMethod1 */
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
    PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
    Py_DECREF(method);
    return result;
}
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    PyObject *method = NULL, *result;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_Call2Args(method, obj, arg);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) return NULL;
    return __Pyx__PyObject_CallMethod1(method, arg);
}

/* append */
static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
    if (likely(PyList_CheckExact(L))) {
        if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
    } else {
        PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
        if (unlikely(!retval))
            return -1;
        Py_DECREF(retval);
    }
    return 0;
}

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_FAST_THREAD_STATE
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

/* PyObjectCallMethod0 */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
    PyObject *method = NULL, *result = NULL;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_CallOneArg(method, obj);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) goto bad;
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
}

/* RaiseNeedMoreValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* RaiseTooManyValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

/* RaiseNoneIterError */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

/* UnpackTupleError */
static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
    if (t == Py_None) {
      __Pyx_RaiseNoneNotIterableError();
    } else if (PyTuple_GET_SIZE(t) < index) {
      __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
    } else {
      __Pyx_RaiseTooManyValuesError(index);
    }
}

/* UnpackTuple2 */
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
        PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) {
    PyObject *value1 = NULL, *value2 = NULL;
#if CYTHON_COMPILING_IN_PYPY
    value1 = PySequence_ITEM(tuple, 0);  if (unlikely(!value1)) goto bad;
    value2 = PySequence_ITEM(tuple, 1);  if (unlikely(!value2)) goto bad;
#else
    value1 = PyTuple_GET_ITEM(tuple, 0);  Py_INCREF(value1);
    value2 = PyTuple_GET_ITEM(tuple, 1);  Py_INCREF(value2);
#endif
    if (decref_tuple) {
        Py_DECREF(tuple);
    }
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
#if CYTHON_COMPILING_IN_PYPY
bad:
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
#endif
}
static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
                                       int has_known_size, int decref_tuple) {
    Py_ssize_t index;
    PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
    iternextfunc iternext;
    iter = PyObject_GetIter(tuple);
    if (unlikely(!iter)) goto bad;
    if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
    iternext = Py_TYPE(iter)->tp_iternext;
    value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
    value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
    if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
    Py_DECREF(iter);
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
unpacking_failed:
    if (!has_known_size && __Pyx_IterFinish() == 0)
        __Pyx_RaiseNeedMoreValuesError(index);
bad:
    Py_XDECREF(iter);
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
}

/* dict_iter */
static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_source_is_dict) {
    is_dict = is_dict || likely(PyDict_CheckExact(iterable));
    *p_source_is_dict = is_dict;
    if (is_dict) {
#if !CYTHON_COMPILING_IN_PYPY
        *p_orig_length = PyDict_Size(iterable);
        Py_INCREF(iterable);
        return iterable;
#elif PY_MAJOR_VERSION >= 3
        static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL;
        PyObject **pp = NULL;
        if (method_name) {
            const char *name = PyUnicode_AsUTF8(method_name);
            if (strcmp(name, "iteritems") == 0) pp = &py_items;
            else if (strcmp(name, "iterkeys") == 0) pp = &py_keys;
            else if (strcmp(name, "itervalues") == 0) pp = &py_values;
            if (pp) {
                if (!*pp) {
                    *pp = PyUnicode_FromString(name + 4);
                    if (!*pp)
                        return NULL;
                }
                method_name = *pp;
            }
        }
#endif
    }
    *p_orig_length = 0;
    if (method_name) {
        PyObject* iter;
        iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
        if (!iterable)
            return NULL;
#if !CYTHON_COMPILING_IN_PYPY
        if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
            return iterable;
#endif
        iter = PyObject_GetIter(iterable);
        Py_DECREF(iterable);
        return iter;
    }
    return PyObject_GetIter(iterable);
}
static CYTHON_INLINE int __Pyx_dict_iter_next(
        PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
        PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
    PyObject* next_item;
#if !CYTHON_COMPILING_IN_PYPY
    if (source_is_dict) {
        PyObject *key, *value;
        if (unlikely(orig_length != PyDict_Size(iter_obj))) {
            PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
            return -1;
        }
        if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
            return 0;
        }
        if (pitem) {
            PyObject* tuple = PyTuple_New(2);
            if (unlikely(!tuple)) {
                return -1;
            }
            Py_INCREF(key);
            Py_INCREF(value);
            PyTuple_SET_ITEM(tuple, 0, key);
            PyTuple_SET_ITEM(tuple, 1, value);
            *pitem = tuple;
        } else {
            if (pkey) {
                Py_INCREF(key);
                *pkey = key;
            }
            if (pvalue) {
                Py_INCREF(value);
                *pvalue = value;
            }
        }
        return 1;
    } else if (PyTuple_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyTuple_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else if (PyList_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyList_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else
#endif
    {
        next_item = PyIter_Next(iter_obj);
        if (unlikely(!next_item)) {
            return __Pyx_IterFinish();
        }
    }
    if (pitem) {
        *pitem = next_item;
    } else if (pkey && pvalue) {
        if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
            return -1;
    } else if (pkey) {
        *pkey = next_item;
    } else {
        *pvalue = next_item;
    }
    return 1;
}

/* SliceTupleAndList */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx_crop_slice(Py_ssize_t* _start, Py_ssize_t* _stop, Py_ssize_t* _length) {
    Py_ssize_t start = *_start, stop = *_stop, length = *_length;
    if (start < 0) {
        start += length;
        if (start < 0)
            start = 0;
    }
    if (stop < 0)
        stop += length;
    else if (stop > length)
        stop = length;
    *_length = stop - start;
    *_start = start;
    *_stop = stop;
}
static CYTHON_INLINE void __Pyx_copy_object_array(PyObject** CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
    PyObject *v;
    Py_ssize_t i;
    for (i = 0; i < length; i++) {
        v = dest[i] = src[i];
        Py_INCREF(v);
    }
}
static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(
            PyObject* src, Py_ssize_t start, Py_ssize_t stop) {
    PyObject* dest;
    Py_ssize_t length = PyList_GET_SIZE(src);
    __Pyx_crop_slice(&start, &stop, &length);
    if (unlikely(length <= 0))
        return PyList_New(0);
    dest = PyList_New(length);
    if (unlikely(!dest))
        return NULL;
    __Pyx_copy_object_array(
        ((PyListObject*)src)->ob_item + start,
        ((PyListObject*)dest)->ob_item,
        length);
    return dest;
}
static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(
            PyObject* src, Py_ssize_t start, Py_ssize_t stop) {
    PyObject* dest;
    Py_ssize_t length = PyTuple_GET_SIZE(src);
    __Pyx_crop_slice(&start, &stop, &length);
    if (unlikely(length <= 0))
        return PyTuple_New(0);
    dest = PyTuple_New(length);
    if (unlikely(!dest))
        return NULL;
    __Pyx_copy_object_array(
        ((PyTupleObject*)src)->ob_item + start,
        ((PyTupleObject*)dest)->ob_item,
        length);
    return dest;
}
#endif

/* FetchCommonType */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* fake_module;
    PyTypeObject* cached_type = NULL;
    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
    if (!fake_module) return NULL;
    Py_INCREF(fake_module);
    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
    if (cached_type) {
        if (!PyType_Check((PyObject*)cached_type)) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s is not a type object",
                type->tp_name);
            goto bad;
        }
        if (cached_type->tp_basicsize != type->tp_basicsize) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s has the wrong size, try recompiling",
                type->tp_name);
            goto bad;
        }
    } else {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        if (PyType_Ready(type) < 0) goto bad;
        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
            goto bad;
        Py_INCREF(type);
        cached_type = type;
    }
done:
    Py_DECREF(fake_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

/* CythonFunction */
#include <structmember.h>
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (unlikely(op->func_doc == NULL)) {
        if (op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    op->func_doc = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = op->func_qualname;
    Py_INCREF(value);
    op->func_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyTuple_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_tuple;
    op->defaults_tuple = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_kwdict;
    op->defaults_kwdict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value || value == Py_None) {
        value = NULL;
    } else if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    tmp = op->func_annotations;
    op->func_annotations = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromString(m->func.m_ml->ml_name);
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
    if (op == NULL)
        return NULL;
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    PyObject_GC_Track(op);
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyObject_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
    return __Pyx_PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    Py_ssize_t size;
    switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 0))
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
        argc = PyTuple_GET_SIZE(args);
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
    0,
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_CyFunction_descr_get,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
};
static int __pyx_CyFunction_init(void) {
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
    if (unlikely(__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_Malloc(size);
    if (unlikely(!m->defaults))
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if (strchr(__Pyx_MODULE_NAME, '.')) {
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* pyfrozenset_new */
static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it) {
    if (it) {
        PyObject* result;
#if CYTHON_COMPILING_IN_PYPY
        PyObject* args;
        args = PyTuple_Pack(1, it);
        if (unlikely(!args))
            return NULL;
        result = PyObject_Call((PyObject*)&PyFrozenSet_Type, args, NULL);
        Py_DECREF(args);
        return result;
#else
        if (PyFrozenSet_CheckExact(it)) {
            Py_INCREF(it);
            return it;
        }
        result = PyFrozenSet_New(it);
        if (unlikely(!result))
            return NULL;
        if (likely(PySet_GET_SIZE(result)))
            return result;
        Py_DECREF(result);
#endif
    }
#if CYTHON_USE_TYPE_SLOTS
    return PyFrozenSet_Type.tp_new(&PyFrozenSet_Type, __pyx_empty_tuple, NULL);
#else
    return PyObject_Call((PyObject*)&PyFrozenSet_Type, __pyx_empty_tuple, NULL);
#endif
}

/* PySetContains */
static int __Pyx_PySet_ContainsUnhashable(PyObject *set, PyObject *key) {
    int result = -1;
    if (PySet_Check(key) && PyErr_ExceptionMatches(PyExc_TypeError)) {
        PyObject *tmpkey;
        PyErr_Clear();
        tmpkey = __Pyx_PyFrozenSet_New(key);
        if (tmpkey != NULL) {
            result = PySet_Contains(set, tmpkey);
            Py_DECREF(tmpkey);
        }
    }
    return result;
}
static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq) {
    int result = PySet_Contains(set, key);
    if (unlikely(result < 0)) {
        result = __Pyx_PySet_ContainsUnhashable(set, key);
    }
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* IterNext */
static PyObject *__Pyx_PyIter_Next2Default(PyObject* defval) {
    PyObject* exc_type;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    exc_type = __Pyx_PyErr_Occurred();
    if (unlikely(exc_type)) {
        if (!defval || unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
            return NULL;
        __Pyx_PyErr_Clear();
        Py_INCREF(defval);
        return defval;
    }
    if (defval) {
        Py_INCREF(defval);
        return defval;
    }
    __Pyx_PyErr_SetNone(PyExc_StopIteration);
    return NULL;
}
static void __Pyx_PyIter_Next_ErrorNoIterator(PyObject *iterator) {
    PyErr_Format(PyExc_TypeError,
        "%.200s object is not an iterator", Py_TYPE(iterator)->tp_name);
}
static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject* iterator, PyObject* defval) {
    PyObject* next;
    iternextfunc iternext = Py_TYPE(iterator)->tp_iternext;
    if (likely(iternext)) {
#if CYTHON_USE_TYPE_SLOTS
        next = iternext(iterator);
        if (likely(next))
            return next;
        #if PY_VERSION_HEX >= 0x02070000
        if (unlikely(iternext == &_PyObject_NextNotImplemented))
            return NULL;
        #endif
#else
        next = PyIter_Next(iterator);
        if (likely(next))
            return next;
#endif
    } else if (CYTHON_USE_TYPE_SLOTS || unlikely(!PyIter_Check(iterator))) {
        __Pyx_PyIter_Next_ErrorNoIterator(iterator);
        return NULL;
    }
#if !CYTHON_USE_TYPE_SLOTS
    else {
        next = PyIter_Next(iterator);
        if (likely(next))
            return next;
    }
#endif
    return __Pyx_PyIter_Next2Default(defval);
}

/* PyObject_GenericGetAttrNoDict */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, attr_name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(attr_name));
#endif
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
    PyObject *descr;
    PyTypeObject *tp = Py_TYPE(obj);
    if (unlikely(!PyString_Check(attr_name))) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    assert(!tp->tp_dictoffset);
    descr = _PyType_Lookup(tp, attr_name);
    if (unlikely(!descr)) {
        return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
    }
    Py_INCREF(descr);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
    #endif
    {
        descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
        if (unlikely(f)) {
            PyObject *res = f(descr, obj, (PyObject *)tp);
            Py_DECREF(descr);
            return res;
        }
    }
    return descr;
}
#endif

/* CalculateMetaclass */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
        tmptype = Py_TYPE(tmp);
#if PY_MAJOR_VERSION < 3
        if (tmptype == &PyClass_Type)
            continue;
#endif
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
#if PY_MAJOR_VERSION < 3
        metaclass = &PyClass_Type;
#else
        metaclass = &PyType_Type;
#endif
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

/* Py3ClassCreate */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
        if (prep) {
            PyObject *pargs = PyTuple_Pack(2, name, bases);
            if (unlikely(!pargs)) {
                Py_DECREF(prep);
                return NULL;
            }
            ns = PyObject_Call(prep, pargs, mkw);
            Py_DECREF(prep);
            Py_DECREF(pargs);
        } else {
            if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
                return NULL;
            PyErr_Clear();
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result, *margs;
    PyObject *owned_metaclass = NULL;
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    margs = PyTuple_Pack(3, name, bases, dict);
    if (unlikely(!margs)) {
        result = NULL;
    } else {
        result = PyObject_Call(metaclass, margs, mkw);
        Py_DECREF(margs);
    }
    Py_XDECREF(owned_metaclass);
    return result;
}

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* CIntFromPyVerify */
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
    const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
    const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = a->tp_base;
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
    if (!res) {
        res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
    return res;
}
#endif
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* CoroutineBase */
#include <structmember.h>
#include <frameobject.h>
#define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
    PyObject *et, *ev, *tb;
    PyObject *value = NULL;
    __Pyx_ErrFetch(&et, &ev, &tb);
    if (!et) {
        Py_XDECREF(tb);
        Py_XDECREF(ev);
        Py_INCREF(Py_None);
        *pvalue = Py_None;
        return 0;
    }
    if (likely(et == PyExc_StopIteration)) {
        if (!ev) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#if PY_VERSION_HEX >= 0x030300A0
        else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
            value = ((PyStopIterationObject *)ev)->value;
            Py_INCREF(value);
            Py_DECREF(ev);
        }
#endif
        else if (unlikely(PyTuple_Check(ev))) {
            if (PyTuple_GET_SIZE(ev) >= 1) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                value = PyTuple_GET_ITEM(ev, 0);
                Py_INCREF(value);
#else
                value = PySequence_ITEM(ev, 0);
#endif
            } else {
                Py_INCREF(Py_None);
                value = Py_None;
            }
            Py_DECREF(ev);
        }
        else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
            value = ev;
        }
        if (likely(value)) {
            Py_XDECREF(tb);
            Py_DECREF(et);
            *pvalue = value;
            return 0;
        }
    } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    PyErr_NormalizeException(&et, &ev, &tb);
    if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    Py_XDECREF(tb);
    Py_DECREF(et);
#if PY_VERSION_HEX >= 0x030300A0
    value = ((PyStopIterationObject *)ev)->value;
    Py_INCREF(value);
    Py_DECREF(ev);
#else
    {
        PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
        Py_DECREF(ev);
        if (likely(args)) {
            value = PySequence_GetItem(args, 0);
            Py_DECREF(args);
        }
        if (unlikely(!value)) {
            __Pyx_ErrRestore(NULL, NULL, NULL);
            Py_INCREF(Py_None);
            value = Py_None;
        }
    }
#endif
    *pvalue = value;
    return 0;
}
static CYTHON_INLINE
void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
    PyObject *t, *v, *tb;
    t = exc_state->exc_type;
    v = exc_state->exc_value;
    tb = exc_state->exc_traceback;
    exc_state->exc_type = NULL;
    exc_state->exc_value = NULL;
    exc_state->exc_traceback = NULL;
    Py_XDECREF(t);
    Py_XDECREF(v);
    Py_XDECREF(tb);
}
#define __Pyx_Coroutine_AlreadyRunningError(gen)  (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
    const char *msg;
    if ((0)) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
        msg = "coroutine already executing";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
        msg = "async generator already executing";
    #endif
    } else {
        msg = "generator already executing";
    }
    PyErr_SetString(PyExc_ValueError, msg);
}
#define __Pyx_Coroutine_NotStartedError(gen)  (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
    const char *msg;
    if ((0)) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_Check(gen)) {
        msg = "can't send non-None value to a just-started coroutine";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact(gen)) {
        msg = "can't send non-None value to a just-started async generator";
    #endif
    } else {
        msg = "can't send non-None value to a just-started generator";
    }
    PyErr_SetString(PyExc_TypeError, msg);
}
#define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing)  (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
    #ifdef __Pyx_Coroutine_USED
    if (!closing && __Pyx_Coroutine_Check(gen)) {
        PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
    } else
    #endif
    if (value) {
        #ifdef __Pyx_AsyncGen_USED
        if (__Pyx_AsyncGen_CheckExact(gen))
            PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
        else
        #endif
        PyErr_SetNone(PyExc_StopIteration);
    }
}
static
PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
    __Pyx_PyThreadState_declare
    PyThreadState *tstate;
    __Pyx_ExcInfoStruct *exc_state;
    PyObject *retval;
    assert(!self->is_running);
    if (unlikely(self->resume_label == 0)) {
        if (unlikely(value && value != Py_None)) {
            return __Pyx_Coroutine_NotStartedError((PyObject*)self);
        }
    }
    if (unlikely(self->resume_label == -1)) {
        return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
    }
#if CYTHON_FAST_THREAD_STATE
    __Pyx_PyThreadState_assign
    tstate = __pyx_tstate;
#else
    tstate = __Pyx_PyThreadState_Current;
#endif
    exc_state = &self->gi_exc_state;
    if (exc_state->exc_type) {
        #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
        #else
        if (exc_state->exc_traceback) {
            PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            Py_XINCREF(tstate->frame);
            assert(f->f_back == NULL);
            f->f_back = tstate->frame;
        }
        #endif
    }
#if CYTHON_USE_EXC_INFO_STACK
    exc_state->previous_item = tstate->exc_info;
    tstate->exc_info = exc_state;
#else
    if (exc_state->exc_type) {
        __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
    } else {
        __Pyx_Coroutine_ExceptionClear(exc_state);
        __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
    }
#endif
    self->is_running = 1;
    retval = self->body((PyObject *) self, tstate, value);
    self->is_running = 0;
#if CYTHON_USE_EXC_INFO_STACK
    exc_state = &self->gi_exc_state;
    tstate->exc_info = exc_state->previous_item;
    exc_state->previous_item = NULL;
    __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
#endif
    return retval;
}
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
    PyObject *exc_tb = exc_state->exc_traceback;
    if (likely(exc_tb)) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
#else
        PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
        PyFrameObject *f = tb->tb_frame;
        Py_CLEAR(f->f_back);
#endif
    }
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
    if (unlikely(!retval)) {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        if (!__Pyx_PyErr_Occurred()) {
            PyObject *exc = PyExc_StopIteration;
            #ifdef __Pyx_AsyncGen_USED
            if (__Pyx_AsyncGen_CheckExact(gen))
                exc = __Pyx_PyExc_StopAsyncIteration;
            #endif
            __Pyx_PyErr_SetNone(exc);
        }
    }
    return retval;
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
    PyObject *ret;
    PyObject *val = NULL;
    __Pyx_Coroutine_Undelegate(gen);
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
    ret = __Pyx_Coroutine_SendEx(gen, val, 0);
    Py_XDECREF(val);
    return ret;
}
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
    PyObject *retval;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_Check(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_AsyncGen_USED
        if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
            ret = __Pyx_async_gen_asend_send(yf, value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyCoro_CheckExact(yf)) {
            ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        {
            if (value == Py_None)
                ret = Py_TYPE(yf)->tp_iternext(yf);
            else
                ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
        }
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        retval = __Pyx_Coroutine_FinishDelegation(gen);
    } else {
        retval = __Pyx_Coroutine_SendEx(gen, value, 0);
    }
    return __Pyx_Coroutine_MethodReturn(self, retval);
}
static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
    PyObject *retval = NULL;
    int err = 0;
    #ifdef __Pyx_Generator_USED
    if (__Pyx_Generator_CheckExact(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_Coroutine_USED
    if (__Pyx_Coroutine_Check(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    if (__Pyx_CoroutineAwait_CheckExact(yf)) {
        retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_AsyncGen_USED
    if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
        retval = __Pyx_async_gen_asend_close(yf, NULL);
    } else
    if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
        retval = __Pyx_async_gen_athrow_close(yf, NULL);
    } else
    #endif
    {
        PyObject *meth;
        gen->is_running = 1;
        meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
        if (unlikely(!meth)) {
            if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                PyErr_WriteUnraisable(yf);
            }
            PyErr_Clear();
        } else {
            retval = PyObject_CallFunction(meth, NULL);
            Py_DECREF(meth);
            if (!retval)
                err = -1;
        }
        gen->is_running = 0;
    }
    Py_XDECREF(retval);
    return err;
}
static PyObject *__Pyx_Generator_Next(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Generator_Next(yf);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = _PyGen_Send((PyGenObject*)yf, NULL);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_Check(yf)) {
            ret = __Pyx_Coroutine_Send(yf, Py_None);
        } else
        #endif
            ret = Py_TYPE(yf)->tp_iternext(yf);
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        return __Pyx_Coroutine_FinishDelegation(gen);
    }
    return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
}
static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) {
    return __Pyx_Coroutine_Close(self);
}
static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *retval, *raised_exception;
    PyObject *yf = gen->yieldfrom;
    int err = 0;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        Py_INCREF(yf);
        err = __Pyx_Coroutine_CloseIter(gen, yf);
        __Pyx_Coroutine_Undelegate(gen);
        Py_DECREF(yf);
    }
    if (err == 0)
        PyErr_SetNone(PyExc_GeneratorExit);
    retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
    if (unlikely(retval)) {
        const char *msg;
        Py_DECREF(retval);
        if ((0)) {
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_Coroutine_Check(self)) {
            msg = "coroutine ignored GeneratorExit";
        #endif
        #ifdef __Pyx_AsyncGen_USED
        } else if (__Pyx_AsyncGen_CheckExact(self)) {
#if PY_VERSION_HEX < 0x03060000
            msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
#else
            msg = "async generator ignored GeneratorExit";
#endif
        #endif
        } else {
            msg = "generator ignored GeneratorExit";
        }
        PyErr_SetString(PyExc_RuntimeError, msg);
        return NULL;
    }
    raised_exception = PyErr_Occurred();
    if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
        if (raised_exception) PyErr_Clear();
        Py_INCREF(Py_None);
        return Py_None;
    }
    return NULL;
}
static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
                                        PyObject *args, int close_on_genexit) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        Py_INCREF(yf);
        if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
            int err = __Pyx_Coroutine_CloseIter(gen, yf);
            Py_DECREF(yf);
            __Pyx_Coroutine_Undelegate(gen);
            if (err < 0)
                return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
            goto throw_here;
        }
        gen->is_running = 1;
        if (0
        #ifdef __Pyx_Generator_USED
            || __Pyx_Generator_CheckExact(yf)
        #endif
        #ifdef __Pyx_Coroutine_USED
            || __Pyx_Coroutine_Check(yf)
        #endif
            ) {
            ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
            ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
        #endif
        } else {
            PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
            if (unlikely(!meth)) {
                Py_DECREF(yf);
                if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                    gen->is_running = 0;
                    return NULL;
                }
                PyErr_Clear();
                __Pyx_Coroutine_Undelegate(gen);
                gen->is_running = 0;
                goto throw_here;
            }
            if (likely(args)) {
                ret = PyObject_CallObject(meth, args);
            } else {
                ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
            }
            Py_DECREF(meth);
        }
        gen->is_running = 0;
        Py_DECREF(yf);
        if (!ret) {
            ret = __Pyx_Coroutine_FinishDelegation(gen);
        }
        return __Pyx_Coroutine_MethodReturn(self, ret);
    }
throw_here:
    __Pyx_Raise(typ, val, tb, NULL);
    return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
}
static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
    PyObject *typ;
    PyObject *val = NULL;
    PyObject *tb = NULL;
    if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
        return NULL;
    return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
}
static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) {
    Py_VISIT(exc_state->exc_type);
    Py_VISIT(exc_state->exc_value);
    Py_VISIT(exc_state->exc_traceback);
    return 0;
}
static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
    Py_VISIT(gen->closure);
    Py_VISIT(gen->classobj);
    Py_VISIT(gen->yieldfrom);
    return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
}
static int __Pyx_Coroutine_clear(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    Py_CLEAR(gen->closure);
    Py_CLEAR(gen->classobj);
    Py_CLEAR(gen->yieldfrom);
    __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
    }
#endif
    Py_CLEAR(gen->gi_code);
    Py_CLEAR(gen->gi_name);
    Py_CLEAR(gen->gi_qualname);
    Py_CLEAR(gen->gi_modulename);
    return 0;
}
static void __Pyx_Coroutine_dealloc(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject_GC_UnTrack(gen);
    if (gen->gi_weakreflist != NULL)
        PyObject_ClearWeakRefs(self);
    if (gen->resume_label >= 0) {
        PyObject_GC_Track(self);
#if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
        if (PyObject_CallFinalizerFromDealloc(self))
#else
        Py_TYPE(gen)->tp_del(self);
        if (self->ob_refcnt > 0)
#endif
        {
            return;
        }
        PyObject_GC_UnTrack(self);
    }
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        /* We have to handle this case for asynchronous generators
           right here, because this code has to be between UNTRACK
           and GC_Del. */
        Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
    }
#endif
    __Pyx_Coroutine_clear(self);
    PyObject_GC_Del(gen);
}
static void __Pyx_Coroutine_del(PyObject *self) {
    PyObject *error_type, *error_value, *error_traceback;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    __Pyx_PyThreadState_declare
    if (gen->resume_label < 0) {
        return;
    }
#if !CYTHON_USE_TP_FINALIZE
    assert(self->ob_refcnt == 0);
    self->ob_refcnt = 1;
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
        PyObject *finalizer = agen->ag_finalizer;
        if (finalizer && !agen->ag_closed) {
            PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
            if (unlikely(!res)) {
                PyErr_WriteUnraisable(self);
            } else {
                Py_DECREF(res);
            }
            __Pyx_ErrRestore(error_type, error_value, error_traceback);
            return;
        }
    }
#endif
    if (unlikely(gen->resume_label == 0 && !error_value)) {
#ifdef __Pyx_Coroutine_USED
#ifdef __Pyx_Generator_USED
    if (!__Pyx_Generator_CheckExact(self))
#endif
        {
        PyObject_GC_UnTrack(self);
#if PY_MAJOR_VERSION >= 3  || defined(PyErr_WarnFormat)
        if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
            PyErr_WriteUnraisable(self);
#else
        {PyObject *msg;
        char *cmsg;
        #if CYTHON_COMPILING_IN_PYPY
        msg = NULL;
        cmsg = (char*) "coroutine was never awaited";
        #else
        char *cname;
        PyObject *qualname;
        qualname = gen->gi_qualname;
        cname = PyString_AS_STRING(qualname);
        msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
        if (unlikely(!msg)) {
            PyErr_Clear();
            cmsg = (char*) "coroutine was never awaited";
        } else {
            cmsg = PyString_AS_STRING(msg);
        }
        #endif
        if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
            PyErr_WriteUnraisable(self);
        Py_XDECREF(msg);}
#endif
        PyObject_GC_Track(self);
        }
#endif
    } else {
        PyObject *res = __Pyx_Coroutine_Close(self);
        if (unlikely(!res)) {
            if (PyErr_Occurred())
                PyErr_WriteUnraisable(self);
        } else {
            Py_DECREF(res);
        }
    }
    __Pyx_ErrRestore(error_type, error_value, error_traceback);
#if !CYTHON_USE_TP_FINALIZE
    assert(self->ob_refcnt > 0);
    if (--self->ob_refcnt == 0) {
        return;
    }
    {
        Py_ssize_t refcnt = self->ob_refcnt;
        _Py_NewReference(self);
        self->ob_refcnt = refcnt;
    }
#if CYTHON_COMPILING_IN_CPYTHON
    assert(PyType_IS_GC(self->ob_type) &&
           _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
    _Py_DEC_REFTOTAL;
#endif
#ifdef COUNT_ALLOCS
    --Py_TYPE(self)->tp_frees;
    --Py_TYPE(self)->tp_allocs;
#endif
#endif
}
static PyObject *
__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
{
    PyObject *name = self->gi_name;
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_name;
    Py_INCREF(value);
    self->gi_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
{
    PyObject *name = self->gi_qualname;
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_qualname;
    Py_INCREF(value);
    self->gi_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
            PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
    if (unlikely(!gen))
        return NULL;
    return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
}
static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
            __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    gen->body = body;
    gen->closure = closure;
    Py_XINCREF(closure);
    gen->is_running = 0;
    gen->resume_label = 0;
    gen->classobj = NULL;
    gen->yieldfrom = NULL;
    gen->gi_exc_state.exc_type = NULL;
    gen->gi_exc_state.exc_value = NULL;
    gen->gi_exc_state.exc_traceback = NULL;
#if CYTHON_USE_EXC_INFO_STACK
    gen->gi_exc_state.previous_item = NULL;
#endif
    gen->gi_weakreflist = NULL;
    Py_XINCREF(qualname);
    gen->gi_qualname = qualname;
    Py_XINCREF(name);
    gen->gi_name = name;
    Py_XINCREF(module_name);
    gen->gi_modulename = module_name;
    Py_XINCREF(code);
    gen->gi_code = code;
    PyObject_GC_Track(gen);
    return gen;
}

/* PatchModuleWithCoroutine */
static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    int result;
    PyObject *globals, *result_obj;
    globals = PyDict_New();  if (unlikely(!globals)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_coroutine_type",
    #ifdef __Pyx_Coroutine_USED
        (PyObject*)__pyx_CoroutineType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_generator_type",
    #ifdef __Pyx_Generator_USED
        (PyObject*)__pyx_GeneratorType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
    result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
    if (unlikely(!result_obj)) goto ignore;
    Py_DECREF(result_obj);
    Py_DECREF(globals);
    return module;
ignore:
    Py_XDECREF(globals);
    PyErr_WriteUnraisable(module);
    if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
        Py_DECREF(module);
        module = NULL;
    }
#else
    py_code++;
#endif
    return module;
}

/* PatchGeneratorABC */
#ifndef CYTHON_REGISTER_ABCS
#define CYTHON_REGISTER_ABCS 1
#endif
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
static PyObject* __Pyx_patch_abc_module(PyObject *module);
static PyObject* __Pyx_patch_abc_module(PyObject *module) {
    module = __Pyx_Coroutine_patch_module(
        module, ""
"if _cython_generator_type is not None:\n"
"    try: Generator = _module.Generator\n"
"    except AttributeError: pass\n"
"    else: Generator.register(_cython_generator_type)\n"
"if _cython_coroutine_type is not None:\n"
"    try: Coroutine = _module.Coroutine\n"
"    except AttributeError: pass\n"
"    else: Coroutine.register(_cython_coroutine_type)\n"
    );
    return module;
}
#endif
static int __Pyx_patch_abc(void) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    static int abc_patched = 0;
    if (CYTHON_REGISTER_ABCS && !abc_patched) {
        PyObject *module;
        module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
        if (!module) {
            PyErr_WriteUnraisable(NULL);
            if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
                    ((PY_MAJOR_VERSION >= 3) ?
                        "Cython module failed to register with collections.abc module" :
                        "Cython module failed to register with collections module"), 1) < 0)) {
                return -1;
            }
        } else {
            module = __Pyx_patch_abc_module(module);
            abc_patched = 1;
            if (unlikely(!module))
                return -1;
            Py_DECREF(module);
        }
        module = PyImport_ImportModule("backports_abc");
        if (module) {
            module = __Pyx_patch_abc_module(module);
            Py_XDECREF(module);
        }
        if (!module) {
            PyErr_Clear();
        }
    }
#else
    if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
#endif
    return 0;
}

/* Generator */
static PyMethodDef __pyx_Generator_methods[] = {
    {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
     (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
    {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
     (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
    {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
     (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
    {0, 0, 0, 0}
};
static PyMemberDef __pyx_Generator_memberlist[] = {
    {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
    {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
     (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
    {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
    {0, 0, 0, 0, 0}
};
static PyGetSetDef __pyx_Generator_getsets[] = {
    {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
     (char*) PyDoc_STR("name of the generator"), 0},
    {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
     (char*) PyDoc_STR("qualified name of the generator"), 0},
    {0, 0, 0, 0, 0}
};
static PyTypeObject __pyx_GeneratorType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "generator",
    sizeof(__pyx_CoroutineObject),
    0,
    (destructor) __Pyx_Coroutine_dealloc,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
    0,
    (traverseproc) __Pyx_Coroutine_traverse,
    0,
    0,
    offsetof(__pyx_CoroutineObject, gi_weakreflist),
    0,
    (iternextfunc) __Pyx_Generator_Next,
    __pyx_Generator_methods,
    __pyx_Generator_memberlist,
    __pyx_Generator_getsets,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if CYTHON_USE_TP_FINALIZE
    0,
#else
    __Pyx_Coroutine_del,
#endif
    0,
#if CYTHON_USE_TP_FINALIZE
    __Pyx_Coroutine_del,
#elif PY_VERSION_HEX >= 0x030400a1
    0,
#endif
};
static int __pyx_Generator_init(void) {
    __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
    __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
    __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
    if (unlikely(!__pyx_GeneratorType)) {
        return -1;
    }
    return 0;
}

/* CheckBinaryVersion */
static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* InitStrings */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type %.200s).  "
                "The ability to return an instance of a strict subclass of int "
                "is deprecated, and may be removed in a future version of Python.",
                Py_TYPE(result)->tp_name)) {
            Py_DECREF(result);
            return NULL;
        }
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type %.200s)",
                 type_name, type_name, Py_TYPE(result)->tp_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
