diff --git a/src/bison/__init__.py b/src/bison/__init__.py index 8481744..698b493 100644 --- a/src/bison/__init__.py +++ b/src/bison/__init__.py @@ -19,6 +19,7 @@ from __future__ import absolute_import from __future__ import print_function +import logging.config import shutil from os.path import dirname, join @@ -37,6 +38,11 @@ from .node import BisonNode from .convert import bisonToPython +import logging + +LOGGER = logging.getLogger(__name__) + + WIN_CHOCO_DIR = "C:\\ProgramData\\chocolatey\\lib\\winflexbison3\\tools\\" WIN_FLEX = join( WIN_CHOCO_DIR, 'win_flex.exe') WIN_BISON = join( WIN_CHOCO_DIR, 'win_bison.exe') @@ -205,6 +211,7 @@ def __init__(self, buildDirectory=None, **kw): self.defaultNodeClass = nodeClass self.verbose = kw.get('verbose', False) + self.config_logger() if self.verbose: self.bisonCmd.append('--verbose') @@ -245,7 +252,7 @@ def _handle(self, targetname, option, names, values): except: hdlrline = handler.__init__.__code__.co_firstlineno - print("BisonParser._handle: call handler at line {} with: {}".format( + LOGGER.info("BisonParser._handle: call handler at line {} with: {}".format( hdlrline, str((targetname, option, names, values))) ) try: @@ -258,7 +265,7 @@ def _handle(self, targetname, option, names, values): # print("handler for {} returned {}".format(targetname, repr(self.last))) else: if self.verbose: - print("no handler for {}, using default".format(targetname)) + LOGGER.info("no handler for {}, using default".format(targetname)) cls = self.default_node_class self.last = cls(target=targetname, option=option, names=names, @@ -267,6 +274,41 @@ def _handle(self, targetname, option, names, values): # assumedly the last thing parsed is at the top of the tree return self.last + def config_logger(self): + if self.verbose: + level = 'DEBUG' + else: + level = 'INFO' + logging.config.dictConfig({ + 'version': 1, + 'disable_existing_loggers': False, + 'formatters': { + 'standard': { + 'format': '%(asctime)s [%(levelname)s] %(name)s: %(message)s' + }, + }, + 'handlers': { + 'default': { + 'level': 'DEBUG', + 'formatter': 'standard', + 'class': 'logging.StreamHandler', + 'stream': 'ext://sys.stdout', # Default is stderr + }, + }, + 'loggers': { + 'bison': { # root logger + 'handlers': ['default'], + 'level': level, + 'propagate': True + }, + '__main__': { # if __name__ == '__main__' + 'handlers': ['default'], + 'level': level, + 'propagate': False + }, + } + }) + def handle_timeout(self, signum, frame): raise TimeoutError("Computation exceeded timeout limit.") @@ -293,7 +335,7 @@ def run(self, **kw): - debug - enables garrulous parser debugging output, default 0 """ if self.verbose: - print('Parser.run: calling engine') + LOGGER.info('Parser.run: calling engine') filename = None # grab keywords @@ -329,9 +371,9 @@ def run(self, **kw): if self.verbose and self.marker: - print('Parser.run(): self.marker (', self.marker, ') is set') + LOGGER.info('Parser.run(): self.marker ({}) is set'.format(self.marker)) if self.verbose and self.file and self.file.closed: - print('Parser.run(): self.file', self.file, 'is closed') + LOGGER.info('Parser.run(): self.file {} is closed'.format(self.file)) error_count = 0 self.last = None @@ -352,16 +394,16 @@ def run(self, **kw): self.report_last_error(filename, e) if self.verbose: - print('Parser.run: back from engine') + LOGGER.info('Parser.run: back from engine') if hasattr(self, 'hook_run'): self.last = self.hook_run(filename, self.last) if self.verbose and not self.marker: - print('last:', self.last) + LOGGER.info('last:{}'.format(self.last)) if self.verbose: - print('last:', self.last) + LOGGER.info('last:{}'.format(self.last)) # restore old values self.file = oldfile @@ -369,7 +411,7 @@ def run(self, **kw): self.marker = 0 if self.verbose: - print('------------------ result=', self.last) + LOGGER.info('------------------ result={}'.format(self.last)) # close the file if we opened one if i_opened_a_file and fileobj: @@ -390,14 +432,13 @@ def read(self, nbytes): """ # default to stdin if self.verbose: - print('Parser.read: want %s bytes' % nbytes) + LOGGER.info('Parser.read: want %s bytes' % nbytes) _bytes = self.file.readline(nbytes).replace(b'\r\n', b'\n').replace(b'\r', b'\n') if self.verbose: - print('Parser.read: got %s bytes' % len(_bytes)) - print(_bytes) - + LOGGER.info('Parser.read: got %s bytes' % len(_bytes)) + LOGGER.info(_bytes) return _bytes def report_last_error(self, filename, error): @@ -437,7 +478,7 @@ def report_last_error(self, filename, error): if self.verbose: traceback.print_exc() - print('ERROR:', error) + LOGGER.error(error) def report_syntax_error(self, msg, yytext, first_line, first_col, last_line, last_col): diff --git a/src/bison/cython/bison_.c b/src/bison/cython/bison_.c deleted file mode 100644 index 60f2f17..0000000 --- a/src/bison/cython/bison_.c +++ /dev/null @@ -1,18364 +0,0 @@ -/* Generated by Cython 0.29.21 */ - -#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_21" -#define CYTHON_HEX_VERSION 0x001D15F0 -#define CYTHON_FUTURE_DIVISION 1 -#include -#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 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 -#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" -#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 - #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ - PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -#else - #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) -#endif - #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) - #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) - #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) - #endif -#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 -#ifndef PyObject_Unicode - #define PyObject_Unicode PyObject_Str -#endif -#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 PY_VERSION_HEX >= 0x030900A4 - #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) - #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) -#else - #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) - #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) -#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) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(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 -#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_MARK_ERR_POS(f_index, lineno) \ - { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } -#define __PYX_ERR(f_index, lineno, Ln_error) \ - { __PYX_MARK_ERR_POS(f_index, lineno) 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__bison__bison_ -#define __PYX_HAVE_API__bison__bison_ -/* Early includes */ -#include "stdio.h" -#include "string.h" -#include "../c/bison_callback.h" -#include "../c/bisondynlib.h" -#ifdef _OPENMP -#include -#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_UTF8 0 -#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) -#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 - #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[] = { - "src/bison/cython/bison_.pyx", - "stringsource", -}; - -/*--- Type declarations ---*/ -struct __pyx_obj_5bison_6bison__ParserEngine; -struct __pyx_obj_5bison_6bison____pyx_scope_struct__hashParserObject; - -/* "src/bison/cython/bison_.pyx":84 - * unquoted = '[^\'"]%s[^\'"]?' - * - * cdef class ParserEngine: # <<<<<<<<<<<<<< - * """ - * Wraps the interface to the binary bison/lex-generated parser engine dynamic - */ -struct __pyx_obj_5bison_6bison__ParserEngine { - PyObject_HEAD - PyObject *parser; - PyObject *parserHash; - PyObject *libFilename_py; - void *libHandle; - char *libHash; -}; - - -/* "src/bison/cython/bison_.pyx":814 - * - * - * def hashParserObject(parser): # <<<<<<<<<<<<<< - * """ - * Calculates an sha1 hex 'hash' of the lex script - */ -struct __pyx_obj_5bison_6bison____pyx_scope_struct__hashParserObject { - PyObject_HEAD - PyObject *__pyx_v_hasher; -}; - - -/* --- 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); - -/* 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); - -/* 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); - -/* 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 - -/* 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 - -/* Profile.proto */ -#ifndef CYTHON_PROFILE -#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON - #define CYTHON_PROFILE 0 -#else - #define CYTHON_PROFILE 1 -#endif -#endif -#ifndef CYTHON_TRACE_NOGIL - #define CYTHON_TRACE_NOGIL 0 -#else - #if CYTHON_TRACE_NOGIL && !defined(CYTHON_TRACE) - #define CYTHON_TRACE 1 - #endif -#endif -#ifndef CYTHON_TRACE - #define CYTHON_TRACE 0 -#endif -#if CYTHON_TRACE - #undef CYTHON_PROFILE_REUSE_FRAME -#endif -#ifndef CYTHON_PROFILE_REUSE_FRAME - #define CYTHON_PROFILE_REUSE_FRAME 0 -#endif -#if CYTHON_PROFILE || CYTHON_TRACE - #include "compile.h" - #include "frameobject.h" - #include "traceback.h" - #if CYTHON_PROFILE_REUSE_FRAME - #define CYTHON_FRAME_MODIFIER static - #define CYTHON_FRAME_DEL(frame) - #else - #define CYTHON_FRAME_MODIFIER - #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame) - #endif - #define __Pyx_TraceDeclarations\ - static PyCodeObject *__pyx_frame_code = NULL;\ - CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;\ - int __Pyx_use_tracing = 0; - #define __Pyx_TraceFrameInit(codeobj)\ - if (codeobj) __pyx_frame_code = (PyCodeObject*) codeobj; - #ifdef WITH_THREAD - #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\ - if (nogil) {\ - if (CYTHON_TRACE_NOGIL) {\ - PyThreadState *tstate;\ - PyGILState_STATE state = PyGILState_Ensure();\ - tstate = __Pyx_PyThreadState_Current;\ - if (unlikely(tstate->use_tracing) && !tstate->tracing &&\ - (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\ - __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\ - }\ - PyGILState_Release(state);\ - if (unlikely(__Pyx_use_tracing < 0)) goto_error;\ - }\ - } else {\ - PyThreadState* tstate = PyThreadState_GET();\ - if (unlikely(tstate->use_tracing) && !tstate->tracing &&\ - (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\ - __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\ - if (unlikely(__Pyx_use_tracing < 0)) goto_error;\ - }\ - } - #else - #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\ - { PyThreadState* tstate = PyThreadState_GET();\ - if (unlikely(tstate->use_tracing) && !tstate->tracing &&\ - (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\ - __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\ - if (unlikely(__Pyx_use_tracing < 0)) goto_error;\ - }\ - } - #endif - #define __Pyx_TraceException()\ - if (likely(!__Pyx_use_tracing)); else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ - if (tstate->use_tracing &&\ - (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\ - tstate->tracing++;\ - tstate->use_tracing = 0;\ - PyObject *exc_info = __Pyx_GetExceptionTuple(tstate);\ - if (exc_info) {\ - if (CYTHON_TRACE && tstate->c_tracefunc)\ - tstate->c_tracefunc(\ - tstate->c_traceobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\ - tstate->c_profilefunc(\ - tstate->c_profileobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\ - Py_DECREF(exc_info);\ - }\ - tstate->use_tracing = 1;\ - tstate->tracing--;\ - }\ - } - static void __Pyx_call_return_trace_func(PyThreadState *tstate, PyFrameObject *frame, PyObject *result) { - PyObject *type, *value, *traceback; - __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); - tstate->tracing++; - tstate->use_tracing = 0; - if (CYTHON_TRACE && tstate->c_tracefunc) - tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_RETURN, result); - if (tstate->c_profilefunc) - tstate->c_profilefunc(tstate->c_profileobj, frame, PyTrace_RETURN, result); - CYTHON_FRAME_DEL(frame); - tstate->use_tracing = 1; - tstate->tracing--; - __Pyx_ErrRestoreInState(tstate, type, value, traceback); - } - #ifdef WITH_THREAD - #define __Pyx_TraceReturn(result, nogil)\ - if (likely(!__Pyx_use_tracing)); else {\ - if (nogil) {\ - if (CYTHON_TRACE_NOGIL) {\ - PyThreadState *tstate;\ - PyGILState_STATE state = PyGILState_Ensure();\ - tstate = __Pyx_PyThreadState_Current;\ - if (tstate->use_tracing) {\ - __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\ - }\ - PyGILState_Release(state);\ - }\ - } else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ - if (tstate->use_tracing) {\ - __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\ - }\ - }\ - } - #else - #define __Pyx_TraceReturn(result, nogil)\ - if (likely(!__Pyx_use_tracing)); else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ - if (tstate->use_tracing) {\ - __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\ - }\ - } - #endif - static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno); - static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, PyThreadState* tstate, const char *funcname, const char *srcfile, int firstlineno); -#else - #define __Pyx_TraceDeclarations - #define __Pyx_TraceFrameInit(codeobj) - #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error) if ((1)); else goto_error; - #define __Pyx_TraceException() - #define __Pyx_TraceReturn(result, nogil) -#endif -#if CYTHON_TRACE - static int __Pyx_call_line_trace_func(PyThreadState *tstate, PyFrameObject *frame, int lineno) { - int ret; - PyObject *type, *value, *traceback; - __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); - __Pyx_PyFrame_SetLineNumber(frame, lineno); - tstate->tracing++; - tstate->use_tracing = 0; - ret = tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_LINE, NULL); - tstate->use_tracing = 1; - tstate->tracing--; - if (likely(!ret)) { - __Pyx_ErrRestoreInState(tstate, type, value, traceback); - } else { - Py_XDECREF(type); - Py_XDECREF(value); - Py_XDECREF(traceback); - } - return ret; - } - #ifdef WITH_THREAD - #define __Pyx_TraceLine(lineno, nogil, goto_error)\ - if (likely(!__Pyx_use_tracing)); else {\ - if (nogil) {\ - if (CYTHON_TRACE_NOGIL) {\ - int ret = 0;\ - PyThreadState *tstate;\ - PyGILState_STATE state = PyGILState_Ensure();\ - tstate = __Pyx_PyThreadState_Current;\ - if (unlikely(tstate->use_tracing && tstate->c_tracefunc && __pyx_frame->f_trace)) {\ - ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\ - }\ - PyGILState_Release(state);\ - if (unlikely(ret)) goto_error;\ - }\ - } else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ - if (unlikely(tstate->use_tracing && tstate->c_tracefunc && __pyx_frame->f_trace)) {\ - int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\ - if (unlikely(ret)) goto_error;\ - }\ - }\ - } - #else - #define __Pyx_TraceLine(lineno, nogil, goto_error)\ - if (likely(!__Pyx_use_tracing)); else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ - if (unlikely(tstate->use_tracing && tstate->c_tracefunc && __pyx_frame->f_trace)) {\ - int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\ - if (unlikely(ret)) goto_error;\ - }\ - } - #endif -#else - #define __Pyx_TraceLine(lineno, nogil, goto_error) if ((1)); else goto_error; -#endif - -/* PyDictVersioning.proto */ -#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS -#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 - -/* 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); - -/* 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, Py_ssize_t 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); - -/* 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 - -/* Import.proto */ -static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); - -/* RaiseTooManyValuesToUnpack.proto */ -static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); - -/* RaiseNeedMoreValuesToUnpack.proto */ -static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); - -/* IterFinish.proto */ -static CYTHON_INLINE int __Pyx_IterFinish(void); - -/* UnpackItemEndCheck.proto */ -static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); - -/* 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); - __Pyx_SET_SIZE(list, len + 1); - return 0; - } - return PyList_Append(list, x); -} -#else -#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) -#endif - -/* RaiseException.proto */ -static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); - -/* GetAttr.proto */ -static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); - -/* 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); - __Pyx_SET_SIZE(list, len + 1); - return 0; - } - return PyList_Append(list, x); -} -#else -#define __Pyx_PyList_Append(L,x) PyList_Append(L,x) -#endif - -/* IncludeStringH.proto */ -#include - -/* 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); - -/* 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); - -/* 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 - -/* PyIntBinop.proto */ -#if !CYTHON_COMPILING_IN_PYPY -static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); -#else -#define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\ - (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2)) -#endif - -/* 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 - -/* 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); - -/* GetTopmostException.proto */ -#if CYTHON_USE_EXC_INFO_STACK -static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); -#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 - -/* 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 - -/* HasAttr.proto */ -static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); - -/* 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 - -/* 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); - -/* FetchCommonType.proto */ -static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); - -/* CythonFunctionShared.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; - size_t defaults_size; // used by FusedFunction for copying defaults - 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)) -static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, 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); - -/* CythonFunction.proto */ -static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, - int flags, PyObject* qualname, - PyObject *closure, - PyObject *module, PyObject *globals, - PyObject* code); - -/* CallableCheck.proto */ -#if CYTHON_USE_TYPE_SLOTS && PY_MAJOR_VERSION >= 3 -#define __Pyx_PyCallable_Check(obj) ((obj)->ob_type->tp_call != NULL) -#else -#define __Pyx_PyCallable_Check(obj) PyCallable_Check(obj) -#endif - -/* 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 - -/* PyObject_GenericGetAttr.proto */ -#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 -static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name); -#else -#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr -#endif - -/* PyObjectGetAttrStrNoError.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); - -/* SetupReduce.proto */ -static int __Pyx_setup_reduce(PyObject* type_obj); - -/* ImportFrom.proto */ -static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); - -/* GetNameInClass.proto */ -#define __Pyx_GetNameInClass(var, nmspace, name) (var) = __Pyx__GetNameInClass(nmspace, name) -static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name); - -/* 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 int __Pyx_PyInt_As_int(PyObject *); - -/* CIntFromPy.proto */ -static CYTHON_INLINE long __Pyx_PyInt_As_long(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) - -/* CheckBinaryVersion.proto */ -static int __Pyx_check_binary_version(void); - -/* InitStrings.proto */ -static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); - - -/* Module declarations from 'bison.bison_' */ -static PyTypeObject *__pyx_ptype_5bison_6bison__ParserEngine = 0; -static PyTypeObject *__pyx_ptype_5bison_6bison____pyx_scope_struct__hashParserObject = 0; -#define __Pyx_MODULE_NAME "bison.bison_" -extern int __pyx_module_is_main_bison__bison_; -int __pyx_module_is_main_bison__bison_ = 0; - -/* Implementation of 'bison.bison_' */ -static PyObject *__pyx_builtin_staticmethod; -static PyObject *__pyx_builtin_print; -static PyObject *__pyx_builtin_open; -static PyObject *__pyx_builtin_range; -static PyObject *__pyx_builtin_TypeError; -static const char __pyx_k_d[] = "d"; -static const char __pyx_k_f[] = "f"; -static const char __pyx_k_h[] = "h"; -static const char __pyx_k_m[] = "m"; -static const char __pyx_k_o[] = "o"; -static const char __pyx_k_s[] = "%s"; -static const char __pyx_k_v[] = "v"; -static const char __pyx_k_w[] = "w"; -static const char __pyx_k__2[] = ""; -static const char __pyx_k__5[] = "*"; -static const char __pyx_k__8[] = " {\n"; -static const char __pyx_k__9[] = " }\n"; -static const char __pyx_k_do[] = "do {"; - static const char __pyx_k_on[] = "on_"; - static const char __pyx_k_os[] = "os"; - static const char __pyx_k_re[] = "re"; - static const char __pyx_k_rm[] = "rm {}"; -static const char __pyx_k__10[] = " }\n"; -static const char __pyx_k__11[] = "\n"; -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[] = "\n\n%%\n\n"; -static const char __pyx_k__18[] = ";"; -static const char __pyx_k__19[] = ":"; -static const char __pyx_k__20[] = "\\|"; -static const char __pyx_k__21[] = "\n {\n"; - static const char __pyx_k__22[] = "\", "; - static const char __pyx_k__23[] = "\""; - static const char __pyx_k__24[] = "\\\""; - static const char __pyx_k__26[] = "\", $"; - static const char __pyx_k__27[] = ",\n "; - static const char __pyx_k__28[] = "\n );\n"; -static const char __pyx_k__29[] = " }\n"; -static const char __pyx_k__30[] = " | "; -static const char __pyx_k__31[] = " ;\n\n"; -static const char __pyx_k__32[] = " )"; -static const char __pyx_k__34[] = "{} => {}{}"; -static const char __pyx_k__35[] = ", "; -static const char __pyx_k__44[] = ","; -static const char __pyx_k_bak[] = ".bak"; -static const char __pyx_k_doc[] = "__doc__"; -static const char __pyx_k_key[] = "key"; -static const char __pyx_k_log[] = "log"; -static const char __pyx_k_new[] = "new"; -static const char __pyx_k_s_2[] = "%s\n : "; -static const char __pyx_k_s_3[] = ", %s"; -static const char __pyx_k_s_4[] = "\\s+"; -static const char __pyx_k_s_5[] = "[^'\"]%s[^'\"]?"; -static const char __pyx_k_sub[] = "sub"; -static const char __pyx_k_sys[] = "sys"; -static const char __pyx_k_tmp[] = "tmp"; -static const char __pyx_k_NULL[] = "NULL"; -static const char __pyx_k_PIPE[] = "PIPE"; -static const char __pyx_k_attr[] = "attr"; -static const char __pyx_k_code[] = "__code__"; -static const char __pyx_k_copy[] = "copy"; -static const char __pyx_k_init[] = "__init__"; -static const char __pyx_k_join[] = "join"; -static const char __pyx_k_libs[] = "libs"; -static const char __pyx_k_line[] = "line"; -static const char __pyx_k_main[] = "__main__"; -static const char __pyx_k_meth[] = "meth"; -static const char __pyx_k_name[] = "__name__"; -static const char __pyx_k_open[] = "open"; -static const char __pyx_k_path[] = "path"; -static const char __pyx_k_prec[] = "%prec"; -static const char __pyx_k_sha1[] = "sha1"; -static const char __pyx_k_sort[] = "sort"; -static const char __pyx_k_test[] = "__test__"; -static const char __pyx_k_walk[] = "walk"; -static const char __pyx_k_Popen[] = "Popen"; -static const char __pyx_k_ascii[] = "ascii"; -static const char __pyx_k_close[] = "close"; -static const char __pyx_k_debug[] = "debug"; -static const char __pyx_k_dname[] = "dname"; -static const char __pyx_k_error[] = "error"; -static const char __pyx_k_if_fn[] = " if (!fn)"; -static const char __pyx_k_line1[] = "line1"; -static const char __pyx_k_line2[] = "line2"; -static const char __pyx_k_meth1[] = "meth1"; -static const char __pyx_k_meth2[] = "meth2"; -static const char __pyx_k_print[] = "print"; -static const char __pyx_k_range[] = "range"; -static const char __pyx_k_shell[] = "shell"; -static const char __pyx_k_split[] = "split"; -static const char __pyx_k_start[] = "start"; -static const char __pyx_k_strip[] = "strip"; -static const char __pyx_k_utf_8[] = "utf-8"; -static const char __pyx_k_win32[] = "win32"; -static const char __pyx_k_write[] = "write"; -static const char __pyx_k_append[] = "append"; -static const char __pyx_k_darwin[] = "darwin"; -static const char __pyx_k_dedent[] = "dedent"; -static const char __pyx_k_encode[] = "encode"; -static const char __pyx_k_filter[] = "filter"; -static const char __pyx_k_format[] = "format"; -static const char __pyx_k_hasher[] = "hasher"; -static const char __pyx_k_if_obj[] = " if (obj) {\n"; - static const char __pyx_k_if_res[] = " if (!res)"; - static const char __pyx_k_import[] = "__import__"; - static const char __pyx_k_isfile[] = "isfile"; - static const char __pyx_k_name_2[] = "name"; - static const char __pyx_k_parser[] = "parser"; - static const char __pyx_k_prefix[] = "prefix"; - static const char __pyx_k_reduce[] = "__reduce__"; - static const char __pyx_k_remove[] = "remove"; - static const char __pyx_k_rename[] = "rename"; - static const char __pyx_k_return[] = " return;"; - static const char __pyx_k_shutil[] = "shutil"; - static const char __pyx_k_stderr[] = "stderr"; - static const char __pyx_k_stdout[] = "stdout"; - static const char __pyx_k_tokens[] = "tokens"; - static const char __pyx_k_unlink[] = "unlink"; - static const char __pyx_k_update[] = "update"; - static const char __pyx_k_YYERROR[] = " YYERROR;\n"; -static const char __pyx_k_YYLTYPE[] = "} YYLTYPE;"; -static const char __pyx_k_compile[] = "compile"; -static const char __pyx_k_dirname[] = "dirname"; -static const char __pyx_k_flexCmd[] = "flexCmd"; -static const char __pyx_k_fnmatch[] = "fnmatch"; -static const char __pyx_k_hashlib[] = "hashlib"; -static const char __pyx_k_if_args[] = " if (!args)"; -static const char __pyx_k_linking[] = "linking: {} => {}"; -static const char __pyx_k_openLib[] = "openLib"; -static const char __pyx_k_options[] = "options"; -static const char __pyx_k_replace[] = "replace"; -static const char __pyx_k_start_s[] = "%%start %s\n\n"; -static const char __pyx_k_token_s[] = "%%token %s\n\n"; -static const char __pyx_k_verbose[] = "verbose"; -static const char __pyx_k_version[] = "version"; -static const char __pyx_k_yyerrok[] = " yyerrok;\n"; -static const char __pyx_k_yyparse[] = " yyparse();"; -static const char __pyx_k_bisonCmd[] = "bisonCmd"; -static const char __pyx_k_buildLib[] = "buildLib"; -static const char __pyx_k_closeLib[] = "closeLib"; -static const char __pyx_k_cmpLines[] = "cmpLines"; -static const char __pyx_k_code_top[] = "%code top {"; - static const char __pyx_k_flexFile[] = "flexFile"; - static const char __pyx_k_flex_cmd[] = "flex cmd: {}"; - static const char __pyx_k_getstate[] = "__getstate__"; - static const char __pyx_k_handlers[] = "handlers"; - static const char __pyx_k_keyLines[] = "keyLines"; - static const char __pyx_k_platform[] = "platform"; - static const char __pyx_k_reSpaces[] = "reSpaces"; - static const char __pyx_k_return_0[] = " return 0;"; - static const char __pyx_k_return_1[] = " return 1;"; - static const char __pyx_k_return_2[] = " return;"; - static const char __pyx_k_setstate[] = "__setstate__"; - static const char __pyx_k_textwrap[] = "textwrap"; - static const char __pyx_k_unquoted[] = "unquoted"; - static const char __pyx_k_Compiling[] = "Compiling: {}"; - static const char __pyx_k_TypeError[] = "TypeError"; - static const char __pyx_k_bisonFile[] = "bisonFile"; - static const char __pyx_k_bison_cmd[] = "bison cmd: {}"; - static const char __pyx_k_ccompiler[] = "ccompiler"; - static const char __pyx_k_direction[] = "direction"; - static const char __pyx_k_distutils[] = "distutils"; - static const char __pyx_k_docString[] = "docString"; - static const char __pyx_k_flexCFile[] = "flexCFile"; - static const char __pyx_k_flexHFile[] = "flexHFile"; - static const char __pyx_k_hexdigest[] = "hexdigest"; - static const char __pyx_k_importlib[] = "importlib"; - static const char __pyx_k_int_debug[] = " int debug"; - static const char __pyx_k_keepfiles[] = "keepfiles"; - static const char __pyx_k_lexscript[] = "lexscript"; - static const char __pyx_k_linker_so[] = "linker_so"; - static const char __pyx_k_locations[] = "%locations"; - static const char __pyx_k_machinery[] = "machinery"; - static const char __pyx_k_print_exc[] = "print_exc"; - static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; - static const char __pyx_k_s_lasterr[] = "\"%s\", lasterr"; - static const char __pyx_k_sysconfig[] = "sysconfig"; - static const char __pyx_k_traceback[] = "traceback"; - static const char __pyx_k_undefined[] = "-undefined"; - static const char __pyx_k_yyclearin[] = " yyclearin;\n"; - static const char __pyx_k_CMD_Output[] = "CMD Output: {}"; - static const char __pyx_k_bisonCFile[] = "bisonCFile"; - static const char __pyx_k_bisonHFile[] = "bisonHFile"; - static const char __pyx_k_cflags_pre[] = "cflags_pre"; - static const char __pyx_k_declspec_x[] = "__declspec(x)"; - static const char __pyx_k_flexCFile1[] = "flexCFile1"; - static const char __pyx_k_flexHFile1[] = "flexHFile1"; - static const char __pyx_k_initialize[] = "initialize"; - static const char __pyx_k_int_status[] = "int status;"; - static const char __pyx_k_returncode[] = "returncode"; - static const char __pyx_k_setuptools[] = "setuptools"; - static const char __pyx_k_startswith[] = "startswith"; - static const char __pyx_k_subprocess[] = "subprocess"; - static const char __pyx_k_tmp_output[] = "tmp.output"; - static const char __pyx_k_add_library[] = "add_library"; - static const char __pyx_k_bisonCFile1[] = "bisonCFile1"; - static const char __pyx_k_bisonHFile1[] = "bisonHFile1"; - static const char __pyx_k_bison_bison[] = "bison.bison_"; - static const char __pyx_k_cflags_post[] = "cflags_post"; - static const char __pyx_k_communicate[] = "communicate"; - static const char __pyx_k_possible_so[] = "possible_so"; - static const char __pyx_k_precedences[] = "precedences"; - static const char __pyx_k_py_input_in[] = " py_input = in;"; - static const char __pyx_k_raw_c_rules[] = "raw_c_rules"; - static const char __pyx_k_ParserEngine[] = "ParserEngine"; - static const char __pyx_k_debugSymbols[] = "debugSymbols"; - static const char __pyx_k_define_macro[] = "define_macro"; - static const char __pyx_k_get_platform[] = "get_platform"; - static const char __pyx_k_handlerNames[] = "handlerNames"; - static const char __pyx_k_new_compiler[] = "new_compiler"; - static const char __pyx_k_staticmethod[] = "staticmethod"; - static const char __pyx_k_version_info[] = "version_info"; - static const char __pyx_k_PyObject_args[] = " PyObject *args;"; - static const char __pyx_k_char_filename[] = " char *filename;"; - static const char __pyx_k_code_requires[] = "%code requires {"; - static const char __pyx_k_distutils_log[] = "distutils.log"; - static const char __pyx_k_extra_preargs[] = "extra_preargs"; - static const char __pyx_k_int_last_line[] = " int last_line;"; - static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; - static const char __pyx_k_set_verbosity[] = "set_verbosity"; - static const char __pyx_k_Py_DECREF_args[] = " Py_DECREF(args);"; - static const char __pyx_k_Py_XDECREF_res[] = " Py_XDECREF(res);"; - static const char __pyx_k_YYLTYPE_yylloc[] = "YYLTYPE yylloc;"; - static const char __pyx_k_buildDirectory[] = "buildDirectory"; - static const char __pyx_k_co_firstlineno[] = "co_firstlineno"; - static const char __pyx_k_dynamic_lookup[] = "dynamic_lookup"; - static const char __pyx_k_extra_postargs[] = "extra_postargs"; - static const char __pyx_k_get_python_inc[] = "get_python_inc"; - static const char __pyx_k_int_first_line[] = " int first_line;"; - static const char __pyx_k_openCurrentLib[] = "openCurrentLib"; - static const char __pyx_k_py_callback_cb[] = " py_callback = cb;"; - static const char __pyx_k_void_py_parser[] = "void *py_parser;"; - static const char __pyx_k_Opening_library[] = "Opening library {}"; - static const char __pyx_k_add_include_dir[] = "add_include_dir"; - static const char __pyx_k_add_library_dir[] = "add_library_dir"; - static const char __pyx_k_bison_library_s[] = " bison library: %s"; - static const char __pyx_k_buildOnlyCFiles[] = "_buildOnlyCFiles"; - static const char __pyx_k_int_last_column[] = " int last_column;"; - static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; - static const char __pyx_k_hashParserObject[] = "hashParserObject"; - static const char __pyx_k_include_Python_h[] = "#include \"Python.h\""; - static const char __pyx_k_include_lex_yy_h[] = "#include \"lex.yy.h\""; - static const char __pyx_k_int_first_column[] = " int first_column;"; - static const char __pyx_k_yyscan_t_scanner[] = "yyscan_t scanner;"; - static const char __pyx_k_Py_DECREF_lasterr[] = " Py_DECREF(lasterr);\n"; - static const char __pyx_k_Py_INCREF_Py_None[] = " Py_INCREF(Py_None);\n"; - static const char __pyx_k_char_rules_hash_s[] = "char *rules_hash = \"%s\";"; - static const char __pyx_k_include_tmp_tab_h[] = "#include \"tmp.tab.h\""; - static const char __pyx_k_py_parser_parser1[] = " py_parser = parser1;"; - static const char __pyx_k_EXTENSION_SUFFIXES[] = "EXTENSION_SUFFIXES"; - static const char __pyx_k_bisonEngineLibName[] = "bisonEngineLibName"; - static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; - static const char __pyx_k_declspec_dllexport[] = "__declspec(dllexport) "; - static const char __pyx_k_distutils_dir_name[] = "distutils_dir_name"; - static const char __pyx_k_link_shared_object[] = "link_shared_object"; - static const char __pyx_k_yylex_init_scanner[] = "yylex_init(&scanner);"; - static const char __pyx_k_yypstate_delete_ps[] = "yypstate_delete(ps);"; - static const char __pyx_k_distutils_ccompiler[] = "distutils.ccompiler"; - static const char __pyx_k_distutils_sysconfig[] = "distutils.sysconfig"; - static const char __pyx_k_report_syntax_error[] = " \"report_syntax_error\");"; - static const char __pyx_k_YYSTYPE_pushed_value[] = "YYSTYPE pushed_value;"; - static const char __pyx_k_define_api_pure_full[] = "%define api.pure full"; - static const char __pyx_k_if_error_PyErr_Clear[] = " if(error) PyErr_Clear();"; - static const char __pyx_k_int_yyerror_char_msg[] = "int yyerror(char *msg);"; - static const char __pyx_k_attribute___dllexport[] = "__attribute__ ((dllexport)) "; - static const char __pyx_k_generating_bison_file[] = "generating bison file: {}"; - static const char __pyx_k_py_callback_py_parser[] = " $$ = (*py_callback)(\n py_parser, \""; - static const char __pyx_k_typedef_void_yyscan_t[] = "typedef void * yyscan_t;"; - static const char __pyx_k_current_parser_class_s[] = " current parser class: %s"; - static const char __pyx_k_define_YYLTYPE_YYLTYPE[] = "#define YYLTYPE YYLTYPE"; - static const char __pyx_k_int_yyerror_char_msg_2[] = "int yyerror(char *msg)"; - static const char __pyx_k_library_loading_failed[] = "library loading failed!"; - static const char __pyx_k_python_v_major_v_minor[] = "python{v.major}{v.minor}"; - static const char __pyx_k_typedef_struct_YYLTYPE[] = "typedef struct YYLTYPE"; - static const char __pyx_k_define_YYERROR_VERBOSE_1[] = "#define YYERROR_VERBOSE 1"; - static const char __pyx_k_while_status_YYPUSH_MORE[] = "} while (status == YYPUSH_MORE);"; - static const char __pyx_k_yypstate_ps_yypstate_new[] = "yypstate *ps = yypstate_new ();"; - static const char __pyx_k_void_cb_void_char_int_int[] = " void *(*cb)(void *, char *, int, int, ...),"; - static const char __pyx_k_void_in_void_char_int_int[] = " void (*in)(void *, char*, int *, int),"; - static const char __pyx_k_ParserEngine_openLib_error[] = "ParserEngine.openLib: error \"{}\"\n"; - static const char __pyx_k_generate_exception_handler[] = "generate_exception_handler"; - static const char __pyx_k_void_do_parse_void_parser1[] = "void do_parse(void *parser1,"; - static const char __pyx_k_PyObject_obj_PyErr_Occurred[] = " PyObject* obj = PyErr_Occurred();\n"; - static const char __pyx_k_Successfully_loaded_library[] = "Successfully loaded library"; - static const char __pyx_k_renaming_bison_output_files[] = "renaming bison output files"; - static const char __pyx_k_src_bison_cython_bison__pyx[] = "src/bison/cython/bison_.pyx"; - static const char __pyx_k_yylex_destroy_scanner_return[] = "yylex_destroy(scanner);return;"; - static const char __pyx_k_PyObject_error_PyErr_Occurred[] = " PyObject *error = PyErr_Occurred();"; - static const char __pyx_k_args_Py_BuildValue_s_s_i_i_i_i[] = " args = Py_BuildValue(\"(s,s,i,i,i,i)\", msg, yyget_text(scanner),"; - static const char __pyx_k_hashParserObject_locals_update[] = "hashParserObject..update"; - static const char __pyx_k_yylloc_first_line_yylloc_first[] = " yylloc.first_line, yylloc.first_column,"; - static const char __pyx_k_Deleting_temporary_bison_output[] = "Deleting temporary bison output files:"; - static const char __pyx_k_Hashes_match_no_need_to_rebuild[] = "Hashes match, no need to rebuild bison engine lib"; - static const char __pyx_k_PyObject_SetAttrString_py_parse[] = " PyObject_SetAttrString(py_parser, \"lasterror\", Py_None);\n"; - static const char __pyx_k_PyObject_fn_PyObject_GetAttrStr[] = " PyObject *fn = PyObject_GetAttrString((PyObject *)py_parser,"; - static const char __pyx_k_PyObject_lasterr_PyObject_GetAt[] = " PyObject* lasterr = PyObject_GetAttrString((PyObject*)py_parser, \"lasterror\");;\n"; - static const char __pyx_k_PyObject_res_PyObject_CallObjec[] = " PyObject *res = PyObject_CallObject(fn, args);"; - static const char __pyx_k_Pyrex_generated_portion_of_pybi[] = "\nPyrex-generated portion of pybison\n"; - static const char __pyx_k_dirname_platform_version_0_vers[] = "{dirname}.{platform}-{version[0]}.{version[1]}"; - static const char __pyx_k_int_token_yylex_pushed_value_yy[] = " int token = yylex(&pushed_value,&yylloc, scanner);"; - static const char __pyx_k_locp_first_line_locp_first_colu[] = " locp->first_line, locp->first_column,"; - static const char __pyx_k_locp_last_line_locp_last_column[] = " locp->last_line, locp->last_column);"; - static const char __pyx_k_status_yypush_parse_ps_token_pu[] = " status = yypush_parse (ps, token , &pushed_value, &yylloc, scanner);"; - static const char __pyx_k_void_py_input_void_char_int_int[] = "void (*py_input)(void *, char *, int *, int);"; - static const char __pyx_k_yydebug_debug_For_Bison_still_g[] = " yydebug = debug; // For Bison (still global, even in a reentrant parser)"; - static const char __pyx_k_yyerror_yylloc_exception_raised[] = " //yyerror(&yylloc, \"exception raised\");\n"; - static const char __pyx_k_yylloc_last_line_yylloc_last_co[] = " yylloc.last_line, yylloc.last_column);"; - static const char __pyx_k_Hash_discrepancy_need_to_rebuild[] = "Hash discrepancy, need to rebuild bison lib"; - static const char __pyx_k_Warning_failed_to_delete_tempora[] = "Warning: failed to delete temporary file {}"; - static const char __pyx_k_args_Py_BuildValue_s_s_i_i_i_i_2[] = " args = Py_BuildValue(\"(s,s,i,i,i,i)\", msg, yytext,"; - static const char __pyx_k_if_debug_yyset_debug_1_scanner_F[] = "if (debug) yyset_debug(1, scanner); // For Flex (no longer a global, but rather a member of yyguts_t)"; - static const char __pyx_k_self_libHandle_cannot_be_convert[] = "self.libHandle cannot be converted to a Python object for pickling"; - static const char __pyx_k_void_py_callback_void_char_int_i[] = "void *(*py_callback)(void *, char *, int, int, ...);"; - static const char __pyx_k_void_yyerror_YYLTYPE_locp_yyscan[] = "void yyerror(YYLTYPE *locp, yyscan_t scanner, char const *msg);"; - static const char __pyx_k_yylloc_first_line_yylloc_first_c[] = "yylloc.first_line = yylloc.first_column = yylloc.last_line = yylloc.last_column = 1;"; - static const char __pyx_k_void_yyerror_YYLTYPE_locp_yyscan_2[] = "void yyerror(YYLTYPE *locp, yyscan_t scanner, char const *msg) {"; - static PyObject *__pyx_kp_u_CMD_Output; - static PyObject *__pyx_kp_u_Compiling; - static PyObject *__pyx_kp_u_Deleting_temporary_bison_output; - static PyObject *__pyx_n_s_EXTENSION_SUFFIXES; - static PyObject *__pyx_kp_u_Hash_discrepancy_need_to_rebuild; - static PyObject *__pyx_kp_u_Hashes_match_no_need_to_rebuild; - static PyObject *__pyx_n_u_NULL; - static PyObject *__pyx_kp_u_Opening_library; - static PyObject *__pyx_n_s_PIPE; - static PyObject *__pyx_n_s_ParserEngine; - static PyObject *__pyx_kp_u_ParserEngine_openLib_error; - static PyObject *__pyx_n_s_Popen; - static PyObject *__pyx_kp_u_PyObject_SetAttrString_py_parse; - static PyObject *__pyx_kp_u_PyObject_args; - static PyObject *__pyx_kp_u_PyObject_error_PyErr_Occurred; - static PyObject *__pyx_kp_u_PyObject_fn_PyObject_GetAttrStr; - static PyObject *__pyx_kp_u_PyObject_lasterr_PyObject_GetAt; - static PyObject *__pyx_kp_u_PyObject_obj_PyErr_Occurred; - static PyObject *__pyx_kp_u_PyObject_res_PyObject_CallObjec; - static PyObject *__pyx_kp_u_Py_DECREF_args; - static PyObject *__pyx_kp_u_Py_DECREF_lasterr; - static PyObject *__pyx_kp_u_Py_INCREF_Py_None; - static PyObject *__pyx_kp_u_Py_XDECREF_res; - static PyObject *__pyx_kp_u_Successfully_loaded_library; - static PyObject *__pyx_n_s_TypeError; - static PyObject *__pyx_kp_u_Warning_failed_to_delete_tempora; - static PyObject *__pyx_kp_u_YYERROR; - static PyObject *__pyx_kp_u_YYLTYPE; - static PyObject *__pyx_kp_u_YYLTYPE_yylloc; - static PyObject *__pyx_kp_u_YYSTYPE_pushed_value; - 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__19; - 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__23; - static PyObject *__pyx_kp_u__24; - static PyObject *__pyx_kp_u__26; - static PyObject *__pyx_kp_u__27; - static PyObject *__pyx_kp_u__28; - static PyObject *__pyx_kp_u__29; - static PyObject *__pyx_kp_u__30; - static PyObject *__pyx_kp_u__31; - static PyObject *__pyx_kp_u__32; - static PyObject *__pyx_kp_u__34; - static PyObject *__pyx_kp_u__35; - static PyObject *__pyx_kp_u__44; - static PyObject *__pyx_kp_u__5; - static PyObject *__pyx_kp_u__8; - static PyObject *__pyx_kp_u__9; - static PyObject *__pyx_n_s_add_include_dir; - static PyObject *__pyx_n_s_add_library; - static PyObject *__pyx_n_s_add_library_dir; - static PyObject *__pyx_n_s_append; - static PyObject *__pyx_kp_u_args_Py_BuildValue_s_s_i_i_i_i; - static PyObject *__pyx_kp_u_args_Py_BuildValue_s_s_i_i_i_i_2; - static PyObject *__pyx_n_u_ascii; - static PyObject *__pyx_n_s_attr; - static PyObject *__pyx_kp_u_attribute___dllexport; - static PyObject *__pyx_kp_u_bak; - static PyObject *__pyx_n_s_bisonCFile; - static PyObject *__pyx_n_u_bisonCFile; - static PyObject *__pyx_n_s_bisonCFile1; - static PyObject *__pyx_n_u_bisonCFile1; - static PyObject *__pyx_n_s_bisonCmd; - static PyObject *__pyx_n_s_bisonEngineLibName; - static PyObject *__pyx_n_s_bisonFile; - static PyObject *__pyx_n_u_bisonFile; - static PyObject *__pyx_n_s_bisonHFile; - static PyObject *__pyx_n_u_bisonHFile; - static PyObject *__pyx_n_s_bisonHFile1; - static PyObject *__pyx_n_u_bisonHFile1; - static PyObject *__pyx_n_s_bison_bison; - static PyObject *__pyx_kp_u_bison_cmd; - static PyObject *__pyx_kp_u_bison_library_s; - static PyObject *__pyx_n_s_buildDirectory; - static PyObject *__pyx_n_s_buildLib; - static PyObject *__pyx_n_s_buildOnlyCFiles; - static PyObject *__pyx_n_s_ccompiler; - static PyObject *__pyx_n_s_cflags_post; - static PyObject *__pyx_n_s_cflags_pre; - static PyObject *__pyx_kp_u_char_filename; - static PyObject *__pyx_kp_u_char_rules_hash_s; - static PyObject *__pyx_n_s_cline_in_traceback; - static PyObject *__pyx_n_s_close; - static PyObject *__pyx_n_s_closeLib; - static PyObject *__pyx_n_s_cmpLines; - static PyObject *__pyx_n_s_co_firstlineno; - static PyObject *__pyx_n_s_code; - static PyObject *__pyx_kp_u_code_requires; - static PyObject *__pyx_kp_u_code_top; - static PyObject *__pyx_n_s_communicate; - static PyObject *__pyx_n_s_compile; - static PyObject *__pyx_n_s_copy; - static PyObject *__pyx_kp_u_current_parser_class_s; - static PyObject *__pyx_n_u_d; - static PyObject *__pyx_n_u_darwin; - static PyObject *__pyx_n_s_debug; - static PyObject *__pyx_n_s_debugSymbols; - static PyObject *__pyx_kp_u_declspec_dllexport; - static PyObject *__pyx_kp_u_declspec_x; - static PyObject *__pyx_n_s_dedent; - static PyObject *__pyx_kp_u_define_YYERROR_VERBOSE_1; - static PyObject *__pyx_kp_u_define_YYLTYPE_YYLTYPE; - static PyObject *__pyx_kp_u_define_api_pure_full; - static PyObject *__pyx_n_s_define_macro; - static PyObject *__pyx_n_s_direction; - static PyObject *__pyx_n_s_dirname; - static PyObject *__pyx_kp_u_dirname_platform_version_0_vers; - static PyObject *__pyx_n_s_distutils; - static PyObject *__pyx_n_s_distutils_ccompiler; - static PyObject *__pyx_n_s_distutils_dir_name; - static PyObject *__pyx_n_s_distutils_log; - static PyObject *__pyx_n_s_distutils_sysconfig; - static PyObject *__pyx_n_s_dname; - static PyObject *__pyx_kp_u_do; - static PyObject *__pyx_n_s_doc; - static PyObject *__pyx_n_s_docString; - static PyObject *__pyx_n_u_dynamic_lookup; - static PyObject *__pyx_n_s_encode; - static PyObject *__pyx_n_u_error; - static PyObject *__pyx_n_s_extra_postargs; - static PyObject *__pyx_n_s_extra_preargs; - static PyObject *__pyx_n_s_f; - static PyObject *__pyx_n_s_filter; - static PyObject *__pyx_n_s_flexCFile; - static PyObject *__pyx_n_u_flexCFile; - static PyObject *__pyx_n_s_flexCFile1; - static PyObject *__pyx_n_u_flexCFile1; - static PyObject *__pyx_n_s_flexCmd; - static PyObject *__pyx_n_s_flexFile; - static PyObject *__pyx_n_u_flexFile; - static PyObject *__pyx_n_s_flexHFile; - static PyObject *__pyx_n_s_flexHFile1; - static PyObject *__pyx_kp_u_flex_cmd; - static PyObject *__pyx_n_s_fnmatch; - static PyObject *__pyx_n_s_format; - static PyObject *__pyx_n_s_generate_exception_handler; - static PyObject *__pyx_kp_u_generating_bison_file; - static PyObject *__pyx_n_s_get_platform; - static PyObject *__pyx_n_s_get_python_inc; - static PyObject *__pyx_n_s_getstate; - static PyObject *__pyx_n_s_h; - static PyObject *__pyx_n_s_handlerNames; - static PyObject *__pyx_n_s_handlers; - static PyObject *__pyx_n_s_hashParserObject; - static PyObject *__pyx_n_s_hashParserObject_locals_update; - static PyObject *__pyx_n_s_hasher; - static PyObject *__pyx_n_s_hashlib; - static PyObject *__pyx_n_s_hexdigest; - static PyObject *__pyx_kp_u_if_args; - static PyObject *__pyx_kp_u_if_debug_yyset_debug_1_scanner_F; - static PyObject *__pyx_kp_u_if_error_PyErr_Clear; - static PyObject *__pyx_kp_u_if_fn; - static PyObject *__pyx_kp_u_if_obj; - static PyObject *__pyx_kp_u_if_res; - static PyObject *__pyx_n_s_import; - static PyObject *__pyx_n_s_importlib; - static PyObject *__pyx_kp_u_include_Python_h; - static PyObject *__pyx_kp_u_include_lex_yy_h; - static PyObject *__pyx_kp_u_include_tmp_tab_h; - static PyObject *__pyx_n_s_init; - static PyObject *__pyx_n_s_initialize; - static PyObject *__pyx_kp_u_int_debug; - static PyObject *__pyx_kp_u_int_first_column; - static PyObject *__pyx_kp_u_int_first_line; - static PyObject *__pyx_kp_u_int_last_column; - static PyObject *__pyx_kp_u_int_last_line; - static PyObject *__pyx_kp_u_int_status; - static PyObject *__pyx_kp_u_int_token_yylex_pushed_value_yy; - static PyObject *__pyx_kp_u_int_yyerror_char_msg; - static PyObject *__pyx_kp_u_int_yyerror_char_msg_2; - static PyObject *__pyx_n_s_isfile; - static PyObject *__pyx_n_s_join; - static PyObject *__pyx_n_s_keepfiles; - static PyObject *__pyx_n_s_key; - static PyObject *__pyx_n_s_keyLines; - static PyObject *__pyx_n_s_lexscript; - static PyObject *__pyx_kp_u_library_loading_failed; - static PyObject *__pyx_n_u_libs; - static PyObject *__pyx_n_s_line; - static PyObject *__pyx_n_s_line1; - static PyObject *__pyx_n_s_line2; - static PyObject *__pyx_n_s_link_shared_object; - static PyObject *__pyx_n_s_linker_so; - static PyObject *__pyx_kp_u_linking; - static PyObject *__pyx_kp_u_locations; - static PyObject *__pyx_kp_u_locp_first_line_locp_first_colu; - static PyObject *__pyx_kp_u_locp_last_line_locp_last_column; - static PyObject *__pyx_n_s_log; - static PyObject *__pyx_n_s_m; - static PyObject *__pyx_n_s_machinery; - static PyObject *__pyx_n_s_main; - static PyObject *__pyx_n_s_meth; - static PyObject *__pyx_n_s_meth1; - static PyObject *__pyx_n_s_meth2; - static PyObject *__pyx_n_s_name; - static PyObject *__pyx_n_s_name_2; - static PyObject *__pyx_n_s_new; - static PyObject *__pyx_n_s_new_compiler; - static PyObject *__pyx_n_s_o; - static PyObject *__pyx_n_u_on; - static PyObject *__pyx_n_s_open; - static PyObject *__pyx_n_s_openCurrentLib; - static PyObject *__pyx_n_s_openLib; - static PyObject *__pyx_n_s_options; - static PyObject *__pyx_n_s_os; - static PyObject *__pyx_n_s_parser; - static PyObject *__pyx_n_s_path; - static PyObject *__pyx_n_s_platform; - static PyObject *__pyx_n_s_possible_so; - static PyObject *__pyx_kp_u_prec; - static PyObject *__pyx_n_s_precedences; - static PyObject *__pyx_n_s_prefix; - static PyObject *__pyx_n_s_print; - static PyObject *__pyx_n_s_print_exc; - static PyObject *__pyx_kp_u_py_callback_cb; - static PyObject *__pyx_kp_u_py_callback_py_parser; - static PyObject *__pyx_kp_u_py_input_in; - static PyObject *__pyx_kp_u_py_parser_parser1; - static PyObject *__pyx_kp_u_python_v_major_v_minor; - static PyObject *__pyx_n_s_range; - static PyObject *__pyx_n_s_raw_c_rules; - static PyObject *__pyx_n_s_re; - static PyObject *__pyx_n_s_reSpaces; - static PyObject *__pyx_n_s_reduce; - static PyObject *__pyx_n_s_reduce_cython; - static PyObject *__pyx_n_s_reduce_ex; - static PyObject *__pyx_n_s_remove; - static PyObject *__pyx_n_s_rename; - static PyObject *__pyx_kp_u_renaming_bison_output_files; - static PyObject *__pyx_n_s_replace; - static PyObject *__pyx_kp_u_report_syntax_error; - static PyObject *__pyx_kp_u_return; - static PyObject *__pyx_kp_u_return_0; - static PyObject *__pyx_kp_u_return_1; - static PyObject *__pyx_kp_u_return_2; - static PyObject *__pyx_n_s_returncode; - static PyObject *__pyx_kp_u_rm; - static PyObject *__pyx_kp_u_s; - static PyObject *__pyx_kp_u_s_2; - static PyObject *__pyx_kp_u_s_3; - static PyObject *__pyx_kp_u_s_4; - static PyObject *__pyx_kp_u_s_5; - static PyObject *__pyx_kp_u_s_lasterr; - static PyObject *__pyx_kp_s_self_libHandle_cannot_be_convert; - static PyObject *__pyx_n_s_set_verbosity; - static PyObject *__pyx_n_s_setstate; - static PyObject *__pyx_n_s_setstate_cython; - static PyObject *__pyx_n_s_setuptools; - static PyObject *__pyx_n_u_sha1; - static PyObject *__pyx_n_s_shell; - static PyObject *__pyx_n_s_shutil; - static PyObject *__pyx_n_s_sort; - static PyObject *__pyx_n_s_split; - static PyObject *__pyx_kp_s_src_bison_cython_bison__pyx; - static PyObject *__pyx_n_s_start; - static PyObject *__pyx_kp_u_start_s; - static PyObject *__pyx_n_s_startswith; - static PyObject *__pyx_n_s_staticmethod; - static PyObject *__pyx_kp_u_status_yypush_parse_ps_token_pu; - static PyObject *__pyx_n_s_stderr; - static PyObject *__pyx_n_s_stdout; - static PyObject *__pyx_n_s_strip; - static PyObject *__pyx_n_s_sub; - static PyObject *__pyx_n_s_subprocess; - static PyObject *__pyx_n_s_sys; - static PyObject *__pyx_n_s_sysconfig; - static PyObject *__pyx_n_s_test; - static PyObject *__pyx_n_s_textwrap; - static PyObject *__pyx_n_s_tmp; - static PyObject *__pyx_kp_u_tmp_output; - static PyObject *__pyx_kp_u_token_s; - static PyObject *__pyx_n_s_tokens; - static PyObject *__pyx_n_s_traceback; - static PyObject *__pyx_kp_u_typedef_struct_YYLTYPE; - static PyObject *__pyx_kp_u_typedef_void_yyscan_t; - static PyObject *__pyx_kp_u_undefined; - static PyObject *__pyx_n_s_unlink; - static PyObject *__pyx_n_s_unquoted; - static PyObject *__pyx_n_s_update; - static PyObject *__pyx_kp_u_utf_8; - static PyObject *__pyx_n_s_v; - static PyObject *__pyx_n_s_verbose; - static PyObject *__pyx_n_s_version; - static PyObject *__pyx_n_s_version_info; - static PyObject *__pyx_kp_u_void_cb_void_char_int_int; - static PyObject *__pyx_kp_u_void_do_parse_void_parser1; - static PyObject *__pyx_kp_u_void_in_void_char_int_int; - static PyObject *__pyx_kp_u_void_py_callback_void_char_int_i; - static PyObject *__pyx_kp_u_void_py_input_void_char_int_int; - static PyObject *__pyx_kp_u_void_py_parser; - static PyObject *__pyx_kp_u_void_yyerror_YYLTYPE_locp_yyscan; - static PyObject *__pyx_kp_u_void_yyerror_YYLTYPE_locp_yyscan_2; - static PyObject *__pyx_n_u_w; - static PyObject *__pyx_n_s_walk; - static PyObject *__pyx_kp_u_while_status_YYPUSH_MORE; - static PyObject *__pyx_n_u_win32; - static PyObject *__pyx_n_s_write; - static PyObject *__pyx_kp_u_yyclearin; - static PyObject *__pyx_kp_u_yydebug_debug_For_Bison_still_g; - static PyObject *__pyx_kp_u_yyerrok; - static PyObject *__pyx_kp_u_yyerror_yylloc_exception_raised; - static PyObject *__pyx_kp_u_yylex_destroy_scanner_return; - static PyObject *__pyx_kp_u_yylex_init_scanner; - static PyObject *__pyx_kp_u_yylloc_first_line_yylloc_first; - static PyObject *__pyx_kp_u_yylloc_first_line_yylloc_first_c; - static PyObject *__pyx_kp_u_yylloc_last_line_yylloc_last_co; - static PyObject *__pyx_kp_u_yyparse; - static PyObject *__pyx_kp_u_yypstate_delete_ps; - static PyObject *__pyx_kp_u_yypstate_ps_yypstate_new; - static PyObject *__pyx_kp_u_yyscan_t_scanner; -static int __pyx_pf_5bison_6bison__12ParserEngine___init__(struct __pyx_obj_5bison_6bison__ParserEngine *__pyx_v_self, PyObject *__pyx_v_parser); /* proto */ -static PyObject *__pyx_pf_5bison_6bison__12ParserEngine_2distutils_dir_name(PyObject *__pyx_v_dname); /* proto */ -static PyObject *__pyx_pf_5bison_6bison__12ParserEngine_4reset(CYTHON_UNUSED struct __pyx_obj_5bison_6bison__ParserEngine *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5bison_6bison__12ParserEngine_6openCurrentLib(struct __pyx_obj_5bison_6bison__ParserEngine *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5bison_6bison__12ParserEngine_8possible_so(struct __pyx_obj_5bison_6bison__ParserEngine *__pyx_v_self, PyObject *__pyx_v_so_dir); /* proto */ -static PyObject *__pyx_pf_5bison_6bison__12ParserEngine_10openLib(struct __pyx_obj_5bison_6bison__ParserEngine *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5bison_6bison__12ParserEngine_12generate_exception_handler(CYTHON_UNUSED struct __pyx_obj_5bison_6bison__ParserEngine *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5bison_6bison__12ParserEngine_14buildLib(struct __pyx_obj_5bison_6bison__ParserEngine *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5bison_6bison__12ParserEngine_16closeLib(struct __pyx_obj_5bison_6bison__ParserEngine *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5bison_6bison__12ParserEngine_18runEngine(struct __pyx_obj_5bison_6bison__ParserEngine *__pyx_v_self, PyObject *__pyx_v_debug); /* proto */ -static PyObject *__pyx_pf_5bison_6bison__12ParserEngine_20__del__(struct __pyx_obj_5bison_6bison__ParserEngine *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5bison_6bison__12ParserEngine_22__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5bison_6bison__ParserEngine *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5bison_6bison__12ParserEngine_24__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5bison_6bison__ParserEngine *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_5bison_6bison__cmpLines(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_meth1, PyObject *__pyx_v_meth2); /* proto */ -static PyObject *__pyx_pf_5bison_6bison__2keyLines(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_meth); /* proto */ -static PyObject *__pyx_pf_5bison_6bison__16hashParserObject_update(PyObject *__pyx_self, PyObject *__pyx_v_o); /* proto */ -static PyObject *__pyx_pf_5bison_6bison__4hashParserObject(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_parser); /* proto */ -static PyObject *__pyx_tp_new_5bison_6bison__ParserEngine(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5bison_6bison____pyx_scope_struct__hashParserObject(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_int_0; -static PyObject *__pyx_int_1; -static PyObject *__pyx_int_neg_1; -static PyObject *__pyx_codeobj_; -static PyObject *__pyx_tuple__3; -static PyObject *__pyx_tuple__4; -static PyObject *__pyx_tuple__6; -static PyObject *__pyx_tuple__7; -static PyObject *__pyx_tuple__25; -static PyObject *__pyx_tuple__33; -static PyObject *__pyx_tuple__36; -static PyObject *__pyx_tuple__37; -static PyObject *__pyx_tuple__38; -static PyObject *__pyx_tuple__42; -static PyObject *__pyx_tuple__45; -static PyObject *__pyx_tuple__46; -static PyObject *__pyx_tuple__47; -static PyObject *__pyx_tuple__48; -static PyObject *__pyx_tuple__49; -static PyObject *__pyx_codeobj__39; -static PyObject *__pyx_codeobj__40; -static PyObject *__pyx_codeobj__41; -static PyObject *__pyx_codeobj__43; -/* Late includes */ - -/* "src/bison/cython/bison_.pyx":109 - * cdef char *libHash - * - * def __init__(self, parser): # <<<<<<<<<<<<<< - * """ - * Creates a ParserEngine wrapper, and builds/loads the library. - */ - -/* Python wrapper */ -static int __pyx_pw_5bison_6bison__12ParserEngine_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_5bison_6bison__12ParserEngine___init__[] = "\n Creates a ParserEngine wrapper, and builds/loads the library.\n\n Arguments:\n - parser - an instance of a subclass of Parser\n\n In the course of initialisation, we check the library against the\n parser object's rules. If the lib doesn't exist, or can't be loaded, or\n doesn't match, we build a new library.\n\n Either way, we end up with a binary parser engine which matches the\n current rules in the parser object.\n "; -#if CYTHON_COMPILING_IN_CPYTHON -struct wrapperbase __pyx_wrapperbase_5bison_6bison__12ParserEngine___init__; -#endif -static int __pyx_pw_5bison_6bison__12ParserEngine_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_parser = 0; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - int __pyx_r; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); - { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parser,0}; - PyObject* values[1] = {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 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_parser)) != 0)) kw_args--; - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 109, __pyx_L3_error) - } - } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = PyTuple_GET_ITEM(__pyx_args, 0); - } - __pyx_v_parser = values[0]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 109, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("bison.bison_.ParserEngine.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return -1; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5bison_6bison__12ParserEngine___init__(((struct __pyx_obj_5bison_6bison__ParserEngine *)__pyx_v_self), __pyx_v_parser); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static int __pyx_pf_5bison_6bison__12ParserEngine___init__(struct __pyx_obj_5bison_6bison__ParserEngine *__pyx_v_self, PyObject *__pyx_v_parser) { - int __pyx_r; - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 109, 0, __PYX_ERR(0, 109, __pyx_L1_error)); - - /* "src/bison/cython/bison_.pyx":123 - * current rules in the parser object. - * """ - * self.parser = parser # <<<<<<<<<<<<<< - * - * self.libFilename_py = parser.buildDirectory \ - */ - __Pyx_TraceLine(123,0,__PYX_ERR(0, 123, __pyx_L1_error)) - __Pyx_INCREF(__pyx_v_parser); - __Pyx_GIVEREF(__pyx_v_parser); - __Pyx_GOTREF(__pyx_v_self->parser); - __Pyx_DECREF(__pyx_v_self->parser); - __pyx_v_self->parser = __pyx_v_parser; - - /* "src/bison/cython/bison_.pyx":125 - * self.parser = parser - * - * self.libFilename_py = parser.buildDirectory \ # <<<<<<<<<<<<<< - * + parser.bisonEngineLibName \ - * + machinery.EXTENSION_SUFFIXES[0] - */ - __Pyx_TraceLine(125,0,__PYX_ERR(0, 125, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_buildDirectory); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - - /* "src/bison/cython/bison_.pyx":126 - * - * self.libFilename_py = parser.buildDirectory \ - * + parser.bisonEngineLibName \ # <<<<<<<<<<<<<< - * + machinery.EXTENSION_SUFFIXES[0] - * - */ - __Pyx_TraceLine(126,0,__PYX_ERR(0, 126, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_bisonEngineLibName); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 126, __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; - - /* "src/bison/cython/bison_.pyx":127 - * self.libFilename_py = parser.buildDirectory \ - * + parser.bisonEngineLibName \ - * + machinery.EXTENSION_SUFFIXES[0] # <<<<<<<<<<<<<< - * - * self.parserHash = hashParserObject(self.parser) - */ - __Pyx_TraceLine(127,0,__PYX_ERR(0, 127, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_machinery); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_EXTENSION_SUFFIXES); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __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, 127, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "src/bison/cython/bison_.pyx":125 - * self.parser = parser - * - * self.libFilename_py = parser.buildDirectory \ # <<<<<<<<<<<<<< - * + parser.bisonEngineLibName \ - * + machinery.EXTENSION_SUFFIXES[0] - */ - __Pyx_TraceLine(125,0,__PYX_ERR(0, 125, __pyx_L1_error)) - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v_self->libFilename_py); - __Pyx_DECREF(__pyx_v_self->libFilename_py); - __pyx_v_self->libFilename_py = __pyx_t_1; - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":129 - * + machinery.EXTENSION_SUFFIXES[0] - * - * self.parserHash = hashParserObject(self.parser) # <<<<<<<<<<<<<< - * - * - */ - __Pyx_TraceLine(129,0,__PYX_ERR(0, 129, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_hashParserObject); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 129, __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_self->parser) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self->parser); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v_self->parserHash); - __Pyx_DECREF(__pyx_v_self->parserHash); - __pyx_v_self->parserHash = __pyx_t_1; - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":132 - * - * - * if parser._buildOnlyCFiles: # <<<<<<<<<<<<<< - * self.buildLib() - * return - */ - __Pyx_TraceLine(132,0,__PYX_ERR(0, 132, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_buildOnlyCFiles); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __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, 132, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_4) { - - /* "src/bison/cython/bison_.pyx":133 - * - * if parser._buildOnlyCFiles: - * self.buildLib() # <<<<<<<<<<<<<< - * return - * self.openCurrentLib() - */ - __Pyx_TraceLine(133,0,__PYX_ERR(0, 133, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_buildLib); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __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, 133, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":134 - * if parser._buildOnlyCFiles: - * self.buildLib() - * return # <<<<<<<<<<<<<< - * self.openCurrentLib() - * - */ - __Pyx_TraceLine(134,0,__PYX_ERR(0, 134, __pyx_L1_error)) - __pyx_r = 0; - goto __pyx_L0; - - /* "src/bison/cython/bison_.pyx":132 - * - * - * if parser._buildOnlyCFiles: # <<<<<<<<<<<<<< - * self.buildLib() - * return - */ - } - - /* "src/bison/cython/bison_.pyx":135 - * self.buildLib() - * return - * self.openCurrentLib() # <<<<<<<<<<<<<< - * - * @staticmethod - */ - __Pyx_TraceLine(135,0,__PYX_ERR(0, 135, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_openCurrentLib); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __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, 135, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":109 - * cdef char *libHash - * - * def __init__(self, parser): # <<<<<<<<<<<<<< - * """ - * Creates a ParserEngine wrapper, and builds/loads the library. - */ - - /* function exit code */ - __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("bison.bison_.ParserEngine.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "src/bison/cython/bison_.pyx":138 - * - * @staticmethod - * def distutils_dir_name(dname): # <<<<<<<<<<<<<< - * import sysconfig, sys - * """Returns the name of a distutils build directory""" - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5bison_6bison__12ParserEngine_3distutils_dir_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_5bison_6bison__12ParserEngine_3distutils_dir_name = {"distutils_dir_name", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5bison_6bison__12ParserEngine_3distutils_dir_name, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_5bison_6bison__12ParserEngine_3distutils_dir_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_dname = 0; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("distutils_dir_name (wrapper)", 0); - { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dname,0}; - PyObject* values[1] = {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 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_dname)) != 0)) kw_args--; - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "distutils_dir_name") < 0)) __PYX_ERR(0, 138, __pyx_L3_error) - } - } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = PyTuple_GET_ITEM(__pyx_args, 0); - } - __pyx_v_dname = values[0]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("distutils_dir_name", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 138, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("bison.bison_.ParserEngine.distutils_dir_name", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5bison_6bison__12ParserEngine_2distutils_dir_name(__pyx_v_dname); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5bison_6bison__12ParserEngine_2distutils_dir_name(PyObject *__pyx_v_dname) { - PyObject *__pyx_v_sysconfig = NULL; - PyObject *__pyx_v_sys = NULL; - PyObject *__pyx_v_f = NULL; - PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations - __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_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_TraceFrameInit(__pyx_codeobj_) - __Pyx_RefNannySetupContext("distutils_dir_name", 0); - __Pyx_TraceCall("distutils_dir_name", __pyx_f[0], 138, 0, __PYX_ERR(0, 138, __pyx_L1_error)); - - /* "src/bison/cython/bison_.pyx":139 - * @staticmethod - * def distutils_dir_name(dname): - * import sysconfig, sys # <<<<<<<<<<<<<< - * """Returns the name of a distutils build directory""" - * f = "{dirname}.{platform}-{version[0]}.{version[1]}" - */ - __Pyx_TraceLine(139,0,__PYX_ERR(0, 139, __pyx_L1_error)) - __pyx_t_1 = __Pyx_Import(__pyx_n_s_sysconfig, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_sysconfig = __pyx_t_1; - __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_sys = __pyx_t_1; - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":141 - * import sysconfig, sys - * """Returns the name of a distutils build directory""" - * f = "{dirname}.{platform}-{version[0]}.{version[1]}" # <<<<<<<<<<<<<< - * return f.format(dirname=dname, - * platform=sysconfig.get_platform(), - */ - __Pyx_TraceLine(141,0,__PYX_ERR(0, 141, __pyx_L1_error)) - __Pyx_INCREF(__pyx_kp_u_dirname_platform_version_0_vers); - __pyx_v_f = __pyx_kp_u_dirname_platform_version_0_vers; - - /* "src/bison/cython/bison_.pyx":142 - * """Returns the name of a distutils build directory""" - * f = "{dirname}.{platform}-{version[0]}.{version[1]}" - * return f.format(dirname=dname, # <<<<<<<<<<<<<< - * platform=sysconfig.get_platform(), - * version=sys.version_info) - */ - __Pyx_TraceLine(142,0,__PYX_ERR(0, 142, __pyx_L1_error)) - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dirname, __pyx_v_dname) < 0) __PYX_ERR(0, 142, __pyx_L1_error) - - /* "src/bison/cython/bison_.pyx":143 - * f = "{dirname}.{platform}-{version[0]}.{version[1]}" - * return f.format(dirname=dname, - * platform=sysconfig.get_platform(), # <<<<<<<<<<<<<< - * version=sys.version_info) - * - */ - __Pyx_TraceLine(143,0,__PYX_ERR(0, 143, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sysconfig, __pyx_n_s_get_platform); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 143, __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_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, 143, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_platform, __pyx_t_3) < 0) __PYX_ERR(0, 142, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "src/bison/cython/bison_.pyx":144 - * return f.format(dirname=dname, - * platform=sysconfig.get_platform(), - * version=sys.version_info) # <<<<<<<<<<<<<< - * - * def reset(self): - */ - __Pyx_TraceLine(144,0,__PYX_ERR(0, 144, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_sys, __pyx_n_s_version_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_version, __pyx_t_3) < 0) __PYX_ERR(0, 142, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "src/bison/cython/bison_.pyx":142 - * """Returns the name of a distutils build directory""" - * f = "{dirname}.{platform}-{version[0]}.{version[1]}" - * return f.format(dirname=dname, # <<<<<<<<<<<<<< - * platform=sysconfig.get_platform(), - * version=sys.version_info) - */ - __Pyx_TraceLine(142,0,__PYX_ERR(0, 142, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 142, __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_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; - - /* "src/bison/cython/bison_.pyx":138 - * - * @staticmethod - * def distutils_dir_name(dname): # <<<<<<<<<<<<<< - * import sysconfig, sys - * """Returns the name of a distutils build directory""" - */ - - /* 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_AddTraceback("bison.bison_.ParserEngine.distutils_dir_name", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_sysconfig); - __Pyx_XDECREF(__pyx_v_sys); - __Pyx_XDECREF(__pyx_v_f); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "src/bison/cython/bison_.pyx":146 - * version=sys.version_info) - * - * def reset(self): # <<<<<<<<<<<<<< - * """ - * Reset Flex's buffer and state. - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5bison_6bison__12ParserEngine_5reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_5bison_6bison__12ParserEngine_4reset[] = "\n Reset Flex's buffer and state.\n "; -static PyObject *__pyx_pw_5bison_6bison__12ParserEngine_5reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("reset (wrapper)", 0); - __pyx_r = __pyx_pf_5bison_6bison__12ParserEngine_4reset(((struct __pyx_obj_5bison_6bison__ParserEngine *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5bison_6bison__12ParserEngine_4reset(CYTHON_UNUSED struct __pyx_obj_5bison_6bison__ParserEngine *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("reset", 0); - __Pyx_TraceCall("reset", __pyx_f[0], 146, 0, __PYX_ERR(0, 146, __pyx_L1_error)); - - /* "src/bison/cython/bison_.pyx":150 - * Reset Flex's buffer and state. - * """ - * bisondynlib_reset() # <<<<<<<<<<<<<< - * - * def openCurrentLib(self): - */ - __Pyx_TraceLine(150,0,__PYX_ERR(0, 150, __pyx_L1_error)) - bisondynlib_reset(); - - /* "src/bison/cython/bison_.pyx":146 - * version=sys.version_info) - * - * def reset(self): # <<<<<<<<<<<<<< - * """ - * Reset Flex's buffer and state. - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("bison.bison_.ParserEngine.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "src/bison/cython/bison_.pyx":152 - * bisondynlib_reset() - * - * def openCurrentLib(self): # <<<<<<<<<<<<<< - * """ - * Tests if library exists and is current. If not, builds a fresh one. - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5bison_6bison__12ParserEngine_7openCurrentLib(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_5bison_6bison__12ParserEngine_6openCurrentLib[] = "\n Tests if library exists and is current. If not, builds a fresh one.\n\n Opens the library and imports the parser entry point.\n "; -static PyObject *__pyx_pw_5bison_6bison__12ParserEngine_7openCurrentLib(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("openCurrentLib (wrapper)", 0); - __pyx_r = __pyx_pf_5bison_6bison__12ParserEngine_6openCurrentLib(((struct __pyx_obj_5bison_6bison__ParserEngine *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5bison_6bison__12ParserEngine_6openCurrentLib(struct __pyx_obj_5bison_6bison__ParserEngine *__pyx_v_self) { - PyObject *__pyx_v_parser = NULL; - PyObject *__pyx_v_verbose = NULL; - PyObject *__pyx_v_filenames = NULL; - PyObject *__pyx_v_libHash = NULL; - PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations - __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; - int __pyx_t_7; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("openCurrentLib", 0); - __Pyx_TraceCall("openCurrentLib", __pyx_f[0], 152, 0, __PYX_ERR(0, 152, __pyx_L1_error)); - - /* "src/bison/cython/bison_.pyx":158 - * Opens the library and imports the parser entry point. - * """ - * parser = self.parser # <<<<<<<<<<<<<< - * verbose = parser.verbose - * - */ - __Pyx_TraceLine(158,0,__PYX_ERR(0, 158, __pyx_L1_error)) - __pyx_t_1 = __pyx_v_self->parser; - __Pyx_INCREF(__pyx_t_1); - __pyx_v_parser = __pyx_t_1; - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":159 - * """ - * parser = self.parser - * verbose = parser.verbose # <<<<<<<<<<<<<< - * - * if verbose: - */ - __Pyx_TraceLine(159,0,__PYX_ERR(0, 159, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_verbose); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_verbose = __pyx_t_1; - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":161 - * verbose = parser.verbose - * - * if verbose: # <<<<<<<<<<<<<< - * distutils.log.set_verbosity(1) - * - */ - __Pyx_TraceLine(161,0,__PYX_ERR(0, 161, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 161, __pyx_L1_error) - if (__pyx_t_2) { - - /* "src/bison/cython/bison_.pyx":162 - * - * if verbose: - * distutils.log.set_verbosity(1) # <<<<<<<<<<<<<< - * - * # search for a shared object - */ - __Pyx_TraceLine(162,0,__PYX_ERR(0, 162, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_distutils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 162, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 162, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_set_verbosity); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 162, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __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_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_int_1) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_1); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 162, __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; - - /* "src/bison/cython/bison_.pyx":161 - * verbose = parser.verbose - * - * if verbose: # <<<<<<<<<<<<<< - * distutils.log.set_verbosity(1) - * - */ - } - - /* "src/bison/cython/bison_.pyx":165 - * - * # search for a shared object - * filenames = self.possible_so(parser.buildDirectory) # <<<<<<<<<<<<<< - * - * self.libFilename_py = "" - */ - __Pyx_TraceLine(165,0,__PYX_ERR(0, 165, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_possible_so); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_buildDirectory); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __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_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_filenames = __pyx_t_1; - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":167 - * filenames = self.possible_so(parser.buildDirectory) - * - * self.libFilename_py = "" # <<<<<<<<<<<<<< - * if len(filenames) == 1: - * self.libFilename_py = filenames[0] - */ - __Pyx_TraceLine(167,0,__PYX_ERR(0, 167, __pyx_L1_error)) - __Pyx_INCREF(__pyx_kp_u__2); - __Pyx_GIVEREF(__pyx_kp_u__2); - __Pyx_GOTREF(__pyx_v_self->libFilename_py); - __Pyx_DECREF(__pyx_v_self->libFilename_py); - __pyx_v_self->libFilename_py = __pyx_kp_u__2; - - /* "src/bison/cython/bison_.pyx":168 - * - * self.libFilename_py = "" - * if len(filenames) == 1: # <<<<<<<<<<<<<< - * self.libFilename_py = filenames[0] - * - */ - __Pyx_TraceLine(168,0,__PYX_ERR(0, 168, __pyx_L1_error)) - __pyx_t_6 = PyObject_Length(__pyx_v_filenames); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 168, __pyx_L1_error) - __pyx_t_2 = ((__pyx_t_6 == 1) != 0); - if (__pyx_t_2) { - - /* "src/bison/cython/bison_.pyx":169 - * self.libFilename_py = "" - * if len(filenames) == 1: - * self.libFilename_py = filenames[0] # <<<<<<<<<<<<<< - * - * if not os.path.isfile(self.libFilename_py): - */ - __Pyx_TraceLine(169,0,__PYX_ERR(0, 169, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_filenames, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v_self->libFilename_py); - __Pyx_DECREF(__pyx_v_self->libFilename_py); - __pyx_v_self->libFilename_py = __pyx_t_1; - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":168 - * - * self.libFilename_py = "" - * if len(filenames) == 1: # <<<<<<<<<<<<<< - * self.libFilename_py = filenames[0] - * - */ - } - - /* "src/bison/cython/bison_.pyx":171 - * self.libFilename_py = filenames[0] - * - * if not os.path.isfile(self.libFilename_py): # <<<<<<<<<<<<<< - * self.buildLib() - * # search for a shared object - */ - __Pyx_TraceLine(171,0,__PYX_ERR(0, 171, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_isfile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __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_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_self->libFilename_py) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_self->libFilename_py); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 171, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = ((!__pyx_t_2) != 0); - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":172 - * - * if not os.path.isfile(self.libFilename_py): - * self.buildLib() # <<<<<<<<<<<<<< - * # search for a shared object - * filenames = self.possible_so(parser.buildDirectory) - */ - __Pyx_TraceLine(172,0,__PYX_ERR(0, 172, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_buildLib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 172, __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, 172, __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; - - /* "src/bison/cython/bison_.pyx":174 - * self.buildLib() - * # search for a shared object - * filenames = self.possible_so(parser.buildDirectory) # <<<<<<<<<<<<<< - * - * self.libFilename_py = "" - */ - __Pyx_TraceLine(174,0,__PYX_ERR(0, 174, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_possible_so); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 174, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_buildDirectory); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 174, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __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_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF_SET(__pyx_v_filenames, __pyx_t_1); - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":176 - * filenames = self.possible_so(parser.buildDirectory) - * - * self.libFilename_py = "" # <<<<<<<<<<<<<< - * if len(filenames) == 1: - * self.libFilename_py = filenames[0] - */ - __Pyx_TraceLine(176,0,__PYX_ERR(0, 176, __pyx_L1_error)) - __Pyx_INCREF(__pyx_kp_u__2); - __Pyx_GIVEREF(__pyx_kp_u__2); - __Pyx_GOTREF(__pyx_v_self->libFilename_py); - __Pyx_DECREF(__pyx_v_self->libFilename_py); - __pyx_v_self->libFilename_py = __pyx_kp_u__2; - - /* "src/bison/cython/bison_.pyx":177 - * - * self.libFilename_py = "" - * if len(filenames) == 1: # <<<<<<<<<<<<<< - * self.libFilename_py = filenames[0] - * - */ - __Pyx_TraceLine(177,0,__PYX_ERR(0, 177, __pyx_L1_error)) - __pyx_t_6 = PyObject_Length(__pyx_v_filenames); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 177, __pyx_L1_error) - __pyx_t_7 = ((__pyx_t_6 == 1) != 0); - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":178 - * self.libFilename_py = "" - * if len(filenames) == 1: - * self.libFilename_py = filenames[0] # <<<<<<<<<<<<<< - * - * self.openLib() - */ - __Pyx_TraceLine(178,0,__PYX_ERR(0, 178, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_filenames, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v_self->libFilename_py); - __Pyx_DECREF(__pyx_v_self->libFilename_py); - __pyx_v_self->libFilename_py = __pyx_t_1; - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":177 - * - * self.libFilename_py = "" - * if len(filenames) == 1: # <<<<<<<<<<<<<< - * self.libFilename_py = filenames[0] - * - */ - } - - /* "src/bison/cython/bison_.pyx":171 - * self.libFilename_py = filenames[0] - * - * if not os.path.isfile(self.libFilename_py): # <<<<<<<<<<<<<< - * self.buildLib() - * # search for a shared object - */ - } - - /* "src/bison/cython/bison_.pyx":180 - * self.libFilename_py = filenames[0] - * - * self.openLib() # <<<<<<<<<<<<<< - * - * # hash parser spec, compare to hash val stored in lib - */ - __Pyx_TraceLine(180,0,__PYX_ERR(0, 180, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_openLib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 180, __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, 180, __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; - - /* "src/bison/cython/bison_.pyx":184 - * # hash parser spec, compare to hash val stored in lib - * IF PY3: - * libHash = PyUnicode_FromString(self.libHash) # <<<<<<<<<<<<<< - * ELSE: - * libHash = PyString_FromString(self.libHash) - */ - __Pyx_TraceLine(184,0,__PYX_ERR(0, 184, __pyx_L1_error)) - __pyx_t_1 = PyUnicode_FromString(__pyx_v_self->libHash); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_libHash = __pyx_t_1; - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":188 - * libHash = PyString_FromString(self.libHash) - * - * if self.parserHash != libHash: # <<<<<<<<<<<<<< - * if verbose: - * print("Hash discrepancy, need to rebuild bison lib") - */ - __Pyx_TraceLine(188,0,__PYX_ERR(0, 188, __pyx_L1_error)) - __pyx_t_1 = PyObject_RichCompare(__pyx_v_self->parserHash, __pyx_v_libHash, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error) - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 188, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":189 - * - * if self.parserHash != libHash: - * if verbose: # <<<<<<<<<<<<<< - * print("Hash discrepancy, need to rebuild bison lib") - * print(" current parser class: %s" % self.parserHash) - */ - __Pyx_TraceLine(189,0,__PYX_ERR(0, 189, __pyx_L1_error)) - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 189, __pyx_L1_error) - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":190 - * if self.parserHash != libHash: - * if verbose: - * print("Hash discrepancy, need to rebuild bison lib") # <<<<<<<<<<<<<< - * print(" current parser class: %s" % self.parserHash) - * print(" bison library: %s" % libHash) - */ - __Pyx_TraceLine(190,0,__PYX_ERR(0, 190, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":191 - * if verbose: - * print("Hash discrepancy, need to rebuild bison lib") - * print(" current parser class: %s" % self.parserHash) # <<<<<<<<<<<<<< - * print(" bison library: %s" % libHash) - * self.closeLib() - */ - __Pyx_TraceLine(191,0,__PYX_ERR(0, 191, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_current_parser_class_s, __pyx_v_self->parserHash); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 191, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "src/bison/cython/bison_.pyx":192 - * print("Hash discrepancy, need to rebuild bison lib") - * print(" current parser class: %s" % self.parserHash) - * print(" bison library: %s" % libHash) # <<<<<<<<<<<<<< - * self.closeLib() - * self.buildLib() - */ - __Pyx_TraceLine(192,0,__PYX_ERR(0, 192, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_bison_library_s, __pyx_v_libHash); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __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; - - /* "src/bison/cython/bison_.pyx":189 - * - * if self.parserHash != libHash: - * if verbose: # <<<<<<<<<<<<<< - * print("Hash discrepancy, need to rebuild bison lib") - * print(" current parser class: %s" % self.parserHash) - */ - } - - /* "src/bison/cython/bison_.pyx":193 - * print(" current parser class: %s" % self.parserHash) - * print(" bison library: %s" % libHash) - * self.closeLib() # <<<<<<<<<<<<<< - * self.buildLib() - * self.openLib() - */ - __Pyx_TraceLine(193,0,__PYX_ERR(0, 193, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_closeLib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 193, __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, 193, __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; - - /* "src/bison/cython/bison_.pyx":194 - * print(" bison library: %s" % libHash) - * self.closeLib() - * self.buildLib() # <<<<<<<<<<<<<< - * self.openLib() - * else: - */ - __Pyx_TraceLine(194,0,__PYX_ERR(0, 194, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_buildLib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 194, __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, 194, __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; - - /* "src/bison/cython/bison_.pyx":195 - * self.closeLib() - * self.buildLib() - * self.openLib() # <<<<<<<<<<<<<< - * else: - * if verbose: - */ - __Pyx_TraceLine(195,0,__PYX_ERR(0, 195, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_openLib); 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_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, 195, __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; - - /* "src/bison/cython/bison_.pyx":188 - * libHash = PyString_FromString(self.libHash) - * - * if self.parserHash != libHash: # <<<<<<<<<<<<<< - * if verbose: - * print("Hash discrepancy, need to rebuild bison lib") - */ - goto __pyx_L7; - } - - /* "src/bison/cython/bison_.pyx":197 - * self.openLib() - * else: - * if verbose: # <<<<<<<<<<<<<< - * print("Hashes match, no need to rebuild bison engine lib") - * - */ - __Pyx_TraceLine(197,0,__PYX_ERR(0, 197, __pyx_L1_error)) - /*else*/ { - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 197, __pyx_L1_error) - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":198 - * else: - * if verbose: - * print("Hashes match, no need to rebuild bison engine lib") # <<<<<<<<<<<<<< - * - * def possible_so(self, so_dir): - */ - __Pyx_TraceLine(198,0,__PYX_ERR(0, 198, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 198, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":197 - * self.openLib() - * else: - * if verbose: # <<<<<<<<<<<<<< - * print("Hashes match, no need to rebuild bison engine lib") - * - */ - } - } - __pyx_L7:; - - /* "src/bison/cython/bison_.pyx":152 - * bisondynlib_reset() - * - * def openCurrentLib(self): # <<<<<<<<<<<<<< - * """ - * Tests if library exists and is current. If not, builds a fresh one. - */ - - /* 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_5); - __Pyx_AddTraceback("bison.bison_.ParserEngine.openCurrentLib", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_parser); - __Pyx_XDECREF(__pyx_v_verbose); - __Pyx_XDECREF(__pyx_v_filenames); - __Pyx_XDECREF(__pyx_v_libHash); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "src/bison/cython/bison_.pyx":200 - * print("Hashes match, no need to rebuild bison engine lib") - * - * def possible_so(self, so_dir): # <<<<<<<<<<<<<< - * import fnmatch - * regex_str = '*' + self.parser.bisonEngineLibName + machinery.EXTENSION_SUFFIXES[0] - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5bison_6bison__12ParserEngine_9possible_so(PyObject *__pyx_v_self, PyObject *__pyx_v_so_dir); /*proto*/ -static PyObject *__pyx_pw_5bison_6bison__12ParserEngine_9possible_so(PyObject *__pyx_v_self, PyObject *__pyx_v_so_dir) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("possible_so (wrapper)", 0); - __pyx_r = __pyx_pf_5bison_6bison__12ParserEngine_8possible_so(((struct __pyx_obj_5bison_6bison__ParserEngine *)__pyx_v_self), ((PyObject *)__pyx_v_so_dir)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5bison_6bison__12ParserEngine_8possible_so(struct __pyx_obj_5bison_6bison__ParserEngine *__pyx_v_self, PyObject *__pyx_v_so_dir) { - PyObject *__pyx_v_fnmatch = NULL; - PyObject *__pyx_v_regex_str = NULL; - PyObject *__pyx_7genexpr__pyx_v_dirpath = NULL; - CYTHON_UNUSED PyObject *__pyx_7genexpr__pyx_v_dirnames = NULL; - PyObject *__pyx_7genexpr__pyx_v_files = NULL; - PyObject *__pyx_7genexpr__pyx_v_f = NULL; - PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - Py_ssize_t __pyx_t_5; - PyObject *(*__pyx_t_6)(PyObject *); - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; - PyObject *(*__pyx_t_10)(PyObject *); - int __pyx_t_11; - Py_ssize_t __pyx_t_12; - PyObject *(*__pyx_t_13)(PyObject *); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("possible_so", 0); - __Pyx_TraceCall("possible_so", __pyx_f[0], 200, 0, __PYX_ERR(0, 200, __pyx_L1_error)); - - /* "src/bison/cython/bison_.pyx":201 - * - * def possible_so(self, so_dir): - * import fnmatch # <<<<<<<<<<<<<< - * regex_str = '*' + self.parser.bisonEngineLibName + machinery.EXTENSION_SUFFIXES[0] - * return [ - */ - __Pyx_TraceLine(201,0,__PYX_ERR(0, 201, __pyx_L1_error)) - __pyx_t_1 = __Pyx_Import(__pyx_n_s_fnmatch, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_fnmatch = __pyx_t_1; - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":202 - * def possible_so(self, so_dir): - * import fnmatch - * regex_str = '*' + self.parser.bisonEngineLibName + machinery.EXTENSION_SUFFIXES[0] # <<<<<<<<<<<<<< - * return [ - * os.path.join(dirpath, f) - */ - __Pyx_TraceLine(202,0,__PYX_ERR(0, 202, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->parser, __pyx_n_s_bisonEngineLibName); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyNumber_Add(__pyx_kp_u__5, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 202, __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_machinery); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_EXTENSION_SUFFIXES); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 202, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 202, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_regex_str = __pyx_t_3; - __pyx_t_3 = 0; - - /* "src/bison/cython/bison_.pyx":203 - * import fnmatch - * regex_str = '*' + self.parser.bisonEngineLibName + machinery.EXTENSION_SUFFIXES[0] - * return [ # <<<<<<<<<<<<<< - * os.path.join(dirpath, f) - * for dirpath, dirnames, files in os.walk(so_dir) - */ - __Pyx_TraceLine(203,0,__PYX_ERR(0, 203, __pyx_L1_error)) - __Pyx_XDECREF(__pyx_r); - { /* enter inner scope */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 203, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_3); - - /* "src/bison/cython/bison_.pyx":205 - * return [ - * os.path.join(dirpath, f) - * for dirpath, dirnames, files in os.walk(so_dir) # <<<<<<<<<<<<<< - * for f in fnmatch.filter(files, regex_str) - * ] - */ - __Pyx_TraceLine(205,0,__PYX_ERR(0, 205, __pyx_L5_error)) - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_walk); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 205, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_2)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_2); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - } - } - __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_v_so_dir) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_so_dir); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { - __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; - __pyx_t_6 = NULL; - } else { - __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 205, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 205, __pyx_L5_error) - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - for (;;) { - if (likely(!__pyx_t_6)) { - if (likely(PyList_CheckExact(__pyx_t_4))) { - if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 205, __pyx_L5_error) - #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_1); - #endif - } else { - if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 205, __pyx_L5_error) - #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_1); - #endif - } - } else { - __pyx_t_1 = __pyx_t_6(__pyx_t_4); - 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, 205, __pyx_L5_error) - } - break; - } - __Pyx_GOTREF(__pyx_t_1); - } - 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 != 3)) { - if (size > 3) __Pyx_RaiseTooManyValuesError(3); - else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 205, __pyx_L5_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_7 = PyTuple_GET_ITEM(sequence, 1); - __pyx_t_8 = PyTuple_GET_ITEM(sequence, 2); - } else { - __pyx_t_2 = PyList_GET_ITEM(sequence, 0); - __pyx_t_7 = PyList_GET_ITEM(sequence, 1); - __pyx_t_8 = PyList_GET_ITEM(sequence, 2); - } - __Pyx_INCREF(__pyx_t_2); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(__pyx_t_8); - #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 205, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 205, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_8); - #endif - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } else { - Py_ssize_t index = -1; - __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 205, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext; - index = 0; __pyx_t_2 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_2)) goto __pyx_L8_unpacking_failed; - __Pyx_GOTREF(__pyx_t_2); - index = 1; __pyx_t_7 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L8_unpacking_failed; - __Pyx_GOTREF(__pyx_t_7); - index = 2; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L8_unpacking_failed; - __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 3) < 0) __PYX_ERR(0, 205, __pyx_L5_error) - __pyx_t_10 = NULL; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - goto __pyx_L9_unpacking_done; - __pyx_L8_unpacking_failed:; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_10 = NULL; - if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 205, __pyx_L5_error) - __pyx_L9_unpacking_done:; - } - __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_dirpath, __pyx_t_2); - __pyx_t_2 = 0; - __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_dirnames, __pyx_t_7); - __pyx_t_7 = 0; - __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_files, __pyx_t_8); - __pyx_t_8 = 0; - - /* "src/bison/cython/bison_.pyx":206 - * os.path.join(dirpath, f) - * for dirpath, dirnames, files in os.walk(so_dir) - * for f in fnmatch.filter(files, regex_str) # <<<<<<<<<<<<<< - * ] - * - */ - __Pyx_TraceLine(206,0,__PYX_ERR(0, 206, __pyx_L5_error)) - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_fnmatch, __pyx_n_s_filter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 206, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_8); - __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_7genexpr__pyx_v_files, __pyx_v_regex_str}; - __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, 206, __pyx_L5_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_8)) { - PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_7genexpr__pyx_v_files, __pyx_v_regex_str}; - __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, 206, __pyx_L5_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_2 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 206, __pyx_L5_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_7genexpr__pyx_v_files); - __Pyx_GIVEREF(__pyx_7genexpr__pyx_v_files); - PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_11, __pyx_7genexpr__pyx_v_files); - __Pyx_INCREF(__pyx_v_regex_str); - __Pyx_GIVEREF(__pyx_v_regex_str); - PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_11, __pyx_v_regex_str); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { - __pyx_t_8 = __pyx_t_1; __Pyx_INCREF(__pyx_t_8); __pyx_t_12 = 0; - __pyx_t_13 = NULL; - } else { - __pyx_t_12 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 206, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_13 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 206, __pyx_L5_error) - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - for (;;) { - if (likely(!__pyx_t_13)) { - if (likely(PyList_CheckExact(__pyx_t_8))) { - if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_8)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_12); __Pyx_INCREF(__pyx_t_1); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 206, __pyx_L5_error) - #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_1); - #endif - } else { - if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_8)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_12); __Pyx_INCREF(__pyx_t_1); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 206, __pyx_L5_error) - #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_1); - #endif - } - } else { - __pyx_t_1 = __pyx_t_13(__pyx_t_8); - 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, 206, __pyx_L5_error) - } - break; - } - __Pyx_GOTREF(__pyx_t_1); - } - __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_f, __pyx_t_1); - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":204 - * regex_str = '*' + self.parser.bisonEngineLibName + machinery.EXTENSION_SUFFIXES[0] - * return [ - * os.path.join(dirpath, f) # <<<<<<<<<<<<<< - * for dirpath, dirnames, files in os.walk(so_dir) - * for f in fnmatch.filter(files, regex_str) - */ - __Pyx_TraceLine(204,0,__PYX_ERR(0, 204, __pyx_L5_error)) - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 204, __pyx_L5_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_join); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L5_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_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_7genexpr__pyx_v_dirpath, __pyx_7genexpr__pyx_v_f}; - __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, 204, __pyx_L5_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_2)) { - PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_7genexpr__pyx_v_dirpath, __pyx_7genexpr__pyx_v_f}; - __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, 204, __pyx_L5_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_9 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 204, __pyx_L5_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_INCREF(__pyx_7genexpr__pyx_v_dirpath); - __Pyx_GIVEREF(__pyx_7genexpr__pyx_v_dirpath); - PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_11, __pyx_7genexpr__pyx_v_dirpath); - __Pyx_INCREF(__pyx_7genexpr__pyx_v_f); - __Pyx_GIVEREF(__pyx_7genexpr__pyx_v_f); - PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_11, __pyx_7genexpr__pyx_v_f); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 204, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 203, __pyx_L5_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":206 - * os.path.join(dirpath, f) - * for dirpath, dirnames, files in os.walk(so_dir) - * for f in fnmatch.filter(files, regex_str) # <<<<<<<<<<<<<< - * ] - * - */ - __Pyx_TraceLine(206,0,__PYX_ERR(0, 206, __pyx_L5_error)) - } - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - - /* "src/bison/cython/bison_.pyx":205 - * return [ - * os.path.join(dirpath, f) - * for dirpath, dirnames, files in os.walk(so_dir) # <<<<<<<<<<<<<< - * for f in fnmatch.filter(files, regex_str) - * ] - */ - __Pyx_TraceLine(205,0,__PYX_ERR(0, 205, __pyx_L5_error)) - } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF(__pyx_7genexpr__pyx_v_dirnames); __pyx_7genexpr__pyx_v_dirnames = 0; - __Pyx_XDECREF(__pyx_7genexpr__pyx_v_dirpath); __pyx_7genexpr__pyx_v_dirpath = 0; - __Pyx_XDECREF(__pyx_7genexpr__pyx_v_f); __pyx_7genexpr__pyx_v_f = 0; - __Pyx_XDECREF(__pyx_7genexpr__pyx_v_files); __pyx_7genexpr__pyx_v_files = 0; - goto __pyx_L12_exit_scope; - __pyx_L5_error:; - __Pyx_XDECREF(__pyx_7genexpr__pyx_v_dirnames); __pyx_7genexpr__pyx_v_dirnames = 0; - __Pyx_XDECREF(__pyx_7genexpr__pyx_v_dirpath); __pyx_7genexpr__pyx_v_dirpath = 0; - __Pyx_XDECREF(__pyx_7genexpr__pyx_v_f); __pyx_7genexpr__pyx_v_f = 0; - __Pyx_XDECREF(__pyx_7genexpr__pyx_v_files); __pyx_7genexpr__pyx_v_files = 0; - goto __pyx_L1_error; - __pyx_L12_exit_scope:; - } /* exit inner scope */ - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; - - /* "src/bison/cython/bison_.pyx":200 - * print("Hashes match, no need to rebuild bison engine lib") - * - * def possible_so(self, so_dir): # <<<<<<<<<<<<<< - * import fnmatch - * regex_str = '*' + self.parser.bisonEngineLibName + machinery.EXTENSION_SUFFIXES[0] - */ - - /* 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_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); - __Pyx_AddTraceback("bison.bison_.ParserEngine.possible_so", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_fnmatch); - __Pyx_XDECREF(__pyx_v_regex_str); - __Pyx_XDECREF(__pyx_7genexpr__pyx_v_dirpath); - __Pyx_XDECREF(__pyx_7genexpr__pyx_v_dirnames); - __Pyx_XDECREF(__pyx_7genexpr__pyx_v_files); - __Pyx_XDECREF(__pyx_7genexpr__pyx_v_f); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "src/bison/cython/bison_.pyx":209 - * ] - * - * def openLib(self): # <<<<<<<<<<<<<< - * """ - * Loads the parser engine's dynamic library, and extracts the following - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5bison_6bison__12ParserEngine_11openLib(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_5bison_6bison__12ParserEngine_10openLib[] = "\n Loads the parser engine's dynamic library, and extracts the following\n symbols:\n\n - void *do_parse() (runs parser)\n - char *parserHash (contains hash of python parser rules)\n\n Returns lib handle, plus pointer to do_parse() function, as long ints\n (which later need to be cast to pointers)\n\n Important note -this is totally linux-specific.\n If you want windows support, you'll have to modify these funcs to\n use glib instead (or create windows equivalents), in which case I'd\n greatly appreciate you sending me a patch.\n "; -static PyObject *__pyx_pw_5bison_6bison__12ParserEngine_11openLib(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("openLib (wrapper)", 0); - __pyx_r = __pyx_pf_5bison_6bison__12ParserEngine_10openLib(((struct __pyx_obj_5bison_6bison__ParserEngine *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5bison_6bison__12ParserEngine_10openLib(struct __pyx_obj_5bison_6bison__ParserEngine *__pyx_v_self) { - char *__pyx_v_libFilename; - char *__pyx_v_err; - void *__pyx_v_handle; - PyObject *__pyx_v_filename_bytes = NULL; - PyObject *__pyx_v_parser = NULL; - PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations - __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_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("openLib", 0); - __Pyx_TraceCall("openLib", __pyx_f[0], 209, 0, __PYX_ERR(0, 209, __pyx_L1_error)); - - /* "src/bison/cython/bison_.pyx":230 - * - * # convert python filename string to c string - * filename_bytes = self.libFilename_py.encode("ascii") # <<<<<<<<<<<<<< - * # `filename_bytes` has to be its own variable - * # or it gets gc'ed before libFilename is used - */ - __Pyx_TraceLine(230,0,__PYX_ERR(0, 230, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->libFilename_py, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 230, __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_n_u_ascii) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_ascii); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_v_filename_bytes = __pyx_t_1; - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":234 - * # or it gets gc'ed before libFilename is used - * IF PY3: - * libFilename = PyBytes_AsString(filename_bytes) # <<<<<<<<<<<<<< - * ELSE: - * libFilename = PyString_AsString(filename_bytes) - */ - __Pyx_TraceLine(234,0,__PYX_ERR(0, 234, __pyx_L1_error)) - __pyx_v_libFilename = PyBytes_AsString(__pyx_v_filename_bytes); - - /* "src/bison/cython/bison_.pyx":238 - * libFilename = PyString_AsString(filename_bytes) - * - * parser = self.parser # <<<<<<<<<<<<<< - * - * if parser.verbose: - */ - __Pyx_TraceLine(238,0,__PYX_ERR(0, 238, __pyx_L1_error)) - __pyx_t_1 = __pyx_v_self->parser; - __Pyx_INCREF(__pyx_t_1); - __pyx_v_parser = __pyx_t_1; - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":240 - * parser = self.parser - * - * if parser.verbose: # <<<<<<<<<<<<<< - * print("Opening library {}".format(self.libFilename_py)) - * - */ - __Pyx_TraceLine(240,0,__PYX_ERR(0, 240, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_verbose); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __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, 240, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_4) { - - /* "src/bison/cython/bison_.pyx":241 - * - * if parser.verbose: - * print("Opening library {}".format(self.libFilename_py)) # <<<<<<<<<<<<<< - * - * handle = bisondynlib_open(libFilename) - */ - __Pyx_TraceLine(241,0,__PYX_ERR(0, 241, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Opening_library, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 241, __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_self->libFilename_py) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self->libFilename_py); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 241, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "src/bison/cython/bison_.pyx":240 - * parser = self.parser - * - * if parser.verbose: # <<<<<<<<<<<<<< - * print("Opening library {}".format(self.libFilename_py)) - * - */ - } - - /* "src/bison/cython/bison_.pyx":243 - * print("Opening library {}".format(self.libFilename_py)) - * - * handle = bisondynlib_open(libFilename) # <<<<<<<<<<<<<< - * if handle == NULL: - * raise Exception('library loading failed!') - */ - __Pyx_TraceLine(243,0,__PYX_ERR(0, 243, __pyx_L1_error)) - __pyx_v_handle = bisondynlib_open(__pyx_v_libFilename); - - /* "src/bison/cython/bison_.pyx":244 - * - * handle = bisondynlib_open(libFilename) - * if handle == NULL: # <<<<<<<<<<<<<< - * raise Exception('library loading failed!') - * self.libHandle = handle - */ - __Pyx_TraceLine(244,0,__PYX_ERR(0, 244, __pyx_L1_error)) - __pyx_t_4 = ((__pyx_v_handle == NULL) != 0); - if (unlikely(__pyx_t_4)) { - - /* "src/bison/cython/bison_.pyx":245 - * handle = bisondynlib_open(libFilename) - * if handle == NULL: - * raise Exception('library loading failed!') # <<<<<<<<<<<<<< - * self.libHandle = handle - * - */ - __Pyx_TraceLine(245,0,__PYX_ERR(0, 245, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_Raise(__pyx_t_2, 0, 0, 0); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 245, __pyx_L1_error) - - /* "src/bison/cython/bison_.pyx":244 - * - * handle = bisondynlib_open(libFilename) - * if handle == NULL: # <<<<<<<<<<<<<< - * raise Exception('library loading failed!') - * self.libHandle = handle - */ - } - - /* "src/bison/cython/bison_.pyx":246 - * if handle == NULL: - * raise Exception('library loading failed!') - * self.libHandle = handle # <<<<<<<<<<<<<< - * - * err = bisondynlib_err() - */ - __Pyx_TraceLine(246,0,__PYX_ERR(0, 246, __pyx_L1_error)) - __pyx_v_self->libHandle = __pyx_v_handle; - - /* "src/bison/cython/bison_.pyx":248 - * self.libHandle = handle - * - * err = bisondynlib_err() # <<<<<<<<<<<<<< - * if err: - * print('ParserEngine.openLib: error "{}"\n'.format(err)) - */ - __Pyx_TraceLine(248,0,__PYX_ERR(0, 248, __pyx_L1_error)) - __pyx_v_err = bisondynlib_err(); - - /* "src/bison/cython/bison_.pyx":249 - * - * err = bisondynlib_err() - * if err: # <<<<<<<<<<<<<< - * print('ParserEngine.openLib: error "{}"\n'.format(err)) - * return - */ - __Pyx_TraceLine(249,0,__PYX_ERR(0, 249, __pyx_L1_error)) - __pyx_t_4 = (__pyx_v_err != 0); - if (__pyx_t_4) { - - /* "src/bison/cython/bison_.pyx":250 - * err = bisondynlib_err() - * if err: - * print('ParserEngine.openLib: error "{}"\n'.format(err)) # <<<<<<<<<<<<<< - * return - * - */ - __Pyx_TraceLine(250,0,__PYX_ERR(0, 250, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_ParserEngine_openLib_error, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 250, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __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_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 250, __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_print, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":251 - * if err: - * print('ParserEngine.openLib: error "{}"\n'.format(err)) - * return # <<<<<<<<<<<<<< - * - * # extract symbols - */ - __Pyx_TraceLine(251,0,__PYX_ERR(0, 251, __pyx_L1_error)) - __Pyx_XDECREF(__pyx_r); - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - - /* "src/bison/cython/bison_.pyx":249 - * - * err = bisondynlib_err() - * if err: # <<<<<<<<<<<<<< - * print('ParserEngine.openLib: error "{}"\n'.format(err)) - * return - */ - } - - /* "src/bison/cython/bison_.pyx":254 - * - * # extract symbols - * self.libHash = bisondynlib_lookup_hash(handle) # <<<<<<<<<<<<<< - * - * if parser.verbose: - */ - __Pyx_TraceLine(254,0,__PYX_ERR(0, 254, __pyx_L1_error)) - __pyx_v_self->libHash = bisondynlib_lookup_hash(__pyx_v_handle); - - /* "src/bison/cython/bison_.pyx":256 - * self.libHash = bisondynlib_lookup_hash(handle) - * - * if parser.verbose: # <<<<<<<<<<<<<< - * print("Successfully loaded library") - * - */ - __Pyx_TraceLine(256,0,__PYX_ERR(0, 256, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_verbose); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __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, 256, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_4) { - - /* "src/bison/cython/bison_.pyx":257 - * - * if parser.verbose: - * print("Successfully loaded library") # <<<<<<<<<<<<<< - * - * def generate_exception_handler(self): - */ - __Pyx_TraceLine(257,0,__PYX_ERR(0, 257, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 257, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":256 - * self.libHash = bisondynlib_lookup_hash(handle) - * - * if parser.verbose: # <<<<<<<<<<<<<< - * print("Successfully loaded library") - * - */ - } - - /* "src/bison/cython/bison_.pyx":209 - * ] - * - * def openLib(self): # <<<<<<<<<<<<<< - * """ - * Loads the parser engine's dynamic library, and extracts the following - */ - - /* 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("bison.bison_.ParserEngine.openLib", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_filename_bytes); - __Pyx_XDECREF(__pyx_v_parser); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "src/bison/cython/bison_.pyx":259 - * print("Successfully loaded library") - * - * def generate_exception_handler(self): # <<<<<<<<<<<<<< - * s = '' - * s += ' {\n' - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5bison_6bison__12ParserEngine_13generate_exception_handler(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_5bison_6bison__12ParserEngine_13generate_exception_handler(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("generate_exception_handler (wrapper)", 0); - __pyx_r = __pyx_pf_5bison_6bison__12ParserEngine_12generate_exception_handler(((struct __pyx_obj_5bison_6bison__ParserEngine *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5bison_6bison__12ParserEngine_12generate_exception_handler(CYTHON_UNUSED struct __pyx_obj_5bison_6bison__ParserEngine *__pyx_v_self) { - PyObject *__pyx_v_s = NULL; - PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("generate_exception_handler", 0); - __Pyx_TraceCall("generate_exception_handler", __pyx_f[0], 259, 0, __PYX_ERR(0, 259, __pyx_L1_error)); - - /* "src/bison/cython/bison_.pyx":260 - * - * def generate_exception_handler(self): - * s = '' # <<<<<<<<<<<<<< - * s += ' {\n' - * s += ' PyObject* obj = PyErr_Occurred();\n' - */ - __Pyx_TraceLine(260,0,__PYX_ERR(0, 260, __pyx_L1_error)) - __Pyx_INCREF(__pyx_kp_u__2); - __pyx_v_s = __pyx_kp_u__2; - - /* "src/bison/cython/bison_.pyx":261 - * def generate_exception_handler(self): - * s = '' - * s += ' {\n' # <<<<<<<<<<<<<< - * s += ' PyObject* obj = PyErr_Occurred();\n' - * s += ' if (obj) {\n' - */ - __Pyx_TraceLine(261,0,__PYX_ERR(0, 261, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_v_s, __pyx_kp_u__8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 261, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF_SET(__pyx_v_s, ((PyObject*)__pyx_t_1)); - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":262 - * s = '' - * s += ' {\n' - * s += ' PyObject* obj = PyErr_Occurred();\n' # <<<<<<<<<<<<<< - * s += ' if (obj) {\n' - * s += ' //yyerror(&yylloc, "exception raised");\n' - */ - __Pyx_TraceLine(262,0,__PYX_ERR(0, 262, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_v_s, __pyx_kp_u_PyObject_obj_PyErr_Occurred); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF_SET(__pyx_v_s, ((PyObject*)__pyx_t_1)); - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":263 - * s += ' {\n' - * s += ' PyObject* obj = PyErr_Occurred();\n' - * s += ' if (obj) {\n' # <<<<<<<<<<<<<< - * s += ' //yyerror(&yylloc, "exception raised");\n' - * s += ' YYERROR;\n' - */ - __Pyx_TraceLine(263,0,__PYX_ERR(0, 263, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_v_s, __pyx_kp_u_if_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 263, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF_SET(__pyx_v_s, ((PyObject*)__pyx_t_1)); - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":264 - * s += ' PyObject* obj = PyErr_Occurred();\n' - * s += ' if (obj) {\n' - * s += ' //yyerror(&yylloc, "exception raised");\n' # <<<<<<<<<<<<<< - * s += ' YYERROR;\n' - * s += ' }\n' - */ - __Pyx_TraceLine(264,0,__PYX_ERR(0, 264, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_v_s, __pyx_kp_u_yyerror_yylloc_exception_raised); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF_SET(__pyx_v_s, ((PyObject*)__pyx_t_1)); - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":265 - * s += ' if (obj) {\n' - * s += ' //yyerror(&yylloc, "exception raised");\n' - * s += ' YYERROR;\n' # <<<<<<<<<<<<<< - * s += ' }\n' - * s += ' }\n' - */ - __Pyx_TraceLine(265,0,__PYX_ERR(0, 265, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_v_s, __pyx_kp_u_YYERROR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 265, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF_SET(__pyx_v_s, ((PyObject*)__pyx_t_1)); - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":266 - * s += ' //yyerror(&yylloc, "exception raised");\n' - * s += ' YYERROR;\n' - * s += ' }\n' # <<<<<<<<<<<<<< - * s += ' }\n' - * return s - */ - __Pyx_TraceLine(266,0,__PYX_ERR(0, 266, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_v_s, __pyx_kp_u__9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF_SET(__pyx_v_s, ((PyObject*)__pyx_t_1)); - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":267 - * s += ' YYERROR;\n' - * s += ' }\n' - * s += ' }\n' # <<<<<<<<<<<<<< - * return s - * - */ - __Pyx_TraceLine(267,0,__PYX_ERR(0, 267, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_v_s, __pyx_kp_u__10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF_SET(__pyx_v_s, ((PyObject*)__pyx_t_1)); - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":268 - * s += ' }\n' - * s += ' }\n' - * return s # <<<<<<<<<<<<<< - * - * def buildLib(self): - */ - __Pyx_TraceLine(268,0,__PYX_ERR(0, 268, __pyx_L1_error)) - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_s); - __pyx_r = __pyx_v_s; - goto __pyx_L0; - - /* "src/bison/cython/bison_.pyx":259 - * print("Successfully loaded library") - * - * def generate_exception_handler(self): # <<<<<<<<<<<<<< - * s = '' - * s += ' {\n' - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("bison.bison_.ParserEngine.generate_exception_handler", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_s); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "src/bison/cython/bison_.pyx":270 - * return s - * - * def buildLib(self): # <<<<<<<<<<<<<< - * """ - * Creates the parser engine lib - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5bison_6bison__12ParserEngine_15buildLib(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_5bison_6bison__12ParserEngine_14buildLib[] = "\n Creates the parser engine lib\n\n This consists of:\n 1. Ripping the tokens list, precedences, start target, handler docstrings\n and lex script from this Parser instance's attribs and methods\n 2. Creating bison and lex files\n 3. Compiling bison/lex files to C\n 4. Compiling the C files, and link into a dynamic lib\n "; -static PyObject *__pyx_pw_5bison_6bison__12ParserEngine_15buildLib(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("buildLib (wrapper)", 0); - __pyx_r = __pyx_pf_5bison_6bison__12ParserEngine_14buildLib(((struct __pyx_obj_5bison_6bison__ParserEngine *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5bison_6bison__12ParserEngine_14buildLib(struct __pyx_obj_5bison_6bison__ParserEngine *__pyx_v_self) { - PyObject *__pyx_v_parser = NULL; - PyObject *__pyx_v_attribs = NULL; - PyObject *__pyx_v_gHandlers = NULL; - PyObject *__pyx_v_a = NULL; - PyObject *__pyx_v_method = NULL; - PyObject *__pyx_v_gOptions = NULL; - PyObject *__pyx_v_gStart = NULL; - PyObject *__pyx_v_gTokens = NULL; - PyObject *__pyx_v_gPrecedences = NULL; - PyObject *__pyx_v_gLex = NULL; - PyObject *__pyx_v_buildDirectory = NULL; - PyObject *__pyx_v_f = NULL; - PyObject *__pyx_v_write = NULL; - PyObject *__pyx_v_export = NULL; - PyObject *__pyx_v_error_def = NULL; - PyObject *__pyx_v_p = NULL; - PyObject *__pyx_v_rules = NULL; - PyObject *__pyx_v_h = NULL; - PyObject *__pyx_v_doc = NULL; - PyObject *__pyx_v_s = NULL; - PyObject *__pyx_v_target = NULL; - PyObject *__pyx_v_options = NULL; - PyObject *__pyx_v_tmp = NULL; - PyObject *__pyx_v_r = NULL; - PyObject *__pyx_v_opts1 = NULL; - PyObject *__pyx_v_o = NULL; - PyObject *__pyx_v_rule = NULL; - PyObject *__pyx_v_idx = NULL; - PyObject *__pyx_v_option = NULL; - Py_ssize_t __pyx_v_nterms; - PyObject *__pyx_v_action = NULL; - PyObject *__pyx_v_args = NULL; - PyObject *__pyx_v_i = NULL; - PyObject *__pyx_v_epilogue = NULL; - PyObject *__pyx_v_env = NULL; - PyObject *__pyx_v_bisonCmd = NULL; - PyObject *__pyx_v_proc = NULL; - PyObject *__pyx_v_out = NULL; - PyObject *__pyx_v_err = NULL; - PyObject *__pyx_v_flexCmd = NULL; - PyObject *__pyx_v_libFileName = NULL; - PyObject *__pyx_v_objs = NULL; - PyObject *__pyx_v_hitlist = NULL; - PyObject *__pyx_v_name = NULL; - PyObject *__pyx_v_fname = NULL; - PyObject *__pyx_8genexpr1__pyx_v_d = NULL; - PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations - __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; - int __pyx_t_8; - int __pyx_t_9; - Py_ssize_t __pyx_t_10; - Py_UCS4 __pyx_t_11; - PyObject *__pyx_t_12 = NULL; - int __pyx_t_13; - PyObject *__pyx_t_14 = NULL; - PyObject *(*__pyx_t_15)(PyObject *); - PyObject *__pyx_t_16 = NULL; - PyObject *__pyx_t_17 = NULL; - PyObject *__pyx_t_18 = NULL; - Py_ssize_t __pyx_t_19; - PyObject *(*__pyx_t_20)(PyObject *); - Py_ssize_t __pyx_t_21; - PyObject *__pyx_t_22 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("buildLib", 0); - __Pyx_TraceCall("buildLib", __pyx_f[0], 270, 0, __PYX_ERR(0, 270, __pyx_L1_error)); - - /* "src/bison/cython/bison_.pyx":284 - * # ------------------------------------------------- - * # rip the pertinent grammar specs from parser class - * parser = self.parser # <<<<<<<<<<<<<< - * - * # get target handler methods, in the order of appearance in the - */ - __Pyx_TraceLine(284,0,__PYX_ERR(0, 284, __pyx_L1_error)) - __pyx_t_1 = __pyx_v_self->parser; - __Pyx_INCREF(__pyx_t_1); - __pyx_v_parser = __pyx_t_1; - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":288 - * # get target handler methods, in the order of appearance in the - * # source file. - * attribs = dir(parser) # <<<<<<<<<<<<<< - * gHandlers = [] - * - */ - __Pyx_TraceLine(288,0,__PYX_ERR(0, 288, __pyx_L1_error)) - __pyx_t_1 = PyObject_Dir(__pyx_v_parser); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 288, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_attribs = __pyx_t_1; - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":289 - * # source file. - * attribs = dir(parser) - * gHandlers = [] # <<<<<<<<<<<<<< - * - * for a in attribs: - */ - __Pyx_TraceLine(289,0,__PYX_ERR(0, 289, __pyx_L1_error)) - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 289, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_gHandlers = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":291 - * gHandlers = [] - * - * for a in attribs: # <<<<<<<<<<<<<< - * if a.startswith('on_'): - * method = getattr(parser, a) - */ - __Pyx_TraceLine(291,0,__PYX_ERR(0, 291, __pyx_L1_error)) - if (likely(PyList_CheckExact(__pyx_v_attribs)) || PyTuple_CheckExact(__pyx_v_attribs)) { - __pyx_t_1 = __pyx_v_attribs; __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_attribs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __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, 291, __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, 291, __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, 291, __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, 291, __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, 291, __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, 291, __pyx_L1_error) - } - break; - } - __Pyx_GOTREF(__pyx_t_4); - } - __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_4); - __pyx_t_4 = 0; - - /* "src/bison/cython/bison_.pyx":292 - * - * for a in attribs: - * if a.startswith('on_'): # <<<<<<<<<<<<<< - * method = getattr(parser, a) - * gHandlers.append(method) - */ - __Pyx_TraceLine(292,0,__PYX_ERR(0, 292, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_startswith); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 292, __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_n_u_on) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_u_on); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 292, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 292, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":293 - * for a in attribs: - * if a.startswith('on_'): - * method = getattr(parser, a) # <<<<<<<<<<<<<< - * gHandlers.append(method) - * - */ - __Pyx_TraceLine(293,0,__PYX_ERR(0, 293, __pyx_L1_error)) - __pyx_t_4 = __Pyx_GetAttr(__pyx_v_parser, __pyx_v_a); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 293, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_XDECREF_SET(__pyx_v_method, __pyx_t_4); - __pyx_t_4 = 0; - - /* "src/bison/cython/bison_.pyx":294 - * if a.startswith('on_'): - * method = getattr(parser, a) - * gHandlers.append(method) # <<<<<<<<<<<<<< - * - * gHandlers.sort(key=keyLines) - */ - __Pyx_TraceLine(294,0,__PYX_ERR(0, 294, __pyx_L1_error)) - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_gHandlers, __pyx_v_method); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 294, __pyx_L1_error) - - /* "src/bison/cython/bison_.pyx":292 - * - * for a in attribs: - * if a.startswith('on_'): # <<<<<<<<<<<<<< - * method = getattr(parser, a) - * gHandlers.append(method) - */ - } - - /* "src/bison/cython/bison_.pyx":291 - * gHandlers = [] - * - * for a in attribs: # <<<<<<<<<<<<<< - * if a.startswith('on_'): - * method = getattr(parser, a) - */ - __Pyx_TraceLine(291,0,__PYX_ERR(0, 291, __pyx_L1_error)) - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":296 - * gHandlers.append(method) - * - * gHandlers.sort(key=keyLines) # <<<<<<<<<<<<<< - * - * # get start symbol, tokens, precedences, lex script - */ - __Pyx_TraceLine(296,0,__PYX_ERR(0, 296, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_gHandlers, __pyx_n_s_sort); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 296, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_keyLines); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 296, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_key, __pyx_t_5) < 0) __PYX_ERR(0, 296, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 296, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":299 - * - * # get start symbol, tokens, precedences, lex script - * gOptions = parser.options # <<<<<<<<<<<<<< - * gStart = parser.start - * gTokens = parser.tokens - */ - __Pyx_TraceLine(299,0,__PYX_ERR(0, 299, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_options); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 299, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_v_gOptions = __pyx_t_5; - __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":300 - * # get start symbol, tokens, precedences, lex script - * gOptions = parser.options - * gStart = parser.start # <<<<<<<<<<<<<< - * gTokens = parser.tokens - * gPrecedences = parser.precedences - */ - __Pyx_TraceLine(300,0,__PYX_ERR(0, 300, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_start); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 300, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_v_gStart = __pyx_t_5; - __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":301 - * gOptions = parser.options - * gStart = parser.start - * gTokens = parser.tokens # <<<<<<<<<<<<<< - * gPrecedences = parser.precedences - * gLex = parser.lexscript - */ - __Pyx_TraceLine(301,0,__PYX_ERR(0, 301, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_tokens); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 301, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_v_gTokens = __pyx_t_5; - __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":302 - * gStart = parser.start - * gTokens = parser.tokens - * gPrecedences = parser.precedences # <<<<<<<<<<<<<< - * gLex = parser.lexscript - * - */ - __Pyx_TraceLine(302,0,__PYX_ERR(0, 302, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_precedences); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 302, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_v_gPrecedences = __pyx_t_5; - __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":303 - * gTokens = parser.tokens - * gPrecedences = parser.precedences - * gLex = parser.lexscript # <<<<<<<<<<<<<< - * - * buildDirectory = parser.buildDirectory - */ - __Pyx_TraceLine(303,0,__PYX_ERR(0, 303, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_lexscript); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 303, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_v_gLex = __pyx_t_5; - __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":305 - * gLex = parser.lexscript - * - * buildDirectory = parser.buildDirectory # <<<<<<<<<<<<<< - * - * # ------------------------------------------------ - */ - __Pyx_TraceLine(305,0,__PYX_ERR(0, 305, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_buildDirectory); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 305, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_v_buildDirectory = __pyx_t_5; - __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":309 - * # ------------------------------------------------ - * # now, can generate the grammar file - * if os.path.isfile(buildDirectory + parser.bisonFile): # <<<<<<<<<<<<<< - * os.unlink(buildDirectory + parser.bisonFile) - * - */ - __Pyx_TraceLine(309,0,__PYX_ERR(0, 309, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 309, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __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_isfile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 309, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_bisonFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyNumber_Add(__pyx_v_buildDirectory, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 309, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __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_5 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_1, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 309, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 309, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":310 - * # now, can generate the grammar file - * if os.path.isfile(buildDirectory + parser.bisonFile): - * os.unlink(buildDirectory + parser.bisonFile) # <<<<<<<<<<<<<< - * - * if parser.verbose: - */ - __Pyx_TraceLine(310,0,__PYX_ERR(0, 310, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 310, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_unlink); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 310, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_bisonFile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 310, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyNumber_Add(__pyx_v_buildDirectory, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __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_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_4, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 310, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":309 - * # ------------------------------------------------ - * # now, can generate the grammar file - * if os.path.isfile(buildDirectory + parser.bisonFile): # <<<<<<<<<<<<<< - * os.unlink(buildDirectory + parser.bisonFile) - * - */ - } - - /* "src/bison/cython/bison_.pyx":312 - * os.unlink(buildDirectory + parser.bisonFile) - * - * if parser.verbose: # <<<<<<<<<<<<<< - * print("generating bison file: {}".format(buildDirectory + parser.bisonFile)) - * - */ - __Pyx_TraceLine(312,0,__PYX_ERR(0, 312, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_verbose); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 312, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 312, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":313 - * - * if parser.verbose: - * print("generating bison file: {}".format(buildDirectory + parser.bisonFile)) # <<<<<<<<<<<<<< - * - * f = open(buildDirectory + parser.bisonFile, "w") - */ - __Pyx_TraceLine(313,0,__PYX_ERR(0, 313, __pyx_L1_error)) - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_generating_bison_file, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 313, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_bisonFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyNumber_Add(__pyx_v_buildDirectory, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 313, __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_6))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_1); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - } - } - __pyx_t_5 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 313, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 313, __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; - - /* "src/bison/cython/bison_.pyx":312 - * os.unlink(buildDirectory + parser.bisonFile) - * - * if parser.verbose: # <<<<<<<<<<<<<< - * print("generating bison file: {}".format(buildDirectory + parser.bisonFile)) - * - */ - } - - /* "src/bison/cython/bison_.pyx":315 - * print("generating bison file: {}".format(buildDirectory + parser.bisonFile)) - * - * f = open(buildDirectory + parser.bisonFile, "w") # <<<<<<<<<<<<<< - * write = f.write - * #writelines = f.writelines - */ - __Pyx_TraceLine(315,0,__PYX_ERR(0, 315, __pyx_L1_error)) - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_bisonFile); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 315, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = PyNumber_Add(__pyx_v_buildDirectory, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 315, __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, 315, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); - __Pyx_INCREF(__pyx_n_u_w); - __Pyx_GIVEREF(__pyx_n_u_w); - PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_u_w); - __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 315, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_v_f = __pyx_t_5; - __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":316 - * - * f = open(buildDirectory + parser.bisonFile, "w") - * write = f.write # <<<<<<<<<<<<<< - * #writelines = f.writelines - * if sys.platform == "win32": - */ - __Pyx_TraceLine(316,0,__PYX_ERR(0, 316, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 316, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_v_write = __pyx_t_5; - __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":318 - * write = f.write - * #writelines = f.writelines - * if sys.platform == "win32": # <<<<<<<<<<<<<< - * export = "__declspec(dllexport) " - * else: - */ - __Pyx_TraceLine(318,0,__PYX_ERR(0, 318, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_sys); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 318, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_platform); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 318, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_win32, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 318, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":319 - * #writelines = f.writelines - * if sys.platform == "win32": - * export = "__declspec(dllexport) " # <<<<<<<<<<<<<< - * else: - * export = "__attribute__ ((dllexport)) " - */ - __Pyx_TraceLine(319,0,__PYX_ERR(0, 319, __pyx_L1_error)) - __Pyx_INCREF(__pyx_kp_u_declspec_dllexport); - __pyx_v_export = __pyx_kp_u_declspec_dllexport; - - /* "src/bison/cython/bison_.pyx":318 - * write = f.write - * #writelines = f.writelines - * if sys.platform == "win32": # <<<<<<<<<<<<<< - * export = "__declspec(dllexport) " - * else: - */ - goto __pyx_L8; - } - - /* "src/bison/cython/bison_.pyx":321 - * export = "__declspec(dllexport) " - * else: - * export = "__attribute__ ((dllexport)) " # <<<<<<<<<<<<<< - * - * - */ - __Pyx_TraceLine(321,0,__PYX_ERR(0, 321, __pyx_L1_error)) - /*else*/ { - __Pyx_INCREF(__pyx_kp_u_attribute___dllexport); - __pyx_v_export = __pyx_kp_u_attribute___dllexport; - } - __pyx_L8:; - - /* "src/bison/cython/bison_.pyx":325 - * - * # define yyerror for reentrant/nonreentrant parser - * if "%define api.pure full" in gOptions: # <<<<<<<<<<<<<< - * error_def = 'void yyerror(YYLTYPE *locp, yyscan_t scanner, char const *msg);' - * else: - */ - __Pyx_TraceLine(325,0,__PYX_ERR(0, 325, __pyx_L1_error)) - __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u_define_api_pure_full, __pyx_v_gOptions, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 325, __pyx_L1_error) - __pyx_t_9 = (__pyx_t_7 != 0); - if (__pyx_t_9) { - - /* "src/bison/cython/bison_.pyx":326 - * # define yyerror for reentrant/nonreentrant parser - * if "%define api.pure full" in gOptions: - * error_def = 'void yyerror(YYLTYPE *locp, yyscan_t scanner, char const *msg);' # <<<<<<<<<<<<<< - * else: - * error_def = 'int yyerror(char *msg);' - */ - __Pyx_TraceLine(326,0,__PYX_ERR(0, 326, __pyx_L1_error)) - __Pyx_INCREF(__pyx_kp_u_void_yyerror_YYLTYPE_locp_yyscan); - __pyx_v_error_def = __pyx_kp_u_void_yyerror_YYLTYPE_locp_yyscan; - - /* "src/bison/cython/bison_.pyx":325 - * - * # define yyerror for reentrant/nonreentrant parser - * if "%define api.pure full" in gOptions: # <<<<<<<<<<<<<< - * error_def = 'void yyerror(YYLTYPE *locp, yyscan_t scanner, char const *msg);' - * else: - */ - goto __pyx_L9; - } - - /* "src/bison/cython/bison_.pyx":328 - * error_def = 'void yyerror(YYLTYPE *locp, yyscan_t scanner, char const *msg);' - * else: - * error_def = 'int yyerror(char *msg);' # <<<<<<<<<<<<<< - * - * - */ - __Pyx_TraceLine(328,0,__PYX_ERR(0, 328, __pyx_L1_error)) - /*else*/ { - __Pyx_INCREF(__pyx_kp_u_int_yyerror_char_msg); - __pyx_v_error_def = __pyx_kp_u_int_yyerror_char_msg; - } - __pyx_L9:; - - /* "src/bison/cython/bison_.pyx":344 - * 'void (*py_input)(void *, char *, int *, int);', - * 'void *py_parser;', - * export + 'char *rules_hash = "%s";' % self.parserHash, # <<<<<<<<<<<<<< - * '#define YYERROR_VERBOSE 1', - * '', - */ - __Pyx_TraceLine(344,0,__PYX_ERR(0, 344, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_char_rules_hash_s, __pyx_v_self->parserHash); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 344, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_v_export, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 344, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":332 - * - * # grammar file prologue - * write('\n'.join([ # <<<<<<<<<<<<<< - * '%code top {', - * '', - */ - __Pyx_TraceLine(332,0,__PYX_ERR(0, 332, __pyx_L1_error)) - __pyx_t_5 = PyList_New(31); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 332, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_INCREF(__pyx_kp_u_code_top); - __Pyx_GIVEREF(__pyx_kp_u_code_top); - PyList_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_code_top); - __Pyx_INCREF(__pyx_kp_u__2); - __Pyx_GIVEREF(__pyx_kp_u__2); - PyList_SET_ITEM(__pyx_t_5, 1, __pyx_kp_u__2); - __Pyx_INCREF(__pyx_kp_u_include_tmp_tab_h); - __Pyx_GIVEREF(__pyx_kp_u_include_tmp_tab_h); - PyList_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_include_tmp_tab_h); - __Pyx_INCREF(__pyx_kp_u_include_lex_yy_h); - __Pyx_GIVEREF(__pyx_kp_u_include_lex_yy_h); - PyList_SET_ITEM(__pyx_t_5, 3, __pyx_kp_u_include_lex_yy_h); - __Pyx_INCREF(__pyx_kp_u_include_Python_h); - __Pyx_GIVEREF(__pyx_kp_u_include_Python_h); - PyList_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u_include_Python_h); - __Pyx_INCREF(__pyx_kp_u_void_py_callback_void_char_int_i); - __Pyx_GIVEREF(__pyx_kp_u_void_py_callback_void_char_int_i); - PyList_SET_ITEM(__pyx_t_5, 5, __pyx_kp_u_void_py_callback_void_char_int_i); - __Pyx_INCREF(__pyx_kp_u_void_py_input_void_char_int_int); - __Pyx_GIVEREF(__pyx_kp_u_void_py_input_void_char_int_int); - PyList_SET_ITEM(__pyx_t_5, 6, __pyx_kp_u_void_py_input_void_char_int_int); - __Pyx_INCREF(__pyx_kp_u_void_py_parser); - __Pyx_GIVEREF(__pyx_kp_u_void_py_parser); - PyList_SET_ITEM(__pyx_t_5, 7, __pyx_kp_u_void_py_parser); - __Pyx_GIVEREF(__pyx_t_4); - PyList_SET_ITEM(__pyx_t_5, 8, __pyx_t_4); - __Pyx_INCREF(__pyx_kp_u_define_YYERROR_VERBOSE_1); - __Pyx_GIVEREF(__pyx_kp_u_define_YYERROR_VERBOSE_1); - PyList_SET_ITEM(__pyx_t_5, 9, __pyx_kp_u_define_YYERROR_VERBOSE_1); - __Pyx_INCREF(__pyx_kp_u__2); - __Pyx_GIVEREF(__pyx_kp_u__2); - PyList_SET_ITEM(__pyx_t_5, 10, __pyx_kp_u__2); - __Pyx_INCREF(__pyx_kp_u__12); - __Pyx_GIVEREF(__pyx_kp_u__12); - PyList_SET_ITEM(__pyx_t_5, 11, __pyx_kp_u__12); - __Pyx_INCREF(__pyx_kp_u__2); - __Pyx_GIVEREF(__pyx_kp_u__2); - PyList_SET_ITEM(__pyx_t_5, 12, __pyx_kp_u__2); - __Pyx_INCREF(__pyx_kp_u_code_requires); - __Pyx_GIVEREF(__pyx_kp_u_code_requires); - PyList_SET_ITEM(__pyx_t_5, 13, __pyx_kp_u_code_requires); - __Pyx_INCREF(__pyx_kp_u__2); - __Pyx_GIVEREF(__pyx_kp_u__2); - PyList_SET_ITEM(__pyx_t_5, 14, __pyx_kp_u__2); - __Pyx_INCREF(__pyx_kp_u_typedef_void_yyscan_t); - __Pyx_GIVEREF(__pyx_kp_u_typedef_void_yyscan_t); - PyList_SET_ITEM(__pyx_t_5, 15, __pyx_kp_u_typedef_void_yyscan_t); - __Pyx_INCREF(__pyx_kp_u_define_YYLTYPE_YYLTYPE); - __Pyx_GIVEREF(__pyx_kp_u_define_YYLTYPE_YYLTYPE); - PyList_SET_ITEM(__pyx_t_5, 16, __pyx_kp_u_define_YYLTYPE_YYLTYPE); - __Pyx_INCREF(__pyx_kp_u_typedef_struct_YYLTYPE); - __Pyx_GIVEREF(__pyx_kp_u_typedef_struct_YYLTYPE); - PyList_SET_ITEM(__pyx_t_5, 17, __pyx_kp_u_typedef_struct_YYLTYPE); - __Pyx_INCREF(__pyx_kp_u__13); - __Pyx_GIVEREF(__pyx_kp_u__13); - PyList_SET_ITEM(__pyx_t_5, 18, __pyx_kp_u__13); - __Pyx_INCREF(__pyx_kp_u_int_first_line); - __Pyx_GIVEREF(__pyx_kp_u_int_first_line); - PyList_SET_ITEM(__pyx_t_5, 19, __pyx_kp_u_int_first_line); - __Pyx_INCREF(__pyx_kp_u_int_first_column); - __Pyx_GIVEREF(__pyx_kp_u_int_first_column); - PyList_SET_ITEM(__pyx_t_5, 20, __pyx_kp_u_int_first_column); - __Pyx_INCREF(__pyx_kp_u_int_last_line); - __Pyx_GIVEREF(__pyx_kp_u_int_last_line); - PyList_SET_ITEM(__pyx_t_5, 21, __pyx_kp_u_int_last_line); - __Pyx_INCREF(__pyx_kp_u_int_last_column); - __Pyx_GIVEREF(__pyx_kp_u_int_last_column); - PyList_SET_ITEM(__pyx_t_5, 22, __pyx_kp_u_int_last_column); - __Pyx_INCREF(__pyx_kp_u_char_filename); - __Pyx_GIVEREF(__pyx_kp_u_char_filename); - PyList_SET_ITEM(__pyx_t_5, 23, __pyx_kp_u_char_filename); - __Pyx_INCREF(__pyx_kp_u_YYLTYPE); - __Pyx_GIVEREF(__pyx_kp_u_YYLTYPE); - PyList_SET_ITEM(__pyx_t_5, 24, __pyx_kp_u_YYLTYPE); - __Pyx_INCREF(__pyx_kp_u__2); - __Pyx_GIVEREF(__pyx_kp_u__2); - PyList_SET_ITEM(__pyx_t_5, 25, __pyx_kp_u__2); - __Pyx_INCREF(__pyx_v_error_def); - __Pyx_GIVEREF(__pyx_v_error_def); - PyList_SET_ITEM(__pyx_t_5, 26, __pyx_v_error_def); - __Pyx_INCREF(__pyx_kp_u__12); - __Pyx_GIVEREF(__pyx_kp_u__12); - PyList_SET_ITEM(__pyx_t_5, 27, __pyx_kp_u__12); - __Pyx_INCREF(__pyx_kp_u__2); - __Pyx_GIVEREF(__pyx_kp_u__2); - PyList_SET_ITEM(__pyx_t_5, 28, __pyx_kp_u__2); - __Pyx_INCREF(__pyx_kp_u_locations); - __Pyx_GIVEREF(__pyx_kp_u_locations); - PyList_SET_ITEM(__pyx_t_5, 29, __pyx_kp_u_locations); - __Pyx_INCREF(__pyx_kp_u__2); - __Pyx_GIVEREF(__pyx_kp_u__2); - PyList_SET_ITEM(__pyx_t_5, 30, __pyx_kp_u__2); - __pyx_t_4 = 0; - __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__11, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 332, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_INCREF(__pyx_v_write); - __pyx_t_5 = __pyx_v_write; __pyx_t_1 = NULL; - 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_6 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __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; - - /* "src/bison/cython/bison_.pyx":372 - * - * # write out tokens and start target dec - * write('%%token %s\n\n' % ' '.join(gTokens)) # <<<<<<<<<<<<<< - * write('%%start %s\n\n' % gStart) - * write("\n".join(["%s" % d for d in gOptions])) - */ - __Pyx_TraceLine(372,0,__PYX_ERR(0, 372, __pyx_L1_error)) - __pyx_t_5 = PyUnicode_Join(__pyx_kp_u__14, __pyx_v_gTokens); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 372, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_token_s, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 372, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_INCREF(__pyx_v_write); - __pyx_t_5 = __pyx_v_write; __pyx_t_1 = NULL; - 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_6 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 372, __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; - - /* "src/bison/cython/bison_.pyx":373 - * # write out tokens and start target dec - * write('%%token %s\n\n' % ' '.join(gTokens)) - * write('%%start %s\n\n' % gStart) # <<<<<<<<<<<<<< - * write("\n".join(["%s" % d for d in gOptions])) - * - */ - __Pyx_TraceLine(373,0,__PYX_ERR(0, 373, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_start_s, __pyx_v_gStart); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 373, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_INCREF(__pyx_v_write); - __pyx_t_4 = __pyx_v_write; __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_6 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 373, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - - /* "src/bison/cython/bison_.pyx":374 - * write('%%token %s\n\n' % ' '.join(gTokens)) - * write('%%start %s\n\n' % gStart) - * write("\n".join(["%s" % d for d in gOptions])) # <<<<<<<<<<<<<< - * - * # write out precedences - */ - __Pyx_TraceLine(374,0,__PYX_ERR(0, 374, __pyx_L1_error)) - { /* enter inner scope */ - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 374, __pyx_L12_error) - __Pyx_GOTREF(__pyx_t_4); - if (likely(PyList_CheckExact(__pyx_v_gOptions)) || PyTuple_CheckExact(__pyx_v_gOptions)) { - __pyx_t_5 = __pyx_v_gOptions; __Pyx_INCREF(__pyx_t_5); __pyx_t_2 = 0; - __pyx_t_3 = NULL; - } else { - __pyx_t_2 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_gOptions); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 374, __pyx_L12_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 374, __pyx_L12_error) - } - for (;;) { - if (likely(!__pyx_t_3)) { - if (likely(PyList_CheckExact(__pyx_t_5))) { - if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_5)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 374, __pyx_L12_error) - #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 374, __pyx_L12_error) - __Pyx_GOTREF(__pyx_t_1); - #endif - } else { - if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_5)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 374, __pyx_L12_error) - #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 374, __pyx_L12_error) - __Pyx_GOTREF(__pyx_t_1); - #endif - } - } else { - __pyx_t_1 = __pyx_t_3(__pyx_t_5); - 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, 374, __pyx_L12_error) - } - break; - } - __Pyx_GOTREF(__pyx_t_1); - } - __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_d, __pyx_t_1); - __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_s, __pyx_8genexpr1__pyx_v_d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 374, __pyx_L12_error) - __Pyx_GOTREF(__pyx_t_1); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 374, __pyx_L12_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_d); __pyx_8genexpr1__pyx_v_d = 0; - goto __pyx_L15_exit_scope; - __pyx_L12_error:; - __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_d); __pyx_8genexpr1__pyx_v_d = 0; - goto __pyx_L1_error; - __pyx_L15_exit_scope:; - } /* exit inner scope */ - __pyx_t_5 = PyUnicode_Join(__pyx_kp_u__11, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 374, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_INCREF(__pyx_v_write); - __pyx_t_4 = __pyx_v_write; __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_6 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 374, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - - /* "src/bison/cython/bison_.pyx":377 - * - * # write out precedences - * for p in gPrecedences: # <<<<<<<<<<<<<< - * write("%%%s %s\n" % (p[0], " ".join(p[1]))) - * - */ - __Pyx_TraceLine(377,0,__PYX_ERR(0, 377, __pyx_L1_error)) - if (likely(PyList_CheckExact(__pyx_v_gPrecedences)) || PyTuple_CheckExact(__pyx_v_gPrecedences)) { - __pyx_t_6 = __pyx_v_gPrecedences; __Pyx_INCREF(__pyx_t_6); __pyx_t_2 = 0; - __pyx_t_3 = NULL; - } else { - __pyx_t_2 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_gPrecedences); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 377, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 377, __pyx_L1_error) - } - for (;;) { - if (likely(!__pyx_t_3)) { - if (likely(PyList_CheckExact(__pyx_t_6))) { - if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_6)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 377, __pyx_L1_error) - #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 377, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - #endif - } else { - if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_6)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 377, __pyx_L1_error) - #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 377, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - #endif - } - } else { - __pyx_t_4 = __pyx_t_3(__pyx_t_6); - 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, 377, __pyx_L1_error) - } - break; - } - __Pyx_GOTREF(__pyx_t_4); - } - __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_4); - __pyx_t_4 = 0; - - /* "src/bison/cython/bison_.pyx":378 - * # write out precedences - * for p in gPrecedences: - * write("%%%s %s\n" % (p[0], " ".join(p[1]))) # <<<<<<<<<<<<<< - * - * write("\n\n%%\n\n") - */ - __Pyx_TraceLine(378,0,__PYX_ERR(0, 378, __pyx_L1_error)) - __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 378, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_10 = 0; - __pyx_t_11 = 127; - __Pyx_INCREF(__pyx_kp_u__15); - __pyx_t_10 += 1; - __Pyx_GIVEREF(__pyx_kp_u__15); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u__15); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_p, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_12 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_1), __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 378, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __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__16); - __pyx_t_10 += 2; - __Pyx_GIVEREF(__pyx_kp_u__16); - PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__16); - __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_p, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 378, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_1 = PyUnicode_Join(__pyx_kp_u__14, __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_11; - __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_1); - __pyx_t_1 = 0; - __Pyx_INCREF(__pyx_kp_u__11); - __pyx_t_10 += 1; - __Pyx_GIVEREF(__pyx_kp_u__11); - PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__11); - __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_5, 5, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_INCREF(__pyx_v_write); - __pyx_t_5 = __pyx_v_write; __pyx_t_12 = NULL; - if (CYTHON_UNPACK_METHODS && likely(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_4 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_12, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __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_4)) __PYX_ERR(0, 378, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "src/bison/cython/bison_.pyx":377 - * - * # write out precedences - * for p in gPrecedences: # <<<<<<<<<<<<<< - * write("%%%s %s\n" % (p[0], " ".join(p[1]))) - * - */ - __Pyx_TraceLine(377,0,__PYX_ERR(0, 377, __pyx_L1_error)) - } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - - /* "src/bison/cython/bison_.pyx":380 - * write("%%%s %s\n" % (p[0], " ".join(p[1]))) - * - * write("\n\n%%\n\n") # <<<<<<<<<<<<<< - * - * if parser.raw_c_rules: - */ - __Pyx_TraceLine(380,0,__PYX_ERR(0, 380, __pyx_L1_error)) - __Pyx_INCREF(__pyx_v_write); - __pyx_t_4 = __pyx_v_write; __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_6 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u__17) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u__17); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 380, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - - /* "src/bison/cython/bison_.pyx":382 - * write("\n\n%%\n\n") - * - * if parser.raw_c_rules: # <<<<<<<<<<<<<< - * write(parser.raw_c_rules) - * - */ - __Pyx_TraceLine(382,0,__PYX_ERR(0, 382, __pyx_L1_error)) - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_raw_c_rules); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 382, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 382, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__pyx_t_9) { - - /* "src/bison/cython/bison_.pyx":383 - * - * if parser.raw_c_rules: - * write(parser.raw_c_rules) # <<<<<<<<<<<<<< - * - * # carve up docstrings - */ - __Pyx_TraceLine(383,0,__PYX_ERR(0, 383, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_raw_c_rules); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 383, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_INCREF(__pyx_v_write); - __pyx_t_5 = __pyx_v_write; __pyx_t_1 = NULL; - 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_6 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 383, __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; - - /* "src/bison/cython/bison_.pyx":382 - * write("\n\n%%\n\n") - * - * if parser.raw_c_rules: # <<<<<<<<<<<<<< - * write(parser.raw_c_rules) - * - */ - } - - /* "src/bison/cython/bison_.pyx":386 - * - * # carve up docstrings - * rules = [] # <<<<<<<<<<<<<< - * for h in gHandlers: - * - */ - __Pyx_TraceLine(386,0,__PYX_ERR(0, 386, __pyx_L1_error)) - __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 386, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_v_rules = ((PyObject*)__pyx_t_6); - __pyx_t_6 = 0; - - /* "src/bison/cython/bison_.pyx":387 - * # carve up docstrings - * rules = [] - * for h in gHandlers: # <<<<<<<<<<<<<< - * - * doc = h.__doc__.strip() - */ - __Pyx_TraceLine(387,0,__PYX_ERR(0, 387, __pyx_L1_error)) - __pyx_t_6 = __pyx_v_gHandlers; __Pyx_INCREF(__pyx_t_6); __pyx_t_2 = 0; - for (;;) { - if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_6)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 387, __pyx_L1_error) - #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 387, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - #endif - __Pyx_XDECREF_SET(__pyx_v_h, __pyx_t_5); - __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":389 - * for h in gHandlers: - * - * doc = h.__doc__.strip() # <<<<<<<<<<<<<< - * - * # added by Eugene Oden - */ - __Pyx_TraceLine(389,0,__PYX_ERR(0, 389, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_doc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 389, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_strip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 389, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - } - } - __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 389, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF_SET(__pyx_v_doc, __pyx_t_5); - __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":393 - * # added by Eugene Oden - * #target, options = doc.split(":") - * doc = re.sub(unquoted % ";", "", doc) # <<<<<<<<<<<<<< - * - * s = re.split(unquoted % ":", doc) - */ - __Pyx_TraceLine(393,0,__PYX_ERR(0, 393, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_re); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 393, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_sub); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 393, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_unquoted); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 393, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_12 = PyNumber_Remainder(__pyx_t_1, __pyx_kp_u__18); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 393, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = NULL; - __pyx_t_13 = 0; - 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_13 = 1; - } - } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_t_12, __pyx_kp_u__2, __pyx_v_doc}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 393, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_t_12, __pyx_kp_u__2, __pyx_v_doc}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 393, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } else - #endif - { - __pyx_t_14 = PyTuple_New(3+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 393, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - if (__pyx_t_1) { - __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_1); __pyx_t_1 = NULL; - } - __Pyx_GIVEREF(__pyx_t_12); - PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_t_12); - __Pyx_INCREF(__pyx_kp_u__2); - __Pyx_GIVEREF(__pyx_kp_u__2); - PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_kp_u__2); - __Pyx_INCREF(__pyx_v_doc); - __Pyx_GIVEREF(__pyx_v_doc); - PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_13, __pyx_v_doc); - __pyx_t_12 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_14, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 393, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF_SET(__pyx_v_doc, __pyx_t_5); - __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":395 - * doc = re.sub(unquoted % ";", "", doc) - * - * s = re.split(unquoted % ":", doc) # <<<<<<<<<<<<<< - * - * target, options = s - */ - __Pyx_TraceLine(395,0,__PYX_ERR(0, 395, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_re); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 395, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 395, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_unquoted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 395, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_12 = PyNumber_Remainder(__pyx_t_4, __pyx_kp_u__19); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 395, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = NULL; - __pyx_t_13 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_14); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_14, function); - __pyx_t_13 = 1; - } - } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_14)) { - PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_12, __pyx_v_doc}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 395, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_5); - __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_4, __pyx_t_12, __pyx_v_doc}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 395, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } else - #endif - { - __pyx_t_1 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (__pyx_t_4) { - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = NULL; - } - __Pyx_GIVEREF(__pyx_t_12); - PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_13, __pyx_t_12); - __Pyx_INCREF(__pyx_v_doc); - __Pyx_GIVEREF(__pyx_v_doc); - PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_13, __pyx_v_doc); - __pyx_t_12 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 395, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_5); - __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":397 - * s = re.split(unquoted % ":", doc) - * - * target, options = s # <<<<<<<<<<<<<< - * target = target.strip() - * - */ - __Pyx_TraceLine(397,0,__PYX_ERR(0, 397, __pyx_L1_error)) - if ((likely(PyTuple_CheckExact(__pyx_v_s))) || (PyList_CheckExact(__pyx_v_s))) { - PyObject* sequence = __pyx_v_s; - 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, 397, __pyx_L1_error) - } - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_14 = PyTuple_GET_ITEM(sequence, 1); - } else { - __pyx_t_5 = PyList_GET_ITEM(sequence, 0); - __pyx_t_14 = PyList_GET_ITEM(sequence, 1); - } - __Pyx_INCREF(__pyx_t_5); - __Pyx_INCREF(__pyx_t_14); - #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 397, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_14 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 397, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - #endif - } else { - Py_ssize_t index = -1; - __pyx_t_1 = PyObject_GetIter(__pyx_v_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_15 = Py_TYPE(__pyx_t_1)->tp_iternext; - index = 0; __pyx_t_5 = __pyx_t_15(__pyx_t_1); if (unlikely(!__pyx_t_5)) goto __pyx_L21_unpacking_failed; - __Pyx_GOTREF(__pyx_t_5); - index = 1; __pyx_t_14 = __pyx_t_15(__pyx_t_1); if (unlikely(!__pyx_t_14)) goto __pyx_L21_unpacking_failed; - __Pyx_GOTREF(__pyx_t_14); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_1), 2) < 0) __PYX_ERR(0, 397, __pyx_L1_error) - __pyx_t_15 = NULL; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L22_unpacking_done; - __pyx_L21_unpacking_failed:; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_15 = NULL; - if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 397, __pyx_L1_error) - __pyx_L22_unpacking_done:; - } - __Pyx_XDECREF_SET(__pyx_v_target, __pyx_t_5); - __pyx_t_5 = 0; - __Pyx_XDECREF_SET(__pyx_v_options, __pyx_t_14); - __pyx_t_14 = 0; - - /* "src/bison/cython/bison_.pyx":398 - * - * target, options = s - * target = target.strip() # <<<<<<<<<<<<<< - * - * options = options.strip() - */ - __Pyx_TraceLine(398,0,__PYX_ERR(0, 398, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_strip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 398, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = NULL; - 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_14 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 398, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF_SET(__pyx_v_target, __pyx_t_14); - __pyx_t_14 = 0; - - /* "src/bison/cython/bison_.pyx":400 - * target = target.strip() - * - * options = options.strip() # <<<<<<<<<<<<<< - * tmp = [] - * - */ - __Pyx_TraceLine(400,0,__PYX_ERR(0, 400, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_options, __pyx_n_s_strip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 400, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = NULL; - 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_14 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 400, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF_SET(__pyx_v_options, __pyx_t_14); - __pyx_t_14 = 0; - - /* "src/bison/cython/bison_.pyx":401 - * - * options = options.strip() - * tmp = [] # <<<<<<<<<<<<<< - * - * #opts = options.split("|") - */ - __Pyx_TraceLine(401,0,__PYX_ERR(0, 401, __pyx_L1_error)) - __pyx_t_14 = PyList_New(0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 401, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_XDECREF_SET(__pyx_v_tmp, ((PyObject*)__pyx_t_14)); - __pyx_t_14 = 0; - - /* "src/bison/cython/bison_.pyx":404 - * - * #opts = options.split("|") - * r = unquoted % r"\|" # <<<<<<<<<<<<<< - * opts1 = re.split(r, " " + options) - * - */ - __Pyx_TraceLine(404,0,__PYX_ERR(0, 404, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_unquoted); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 404, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __pyx_t_5 = PyNumber_Remainder(__pyx_t_14, __pyx_kp_u__20); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 404, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_5); - __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":405 - * #opts = options.split("|") - * r = unquoted % r"\|" - * opts1 = re.split(r, " " + options) # <<<<<<<<<<<<<< - * - * for o in opts1: - */ - __Pyx_TraceLine(405,0,__PYX_ERR(0, 405, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_re); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 405, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 405, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_14 = PyNumber_Add(__pyx_kp_u__14, __pyx_v_options); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 405, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __pyx_t_12 = NULL; - __pyx_t_13 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_12)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_12); - __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[3] = {__pyx_t_12, __pyx_v_r, __pyx_t_14}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 405, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { - PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_r, __pyx_t_14}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 405, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - } else - #endif - { - __pyx_t_4 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 405, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__pyx_t_12) { - __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_12); __pyx_t_12 = NULL; - } - __Pyx_INCREF(__pyx_v_r); - __Pyx_GIVEREF(__pyx_v_r); - PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_13, __pyx_v_r); - __Pyx_GIVEREF(__pyx_t_14); - PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_13, __pyx_t_14); - __pyx_t_14 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 405, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF_SET(__pyx_v_opts1, __pyx_t_5); - __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":407 - * opts1 = re.split(r, " " + options) - * - * for o in opts1: # <<<<<<<<<<<<<< - * o = o.strip() - * - */ - __Pyx_TraceLine(407,0,__PYX_ERR(0, 407, __pyx_L1_error)) - if (likely(PyList_CheckExact(__pyx_v_opts1)) || PyTuple_CheckExact(__pyx_v_opts1)) { - __pyx_t_5 = __pyx_v_opts1; __Pyx_INCREF(__pyx_t_5); __pyx_t_10 = 0; - __pyx_t_3 = NULL; - } else { - __pyx_t_10 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_opts1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 407, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 407, __pyx_L1_error) - } - for (;;) { - if (likely(!__pyx_t_3)) { - if (likely(PyList_CheckExact(__pyx_t_5))) { - if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_5)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 407, __pyx_L1_error) - #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 407, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - #endif - } else { - if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_5)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 407, __pyx_L1_error) - #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 407, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - #endif - } - } else { - __pyx_t_1 = __pyx_t_3(__pyx_t_5); - 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, 407, __pyx_L1_error) - } - break; - } - __Pyx_GOTREF(__pyx_t_1); - } - __Pyx_XDECREF_SET(__pyx_v_o, __pyx_t_1); - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":408 - * - * for o in opts1: - * o = o.strip() # <<<<<<<<<<<<<< - * - * tmp.append(reSpaces.split(o)) - */ - __Pyx_TraceLine(408,0,__PYX_ERR(0, 408, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_o, __pyx_n_s_strip); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 408, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_14 = NULL; - if (CYTHON_UNPACK_METHODS && likely(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_1 = (__pyx_t_14) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_14) : __Pyx_PyObject_CallNoArg(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 408, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF_SET(__pyx_v_o, __pyx_t_1); - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":410 - * o = o.strip() - * - * tmp.append(reSpaces.split(o)) # <<<<<<<<<<<<<< - * options = tmp - * - */ - __Pyx_TraceLine(410,0,__PYX_ERR(0, 410, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_reSpaces); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 410, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 410, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_14); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_14, function); - } - } - __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_4, __pyx_v_o) : __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_v_o); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 410, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_tmp, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 410, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":407 - * opts1 = re.split(r, " " + options) - * - * for o in opts1: # <<<<<<<<<<<<<< - * o = o.strip() - * - */ - __Pyx_TraceLine(407,0,__PYX_ERR(0, 407, __pyx_L1_error)) - } - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":411 - * - * tmp.append(reSpaces.split(o)) - * options = tmp # <<<<<<<<<<<<<< - * - * rules.append((target, options)) - */ - __Pyx_TraceLine(411,0,__PYX_ERR(0, 411, __pyx_L1_error)) - __Pyx_INCREF(__pyx_v_tmp); - __Pyx_DECREF_SET(__pyx_v_options, __pyx_v_tmp); - - /* "src/bison/cython/bison_.pyx":413 - * options = tmp - * - * rules.append((target, options)) # <<<<<<<<<<<<<< - * - * # and render rules to grammar file - */ - __Pyx_TraceLine(413,0,__PYX_ERR(0, 413, __pyx_L1_error)) - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 413, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_INCREF(__pyx_v_target); - __Pyx_GIVEREF(__pyx_v_target); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_target); - __Pyx_INCREF(__pyx_v_options); - __Pyx_GIVEREF(__pyx_v_options); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_options); - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_rules, __pyx_t_5); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 413, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":387 - * # carve up docstrings - * rules = [] - * for h in gHandlers: # <<<<<<<<<<<<<< - * - * doc = h.__doc__.strip() - */ - __Pyx_TraceLine(387,0,__PYX_ERR(0, 387, __pyx_L1_error)) - } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - - /* "src/bison/cython/bison_.pyx":416 - * - * # and render rules to grammar file - * for rule in rules: # <<<<<<<<<<<<<< - * try: - * write("%s\n : " % rule[0]) - */ - __Pyx_TraceLine(416,0,__PYX_ERR(0, 416, __pyx_L1_error)) - __pyx_t_6 = __pyx_v_rules; __Pyx_INCREF(__pyx_t_6); __pyx_t_2 = 0; - for (;;) { - if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_6)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 416, __pyx_L1_error) - #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 416, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - #endif - __Pyx_XDECREF_SET(__pyx_v_rule, __pyx_t_5); - __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":417 - * # and render rules to grammar file - * for rule in rules: - * try: # <<<<<<<<<<<<<< - * write("%s\n : " % rule[0]) - * options = [] - */ - __Pyx_TraceLine(417,0,__PYX_ERR(0, 417, __pyx_L1_error)) - { - __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:*/ { - - /* "src/bison/cython/bison_.pyx":418 - * for rule in rules: - * try: - * write("%s\n : " % rule[0]) # <<<<<<<<<<<<<< - * options = [] - * idx = 0 - */ - __Pyx_TraceLine(418,0,__PYX_ERR(0, 418, __pyx_L27_error)) - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_rule, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 418, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_14 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_s_2, __pyx_t_1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 418, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_INCREF(__pyx_v_write); - __pyx_t_1 = __pyx_v_write; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - } - } - __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_t_14) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __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_5)) __PYX_ERR(0, 418, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":419 - * try: - * write("%s\n : " % rule[0]) - * options = [] # <<<<<<<<<<<<<< - * idx = 0 - * for option in rule[1]: - */ - __Pyx_TraceLine(419,0,__PYX_ERR(0, 419, __pyx_L27_error)) - __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 419, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_XDECREF_SET(__pyx_v_options, __pyx_t_5); - __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":420 - * write("%s\n : " % rule[0]) - * options = [] - * idx = 0 # <<<<<<<<<<<<<< - * for option in rule[1]: - * nterms = len(option) - */ - __Pyx_TraceLine(420,0,__PYX_ERR(0, 420, __pyx_L27_error)) - __Pyx_INCREF(__pyx_int_0); - __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_int_0); - - /* "src/bison/cython/bison_.pyx":421 - * options = [] - * idx = 0 - * for option in rule[1]: # <<<<<<<<<<<<<< - * nterms = len(option) - * if nterms == 1 and option[0] == '': - */ - __Pyx_TraceLine(421,0,__PYX_ERR(0, 421, __pyx_L27_error)) - __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_rule, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 421, __pyx_L27_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_10 = 0; - __pyx_t_3 = NULL; - } else { - __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 421, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 421, __pyx_L27_error) - } - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - for (;;) { - if (likely(!__pyx_t_3)) { - if (likely(PyList_CheckExact(__pyx_t_1))) { - if (__pyx_t_10 >= 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_10); __Pyx_INCREF(__pyx_t_5); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 421, __pyx_L27_error) - #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 421, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_5); - #endif - } else { - if (__pyx_t_10 >= 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_10); __Pyx_INCREF(__pyx_t_5); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 421, __pyx_L27_error) - #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 421, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_5); - #endif - } - } else { - __pyx_t_5 = __pyx_t_3(__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, 421, __pyx_L27_error) - } - break; - } - __Pyx_GOTREF(__pyx_t_5); - } - __Pyx_XDECREF_SET(__pyx_v_option, __pyx_t_5); - __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":422 - * idx = 0 - * for option in rule[1]: - * nterms = len(option) # <<<<<<<<<<<<<< - * if nterms == 1 and option[0] == '': - * nterms = 0 - */ - __Pyx_TraceLine(422,0,__PYX_ERR(0, 422, __pyx_L27_error)) - __pyx_t_19 = PyObject_Length(__pyx_v_option); if (unlikely(__pyx_t_19 == ((Py_ssize_t)-1))) __PYX_ERR(0, 422, __pyx_L27_error) - __pyx_v_nterms = __pyx_t_19; - - /* "src/bison/cython/bison_.pyx":423 - * for option in rule[1]: - * nterms = len(option) - * if nterms == 1 and option[0] == '': # <<<<<<<<<<<<<< - * nterms = 0 - * option = [] - */ - __Pyx_TraceLine(423,0,__PYX_ERR(0, 423, __pyx_L27_error)) - __pyx_t_7 = ((__pyx_v_nterms == 1) != 0); - if (__pyx_t_7) { - } else { - __pyx_t_9 = __pyx_t_7; - goto __pyx_L38_bool_binop_done; - } - __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_option, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 423, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_5, __pyx_kp_u__2, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 423, __pyx_L27_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_9 = __pyx_t_7; - __pyx_L38_bool_binop_done:; - if (__pyx_t_9) { - - /* "src/bison/cython/bison_.pyx":424 - * nterms = len(option) - * if nterms == 1 and option[0] == '': - * nterms = 0 # <<<<<<<<<<<<<< - * option = [] - * action = '\n {\n' - */ - __Pyx_TraceLine(424,0,__PYX_ERR(0, 424, __pyx_L27_error)) - __pyx_v_nterms = 0; - - /* "src/bison/cython/bison_.pyx":425 - * if nterms == 1 and option[0] == '': - * nterms = 0 - * option = [] # <<<<<<<<<<<<<< - * action = '\n {\n' - * if 'error' in option: - */ - __Pyx_TraceLine(425,0,__PYX_ERR(0, 425, __pyx_L27_error)) - __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 425, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF_SET(__pyx_v_option, __pyx_t_5); - __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":423 - * for option in rule[1]: - * nterms = len(option) - * if nterms == 1 and option[0] == '': # <<<<<<<<<<<<<< - * nterms = 0 - * option = [] - */ - } - - /* "src/bison/cython/bison_.pyx":426 - * nterms = 0 - * option = [] - * action = '\n {\n' # <<<<<<<<<<<<<< - * if 'error' in option: - * action = action + " yyerrok;\n" - */ - __Pyx_TraceLine(426,0,__PYX_ERR(0, 426, __pyx_L27_error)) - __Pyx_INCREF(__pyx_kp_u__21); - __Pyx_XDECREF_SET(__pyx_v_action, __pyx_kp_u__21); - - /* "src/bison/cython/bison_.pyx":427 - * option = [] - * action = '\n {\n' - * if 'error' in option: # <<<<<<<<<<<<<< - * action = action + " yyerrok;\n" - * action = action + " PyObject* lasterr = PyObject_GetAttrString((PyObject*)py_parser, \"lasterror\");;\n" - */ - __Pyx_TraceLine(427,0,__PYX_ERR(0, 427, __pyx_L27_error)) - __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_error, __pyx_v_option, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 427, __pyx_L27_error) - __pyx_t_7 = (__pyx_t_9 != 0); - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":428 - * action = '\n {\n' - * if 'error' in option: - * action = action + " yyerrok;\n" # <<<<<<<<<<<<<< - * action = action + " PyObject* lasterr = PyObject_GetAttrString((PyObject*)py_parser, \"lasterror\");;\n" - * action = action + ' $$ = (*py_callback)(\n py_parser, "%s", %s, %%s' % \ - */ - __Pyx_TraceLine(428,0,__PYX_ERR(0, 428, __pyx_L27_error)) - __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_v_action, __pyx_kp_u_yyerrok); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 428, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF_SET(__pyx_v_action, __pyx_t_5); - __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":429 - * if 'error' in option: - * action = action + " yyerrok;\n" - * action = action + " PyObject* lasterr = PyObject_GetAttrString((PyObject*)py_parser, \"lasterror\");;\n" # <<<<<<<<<<<<<< - * action = action + ' $$ = (*py_callback)(\n py_parser, "%s", %s, %%s' % \ - * (rule[0], idx) # note we're deferring the substitution of 'nterms' (last arg) - */ - __Pyx_TraceLine(429,0,__PYX_ERR(0, 429, __pyx_L27_error)) - __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_v_action, __pyx_kp_u_PyObject_lasterr_PyObject_GetAt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 429, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF_SET(__pyx_v_action, __pyx_t_5); - __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":427 - * option = [] - * action = '\n {\n' - * if 'error' in option: # <<<<<<<<<<<<<< - * action = action + " yyerrok;\n" - * action = action + " PyObject* lasterr = PyObject_GetAttrString((PyObject*)py_parser, \"lasterror\");;\n" - */ - } - - /* "src/bison/cython/bison_.pyx":430 - * action = action + " yyerrok;\n" - * action = action + " PyObject* lasterr = PyObject_GetAttrString((PyObject*)py_parser, \"lasterror\");;\n" - * action = action + ' $$ = (*py_callback)(\n py_parser, "%s", %s, %%s' % \ # <<<<<<<<<<<<<< - * (rule[0], idx) # note we're deferring the substitution of 'nterms' (last arg) - * args = [] - */ - __Pyx_TraceLine(430,0,__PYX_ERR(0, 430, __pyx_L27_error)) - __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 430, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_19 = 0; - __pyx_t_11 = 127; - __Pyx_INCREF(__pyx_kp_u_py_callback_py_parser); - __pyx_t_19 += 55; - __Pyx_GIVEREF(__pyx_kp_u_py_callback_py_parser); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_py_callback_py_parser); - - /* "src/bison/cython/bison_.pyx":431 - * action = action + " PyObject* lasterr = PyObject_GetAttrString((PyObject*)py_parser, \"lasterror\");;\n" - * action = action + ' $$ = (*py_callback)(\n py_parser, "%s", %s, %%s' % \ - * (rule[0], idx) # note we're deferring the substitution of 'nterms' (last arg) # <<<<<<<<<<<<<< - * args = [] - * i = -1 - */ - __Pyx_TraceLine(431,0,__PYX_ERR(0, 431, __pyx_L27_error)) - __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_rule, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 431, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_14); - __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_14), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 431, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_11; - __pyx_t_19 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); - __pyx_t_4 = 0; - __Pyx_INCREF(__pyx_kp_u__22); - __pyx_t_19 += 3; - __Pyx_GIVEREF(__pyx_kp_u__22); - PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__22); - __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_idx), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 431, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_11; - __pyx_t_19 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4); - __pyx_t_4 = 0; - __Pyx_INCREF(__pyx_kp_u_s_3); - __pyx_t_19 += 4; - __Pyx_GIVEREF(__pyx_kp_u_s_3); - PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u_s_3); - - /* "src/bison/cython/bison_.pyx":430 - * action = action + " yyerrok;\n" - * action = action + " PyObject* lasterr = PyObject_GetAttrString((PyObject*)py_parser, \"lasterror\");;\n" - * action = action + ' $$ = (*py_callback)(\n py_parser, "%s", %s, %%s' % \ # <<<<<<<<<<<<<< - * (rule[0], idx) # note we're deferring the substitution of 'nterms' (last arg) - * args = [] - */ - __Pyx_TraceLine(430,0,__PYX_ERR(0, 430, __pyx_L27_error)) - __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_5, 5, __pyx_t_19, __pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 430, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_v_action, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 430, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF_SET(__pyx_v_action, __pyx_t_5); - __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":432 - * action = action + ' $$ = (*py_callback)(\n py_parser, "%s", %s, %%s' % \ - * (rule[0], idx) # note we're deferring the substitution of 'nterms' (last arg) - * args = [] # <<<<<<<<<<<<<< - * i = -1 - * - */ - __Pyx_TraceLine(432,0,__PYX_ERR(0, 432, __pyx_L27_error)) - __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 432, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_XDECREF_SET(__pyx_v_args, ((PyObject*)__pyx_t_5)); - __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":433 - * (rule[0], idx) # note we're deferring the substitution of 'nterms' (last arg) - * args = [] - * i = -1 # <<<<<<<<<<<<<< - * - * if nterms == 0: - */ - __Pyx_TraceLine(433,0,__PYX_ERR(0, 433, __pyx_L27_error)) - __Pyx_INCREF(__pyx_int_neg_1); - __Pyx_XDECREF_SET(__pyx_v_i, __pyx_int_neg_1); - - /* "src/bison/cython/bison_.pyx":435 - * i = -1 - * - * if nterms == 0: # <<<<<<<<<<<<<< - * args.append('NULL') - * else: - */ - __Pyx_TraceLine(435,0,__PYX_ERR(0, 435, __pyx_L27_error)) - __pyx_t_7 = ((__pyx_v_nterms == 0) != 0); - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":436 - * - * if nterms == 0: - * args.append('NULL') # <<<<<<<<<<<<<< - * else: - * for i in range(nterms): - */ - __Pyx_TraceLine(436,0,__PYX_ERR(0, 436, __pyx_L27_error)) - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_n_u_NULL); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 436, __pyx_L27_error) - - /* "src/bison/cython/bison_.pyx":435 - * i = -1 - * - * if nterms == 0: # <<<<<<<<<<<<<< - * args.append('NULL') - * else: - */ - goto __pyx_L41; - } - - /* "src/bison/cython/bison_.pyx":438 - * args.append('NULL') - * else: - * for i in range(nterms): # <<<<<<<<<<<<<< - * if option[i] == '%prec': - * i = i - 1 - */ - __Pyx_TraceLine(438,0,__PYX_ERR(0, 438, __pyx_L27_error)) - /*else*/ { - __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_nterms); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 438, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 438, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { - __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_19 = 0; - __pyx_t_20 = NULL; - } else { - __pyx_t_19 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 438, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_20 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 438, __pyx_L27_error) - } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - for (;;) { - if (likely(!__pyx_t_20)) { - if (likely(PyList_CheckExact(__pyx_t_5))) { - if (__pyx_t_19 >= PyList_GET_SIZE(__pyx_t_5)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_19); __Pyx_INCREF(__pyx_t_4); __pyx_t_19++; if (unlikely(0 < 0)) __PYX_ERR(0, 438, __pyx_L27_error) - #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 438, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_4); - #endif - } else { - if (__pyx_t_19 >= PyTuple_GET_SIZE(__pyx_t_5)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_19); __Pyx_INCREF(__pyx_t_4); __pyx_t_19++; if (unlikely(0 < 0)) __PYX_ERR(0, 438, __pyx_L27_error) - #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 438, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_4); - #endif - } - } else { - __pyx_t_4 = __pyx_t_20(__pyx_t_5); - 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, 438, __pyx_L27_error) - } - break; - } - __Pyx_GOTREF(__pyx_t_4); - } - __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_4); - __pyx_t_4 = 0; - - /* "src/bison/cython/bison_.pyx":439 - * else: - * for i in range(nterms): - * if option[i] == '%prec': # <<<<<<<<<<<<<< - * i = i - 1 - * break # hack for rules using '%prec' - */ - __Pyx_TraceLine(439,0,__PYX_ERR(0, 439, __pyx_L27_error)) - __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_option, __pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 439, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_kp_u_prec, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 439, __pyx_L27_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":440 - * for i in range(nterms): - * if option[i] == '%prec': - * i = i - 1 # <<<<<<<<<<<<<< - * break # hack for rules using '%prec' - * o = option[i].replace('"', '\\"') - */ - __Pyx_TraceLine(440,0,__PYX_ERR(0, 440, __pyx_L27_error)) - __pyx_t_4 = __Pyx_PyInt_SubtractObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 440, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_4); - __pyx_t_4 = 0; - - /* "src/bison/cython/bison_.pyx":441 - * if option[i] == '%prec': - * i = i - 1 - * break # hack for rules using '%prec' # <<<<<<<<<<<<<< - * o = option[i].replace('"', '\\"') - * if o == 'error': - */ - __Pyx_TraceLine(441,0,__PYX_ERR(0, 441, __pyx_L27_error)) - goto __pyx_L43_break; - - /* "src/bison/cython/bison_.pyx":439 - * else: - * for i in range(nterms): - * if option[i] == '%prec': # <<<<<<<<<<<<<< - * i = i - 1 - * break # hack for rules using '%prec' - */ - } - - /* "src/bison/cython/bison_.pyx":442 - * i = i - 1 - * break # hack for rules using '%prec' - * o = option[i].replace('"', '\\"') # <<<<<<<<<<<<<< - * if o == 'error': - * args.append('"%s", lasterr' % (o)) - */ - __Pyx_TraceLine(442,0,__PYX_ERR(0, 442, __pyx_L27_error)) - __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_option, __pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 442, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_replace); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 442, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 442, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_XDECREF_SET(__pyx_v_o, __pyx_t_4); - __pyx_t_4 = 0; - - /* "src/bison/cython/bison_.pyx":443 - * break # hack for rules using '%prec' - * o = option[i].replace('"', '\\"') - * if o == 'error': # <<<<<<<<<<<<<< - * args.append('"%s", lasterr' % (o)) - * else: - */ - __Pyx_TraceLine(443,0,__PYX_ERR(0, 443, __pyx_L27_error)) - __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_o, __pyx_n_u_error, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 443, __pyx_L27_error) - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":444 - * o = option[i].replace('"', '\\"') - * if o == 'error': - * args.append('"%s", lasterr' % (o)) # <<<<<<<<<<<<<< - * else: - * args.append('"%s", $%d' % (o, i+1)) - */ - __Pyx_TraceLine(444,0,__PYX_ERR(0, 444, __pyx_L27_error)) - __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_s_lasterr, __pyx_v_o); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 444, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_t_4); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 444, __pyx_L27_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "src/bison/cython/bison_.pyx":443 - * break # hack for rules using '%prec' - * o = option[i].replace('"', '\\"') - * if o == 'error': # <<<<<<<<<<<<<< - * args.append('"%s", lasterr' % (o)) - * else: - */ - goto __pyx_L45; - } - - /* "src/bison/cython/bison_.pyx":446 - * args.append('"%s", lasterr' % (o)) - * else: - * args.append('"%s", $%d' % (o, i+1)) # <<<<<<<<<<<<<< - * - * # now, we have the correct terms count - */ - __Pyx_TraceLine(446,0,__PYX_ERR(0, 446, __pyx_L27_error)) - /*else*/ { - __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 446, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_21 = 0; - __pyx_t_11 = 127; - __Pyx_INCREF(__pyx_kp_u__23); - __pyx_t_21 += 1; - __Pyx_GIVEREF(__pyx_kp_u__23); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u__23); - __pyx_t_14 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_o), __pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 446, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_14); - __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) : __pyx_t_11; - __pyx_t_21 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14); - __Pyx_GIVEREF(__pyx_t_14); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_14); - __pyx_t_14 = 0; - __Pyx_INCREF(__pyx_kp_u__26); - __pyx_t_21 += 4; - __Pyx_GIVEREF(__pyx_kp_u__26); - PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__26); - __pyx_t_14 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 446, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_14); - __pyx_t_12 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_IntOrLong(__pyx_t_14), __pyx_n_u_d); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 446, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __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_21 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12); - __Pyx_GIVEREF(__pyx_t_12); - PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_12); - __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_21, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 446, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_t_12); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 446, __pyx_L27_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } - __pyx_L45:; - - /* "src/bison/cython/bison_.pyx":438 - * args.append('NULL') - * else: - * for i in range(nterms): # <<<<<<<<<<<<<< - * if option[i] == '%prec': - * i = i - 1 - */ - __Pyx_TraceLine(438,0,__PYX_ERR(0, 438, __pyx_L27_error)) - } - __pyx_L43_break:; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - __pyx_L41:; - - /* "src/bison/cython/bison_.pyx":449 - * - * # now, we have the correct terms count - * action = action % (i + 1) # <<<<<<<<<<<<<< - * - * # assemble the full rule + action, add to list - */ - __Pyx_TraceLine(449,0,__PYX_ERR(0, 449, __pyx_L27_error)) - __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 449, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_12 = __Pyx_PyUnicode_FormatSafe(__pyx_v_action, __pyx_t_5); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 449, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF_SET(__pyx_v_action, __pyx_t_12); - __pyx_t_12 = 0; - - /* "src/bison/cython/bison_.pyx":452 - * - * # assemble the full rule + action, add to list - * action = action + ",\n " # <<<<<<<<<<<<<< - * action = action + ",\n ".join(args) + "\n );\n" - * - */ - __Pyx_TraceLine(452,0,__PYX_ERR(0, 452, __pyx_L27_error)) - __pyx_t_12 = PyNumber_Add(__pyx_v_action, __pyx_kp_u__27); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 452, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF_SET(__pyx_v_action, __pyx_t_12); - __pyx_t_12 = 0; - - /* "src/bison/cython/bison_.pyx":453 - * # assemble the full rule + action, add to list - * action = action + ",\n " - * action = action + ",\n ".join(args) + "\n );\n" # <<<<<<<<<<<<<< - * - * if 'error' in option: - */ - __Pyx_TraceLine(453,0,__PYX_ERR(0, 453, __pyx_L27_error)) - __pyx_t_12 = PyUnicode_Join(__pyx_kp_u__27, __pyx_v_args); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 453, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_5 = PyNumber_Add(__pyx_v_action, __pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 453, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = PyNumber_Add(__pyx_t_5, __pyx_kp_u__28); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 453, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF_SET(__pyx_v_action, __pyx_t_12); - __pyx_t_12 = 0; - - /* "src/bison/cython/bison_.pyx":455 - * action = action + ",\n ".join(args) + "\n );\n" - * - * if 'error' in option: # <<<<<<<<<<<<<< - * action = action + " PyObject_SetAttrString(py_parser, \"lasterror\", Py_None);\n" - * action = action + " Py_DECREF(lasterr);\n" - */ - __Pyx_TraceLine(455,0,__PYX_ERR(0, 455, __pyx_L27_error)) - __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_error, __pyx_v_option, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 455, __pyx_L27_error) - __pyx_t_9 = (__pyx_t_7 != 0); - if (__pyx_t_9) { - - /* "src/bison/cython/bison_.pyx":456 - * - * if 'error' in option: - * action = action + " PyObject_SetAttrString(py_parser, \"lasterror\", Py_None);\n" # <<<<<<<<<<<<<< - * action = action + " Py_DECREF(lasterr);\n" - * action = action + " Py_INCREF(Py_None);\n" - */ - __Pyx_TraceLine(456,0,__PYX_ERR(0, 456, __pyx_L27_error)) - __pyx_t_12 = PyNumber_Add(__pyx_v_action, __pyx_kp_u_PyObject_SetAttrString_py_parse); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 456, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF_SET(__pyx_v_action, __pyx_t_12); - __pyx_t_12 = 0; - - /* "src/bison/cython/bison_.pyx":457 - * if 'error' in option: - * action = action + " PyObject_SetAttrString(py_parser, \"lasterror\", Py_None);\n" - * action = action + " Py_DECREF(lasterr);\n" # <<<<<<<<<<<<<< - * action = action + " Py_INCREF(Py_None);\n" - * action = action + " yyclearin;\n" - */ - __Pyx_TraceLine(457,0,__PYX_ERR(0, 457, __pyx_L27_error)) - __pyx_t_12 = PyNumber_Add(__pyx_v_action, __pyx_kp_u_Py_DECREF_lasterr); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 457, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF_SET(__pyx_v_action, __pyx_t_12); - __pyx_t_12 = 0; - - /* "src/bison/cython/bison_.pyx":458 - * action = action + " PyObject_SetAttrString(py_parser, \"lasterror\", Py_None);\n" - * action = action + " Py_DECREF(lasterr);\n" - * action = action + " Py_INCREF(Py_None);\n" # <<<<<<<<<<<<<< - * action = action + " yyclearin;\n" - * - */ - __Pyx_TraceLine(458,0,__PYX_ERR(0, 458, __pyx_L27_error)) - __pyx_t_12 = PyNumber_Add(__pyx_v_action, __pyx_kp_u_Py_INCREF_Py_None); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 458, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF_SET(__pyx_v_action, __pyx_t_12); - __pyx_t_12 = 0; - - /* "src/bison/cython/bison_.pyx":459 - * action = action + " Py_DECREF(lasterr);\n" - * action = action + " Py_INCREF(Py_None);\n" - * action = action + " yyclearin;\n" # <<<<<<<<<<<<<< - * - * else: - */ - __Pyx_TraceLine(459,0,__PYX_ERR(0, 459, __pyx_L27_error)) - __pyx_t_12 = PyNumber_Add(__pyx_v_action, __pyx_kp_u_yyclearin); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 459, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF_SET(__pyx_v_action, __pyx_t_12); - __pyx_t_12 = 0; - - /* "src/bison/cython/bison_.pyx":455 - * action = action + ",\n ".join(args) + "\n );\n" - * - * if 'error' in option: # <<<<<<<<<<<<<< - * action = action + " PyObject_SetAttrString(py_parser, \"lasterror\", Py_None);\n" - * action = action + " Py_DECREF(lasterr);\n" - */ - goto __pyx_L46; - } - - /* "src/bison/cython/bison_.pyx":462 - * - * else: - * action = action + self.generate_exception_handler() # <<<<<<<<<<<<<< - * - * action = action + ' }\n' - */ - __Pyx_TraceLine(462,0,__PYX_ERR(0, 462, __pyx_L27_error)) - /*else*/ { - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_generate_exception_handler); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 462, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = NULL; - 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_12 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 462, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyNumber_Add(__pyx_v_action, __pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 462, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_DECREF_SET(__pyx_v_action, __pyx_t_5); - __pyx_t_5 = 0; - } - __pyx_L46:; - - /* "src/bison/cython/bison_.pyx":464 - * action = action + self.generate_exception_handler() - * - * action = action + ' }\n' # <<<<<<<<<<<<<< - * - * options.append(" ".join(option) + action) - */ - __Pyx_TraceLine(464,0,__PYX_ERR(0, 464, __pyx_L27_error)) - __pyx_t_5 = PyNumber_Add(__pyx_v_action, __pyx_kp_u__29); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 464, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF_SET(__pyx_v_action, __pyx_t_5); - __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":466 - * action = action + ' }\n' - * - * options.append(" ".join(option) + action) # <<<<<<<<<<<<<< - * idx = idx + 1 - * write(" | ".join(options) + " ;\n\n") - */ - __Pyx_TraceLine(466,0,__PYX_ERR(0, 466, __pyx_L27_error)) - __pyx_t_5 = PyUnicode_Join(__pyx_kp_u__14, __pyx_v_option); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 466, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_12 = PyNumber_Add(__pyx_t_5, __pyx_v_action); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 466, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_options, __pyx_t_12); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 466, __pyx_L27_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - - /* "src/bison/cython/bison_.pyx":467 - * - * options.append(" ".join(option) + action) - * idx = idx + 1 # <<<<<<<<<<<<<< - * write(" | ".join(options) + " ;\n\n") - * except: - */ - __Pyx_TraceLine(467,0,__PYX_ERR(0, 467, __pyx_L27_error)) - __pyx_t_12 = __Pyx_PyInt_AddObjC(__pyx_v_idx, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 467, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF_SET(__pyx_v_idx, __pyx_t_12); - __pyx_t_12 = 0; - - /* "src/bison/cython/bison_.pyx":421 - * options = [] - * idx = 0 - * for option in rule[1]: # <<<<<<<<<<<<<< - * nterms = len(option) - * if nterms == 1 and option[0] == '': - */ - __Pyx_TraceLine(421,0,__PYX_ERR(0, 421, __pyx_L27_error)) - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":468 - * options.append(" ".join(option) + action) - * idx = idx + 1 - * write(" | ".join(options) + " ;\n\n") # <<<<<<<<<<<<<< - * except: - * traceback.print_exc() - */ - __Pyx_TraceLine(468,0,__PYX_ERR(0, 468, __pyx_L27_error)) - __pyx_t_12 = PyUnicode_Join(__pyx_kp_u__30, __pyx_v_options); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 468, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_12, __pyx_kp_u__31); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 468, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_INCREF(__pyx_v_write); - __pyx_t_12 = __pyx_v_write; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && likely(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_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __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, 468, __pyx_L27_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":417 - * # and render rules to grammar file - * for rule in rules: - * try: # <<<<<<<<<<<<<< - * write("%s\n : " % rule[0]) - * options = [] - */ - } - __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_L34_try_end; - __pyx_L27_error:; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":469 - * idx = idx + 1 - * write(" | ".join(options) + " ;\n\n") - * except: # <<<<<<<<<<<<<< - * traceback.print_exc() - * - */ - __Pyx_TraceLine(469,0,__PYX_ERR(0, 469, __pyx_L29_except_error)) - /*except:*/ { - __Pyx_AddTraceback("bison.bison_.ParserEngine.buildLib", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_12, &__pyx_t_5) < 0) __PYX_ERR(0, 469, __pyx_L29_except_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_t_12); - __Pyx_GOTREF(__pyx_t_5); - - /* "src/bison/cython/bison_.pyx":470 - * write(" | ".join(options) + " ;\n\n") - * except: - * traceback.print_exc() # <<<<<<<<<<<<<< - * - * write('\n\n%%\n\n') - */ - __Pyx_TraceLine(470,0,__PYX_ERR(0, 470, __pyx_L29_except_error)) - __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_traceback); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 470, __pyx_L29_except_error) - __Pyx_GOTREF(__pyx_t_14); - __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_print_exc); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 470, __pyx_L29_except_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_14 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_22))) { - __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_22); - if (likely(__pyx_t_14)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_22); - __Pyx_INCREF(__pyx_t_14); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_22, function); - } - } - __pyx_t_4 = (__pyx_t_14) ? __Pyx_PyObject_CallOneArg(__pyx_t_22, __pyx_t_14) : __Pyx_PyObject_CallNoArg(__pyx_t_22); - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 470, __pyx_L29_except_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __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; - goto __pyx_L28_exception_handled; - } - __pyx_L29_except_error:; - - /* "src/bison/cython/bison_.pyx":417 - * # and render rules to grammar file - * for rule in rules: - * try: # <<<<<<<<<<<<<< - * write("%s\n : " % rule[0]) - * options = [] - */ - __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_L28_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_L34_try_end:; - } - - /* "src/bison/cython/bison_.pyx":416 - * - * # and render rules to grammar file - * for rule in rules: # <<<<<<<<<<<<<< - * try: - * write("%s\n : " % rule[0]) - */ - __Pyx_TraceLine(416,0,__PYX_ERR(0, 416, __pyx_L1_error)) - } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - - /* "src/bison/cython/bison_.pyx":472 - * traceback.print_exc() - * - * write('\n\n%%\n\n') # <<<<<<<<<<<<<< - * - * # now generate C code - */ - __Pyx_TraceLine(472,0,__PYX_ERR(0, 472, __pyx_L1_error)) - __Pyx_INCREF(__pyx_v_write); - __pyx_t_5 = __pyx_v_write; __pyx_t_12 = NULL; - if (CYTHON_UNPACK_METHODS && likely(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_6 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_12, __pyx_kp_u__17) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__17); - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 472, __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; - - /* "src/bison/cython/bison_.pyx":476 - * # now generate C code - * epilogue = '\n'.join([ - * export + 'void do_parse(void *parser1,', # <<<<<<<<<<<<<< - * ' void *(*cb)(void *, char *, int, int, ...),', - * ' void (*in)(void *, char*, int *, int),', - */ - __Pyx_TraceLine(476,0,__PYX_ERR(0, 476, __pyx_L1_error)) - __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_v_export, __pyx_kp_u_void_do_parse_void_parser1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 476, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - - /* "src/bison/cython/bison_.pyx":475 - * - * # now generate C code - * epilogue = '\n'.join([ # <<<<<<<<<<<<<< - * export + 'void do_parse(void *parser1,', - * ' void *(*cb)(void *, char *, int, int, ...),', - */ - __Pyx_TraceLine(475,0,__PYX_ERR(0, 475, __pyx_L1_error)) - __pyx_t_5 = PyList_New(11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 475, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_6); - PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); - __Pyx_INCREF(__pyx_kp_u_void_cb_void_char_int_int); - __Pyx_GIVEREF(__pyx_kp_u_void_cb_void_char_int_int); - PyList_SET_ITEM(__pyx_t_5, 1, __pyx_kp_u_void_cb_void_char_int_int); - __Pyx_INCREF(__pyx_kp_u_void_in_void_char_int_int); - __Pyx_GIVEREF(__pyx_kp_u_void_in_void_char_int_int); - PyList_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_void_in_void_char_int_int); - __Pyx_INCREF(__pyx_kp_u_int_debug); - __Pyx_GIVEREF(__pyx_kp_u_int_debug); - PyList_SET_ITEM(__pyx_t_5, 3, __pyx_kp_u_int_debug); - __Pyx_INCREF(__pyx_kp_u__32); - __Pyx_GIVEREF(__pyx_kp_u__32); - PyList_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__32); - __Pyx_INCREF(__pyx_kp_u__13); - __Pyx_GIVEREF(__pyx_kp_u__13); - PyList_SET_ITEM(__pyx_t_5, 5, __pyx_kp_u__13); - __Pyx_INCREF(__pyx_kp_u_py_callback_cb); - __Pyx_GIVEREF(__pyx_kp_u_py_callback_cb); - PyList_SET_ITEM(__pyx_t_5, 6, __pyx_kp_u_py_callback_cb); - __Pyx_INCREF(__pyx_kp_u_py_input_in); - __Pyx_GIVEREF(__pyx_kp_u_py_input_in); - PyList_SET_ITEM(__pyx_t_5, 7, __pyx_kp_u_py_input_in); - __Pyx_INCREF(__pyx_kp_u_py_parser_parser1); - __Pyx_GIVEREF(__pyx_kp_u_py_parser_parser1); - PyList_SET_ITEM(__pyx_t_5, 8, __pyx_kp_u_py_parser_parser1); - __Pyx_INCREF(__pyx_kp_u_yydebug_debug_For_Bison_still_g); - __Pyx_GIVEREF(__pyx_kp_u_yydebug_debug_For_Bison_still_g); - PyList_SET_ITEM(__pyx_t_5, 9, __pyx_kp_u_yydebug_debug_For_Bison_still_g); - __Pyx_INCREF(__pyx_kp_u__2); - __Pyx_GIVEREF(__pyx_kp_u__2); - PyList_SET_ITEM(__pyx_t_5, 10, __pyx_kp_u__2); - __pyx_t_6 = 0; - __pyx_t_6 = PyUnicode_Join(__pyx_kp_u__11, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_v_epilogue = ((PyObject*)__pyx_t_6); - __pyx_t_6 = 0; - - /* "src/bison/cython/bison_.pyx":489 - * ]) - * - * if "%define api.pure full" in gOptions: # <<<<<<<<<<<<<< - * epilogue += '\n'.join([ - * 'yyscan_t scanner;', - */ - __Pyx_TraceLine(489,0,__PYX_ERR(0, 489, __pyx_L1_error)) - __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u_define_api_pure_full, __pyx_v_gOptions, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 489, __pyx_L1_error) - __pyx_t_7 = (__pyx_t_9 != 0); - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":490 - * - * if "%define api.pure full" in gOptions: - * epilogue += '\n'.join([ # <<<<<<<<<<<<<< - * 'yyscan_t scanner;', - * 'yylex_init(&scanner);', - */ - __Pyx_TraceLine(490,0,__PYX_ERR(0, 490, __pyx_L1_error)) - __pyx_t_6 = PyList_New(46); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 490, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_INCREF(__pyx_kp_u_yyscan_t_scanner); - __Pyx_GIVEREF(__pyx_kp_u_yyscan_t_scanner); - PyList_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_yyscan_t_scanner); - __Pyx_INCREF(__pyx_kp_u_yylex_init_scanner); - __Pyx_GIVEREF(__pyx_kp_u_yylex_init_scanner); - PyList_SET_ITEM(__pyx_t_6, 1, __pyx_kp_u_yylex_init_scanner); - __Pyx_INCREF(__pyx_kp_u_if_debug_yyset_debug_1_scanner_F); - __Pyx_GIVEREF(__pyx_kp_u_if_debug_yyset_debug_1_scanner_F); - PyList_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_if_debug_yyset_debug_1_scanner_F); - __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__2); - __Pyx_GIVEREF(__pyx_kp_u__2); - PyList_SET_ITEM(__pyx_t_6, 4, __pyx_kp_u__2); - __Pyx_INCREF(__pyx_kp_u_int_status); - __Pyx_GIVEREF(__pyx_kp_u_int_status); - PyList_SET_ITEM(__pyx_t_6, 5, __pyx_kp_u_int_status); - __Pyx_INCREF(__pyx_kp_u_yypstate_ps_yypstate_new); - __Pyx_GIVEREF(__pyx_kp_u_yypstate_ps_yypstate_new); - PyList_SET_ITEM(__pyx_t_6, 6, __pyx_kp_u_yypstate_ps_yypstate_new); - __Pyx_INCREF(__pyx_kp_u_YYSTYPE_pushed_value); - __Pyx_GIVEREF(__pyx_kp_u_YYSTYPE_pushed_value); - PyList_SET_ITEM(__pyx_t_6, 7, __pyx_kp_u_YYSTYPE_pushed_value); - __Pyx_INCREF(__pyx_kp_u_YYLTYPE_yylloc); - __Pyx_GIVEREF(__pyx_kp_u_YYLTYPE_yylloc); - PyList_SET_ITEM(__pyx_t_6, 8, __pyx_kp_u_YYLTYPE_yylloc); - __Pyx_INCREF(__pyx_kp_u_yylloc_first_line_yylloc_first_c); - __Pyx_GIVEREF(__pyx_kp_u_yylloc_first_line_yylloc_first_c); - PyList_SET_ITEM(__pyx_t_6, 9, __pyx_kp_u_yylloc_first_line_yylloc_first_c); - __Pyx_INCREF(__pyx_kp_u_do); - __Pyx_GIVEREF(__pyx_kp_u_do); - PyList_SET_ITEM(__pyx_t_6, 10, __pyx_kp_u_do); - __Pyx_INCREF(__pyx_kp_u_int_token_yylex_pushed_value_yy); - __Pyx_GIVEREF(__pyx_kp_u_int_token_yylex_pushed_value_yy); - PyList_SET_ITEM(__pyx_t_6, 11, __pyx_kp_u_int_token_yylex_pushed_value_yy); - __Pyx_INCREF(__pyx_kp_u_status_yypush_parse_ps_token_pu); - __Pyx_GIVEREF(__pyx_kp_u_status_yypush_parse_ps_token_pu); - PyList_SET_ITEM(__pyx_t_6, 12, __pyx_kp_u_status_yypush_parse_ps_token_pu); - __Pyx_INCREF(__pyx_kp_u_while_status_YYPUSH_MORE); - __Pyx_GIVEREF(__pyx_kp_u_while_status_YYPUSH_MORE); - PyList_SET_ITEM(__pyx_t_6, 13, __pyx_kp_u_while_status_YYPUSH_MORE); - __Pyx_INCREF(__pyx_kp_u_yypstate_delete_ps); - __Pyx_GIVEREF(__pyx_kp_u_yypstate_delete_ps); - PyList_SET_ITEM(__pyx_t_6, 14, __pyx_kp_u_yypstate_delete_ps); - __Pyx_INCREF(__pyx_kp_u_yylex_destroy_scanner_return); - __Pyx_GIVEREF(__pyx_kp_u_yylex_destroy_scanner_return); - PyList_SET_ITEM(__pyx_t_6, 15, __pyx_kp_u_yylex_destroy_scanner_return); - __Pyx_INCREF(__pyx_kp_u__12); - __Pyx_GIVEREF(__pyx_kp_u__12); - PyList_SET_ITEM(__pyx_t_6, 16, __pyx_kp_u__12); - __Pyx_INCREF(__pyx_kp_u__2); - __Pyx_GIVEREF(__pyx_kp_u__2); - PyList_SET_ITEM(__pyx_t_6, 17, __pyx_kp_u__2); - __Pyx_INCREF(__pyx_kp_u__2); - __Pyx_GIVEREF(__pyx_kp_u__2); - PyList_SET_ITEM(__pyx_t_6, 18, __pyx_kp_u__2); - __Pyx_INCREF(__pyx_kp_u_void_yyerror_YYLTYPE_locp_yyscan_2); - __Pyx_GIVEREF(__pyx_kp_u_void_yyerror_YYLTYPE_locp_yyscan_2); - PyList_SET_ITEM(__pyx_t_6, 19, __pyx_kp_u_void_yyerror_YYLTYPE_locp_yyscan_2); - __Pyx_INCREF(__pyx_kp_u__2); - __Pyx_GIVEREF(__pyx_kp_u__2); - PyList_SET_ITEM(__pyx_t_6, 20, __pyx_kp_u__2); - __Pyx_INCREF(__pyx_kp_u_PyObject_error_PyErr_Occurred); - __Pyx_GIVEREF(__pyx_kp_u_PyObject_error_PyErr_Occurred); - PyList_SET_ITEM(__pyx_t_6, 21, __pyx_kp_u_PyObject_error_PyErr_Occurred); - __Pyx_INCREF(__pyx_kp_u_if_error_PyErr_Clear); - __Pyx_GIVEREF(__pyx_kp_u_if_error_PyErr_Clear); - PyList_SET_ITEM(__pyx_t_6, 22, __pyx_kp_u_if_error_PyErr_Clear); - __Pyx_INCREF(__pyx_kp_u_PyObject_fn_PyObject_GetAttrStr); - __Pyx_GIVEREF(__pyx_kp_u_PyObject_fn_PyObject_GetAttrStr); - PyList_SET_ITEM(__pyx_t_6, 23, __pyx_kp_u_PyObject_fn_PyObject_GetAttrStr); - __Pyx_INCREF(__pyx_kp_u_report_syntax_error); - __Pyx_GIVEREF(__pyx_kp_u_report_syntax_error); - PyList_SET_ITEM(__pyx_t_6, 24, __pyx_kp_u_report_syntax_error); - __Pyx_INCREF(__pyx_kp_u_if_fn); - __Pyx_GIVEREF(__pyx_kp_u_if_fn); - PyList_SET_ITEM(__pyx_t_6, 25, __pyx_kp_u_if_fn); - __Pyx_INCREF(__pyx_kp_u_return); - __Pyx_GIVEREF(__pyx_kp_u_return); - PyList_SET_ITEM(__pyx_t_6, 26, __pyx_kp_u_return); - __Pyx_INCREF(__pyx_kp_u__2); - __Pyx_GIVEREF(__pyx_kp_u__2); - PyList_SET_ITEM(__pyx_t_6, 27, __pyx_kp_u__2); - __Pyx_INCREF(__pyx_kp_u_PyObject_args); - __Pyx_GIVEREF(__pyx_kp_u_PyObject_args); - PyList_SET_ITEM(__pyx_t_6, 28, __pyx_kp_u_PyObject_args); - __Pyx_INCREF(__pyx_kp_u_args_Py_BuildValue_s_s_i_i_i_i); - __Pyx_GIVEREF(__pyx_kp_u_args_Py_BuildValue_s_s_i_i_i_i); - PyList_SET_ITEM(__pyx_t_6, 29, __pyx_kp_u_args_Py_BuildValue_s_s_i_i_i_i); - __Pyx_INCREF(__pyx_kp_u_locp_first_line_locp_first_colu); - __Pyx_GIVEREF(__pyx_kp_u_locp_first_line_locp_first_colu); - PyList_SET_ITEM(__pyx_t_6, 30, __pyx_kp_u_locp_first_line_locp_first_colu); - __Pyx_INCREF(__pyx_kp_u_locp_last_line_locp_last_column); - __Pyx_GIVEREF(__pyx_kp_u_locp_last_line_locp_last_column); - PyList_SET_ITEM(__pyx_t_6, 31, __pyx_kp_u_locp_last_line_locp_last_column); - __Pyx_INCREF(__pyx_kp_u__2); - __Pyx_GIVEREF(__pyx_kp_u__2); - PyList_SET_ITEM(__pyx_t_6, 32, __pyx_kp_u__2); - __Pyx_INCREF(__pyx_kp_u_if_args); - __Pyx_GIVEREF(__pyx_kp_u_if_args); - PyList_SET_ITEM(__pyx_t_6, 33, __pyx_kp_u_if_args); - __Pyx_INCREF(__pyx_kp_u_return); - __Pyx_GIVEREF(__pyx_kp_u_return); - PyList_SET_ITEM(__pyx_t_6, 34, __pyx_kp_u_return); - __Pyx_INCREF(__pyx_kp_u__2); - __Pyx_GIVEREF(__pyx_kp_u__2); - PyList_SET_ITEM(__pyx_t_6, 35, __pyx_kp_u__2); - __Pyx_INCREF(__pyx_kp_u__2); - __Pyx_GIVEREF(__pyx_kp_u__2); - PyList_SET_ITEM(__pyx_t_6, 36, __pyx_kp_u__2); - __Pyx_INCREF(__pyx_kp_u_PyObject_res_PyObject_CallObjec); - __Pyx_GIVEREF(__pyx_kp_u_PyObject_res_PyObject_CallObjec); - PyList_SET_ITEM(__pyx_t_6, 37, __pyx_kp_u_PyObject_res_PyObject_CallObjec); - __Pyx_INCREF(__pyx_kp_u_Py_DECREF_args); - __Pyx_GIVEREF(__pyx_kp_u_Py_DECREF_args); - PyList_SET_ITEM(__pyx_t_6, 38, __pyx_kp_u_Py_DECREF_args); - __Pyx_INCREF(__pyx_kp_u__2); - __Pyx_GIVEREF(__pyx_kp_u__2); - PyList_SET_ITEM(__pyx_t_6, 39, __pyx_kp_u__2); - __Pyx_INCREF(__pyx_kp_u_if_res); - __Pyx_GIVEREF(__pyx_kp_u_if_res); - PyList_SET_ITEM(__pyx_t_6, 40, __pyx_kp_u_if_res); - __Pyx_INCREF(__pyx_kp_u_return); - __Pyx_GIVEREF(__pyx_kp_u_return); - PyList_SET_ITEM(__pyx_t_6, 41, __pyx_kp_u_return); - __Pyx_INCREF(__pyx_kp_u__2); - __Pyx_GIVEREF(__pyx_kp_u__2); - PyList_SET_ITEM(__pyx_t_6, 42, __pyx_kp_u__2); - __Pyx_INCREF(__pyx_kp_u_Py_XDECREF_res); - __Pyx_GIVEREF(__pyx_kp_u_Py_XDECREF_res); - PyList_SET_ITEM(__pyx_t_6, 43, __pyx_kp_u_Py_XDECREF_res); - __Pyx_INCREF(__pyx_kp_u_return_2); - __Pyx_GIVEREF(__pyx_kp_u_return_2); - PyList_SET_ITEM(__pyx_t_6, 44, __pyx_kp_u_return_2); - __Pyx_INCREF(__pyx_kp_u__12); - __Pyx_GIVEREF(__pyx_kp_u__12); - PyList_SET_ITEM(__pyx_t_6, 45, __pyx_kp_u__12); - __pyx_t_5 = PyUnicode_Join(__pyx_kp_u__11, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 490, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - - /* "src/bison/cython/bison_.pyx":543 - * ' return;', - * '}', - * ]) + '\n' # <<<<<<<<<<<<<< - * - * else: - */ - __Pyx_TraceLine(543,0,__PYX_ERR(0, 543, __pyx_L1_error)) - __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_kp_u__11); 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; - - /* "src/bison/cython/bison_.pyx":490 - * - * if "%define api.pure full" in gOptions: - * epilogue += '\n'.join([ # <<<<<<<<<<<<<< - * 'yyscan_t scanner;', - * 'yylex_init(&scanner);', - */ - __Pyx_TraceLine(490,0,__PYX_ERR(0, 490, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyUnicode_ConcatSafe(__pyx_v_epilogue, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 490, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF_SET(__pyx_v_epilogue, ((PyObject*)__pyx_t_5)); - __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":489 - * ]) - * - * if "%define api.pure full" in gOptions: # <<<<<<<<<<<<<< - * epilogue += '\n'.join([ - * 'yyscan_t scanner;', - */ - goto __pyx_L49; - } - - /* "src/bison/cython/bison_.pyx":546 - * - * else: - * epilogue += '\n'.join([ # <<<<<<<<<<<<<< - * ' yyparse();', - * '}', - */ - __Pyx_TraceLine(546,0,__PYX_ERR(0, 546, __pyx_L1_error)) - /*else*/ { - __pyx_t_5 = PyList_New(30); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 546, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_INCREF(__pyx_kp_u_yyparse); - __Pyx_GIVEREF(__pyx_kp_u_yyparse); - PyList_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_yyparse); - __Pyx_INCREF(__pyx_kp_u__12); - __Pyx_GIVEREF(__pyx_kp_u__12); - PyList_SET_ITEM(__pyx_t_5, 1, __pyx_kp_u__12); - __Pyx_INCREF(__pyx_kp_u__2); - __Pyx_GIVEREF(__pyx_kp_u__2); - PyList_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__2); - __Pyx_INCREF(__pyx_kp_u__2); - __Pyx_GIVEREF(__pyx_kp_u__2); - PyList_SET_ITEM(__pyx_t_5, 3, __pyx_kp_u__2); - __Pyx_INCREF(__pyx_kp_u_int_yyerror_char_msg_2); - __Pyx_GIVEREF(__pyx_kp_u_int_yyerror_char_msg_2); - PyList_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u_int_yyerror_char_msg_2); - __Pyx_INCREF(__pyx_kp_u__13); - __Pyx_GIVEREF(__pyx_kp_u__13); - PyList_SET_ITEM(__pyx_t_5, 5, __pyx_kp_u__13); - __Pyx_INCREF(__pyx_kp_u_PyObject_error_PyErr_Occurred); - __Pyx_GIVEREF(__pyx_kp_u_PyObject_error_PyErr_Occurred); - PyList_SET_ITEM(__pyx_t_5, 6, __pyx_kp_u_PyObject_error_PyErr_Occurred); - __Pyx_INCREF(__pyx_kp_u_if_error_PyErr_Clear); - __Pyx_GIVEREF(__pyx_kp_u_if_error_PyErr_Clear); - PyList_SET_ITEM(__pyx_t_5, 7, __pyx_kp_u_if_error_PyErr_Clear); - __Pyx_INCREF(__pyx_kp_u_PyObject_fn_PyObject_GetAttrStr); - __Pyx_GIVEREF(__pyx_kp_u_PyObject_fn_PyObject_GetAttrStr); - PyList_SET_ITEM(__pyx_t_5, 8, __pyx_kp_u_PyObject_fn_PyObject_GetAttrStr); - __Pyx_INCREF(__pyx_kp_u_report_syntax_error); - __Pyx_GIVEREF(__pyx_kp_u_report_syntax_error); - PyList_SET_ITEM(__pyx_t_5, 9, __pyx_kp_u_report_syntax_error); - __Pyx_INCREF(__pyx_kp_u_if_fn); - __Pyx_GIVEREF(__pyx_kp_u_if_fn); - PyList_SET_ITEM(__pyx_t_5, 10, __pyx_kp_u_if_fn); - __Pyx_INCREF(__pyx_kp_u_return_1); - __Pyx_GIVEREF(__pyx_kp_u_return_1); - PyList_SET_ITEM(__pyx_t_5, 11, __pyx_kp_u_return_1); - __Pyx_INCREF(__pyx_kp_u__2); - __Pyx_GIVEREF(__pyx_kp_u__2); - PyList_SET_ITEM(__pyx_t_5, 12, __pyx_kp_u__2); - __Pyx_INCREF(__pyx_kp_u_PyObject_args); - __Pyx_GIVEREF(__pyx_kp_u_PyObject_args); - PyList_SET_ITEM(__pyx_t_5, 13, __pyx_kp_u_PyObject_args); - __Pyx_INCREF(__pyx_kp_u_args_Py_BuildValue_s_s_i_i_i_i_2); - __Pyx_GIVEREF(__pyx_kp_u_args_Py_BuildValue_s_s_i_i_i_i_2); - PyList_SET_ITEM(__pyx_t_5, 14, __pyx_kp_u_args_Py_BuildValue_s_s_i_i_i_i_2); - __Pyx_INCREF(__pyx_kp_u_yylloc_first_line_yylloc_first); - __Pyx_GIVEREF(__pyx_kp_u_yylloc_first_line_yylloc_first); - PyList_SET_ITEM(__pyx_t_5, 15, __pyx_kp_u_yylloc_first_line_yylloc_first); - __Pyx_INCREF(__pyx_kp_u_yylloc_last_line_yylloc_last_co); - __Pyx_GIVEREF(__pyx_kp_u_yylloc_last_line_yylloc_last_co); - PyList_SET_ITEM(__pyx_t_5, 16, __pyx_kp_u_yylloc_last_line_yylloc_last_co); - __Pyx_INCREF(__pyx_kp_u__2); - __Pyx_GIVEREF(__pyx_kp_u__2); - PyList_SET_ITEM(__pyx_t_5, 17, __pyx_kp_u__2); - __Pyx_INCREF(__pyx_kp_u_if_args); - __Pyx_GIVEREF(__pyx_kp_u_if_args); - PyList_SET_ITEM(__pyx_t_5, 18, __pyx_kp_u_if_args); - __Pyx_INCREF(__pyx_kp_u_return_1); - __Pyx_GIVEREF(__pyx_kp_u_return_1); - PyList_SET_ITEM(__pyx_t_5, 19, __pyx_kp_u_return_1); - __Pyx_INCREF(__pyx_kp_u__2); - __Pyx_GIVEREF(__pyx_kp_u__2); - PyList_SET_ITEM(__pyx_t_5, 20, __pyx_kp_u__2); - __Pyx_INCREF(__pyx_kp_u_PyObject_res_PyObject_CallObjec); - __Pyx_GIVEREF(__pyx_kp_u_PyObject_res_PyObject_CallObjec); - PyList_SET_ITEM(__pyx_t_5, 21, __pyx_kp_u_PyObject_res_PyObject_CallObjec); - __Pyx_INCREF(__pyx_kp_u_Py_DECREF_args); - __Pyx_GIVEREF(__pyx_kp_u_Py_DECREF_args); - PyList_SET_ITEM(__pyx_t_5, 22, __pyx_kp_u_Py_DECREF_args); - __Pyx_INCREF(__pyx_kp_u__2); - __Pyx_GIVEREF(__pyx_kp_u__2); - PyList_SET_ITEM(__pyx_t_5, 23, __pyx_kp_u__2); - __Pyx_INCREF(__pyx_kp_u_if_res); - __Pyx_GIVEREF(__pyx_kp_u_if_res); - PyList_SET_ITEM(__pyx_t_5, 24, __pyx_kp_u_if_res); - __Pyx_INCREF(__pyx_kp_u_return_1); - __Pyx_GIVEREF(__pyx_kp_u_return_1); - PyList_SET_ITEM(__pyx_t_5, 25, __pyx_kp_u_return_1); - __Pyx_INCREF(__pyx_kp_u__2); - __Pyx_GIVEREF(__pyx_kp_u__2); - PyList_SET_ITEM(__pyx_t_5, 26, __pyx_kp_u__2); - __Pyx_INCREF(__pyx_kp_u_Py_XDECREF_res); - __Pyx_GIVEREF(__pyx_kp_u_Py_XDECREF_res); - PyList_SET_ITEM(__pyx_t_5, 27, __pyx_kp_u_Py_XDECREF_res); - __Pyx_INCREF(__pyx_kp_u_return_0); - __Pyx_GIVEREF(__pyx_kp_u_return_0); - PyList_SET_ITEM(__pyx_t_5, 28, __pyx_kp_u_return_0); - __Pyx_INCREF(__pyx_kp_u__12); - __Pyx_GIVEREF(__pyx_kp_u__12); - PyList_SET_ITEM(__pyx_t_5, 29, __pyx_kp_u__12); - __pyx_t_6 = PyUnicode_Join(__pyx_kp_u__11, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 546, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":582 - * ' return 0;', - * '}', - * ]) + '\n' # <<<<<<<<<<<<<< - * write(epilogue) - * - */ - __Pyx_TraceLine(582,0,__PYX_ERR(0, 582, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_6, __pyx_kp_u__11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 582, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - - /* "src/bison/cython/bison_.pyx":546 - * - * else: - * epilogue += '\n'.join([ # <<<<<<<<<<<<<< - * ' yyparse();', - * '}', - */ - __Pyx_TraceLine(546,0,__PYX_ERR(0, 546, __pyx_L1_error)) - __pyx_t_6 = __Pyx_PyUnicode_ConcatSafe(__pyx_v_epilogue, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 546, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF_SET(__pyx_v_epilogue, ((PyObject*)__pyx_t_6)); - __pyx_t_6 = 0; - } - __pyx_L49:; - - /* "src/bison/cython/bison_.pyx":583 - * '}', - * ]) + '\n' - * write(epilogue) # <<<<<<<<<<<<<< - * - * # done with grammar file - */ - __Pyx_TraceLine(583,0,__PYX_ERR(0, 583, __pyx_L1_error)) - __Pyx_INCREF(__pyx_v_write); - __pyx_t_5 = __pyx_v_write; __pyx_t_12 = NULL; - if (CYTHON_UNPACK_METHODS && likely(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_6 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_12, __pyx_v_epilogue) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_epilogue); - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 583, __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; - - /* "src/bison/cython/bison_.pyx":586 - * - * # done with grammar file - * f.close() # <<<<<<<<<<<<<< - * - * # ----------------------------------------------- - */ - __Pyx_TraceLine(586,0,__PYX_ERR(0, 586, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_close); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 586, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_12 = NULL; - if (CYTHON_UNPACK_METHODS && likely(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_6 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 586, __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; - - /* "src/bison/cython/bison_.pyx":590 - * # ----------------------------------------------- - * # now generate the lex script - * if os.path.isfile(buildDirectory + parser.flexFile): # <<<<<<<<<<<<<< - * os.unlink(buildDirectory + parser.flexFile) - * - */ - __Pyx_TraceLine(590,0,__PYX_ERR(0, 590, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 590, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 590, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_isfile); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 590, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_flexFile); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 590, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_1 = PyNumber_Add(__pyx_v_buildDirectory, __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 590, __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_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_6 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_12, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __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_6)) __PYX_ERR(0, 590, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 590, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":591 - * # now generate the lex script - * if os.path.isfile(buildDirectory + parser.flexFile): - * os.unlink(buildDirectory + parser.flexFile) # <<<<<<<<<<<<<< - * - * f = open(buildDirectory + parser.flexFile, 'w') - */ - __Pyx_TraceLine(591,0,__PYX_ERR(0, 591, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 591, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_unlink); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 591, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_flexFile); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 591, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_12 = PyNumber_Add(__pyx_v_buildDirectory, __pyx_t_5); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 591, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __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_6 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_12); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 591, __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; - - /* "src/bison/cython/bison_.pyx":590 - * # ----------------------------------------------- - * # now generate the lex script - * if os.path.isfile(buildDirectory + parser.flexFile): # <<<<<<<<<<<<<< - * os.unlink(buildDirectory + parser.flexFile) - * - */ - } - - /* "src/bison/cython/bison_.pyx":593 - * os.unlink(buildDirectory + parser.flexFile) - * - * f = open(buildDirectory + parser.flexFile, 'w') # <<<<<<<<<<<<<< - * f.write(textwrap.dedent(gLex)) - * f.close() - */ - __Pyx_TraceLine(593,0,__PYX_ERR(0, 593, __pyx_L1_error)) - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_flexFile); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 593, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = PyNumber_Add(__pyx_v_buildDirectory, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 593, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); - __Pyx_INCREF(__pyx_n_u_w); - __Pyx_GIVEREF(__pyx_n_u_w); - PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_u_w); - __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF_SET(__pyx_v_f, __pyx_t_1); - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":594 - * - * f = open(buildDirectory + parser.flexFile, 'w') - * f.write(textwrap.dedent(gLex)) # <<<<<<<<<<<<<< - * f.close() - * - */ - __Pyx_TraceLine(594,0,__PYX_ERR(0, 594, __pyx_L1_error)) - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 594, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_textwrap); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 594, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_dedent); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 594, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __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_12 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_gLex) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_gLex); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 594, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __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_Call2Args(__pyx_t_6, __pyx_t_4, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_12); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 594, __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; - - /* "src/bison/cython/bison_.pyx":595 - * f = open(buildDirectory + parser.flexFile, 'w') - * f.write(textwrap.dedent(gLex)) - * f.close() # <<<<<<<<<<<<<< - * - * # create and set up a compiler object - */ - __Pyx_TraceLine(595,0,__PYX_ERR(0, 595, __pyx_L1_error)) - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_close); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 595, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __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_1 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __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; - - /* "src/bison/cython/bison_.pyx":598 - * - * # create and set up a compiler object - * if sys.platform == 'win32': # <<<<<<<<<<<<<< - * env = distutils.ccompiler.new_compiler(verbose=parser.verbose) - * env.initialize() - */ - __Pyx_TraceLine(598,0,__PYX_ERR(0, 598, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_platform); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 598, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_win32, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 598, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":599 - * # create and set up a compiler object - * if sys.platform == 'win32': - * env = distutils.ccompiler.new_compiler(verbose=parser.verbose) # <<<<<<<<<<<<<< - * env.initialize() - * env.add_library('python{v.major}{v.minor}'.format(v=sys.version_info)) - */ - __Pyx_TraceLine(599,0,__PYX_ERR(0, 599, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_distutils); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 599, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ccompiler); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 599, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_new_compiler); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 599, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 599, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_verbose); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 599, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_verbose, __pyx_t_12) < 0) __PYX_ERR(0, 599, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 599, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_env = __pyx_t_12; - __pyx_t_12 = 0; - - /* "src/bison/cython/bison_.pyx":600 - * if sys.platform == 'win32': - * env = distutils.ccompiler.new_compiler(verbose=parser.verbose) - * env.initialize() # <<<<<<<<<<<<<< - * env.add_library('python{v.major}{v.minor}'.format(v=sys.version_info)) - * env.add_include_dir(distutils.sysconfig.get_python_inc()) - */ - __Pyx_TraceLine(600,0,__PYX_ERR(0, 600, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_env, __pyx_n_s_initialize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 600, __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_12 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 600, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - - /* "src/bison/cython/bison_.pyx":601 - * env = distutils.ccompiler.new_compiler(verbose=parser.verbose) - * env.initialize() - * env.add_library('python{v.major}{v.minor}'.format(v=sys.version_info)) # <<<<<<<<<<<<<< - * env.add_include_dir(distutils.sysconfig.get_python_inc()) - * env.add_library_dir(os.path.join(sys.prefix, 'libs')) - */ - __Pyx_TraceLine(601,0,__PYX_ERR(0, 601, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_env, __pyx_n_s_add_library); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 601, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_python_v_major_v_minor, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 601, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 601, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_sys); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 601, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_version_info); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 601, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_v, __pyx_t_22) < 0) __PYX_ERR(0, 601, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 601, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - } - } - __pyx_t_12 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_t_22) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_22); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 601, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - - /* "src/bison/cython/bison_.pyx":602 - * env.initialize() - * env.add_library('python{v.major}{v.minor}'.format(v=sys.version_info)) - * env.add_include_dir(distutils.sysconfig.get_python_inc()) # <<<<<<<<<<<<<< - * env.add_library_dir(os.path.join(sys.prefix, 'libs')) - * else: - */ - __Pyx_TraceLine(602,0,__PYX_ERR(0, 602, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_env, __pyx_n_s_add_include_dir); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 602, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_distutils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 602, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sysconfig); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 602, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_get_python_inc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 602, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __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_22 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 602, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - } - } - __pyx_t_12 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_t_22) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_22); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 602, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - - /* "src/bison/cython/bison_.pyx":603 - * env.add_library('python{v.major}{v.minor}'.format(v=sys.version_info)) - * env.add_include_dir(distutils.sysconfig.get_python_inc()) - * env.add_library_dir(os.path.join(sys.prefix, 'libs')) # <<<<<<<<<<<<<< - * else: - * env = distutils.ccompiler.new_compiler(verbose=parser.verbose) - */ - __Pyx_TraceLine(603,0,__PYX_ERR(0, 603, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_env, __pyx_n_s_add_library_dir); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 603, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 603, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 603, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_join); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 603, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_sys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 603, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_prefix); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 603, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = NULL; - __pyx_t_13 = 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_13 = 1; - } - } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_5, __pyx_n_u_libs}; - __pyx_t_22 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 603, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_5, __pyx_n_u_libs}; - __pyx_t_22 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 603, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else - #endif - { - __pyx_t_14 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 603, __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_5); - PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_t_5); - __Pyx_INCREF(__pyx_n_u_libs); - __Pyx_GIVEREF(__pyx_n_u_libs); - PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_n_u_libs); - __pyx_t_5 = 0; - __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_14, NULL); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 603, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - } - } - __pyx_t_12 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_t_22) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_22); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 603, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - - /* "src/bison/cython/bison_.pyx":598 - * - * # create and set up a compiler object - * if sys.platform == 'win32': # <<<<<<<<<<<<<< - * env = distutils.ccompiler.new_compiler(verbose=parser.verbose) - * env.initialize() - */ - goto __pyx_L51; - } - - /* "src/bison/cython/bison_.pyx":605 - * env.add_library_dir(os.path.join(sys.prefix, 'libs')) - * else: - * env = distutils.ccompiler.new_compiler(verbose=parser.verbose) # <<<<<<<<<<<<<< - * env.add_include_dir(distutils.sysconfig.get_python_inc()) - * env.define_macro('__declspec(x)') - */ - __Pyx_TraceLine(605,0,__PYX_ERR(0, 605, __pyx_L1_error)) - /*else*/ { - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_distutils); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 605, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_ccompiler); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 605, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_new_compiler); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 605, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 605, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_verbose); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 605, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_verbose, __pyx_t_22) < 0) __PYX_ERR(0, 605, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 605, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_env = __pyx_t_22; - __pyx_t_22 = 0; - - /* "src/bison/cython/bison_.pyx":606 - * else: - * env = distutils.ccompiler.new_compiler(verbose=parser.verbose) - * env.add_include_dir(distutils.sysconfig.get_python_inc()) # <<<<<<<<<<<<<< - * env.define_macro('__declspec(x)') - * - */ - __Pyx_TraceLine(606,0,__PYX_ERR(0, 606, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_env, __pyx_n_s_add_include_dir); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 606, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_distutils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 606, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sysconfig); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 606, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_get_python_inc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 606, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_14 = NULL; - if (CYTHON_UNPACK_METHODS && likely(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_12 = (__pyx_t_14) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_14) : __Pyx_PyObject_CallNoArg(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 606, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - } - } - __pyx_t_22 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_12); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 606, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - - /* "src/bison/cython/bison_.pyx":607 - * env = distutils.ccompiler.new_compiler(verbose=parser.verbose) - * env.add_include_dir(distutils.sysconfig.get_python_inc()) - * env.define_macro('__declspec(x)') # <<<<<<<<<<<<<< - * - * # ----------------------------------------- - */ - __Pyx_TraceLine(607,0,__PYX_ERR(0, 607, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_env, __pyx_n_s_define_macro); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_12 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_12)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_12); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - } - } - __pyx_t_22 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_12, __pyx_kp_u_declspec_x) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_kp_u_declspec_x); - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 607, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - } - __pyx_L51:; - - /* "src/bison/cython/bison_.pyx":612 - * # Now run bison on the grammar file - * #os.system('bison -d tmp.y') - * bisonCmd = parser.bisonCmd + [buildDirectory + parser.bisonFile] # <<<<<<<<<<<<<< - * - * if parser.verbose: - */ - __Pyx_TraceLine(612,0,__PYX_ERR(0, 612, __pyx_L1_error)) - __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_bisonCmd); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 612, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_bisonFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_12 = PyNumber_Add(__pyx_v_buildDirectory, __pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 612, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_12); - PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_12); - __pyx_t_12 = 0; - __pyx_t_12 = PyNumber_Add(__pyx_t_22, __pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 612, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_bisonCmd = __pyx_t_12; - __pyx_t_12 = 0; - - /* "src/bison/cython/bison_.pyx":614 - * bisonCmd = parser.bisonCmd + [buildDirectory + parser.bisonFile] - * - * if parser.verbose: # <<<<<<<<<<<<<< - * print("bison cmd: {}".format(' '.join(bisonCmd))) - * - */ - __Pyx_TraceLine(614,0,__PYX_ERR(0, 614, __pyx_L1_error)) - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_verbose); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 614, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 614, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":615 - * - * if parser.verbose: - * print("bison cmd: {}".format(' '.join(bisonCmd))) # <<<<<<<<<<<<<< - * - * # env.spawn(bisonCmd) - */ - __Pyx_TraceLine(615,0,__PYX_ERR(0, 615, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_bison_cmd, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 615, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_22 = PyUnicode_Join(__pyx_kp_u__14, __pyx_v_bisonCmd); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 615, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - } - } - __pyx_t_12 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_t_22) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_22); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 615, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 615, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":614 - * bisonCmd = parser.bisonCmd + [buildDirectory + parser.bisonFile] - * - * if parser.verbose: # <<<<<<<<<<<<<< - * print("bison cmd: {}".format(' '.join(bisonCmd))) - * - */ - } - - /* "src/bison/cython/bison_.pyx":618 - * - * # env.spawn(bisonCmd) - * proc = subprocess.Popen(' '.join(bisonCmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) # <<<<<<<<<<<<<< - * (out, err) = proc.communicate() - * if proc.returncode: - */ - __Pyx_TraceLine(618,0,__PYX_ERR(0, 618, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_subprocess); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Popen); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 618, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyUnicode_Join(__pyx_kp_u__14, __pyx_v_bisonCmd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_22 = PyTuple_New(1); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 618, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_1); - __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_subprocess); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 618, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_PIPE); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 618, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_stdout, __pyx_t_14) < 0) __PYX_ERR(0, 618, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_subprocess); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 618, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_PIPE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 618, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_stderr, __pyx_t_4) < 0) __PYX_ERR(0, 618, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_shell, Py_True) < 0) __PYX_ERR(0, 618, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_22, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 618, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_proc = __pyx_t_4; - __pyx_t_4 = 0; - - /* "src/bison/cython/bison_.pyx":619 - * # env.spawn(bisonCmd) - * proc = subprocess.Popen(' '.join(bisonCmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) - * (out, err) = proc.communicate() # <<<<<<<<<<<<<< - * if proc.returncode: - * raise Exception(err) - */ - __Pyx_TraceLine(619,0,__PYX_ERR(0, 619, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_proc, __pyx_n_s_communicate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_22 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_22 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_22)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_22); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - } - } - __pyx_t_4 = (__pyx_t_22) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_22) : __Pyx_PyObject_CallNoArg(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 619, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { - PyObject* sequence = __pyx_t_4; - 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, 619, __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_22 = PyTuple_GET_ITEM(sequence, 1); - } else { - __pyx_t_1 = PyList_GET_ITEM(sequence, 0); - __pyx_t_22 = PyList_GET_ITEM(sequence, 1); - } - __Pyx_INCREF(__pyx_t_1); - __Pyx_INCREF(__pyx_t_22); - #else - __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_22 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 619, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - #endif - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - Py_ssize_t index = -1; - __pyx_t_12 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 619, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_15 = Py_TYPE(__pyx_t_12)->tp_iternext; - index = 0; __pyx_t_1 = __pyx_t_15(__pyx_t_12); if (unlikely(!__pyx_t_1)) goto __pyx_L53_unpacking_failed; - __Pyx_GOTREF(__pyx_t_1); - index = 1; __pyx_t_22 = __pyx_t_15(__pyx_t_12); if (unlikely(!__pyx_t_22)) goto __pyx_L53_unpacking_failed; - __Pyx_GOTREF(__pyx_t_22); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_12), 2) < 0) __PYX_ERR(0, 619, __pyx_L1_error) - __pyx_t_15 = NULL; - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - goto __pyx_L54_unpacking_done; - __pyx_L53_unpacking_failed:; - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_15 = NULL; - if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 619, __pyx_L1_error) - __pyx_L54_unpacking_done:; - } - __pyx_v_out = __pyx_t_1; - __pyx_t_1 = 0; - __pyx_v_err = __pyx_t_22; - __pyx_t_22 = 0; - - /* "src/bison/cython/bison_.pyx":620 - * proc = subprocess.Popen(' '.join(bisonCmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) - * (out, err) = proc.communicate() - * if proc.returncode: # <<<<<<<<<<<<<< - * raise Exception(err) - * - */ - __Pyx_TraceLine(620,0,__PYX_ERR(0, 620, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_proc, __pyx_n_s_returncode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 620, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 620, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(__pyx_t_7)) { - - /* "src/bison/cython/bison_.pyx":621 - * (out, err) = proc.communicate() - * if proc.returncode: - * raise Exception(err) # <<<<<<<<<<<<<< - * - * if parser.verbose: - */ - __Pyx_TraceLine(621,0,__PYX_ERR(0, 621, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 621, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_Raise(__pyx_t_4, 0, 0, 0); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 621, __pyx_L1_error) - - /* "src/bison/cython/bison_.pyx":620 - * proc = subprocess.Popen(' '.join(bisonCmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) - * (out, err) = proc.communicate() - * if proc.returncode: # <<<<<<<<<<<<<< - * raise Exception(err) - * - */ - } - - /* "src/bison/cython/bison_.pyx":623 - * raise Exception(err) - * - * if parser.verbose: # <<<<<<<<<<<<<< - * print("CMD Output: {}".format(out)) - * - */ - __Pyx_TraceLine(623,0,__PYX_ERR(0, 623, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_verbose); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 623, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 623, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":624 - * - * if parser.verbose: - * print("CMD Output: {}".format(out)) # <<<<<<<<<<<<<< - * - * if parser.verbose: - */ - __Pyx_TraceLine(624,0,__PYX_ERR(0, 624, __pyx_L1_error)) - __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_CMD_Output, __pyx_n_s_format); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 624, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __pyx_t_1 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_22))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_22); - if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_22); - __Pyx_INCREF(__pyx_t_1); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_22, function); - } - } - __pyx_t_4 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_22, __pyx_t_1, __pyx_v_out) : __Pyx_PyObject_CallOneArg(__pyx_t_22, __pyx_v_out); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 624, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __pyx_t_22 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 624, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - - /* "src/bison/cython/bison_.pyx":623 - * raise Exception(err) - * - * if parser.verbose: # <<<<<<<<<<<<<< - * print("CMD Output: {}".format(out)) - * - */ - } - - /* "src/bison/cython/bison_.pyx":626 - * print("CMD Output: {}".format(out)) - * - * if parser.verbose: # <<<<<<<<<<<<<< - * print("renaming bison output files") - * print("{} => {}{}".format(parser.bisonCFile, buildDirectory, - */ - __Pyx_TraceLine(626,0,__PYX_ERR(0, 626, __pyx_L1_error)) - __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_verbose); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 626, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_22); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 626, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":627 - * - * if parser.verbose: - * print("renaming bison output files") # <<<<<<<<<<<<<< - * print("{} => {}{}".format(parser.bisonCFile, buildDirectory, - * parser.bisonCFile1)) - */ - __Pyx_TraceLine(627,0,__PYX_ERR(0, 627, __pyx_L1_error)) - __pyx_t_22 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 627, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - - /* "src/bison/cython/bison_.pyx":628 - * if parser.verbose: - * print("renaming bison output files") - * print("{} => {}{}".format(parser.bisonCFile, buildDirectory, # <<<<<<<<<<<<<< - * parser.bisonCFile1)) - * print("{} => {}{}".format(parser.bisonHFile, buildDirectory, - */ - __Pyx_TraceLine(628,0,__PYX_ERR(0, 628, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__34, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 628, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_bisonCFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 628, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - - /* "src/bison/cython/bison_.pyx":629 - * print("renaming bison output files") - * print("{} => {}{}".format(parser.bisonCFile, buildDirectory, - * parser.bisonCFile1)) # <<<<<<<<<<<<<< - * print("{} => {}{}".format(parser.bisonHFile, buildDirectory, - * parser.bisonHFile1)) - */ - __Pyx_TraceLine(629,0,__PYX_ERR(0, 629, __pyx_L1_error)) - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_bisonCFile1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 629, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_14 = NULL; - __pyx_t_13 = 0; - if (CYTHON_UNPACK_METHODS && likely(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_13 = 1; - } - } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[4] = {__pyx_t_14, __pyx_t_1, __pyx_v_buildDirectory, __pyx_t_12}; - __pyx_t_22 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 628, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[4] = {__pyx_t_14, __pyx_t_1, __pyx_v_buildDirectory, __pyx_t_12}; - __pyx_t_22 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 628, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } else - #endif - { - __pyx_t_5 = PyTuple_New(3+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 628, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (__pyx_t_14) { - __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_14); __pyx_t_14 = NULL; - } - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_13, __pyx_t_1); - __Pyx_INCREF(__pyx_v_buildDirectory); - __Pyx_GIVEREF(__pyx_v_buildDirectory); - PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_13, __pyx_v_buildDirectory); - __Pyx_GIVEREF(__pyx_t_12); - PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_13, __pyx_t_12); - __pyx_t_1 = 0; - __pyx_t_12 = 0; - __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 628, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "src/bison/cython/bison_.pyx":628 - * if parser.verbose: - * print("renaming bison output files") - * print("{} => {}{}".format(parser.bisonCFile, buildDirectory, # <<<<<<<<<<<<<< - * parser.bisonCFile1)) - * print("{} => {}{}".format(parser.bisonHFile, buildDirectory, - */ - __Pyx_TraceLine(628,0,__PYX_ERR(0, 628, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_22); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 628, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "src/bison/cython/bison_.pyx":630 - * print("{} => {}{}".format(parser.bisonCFile, buildDirectory, - * parser.bisonCFile1)) - * print("{} => {}{}".format(parser.bisonHFile, buildDirectory, # <<<<<<<<<<<<<< - * parser.bisonHFile1)) - * - */ - __Pyx_TraceLine(630,0,__PYX_ERR(0, 630, __pyx_L1_error)) - __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__34, __pyx_n_s_format); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 630, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_bisonHFile); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 630, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - - /* "src/bison/cython/bison_.pyx":631 - * parser.bisonCFile1)) - * print("{} => {}{}".format(parser.bisonHFile, buildDirectory, - * parser.bisonHFile1)) # <<<<<<<<<<<<<< - * - * if os.path.isfile(buildDirectory + parser.bisonCFile1): - */ - __Pyx_TraceLine(631,0,__PYX_ERR(0, 631, __pyx_L1_error)) - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_bisonHFile1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 631, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_1 = NULL; - __pyx_t_13 = 0; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_22))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_22); - if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_22); - __Pyx_INCREF(__pyx_t_1); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_22, function); - __pyx_t_13 = 1; - } - } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_22)) { - PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_t_5, __pyx_v_buildDirectory, __pyx_t_12}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_22, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 630, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_22)) { - PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_t_5, __pyx_v_buildDirectory, __pyx_t_12}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_22, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 630, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } else - #endif - { - __pyx_t_14 = PyTuple_New(3+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 630, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - if (__pyx_t_1) { - __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_1); __pyx_t_1 = NULL; - } - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_t_5); - __Pyx_INCREF(__pyx_v_buildDirectory); - __Pyx_GIVEREF(__pyx_v_buildDirectory); - PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_v_buildDirectory); - __Pyx_GIVEREF(__pyx_t_12); - PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_13, __pyx_t_12); - __pyx_t_5 = 0; - __pyx_t_12 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_22, __pyx_t_14, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 630, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - } - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - - /* "src/bison/cython/bison_.pyx":630 - * print("{} => {}{}".format(parser.bisonCFile, buildDirectory, - * parser.bisonCFile1)) - * print("{} => {}{}".format(parser.bisonHFile, buildDirectory, # <<<<<<<<<<<<<< - * parser.bisonHFile1)) - * - */ - __Pyx_TraceLine(630,0,__PYX_ERR(0, 630, __pyx_L1_error)) - __pyx_t_22 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 630, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - - /* "src/bison/cython/bison_.pyx":626 - * print("CMD Output: {}".format(out)) - * - * if parser.verbose: # <<<<<<<<<<<<<< - * print("renaming bison output files") - * print("{} => {}{}".format(parser.bisonCFile, buildDirectory, - */ - } - - /* "src/bison/cython/bison_.pyx":633 - * parser.bisonHFile1)) - * - * if os.path.isfile(buildDirectory + parser.bisonCFile1): # <<<<<<<<<<<<<< - * os.unlink(buildDirectory + parser.bisonCFile1) - * - */ - __Pyx_TraceLine(633,0,__PYX_ERR(0, 633, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 633, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 633, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_isfile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 633, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_bisonCFile1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 633, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __pyx_t_12 = PyNumber_Add(__pyx_v_buildDirectory, __pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 633, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_14 = NULL; - if (CYTHON_UNPACK_METHODS && likely(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_22 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_14, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_12); - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 633, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_22); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 633, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":634 - * - * if os.path.isfile(buildDirectory + parser.bisonCFile1): - * os.unlink(buildDirectory + parser.bisonCFile1) # <<<<<<<<<<<<<< - * - * shutil.copy(parser.bisonCFile, buildDirectory + parser.bisonCFile1) - */ - __Pyx_TraceLine(634,0,__PYX_ERR(0, 634, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 634, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_unlink); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 634, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_bisonCFile1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 634, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_14 = PyNumber_Add(__pyx_v_buildDirectory, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 634, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = NULL; - 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_22 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_4, __pyx_t_14) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __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_22)) __PYX_ERR(0, 634, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - - /* "src/bison/cython/bison_.pyx":633 - * parser.bisonHFile1)) - * - * if os.path.isfile(buildDirectory + parser.bisonCFile1): # <<<<<<<<<<<<<< - * os.unlink(buildDirectory + parser.bisonCFile1) - * - */ - } - - /* "src/bison/cython/bison_.pyx":636 - * os.unlink(buildDirectory + parser.bisonCFile1) - * - * shutil.copy(parser.bisonCFile, buildDirectory + parser.bisonCFile1) # <<<<<<<<<<<<<< - * # delete 'local' file - * os.remove(parser.bisonCFile) - */ - __Pyx_TraceLine(636,0,__PYX_ERR(0, 636, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_shutil); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 636, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_copy); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 636, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_bisonCFile); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 636, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_bisonCFile1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 636, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyNumber_Add(__pyx_v_buildDirectory, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 636, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = NULL; - __pyx_t_13 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_14); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_14, function); - __pyx_t_13 = 1; - } - } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_14)) { - PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_12, __pyx_t_5}; - __pyx_t_22 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 636, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) { - PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_12, __pyx_t_5}; - __pyx_t_22 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 636, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else - #endif - { - __pyx_t_1 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 636, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (__pyx_t_4) { - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = NULL; - } - __Pyx_GIVEREF(__pyx_t_12); - PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_13, __pyx_t_12); - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_13, __pyx_t_5); - __pyx_t_12 = 0; - __pyx_t_5 = 0; - __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_1, NULL); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 636, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - - /* "src/bison/cython/bison_.pyx":638 - * shutil.copy(parser.bisonCFile, buildDirectory + parser.bisonCFile1) - * # delete 'local' file - * os.remove(parser.bisonCFile) # <<<<<<<<<<<<<< - * - * if os.path.isfile(buildDirectory + parser.bisonHFile1): - */ - __Pyx_TraceLine(638,0,__PYX_ERR(0, 638, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_os); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 638, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_remove); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 638, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_bisonCFile); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 638, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __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_22 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_14) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_14); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 638, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - - /* "src/bison/cython/bison_.pyx":640 - * os.remove(parser.bisonCFile) - * - * if os.path.isfile(buildDirectory + parser.bisonHFile1): # <<<<<<<<<<<<<< - * os.unlink(buildDirectory + parser.bisonHFile1) - * - */ - __Pyx_TraceLine(640,0,__PYX_ERR(0, 640, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_path); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 640, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_isfile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_bisonHFile1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 640, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __pyx_t_5 = PyNumber_Add(__pyx_v_buildDirectory, __pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 640, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_14 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_14)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_14); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - } - } - __pyx_t_22 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_14, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 640, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_22); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 640, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":641 - * - * if os.path.isfile(buildDirectory + parser.bisonHFile1): - * os.unlink(buildDirectory + parser.bisonHFile1) # <<<<<<<<<<<<<< - * - * shutil.copy(parser.bisonHFile, buildDirectory + parser.bisonHFile1) - */ - __Pyx_TraceLine(641,0,__PYX_ERR(0, 641, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_unlink); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 641, __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_parser, __pyx_n_s_bisonHFile1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_14 = PyNumber_Add(__pyx_v_buildDirectory, __pyx_t_1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 641, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(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_22 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_1, __pyx_t_14) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_14); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 641, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - - /* "src/bison/cython/bison_.pyx":640 - * os.remove(parser.bisonCFile) - * - * if os.path.isfile(buildDirectory + parser.bisonHFile1): # <<<<<<<<<<<<<< - * os.unlink(buildDirectory + parser.bisonHFile1) - * - */ - } - - /* "src/bison/cython/bison_.pyx":643 - * os.unlink(buildDirectory + parser.bisonHFile1) - * - * shutil.copy(parser.bisonHFile, buildDirectory + parser.bisonHFile1) # <<<<<<<<<<<<<< - * # delete 'local' file - * os.remove(parser.bisonHFile) - */ - __Pyx_TraceLine(643,0,__PYX_ERR(0, 643, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_shutil); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 643, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_copy); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 643, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_bisonHFile); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 643, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_bisonHFile1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 643, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_12 = PyNumber_Add(__pyx_v_buildDirectory, __pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 643, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = NULL; - __pyx_t_13 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_14); - if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); - __Pyx_INCREF(__pyx_t_1); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_14, function); - __pyx_t_13 = 1; - } - } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_14)) { - PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_5, __pyx_t_12}; - __pyx_t_22 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 643, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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_1, __pyx_t_5, __pyx_t_12}; - __pyx_t_22 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 643, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } else - #endif - { - __pyx_t_4 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 643, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__pyx_t_1) { - __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = NULL; - } - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_13, __pyx_t_5); - __Pyx_GIVEREF(__pyx_t_12); - PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_13, __pyx_t_12); - __pyx_t_5 = 0; - __pyx_t_12 = 0; - __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_4, NULL); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 643, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - - /* "src/bison/cython/bison_.pyx":645 - * shutil.copy(parser.bisonHFile, buildDirectory + parser.bisonHFile1) - * # delete 'local' file - * os.remove(parser.bisonHFile) # <<<<<<<<<<<<<< - * - * # ----------------------------------------- - */ - __Pyx_TraceLine(645,0,__PYX_ERR(0, 645, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_os); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 645, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_remove); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 645, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_bisonHFile); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 645, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __pyx_t_12 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_12)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_12); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - } - } - __pyx_t_22 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_12, __pyx_t_14) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_14); - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 645, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - - /* "src/bison/cython/bison_.pyx":650 - * # Now run lex on the lex file - * #os.system('lex tmp.l') - * flexCmd = parser.flexCmd + [buildDirectory + parser.flexFile] # <<<<<<<<<<<<<< - * - * if parser.verbose: - */ - __Pyx_TraceLine(650,0,__PYX_ERR(0, 650, __pyx_L1_error)) - __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_flexCmd); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 650, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_flexFile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 650, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_14 = PyNumber_Add(__pyx_v_buildDirectory, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 650, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 650, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_14); - PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_14); - __pyx_t_14 = 0; - __pyx_t_14 = PyNumber_Add(__pyx_t_22, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 650, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_v_flexCmd = __pyx_t_14; - __pyx_t_14 = 0; - - /* "src/bison/cython/bison_.pyx":652 - * flexCmd = parser.flexCmd + [buildDirectory + parser.flexFile] - * - * if parser.verbose: # <<<<<<<<<<<<<< - * print("flex cmd: {}".format(' '.join(flexCmd))) - * - */ - __Pyx_TraceLine(652,0,__PYX_ERR(0, 652, __pyx_L1_error)) - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_verbose); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 652, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 652, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":653 - * - * if parser.verbose: - * print("flex cmd: {}".format(' '.join(flexCmd))) # <<<<<<<<<<<<<< - * - * # env.spawn(flexCmd) - */ - __Pyx_TraceLine(653,0,__PYX_ERR(0, 653, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_flex_cmd, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 653, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_22 = PyUnicode_Join(__pyx_kp_u__14, __pyx_v_flexCmd); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 653, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __pyx_t_12 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_12)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_12); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - } - } - __pyx_t_14 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_12, __pyx_t_22) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_22); - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 653, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 653, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "src/bison/cython/bison_.pyx":652 - * flexCmd = parser.flexCmd + [buildDirectory + parser.flexFile] - * - * if parser.verbose: # <<<<<<<<<<<<<< - * print("flex cmd: {}".format(' '.join(flexCmd))) - * - */ - } - - /* "src/bison/cython/bison_.pyx":656 - * - * # env.spawn(flexCmd) - * proc = subprocess.Popen(' '.join(flexCmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) # <<<<<<<<<<<<<< - * (out, err) = proc.communicate() - * if proc.returncode: - */ - __Pyx_TraceLine(656,0,__PYX_ERR(0, 656, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_subprocess); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 656, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Popen); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 656, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__14, __pyx_v_flexCmd); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 656, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_22 = PyTuple_New(1); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 656, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_4); - __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 656, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_subprocess); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 656, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_PIPE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 656, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_stdout, __pyx_t_5) < 0) __PYX_ERR(0, 656, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_subprocess); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 656, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_PIPE); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 656, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_stderr, __pyx_t_12) < 0) __PYX_ERR(0, 656, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shell, Py_True) < 0) __PYX_ERR(0, 656, __pyx_L1_error) - __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_22, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 656, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF_SET(__pyx_v_proc, __pyx_t_12); - __pyx_t_12 = 0; - - /* "src/bison/cython/bison_.pyx":657 - * # env.spawn(flexCmd) - * proc = subprocess.Popen(' '.join(flexCmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) - * (out, err) = proc.communicate() # <<<<<<<<<<<<<< - * if proc.returncode: - * raise Exception(err) - */ - __Pyx_TraceLine(657,0,__PYX_ERR(0, 657, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_proc, __pyx_n_s_communicate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 657, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_22 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_22 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_22)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_22); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - } - } - __pyx_t_12 = (__pyx_t_22) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_22) : __Pyx_PyObject_CallNoArg(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 657, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if ((likely(PyTuple_CheckExact(__pyx_t_12))) || (PyList_CheckExact(__pyx_t_12))) { - PyObject* sequence = __pyx_t_12; - 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, 657, __pyx_L1_error) - } - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_22 = PyTuple_GET_ITEM(sequence, 1); - } else { - __pyx_t_4 = PyList_GET_ITEM(sequence, 0); - __pyx_t_22 = PyList_GET_ITEM(sequence, 1); - } - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(__pyx_t_22); - #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 657, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_22 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 657, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - #endif - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } else { - Py_ssize_t index = -1; - __pyx_t_14 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 657, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_15 = Py_TYPE(__pyx_t_14)->tp_iternext; - index = 0; __pyx_t_4 = __pyx_t_15(__pyx_t_14); if (unlikely(!__pyx_t_4)) goto __pyx_L61_unpacking_failed; - __Pyx_GOTREF(__pyx_t_4); - index = 1; __pyx_t_22 = __pyx_t_15(__pyx_t_14); if (unlikely(!__pyx_t_22)) goto __pyx_L61_unpacking_failed; - __Pyx_GOTREF(__pyx_t_22); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 2) < 0) __PYX_ERR(0, 657, __pyx_L1_error) - __pyx_t_15 = NULL; - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - goto __pyx_L62_unpacking_done; - __pyx_L61_unpacking_failed:; - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_15 = NULL; - if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 657, __pyx_L1_error) - __pyx_L62_unpacking_done:; - } - __Pyx_DECREF_SET(__pyx_v_out, __pyx_t_4); - __pyx_t_4 = 0; - __Pyx_DECREF_SET(__pyx_v_err, __pyx_t_22); - __pyx_t_22 = 0; - - /* "src/bison/cython/bison_.pyx":658 - * proc = subprocess.Popen(' '.join(flexCmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) - * (out, err) = proc.communicate() - * if proc.returncode: # <<<<<<<<<<<<<< - * raise Exception(err) - * - */ - __Pyx_TraceLine(658,0,__PYX_ERR(0, 658, __pyx_L1_error)) - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_proc, __pyx_n_s_returncode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 658, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 658, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(__pyx_t_7)) { - - /* "src/bison/cython/bison_.pyx":659 - * (out, err) = proc.communicate() - * if proc.returncode: - * raise Exception(err) # <<<<<<<<<<<<<< - * - * if parser.verbose: - */ - __Pyx_TraceLine(659,0,__PYX_ERR(0, 659, __pyx_L1_error)) - __pyx_t_12 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_v_err); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 659, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_Raise(__pyx_t_12, 0, 0, 0); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __PYX_ERR(0, 659, __pyx_L1_error) - - /* "src/bison/cython/bison_.pyx":658 - * proc = subprocess.Popen(' '.join(flexCmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) - * (out, err) = proc.communicate() - * if proc.returncode: # <<<<<<<<<<<<<< - * raise Exception(err) - * - */ - } - - /* "src/bison/cython/bison_.pyx":661 - * raise Exception(err) - * - * if parser.verbose: # <<<<<<<<<<<<<< - * print("CMD Output: {}".format(out)) - * - */ - __Pyx_TraceLine(661,0,__PYX_ERR(0, 661, __pyx_L1_error)) - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_verbose); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 661, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 661, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":662 - * - * if parser.verbose: - * print("CMD Output: {}".format(out)) # <<<<<<<<<<<<<< - * - * if os.path.isfile(buildDirectory + parser.flexCFile1): - */ - __Pyx_TraceLine(662,0,__PYX_ERR(0, 662, __pyx_L1_error)) - __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_CMD_Output, __pyx_n_s_format); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 662, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_22))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_22); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_22); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_22, function); - } - } - __pyx_t_12 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_22, __pyx_t_4, __pyx_v_out) : __Pyx_PyObject_CallOneArg(__pyx_t_22, __pyx_v_out); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 662, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __pyx_t_22 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_12); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 662, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - - /* "src/bison/cython/bison_.pyx":661 - * raise Exception(err) - * - * if parser.verbose: # <<<<<<<<<<<<<< - * print("CMD Output: {}".format(out)) - * - */ - } - - /* "src/bison/cython/bison_.pyx":664 - * print("CMD Output: {}".format(out)) - * - * if os.path.isfile(buildDirectory + parser.flexCFile1): # <<<<<<<<<<<<<< - * os.unlink(buildDirectory + parser.flexCFile1) - * if parser.verbose: - */ - __Pyx_TraceLine(664,0,__PYX_ERR(0, 664, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_os); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 664, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 664, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_isfile); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 664, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_flexCFile1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 664, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_14 = PyNumber_Add(__pyx_v_buildDirectory, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 664, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && likely(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_22 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_4, __pyx_t_14) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __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_22)) __PYX_ERR(0, 664, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_22); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 664, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":665 - * - * if os.path.isfile(buildDirectory + parser.flexCFile1): - * os.unlink(buildDirectory + parser.flexCFile1) # <<<<<<<<<<<<<< - * if parser.verbose: - * print("{} => {}{}".format(parser.flexCFile, buildDirectory, parser.flexCFile1)) - */ - __Pyx_TraceLine(665,0,__PYX_ERR(0, 665, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_os); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 665, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_unlink); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 665, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_flexCFile1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 665, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_4 = PyNumber_Add(__pyx_v_buildDirectory, __pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 665, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) { - __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_14); - if (likely(__pyx_t_12)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); - __Pyx_INCREF(__pyx_t_12); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_14, function); - } - } - __pyx_t_22 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_12, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_4); - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 665, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - - /* "src/bison/cython/bison_.pyx":664 - * print("CMD Output: {}".format(out)) - * - * if os.path.isfile(buildDirectory + parser.flexCFile1): # <<<<<<<<<<<<<< - * os.unlink(buildDirectory + parser.flexCFile1) - * if parser.verbose: - */ - } - - /* "src/bison/cython/bison_.pyx":666 - * if os.path.isfile(buildDirectory + parser.flexCFile1): - * os.unlink(buildDirectory + parser.flexCFile1) - * if parser.verbose: # <<<<<<<<<<<<<< - * print("{} => {}{}".format(parser.flexCFile, buildDirectory, parser.flexCFile1)) - * shutil.copy(parser.flexCFile, buildDirectory + parser.flexCFile1) - */ - __Pyx_TraceLine(666,0,__PYX_ERR(0, 666, __pyx_L1_error)) - __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_verbose); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 666, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_22); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 666, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":667 - * os.unlink(buildDirectory + parser.flexCFile1) - * if parser.verbose: - * print("{} => {}{}".format(parser.flexCFile, buildDirectory, parser.flexCFile1)) # <<<<<<<<<<<<<< - * shutil.copy(parser.flexCFile, buildDirectory + parser.flexCFile1) - * # delete 'local' file - */ - __Pyx_TraceLine(667,0,__PYX_ERR(0, 667, __pyx_L1_error)) - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__34, __pyx_n_s_format); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 667, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_flexCFile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 667, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_flexCFile1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 667, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_5 = NULL; - __pyx_t_13 = 0; - if (CYTHON_UNPACK_METHODS && likely(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_13 = 1; - } - } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_14)) { - PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_4, __pyx_v_buildDirectory, __pyx_t_12}; - __pyx_t_22 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 667, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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[4] = {__pyx_t_5, __pyx_t_4, __pyx_v_buildDirectory, __pyx_t_12}; - __pyx_t_22 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 667, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } else - #endif - { - __pyx_t_1 = PyTuple_New(3+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __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_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_13, __pyx_t_4); - __Pyx_INCREF(__pyx_v_buildDirectory); - __Pyx_GIVEREF(__pyx_v_buildDirectory); - PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_13, __pyx_v_buildDirectory); - __Pyx_GIVEREF(__pyx_t_12); - PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_13, __pyx_t_12); - __pyx_t_4 = 0; - __pyx_t_12 = 0; - __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_1, NULL); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 667, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_22); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 667, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - - /* "src/bison/cython/bison_.pyx":666 - * if os.path.isfile(buildDirectory + parser.flexCFile1): - * os.unlink(buildDirectory + parser.flexCFile1) - * if parser.verbose: # <<<<<<<<<<<<<< - * print("{} => {}{}".format(parser.flexCFile, buildDirectory, parser.flexCFile1)) - * shutil.copy(parser.flexCFile, buildDirectory + parser.flexCFile1) - */ - } - - /* "src/bison/cython/bison_.pyx":668 - * if parser.verbose: - * print("{} => {}{}".format(parser.flexCFile, buildDirectory, parser.flexCFile1)) - * shutil.copy(parser.flexCFile, buildDirectory + parser.flexCFile1) # <<<<<<<<<<<<<< - * # delete 'local' file - * os.remove(parser.flexCFile) - */ - __Pyx_TraceLine(668,0,__PYX_ERR(0, 668, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_22, __pyx_n_s_shutil); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 668, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_22, __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_flexCFile); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 668, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_flexCFile1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 668, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_4 = PyNumber_Add(__pyx_v_buildDirectory, __pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 668, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = NULL; - __pyx_t_13 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_12)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_12); - __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[3] = {__pyx_t_12, __pyx_t_22, __pyx_t_4}; - __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 668, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { - PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_t_22, __pyx_t_4}; - __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 668, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - { - __pyx_t_5 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 668, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (__pyx_t_12) { - __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_12); __pyx_t_12 = NULL; - } - __Pyx_GIVEREF(__pyx_t_22); - PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_13, __pyx_t_22); - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_13, __pyx_t_4); - __pyx_t_22 = 0; - __pyx_t_4 = 0; - __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 668, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - - /* "src/bison/cython/bison_.pyx":670 - * shutil.copy(parser.flexCFile, buildDirectory + parser.flexCFile1) - * # delete 'local' file - * os.remove(parser.flexCFile) # <<<<<<<<<<<<<< - * - * if os.path.isfile(buildDirectory + parser.flexHFile1): - */ - __Pyx_TraceLine(670,0,__PYX_ERR(0, 670, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_remove); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 670, __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_parser, __pyx_n_s_flexCFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = NULL; - 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_14 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 670, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - - /* "src/bison/cython/bison_.pyx":672 - * os.remove(parser.flexCFile) - * - * if os.path.isfile(buildDirectory + parser.flexHFile1): # <<<<<<<<<<<<<< - * os.unlink(buildDirectory + parser.flexHFile1) - * if parser.verbose: - */ - __Pyx_TraceLine(672,0,__PYX_ERR(0, 672, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 672, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_isfile); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 672, __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_parser, __pyx_n_s_flexHFile1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyNumber_Add(__pyx_v_buildDirectory, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 672, __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_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_14 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 672, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 672, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":673 - * - * if os.path.isfile(buildDirectory + parser.flexHFile1): - * os.unlink(buildDirectory + parser.flexHFile1) # <<<<<<<<<<<<<< - * if parser.verbose: - * print("{} => {}{}".format(parser.flexHFile, buildDirectory, parser.flexHFile1)) - */ - __Pyx_TraceLine(673,0,__PYX_ERR(0, 673, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 673, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_unlink); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 673, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_flexHFile1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 673, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = PyNumber_Add(__pyx_v_buildDirectory, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 673, __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_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_14 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 673, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - - /* "src/bison/cython/bison_.pyx":672 - * os.remove(parser.flexCFile) - * - * if os.path.isfile(buildDirectory + parser.flexHFile1): # <<<<<<<<<<<<<< - * os.unlink(buildDirectory + parser.flexHFile1) - * if parser.verbose: - */ - } - - /* "src/bison/cython/bison_.pyx":674 - * if os.path.isfile(buildDirectory + parser.flexHFile1): - * os.unlink(buildDirectory + parser.flexHFile1) - * if parser.verbose: # <<<<<<<<<<<<<< - * print("{} => {}{}".format(parser.flexHFile, buildDirectory, parser.flexHFile1)) - * shutil.copy(parser.flexHFile, buildDirectory + parser.flexHFile1) - */ - __Pyx_TraceLine(674,0,__PYX_ERR(0, 674, __pyx_L1_error)) - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_verbose); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 674, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 674, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":675 - * os.unlink(buildDirectory + parser.flexHFile1) - * if parser.verbose: - * print("{} => {}{}".format(parser.flexHFile, buildDirectory, parser.flexHFile1)) # <<<<<<<<<<<<<< - * shutil.copy(parser.flexHFile, buildDirectory + parser.flexHFile1) - * # delete 'local' file - */ - __Pyx_TraceLine(675,0,__PYX_ERR(0, 675, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__34, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 675, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_flexHFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 675, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_flexHFile1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 675, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_22 = NULL; - __pyx_t_13 = 0; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_22 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_22)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_22); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - __pyx_t_13 = 1; - } - } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[4] = {__pyx_t_22, __pyx_t_1, __pyx_v_buildDirectory, __pyx_t_5}; - __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 675, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[4] = {__pyx_t_22, __pyx_t_1, __pyx_v_buildDirectory, __pyx_t_5}; - __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 675, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else - #endif - { - __pyx_t_12 = PyTuple_New(3+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 675, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - if (__pyx_t_22) { - __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_22); __pyx_t_22 = NULL; - } - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_t_1); - __Pyx_INCREF(__pyx_v_buildDirectory); - __Pyx_GIVEREF(__pyx_v_buildDirectory); - PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_v_buildDirectory); - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_13, __pyx_t_5); - __pyx_t_1 = 0; - __pyx_t_5 = 0; - __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_12, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 675, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 675, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "src/bison/cython/bison_.pyx":674 - * if os.path.isfile(buildDirectory + parser.flexHFile1): - * os.unlink(buildDirectory + parser.flexHFile1) - * if parser.verbose: # <<<<<<<<<<<<<< - * print("{} => {}{}".format(parser.flexHFile, buildDirectory, parser.flexHFile1)) - * shutil.copy(parser.flexHFile, buildDirectory + parser.flexHFile1) - */ - } - - /* "src/bison/cython/bison_.pyx":676 - * if parser.verbose: - * print("{} => {}{}".format(parser.flexHFile, buildDirectory, parser.flexHFile1)) - * shutil.copy(parser.flexHFile, buildDirectory + parser.flexHFile1) # <<<<<<<<<<<<<< - * # delete 'local' file - * # os.remove(parser.flexHFile) - */ - __Pyx_TraceLine(676,0,__PYX_ERR(0, 676, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_shutil); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 676, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_copy); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 676, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_flexHFile); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 676, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_flexHFile1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 676, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = PyNumber_Add(__pyx_v_buildDirectory, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 676, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; - __pyx_t_13 = 0; - 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_13 = 1; - } - } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_12)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_14, __pyx_t_1}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 676, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_14, __pyx_t_1}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 676, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } else - #endif - { - __pyx_t_22 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 676, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - if (__pyx_t_5) { - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_5); __pyx_t_5 = NULL; - } - __Pyx_GIVEREF(__pyx_t_14); - PyTuple_SET_ITEM(__pyx_t_22, 0+__pyx_t_13, __pyx_t_14); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_22, 1+__pyx_t_13, __pyx_t_1); - __pyx_t_14 = 0; - __pyx_t_1 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_22, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 676, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - } - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "src/bison/cython/bison_.pyx":681 - * - * - * if parser._buildOnlyCFiles: # <<<<<<<<<<<<<< - * return - * - */ - __Pyx_TraceLine(681,0,__PYX_ERR(0, 681, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_buildOnlyCFiles); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 681, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 681, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":682 - * - * if parser._buildOnlyCFiles: - * return # <<<<<<<<<<<<<< - * - * libFileName = buildDirectory + parser.bisonEngineLibName \ - */ - __Pyx_TraceLine(682,0,__PYX_ERR(0, 682, __pyx_L1_error)) - __Pyx_XDECREF(__pyx_r); - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - - /* "src/bison/cython/bison_.pyx":681 - * - * - * if parser._buildOnlyCFiles: # <<<<<<<<<<<<<< - * return - * - */ - } - - /* "src/bison/cython/bison_.pyx":684 - * return - * - * libFileName = buildDirectory + parser.bisonEngineLibName \ # <<<<<<<<<<<<<< - * + machinery.EXTENSION_SUFFIXES[0] - * - */ - __Pyx_TraceLine(684,0,__PYX_ERR(0, 684, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_bisonEngineLibName); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 684, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_12 = PyNumber_Add(__pyx_v_buildDirectory, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 684, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "src/bison/cython/bison_.pyx":685 - * - * libFileName = buildDirectory + parser.bisonEngineLibName \ - * + machinery.EXTENSION_SUFFIXES[0] # <<<<<<<<<<<<<< - * - * if parser.verbose: - */ - __Pyx_TraceLine(685,0,__PYX_ERR(0, 685, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_machinery); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 685, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_EXTENSION_SUFFIXES); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 685, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_22, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 685, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __pyx_t_22 = PyNumber_Add(__pyx_t_12, __pyx_t_4); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 685, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_v_libFileName = __pyx_t_22; - __pyx_t_22 = 0; - - /* "src/bison/cython/bison_.pyx":687 - * + machinery.EXTENSION_SUFFIXES[0] - * - * if parser.verbose: # <<<<<<<<<<<<<< - * print("Compiling: {}".format(libFileName)) - * # ----------------------------------------- - */ - __Pyx_TraceLine(687,0,__PYX_ERR(0, 687, __pyx_L1_error)) - __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_verbose); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 687, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_22); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 687, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":688 - * - * if parser.verbose: - * print("Compiling: {}".format(libFileName)) # <<<<<<<<<<<<<< - * # ----------------------------------------- - * # Now compile the files into a shared lib - */ - __Pyx_TraceLine(688,0,__PYX_ERR(0, 688, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Compiling, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 688, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_12 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_12)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_12); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - } - } - __pyx_t_22 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_12, __pyx_v_libFileName) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_libFileName); - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 688, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_22); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 688, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "src/bison/cython/bison_.pyx":687 - * + machinery.EXTENSION_SUFFIXES[0] - * - * if parser.verbose: # <<<<<<<<<<<<<< - * print("Compiling: {}".format(libFileName)) - * # ----------------------------------------- - */ - } - - /* "src/bison/cython/bison_.pyx":691 - * # ----------------------------------------- - * # Now compile the files into a shared lib - * objs = env.compile([buildDirectory + parser.bisonCFile1, # <<<<<<<<<<<<<< - * buildDirectory + parser.flexCFile1], - * extra_preargs=parser.cflags_pre, - */ - __Pyx_TraceLine(691,0,__PYX_ERR(0, 691, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_env, __pyx_n_s_compile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 691, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_bisonCFile1); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 691, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __pyx_t_12 = PyNumber_Add(__pyx_v_buildDirectory, __pyx_t_22); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 691, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - - /* "src/bison/cython/bison_.pyx":692 - * # Now compile the files into a shared lib - * objs = env.compile([buildDirectory + parser.bisonCFile1, - * buildDirectory + parser.flexCFile1], # <<<<<<<<<<<<<< - * extra_preargs=parser.cflags_pre, - * extra_postargs=parser.cflags_post, - */ - __Pyx_TraceLine(692,0,__PYX_ERR(0, 692, __pyx_L1_error)) - __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_flexCFile1); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 692, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __pyx_t_1 = PyNumber_Add(__pyx_v_buildDirectory, __pyx_t_22); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - - /* "src/bison/cython/bison_.pyx":691 - * # ----------------------------------------- - * # Now compile the files into a shared lib - * objs = env.compile([buildDirectory + parser.bisonCFile1, # <<<<<<<<<<<<<< - * buildDirectory + parser.flexCFile1], - * extra_preargs=parser.cflags_pre, - */ - __Pyx_TraceLine(691,0,__PYX_ERR(0, 691, __pyx_L1_error)) - __pyx_t_22 = PyList_New(2); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 691, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_GIVEREF(__pyx_t_12); - PyList_SET_ITEM(__pyx_t_22, 0, __pyx_t_12); - __Pyx_GIVEREF(__pyx_t_1); - PyList_SET_ITEM(__pyx_t_22, 1, __pyx_t_1); - __pyx_t_12 = 0; - __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_22); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_22); - __pyx_t_22 = 0; - - /* "src/bison/cython/bison_.pyx":693 - * objs = env.compile([buildDirectory + parser.bisonCFile1, - * buildDirectory + parser.flexCFile1], - * extra_preargs=parser.cflags_pre, # <<<<<<<<<<<<<< - * extra_postargs=parser.cflags_post, - * debug=parser.debugSymbols) - */ - __Pyx_TraceLine(693,0,__PYX_ERR(0, 693, __pyx_L1_error)) - __pyx_t_22 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 693, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_cflags_pre); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 693, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - if (PyDict_SetItem(__pyx_t_22, __pyx_n_s_extra_preargs, __pyx_t_12) < 0) __PYX_ERR(0, 693, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - - /* "src/bison/cython/bison_.pyx":694 - * buildDirectory + parser.flexCFile1], - * extra_preargs=parser.cflags_pre, - * extra_postargs=parser.cflags_post, # <<<<<<<<<<<<<< - * debug=parser.debugSymbols) - * - */ - __Pyx_TraceLine(694,0,__PYX_ERR(0, 694, __pyx_L1_error)) - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_cflags_post); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 694, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - if (PyDict_SetItem(__pyx_t_22, __pyx_n_s_extra_postargs, __pyx_t_12) < 0) __PYX_ERR(0, 693, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - - /* "src/bison/cython/bison_.pyx":695 - * extra_preargs=parser.cflags_pre, - * extra_postargs=parser.cflags_post, - * debug=parser.debugSymbols) # <<<<<<<<<<<<<< - * - * if os.path.isfile(libFileName+".bak"): - */ - __Pyx_TraceLine(695,0,__PYX_ERR(0, 695, __pyx_L1_error)) - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_debugSymbols); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 695, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - if (PyDict_SetItem(__pyx_t_22, __pyx_n_s_debug, __pyx_t_12) < 0) __PYX_ERR(0, 693, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - - /* "src/bison/cython/bison_.pyx":691 - * # ----------------------------------------- - * # Now compile the files into a shared lib - * objs = env.compile([buildDirectory + parser.bisonCFile1, # <<<<<<<<<<<<<< - * buildDirectory + parser.flexCFile1], - * extra_preargs=parser.cflags_pre, - */ - __Pyx_TraceLine(691,0,__PYX_ERR(0, 691, __pyx_L1_error)) - __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, __pyx_t_22); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 691, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __pyx_v_objs = __pyx_t_12; - __pyx_t_12 = 0; - - /* "src/bison/cython/bison_.pyx":697 - * debug=parser.debugSymbols) - * - * if os.path.isfile(libFileName+".bak"): # <<<<<<<<<<<<<< - * os.unlink(libFileName+".bak") - * - */ - __Pyx_TraceLine(697,0,__PYX_ERR(0, 697, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_22, __pyx_n_s_os); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 697, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_22, __pyx_n_s_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_isfile); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 697, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Add(__pyx_v_libFileName, __pyx_kp_u_bak); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_22))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_22); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_22); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_22, function); - } - } - __pyx_t_12 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_22, __pyx_t_4, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_22, __pyx_t_1); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 697, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 697, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":698 - * - * if os.path.isfile(libFileName+".bak"): - * os.unlink(libFileName+".bak") # <<<<<<<<<<<<<< - * - * if os.path.isfile(libFileName): - */ - __Pyx_TraceLine(698,0,__PYX_ERR(0, 698, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_22, __pyx_n_s_os); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 698, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_22, __pyx_n_s_unlink); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 698, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __pyx_t_22 = PyNumber_Add(__pyx_v_libFileName, __pyx_kp_u_bak); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 698, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - } - } - __pyx_t_12 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_t_22) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_22); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 698, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - - /* "src/bison/cython/bison_.pyx":697 - * debug=parser.debugSymbols) - * - * if os.path.isfile(libFileName+".bak"): # <<<<<<<<<<<<<< - * os.unlink(libFileName+".bak") - * - */ - } - - /* "src/bison/cython/bison_.pyx":700 - * os.unlink(libFileName+".bak") - * - * if os.path.isfile(libFileName): # <<<<<<<<<<<<<< - * os.rename(libFileName, libFileName+".bak") - * - */ - __Pyx_TraceLine(700,0,__PYX_ERR(0, 700, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 700, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_path); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 700, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_22, __pyx_n_s_isfile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 700, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __pyx_t_22 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_22 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_22)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_22); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - } - } - __pyx_t_12 = (__pyx_t_22) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_22, __pyx_v_libFileName) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_libFileName); - __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 700, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 700, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":701 - * - * if os.path.isfile(libFileName): - * os.rename(libFileName, libFileName+".bak") # <<<<<<<<<<<<<< - * - * if parser.verbose: - */ - __Pyx_TraceLine(701,0,__PYX_ERR(0, 701, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_rename); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 701, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Add(__pyx_v_libFileName, __pyx_kp_u_bak); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = NULL; - __pyx_t_13 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_22))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_22); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_22); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_22, function); - __pyx_t_13 = 1; - } - } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_22)) { - PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_libFileName, __pyx_t_1}; - __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_22, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 701, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_22)) { - PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_libFileName, __pyx_t_1}; - __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_22, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 701, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } else - #endif - { - __pyx_t_14 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 701, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - if (__pyx_t_4) { - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_4); __pyx_t_4 = NULL; - } - __Pyx_INCREF(__pyx_v_libFileName); - __Pyx_GIVEREF(__pyx_v_libFileName); - PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_v_libFileName); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_t_1); - __pyx_t_1 = 0; - __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_22, __pyx_t_14, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 701, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - } - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - - /* "src/bison/cython/bison_.pyx":700 - * os.unlink(libFileName+".bak") - * - * if os.path.isfile(libFileName): # <<<<<<<<<<<<<< - * os.rename(libFileName, libFileName+".bak") - * - */ - } - - /* "src/bison/cython/bison_.pyx":703 - * os.rename(libFileName, libFileName+".bak") - * - * if parser.verbose: # <<<<<<<<<<<<<< - * print("linking: {} => {}".format(', '.join(objs), libFileName)) - * - */ - __Pyx_TraceLine(703,0,__PYX_ERR(0, 703, __pyx_L1_error)) - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_verbose); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 703, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 703, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":704 - * - * if parser.verbose: - * print("linking: {} => {}".format(', '.join(objs), libFileName)) # <<<<<<<<<<<<<< - * - * if sys.platform.startswith("darwin"): - */ - __Pyx_TraceLine(704,0,__PYX_ERR(0, 704, __pyx_L1_error)) - __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_linking, __pyx_n_s_format); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 704, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __pyx_t_14 = PyUnicode_Join(__pyx_kp_u__35, __pyx_v_objs); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 704, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __pyx_t_1 = NULL; - __pyx_t_13 = 0; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_22))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_22); - if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_22); - __Pyx_INCREF(__pyx_t_1); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_22, function); - __pyx_t_13 = 1; - } - } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_22)) { - PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_14, __pyx_v_libFileName}; - __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_22, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 704, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_22)) { - PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_14, __pyx_v_libFileName}; - __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_22, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 704, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - } else - #endif - { - __pyx_t_4 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 704, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__pyx_t_1) { - __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = NULL; - } - __Pyx_GIVEREF(__pyx_t_14); - PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_13, __pyx_t_14); - __Pyx_INCREF(__pyx_v_libFileName); - __Pyx_GIVEREF(__pyx_v_libFileName); - PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_13, __pyx_v_libFileName); - __pyx_t_14 = 0; - __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_22, __pyx_t_4, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 704, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __pyx_t_22 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_12); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 704, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - - /* "src/bison/cython/bison_.pyx":703 - * os.rename(libFileName, libFileName+".bak") - * - * if parser.verbose: # <<<<<<<<<<<<<< - * print("linking: {} => {}".format(', '.join(objs), libFileName)) - * - */ - } - - /* "src/bison/cython/bison_.pyx":706 - * print("linking: {} => {}".format(', '.join(objs), libFileName)) - * - * if sys.platform.startswith("darwin"): # <<<<<<<<<<<<<< - * # on OSX, ld throws undefined symbol for shared library references - * # however, we would like to link against libpython dynamically, so that - */ - __Pyx_TraceLine(706,0,__PYX_ERR(0, 706, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_sys); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 706, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_platform); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 706, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_startswith); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 706, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && likely(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_22 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_4, __pyx_n_u_darwin) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_n_u_darwin); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 706, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_22); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 706, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":710 - * # however, we would like to link against libpython dynamically, so that - * # the built .so will not depend on which python interpreter it runs on - * env.linker_so += ["-undefined", "dynamic_lookup"] # <<<<<<<<<<<<<< - * - * # link 'em into a shared lib - */ - __Pyx_TraceLine(710,0,__PYX_ERR(0, 710, __pyx_L1_error)) - __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_env, __pyx_n_s_linker_so); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 710, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __pyx_t_12 = PyList_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 710, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_INCREF(__pyx_kp_u_undefined); - __Pyx_GIVEREF(__pyx_kp_u_undefined); - PyList_SET_ITEM(__pyx_t_12, 0, __pyx_kp_u_undefined); - __Pyx_INCREF(__pyx_n_u_dynamic_lookup); - __Pyx_GIVEREF(__pyx_n_u_dynamic_lookup); - PyList_SET_ITEM(__pyx_t_12, 1, __pyx_n_u_dynamic_lookup); - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_22, __pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 710, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_env, __pyx_n_s_linker_so, __pyx_t_4) < 0) __PYX_ERR(0, 710, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "src/bison/cython/bison_.pyx":706 - * print("linking: {} => {}".format(', '.join(objs), libFileName)) - * - * if sys.platform.startswith("darwin"): # <<<<<<<<<<<<<< - * # on OSX, ld throws undefined symbol for shared library references - * # however, we would like to link against libpython dynamically, so that - */ - } - - /* "src/bison/cython/bison_.pyx":713 - * - * # link 'em into a shared lib - * env.link_shared_object(objs, libFileName) # <<<<<<<<<<<<<< - * - * #cdef char *incdir - */ - __Pyx_TraceLine(713,0,__PYX_ERR(0, 713, __pyx_L1_error)) - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_env, __pyx_n_s_link_shared_object); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 713, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_22 = NULL; - __pyx_t_13 = 0; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { - __pyx_t_22 = PyMethod_GET_SELF(__pyx_t_12); - if (likely(__pyx_t_22)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); - __Pyx_INCREF(__pyx_t_22); - __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_22, __pyx_v_objs, __pyx_v_libFileName}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 713, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) { - PyObject *__pyx_temp[3] = {__pyx_t_22, __pyx_v_objs, __pyx_v_libFileName}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 713, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else - #endif - { - __pyx_t_14 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 713, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - if (__pyx_t_22) { - __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_22); __pyx_t_22 = NULL; - } - __Pyx_INCREF(__pyx_v_objs); - __Pyx_GIVEREF(__pyx_v_objs); - PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_v_objs); - __Pyx_INCREF(__pyx_v_libFileName); - __Pyx_GIVEREF(__pyx_v_libFileName); - PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_v_libFileName); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_14, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 713, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - } - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "src/bison/cython/bison_.pyx":722 - * # clean up, if we succeeded - * # hitlist = objs[:] - * hitlist = [] # <<<<<<<<<<<<<< - * - * if os.path.isfile(self.libFilename_py): - */ - __Pyx_TraceLine(722,0,__PYX_ERR(0, 722, __pyx_L1_error)) - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 722, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_v_hitlist = ((PyObject*)__pyx_t_4); - __pyx_t_4 = 0; - - /* "src/bison/cython/bison_.pyx":724 - * hitlist = [] - * - * if os.path.isfile(self.libFilename_py): # <<<<<<<<<<<<<< - * for name in ['bisonFile', 'bisonCFile', 'bisonHFile', - * 'bisonCFile1', 'bisonHFile1', 'flexFile', - */ - __Pyx_TraceLine(724,0,__PYX_ERR(0, 724, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_os); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 724, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_path); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 724, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_isfile); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 724, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_14 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { - __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_12); - if (likely(__pyx_t_14)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); - __Pyx_INCREF(__pyx_t_14); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_12, function); - } - } - __pyx_t_4 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_14, __pyx_v_self->libFilename_py) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_self->libFilename_py); - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 724, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 724, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":725 - * - * if os.path.isfile(self.libFilename_py): - * for name in ['bisonFile', 'bisonCFile', 'bisonHFile', # <<<<<<<<<<<<<< - * 'bisonCFile1', 'bisonHFile1', 'flexFile', - * 'flexCFile', 'flexCFile1', - */ - __Pyx_TraceLine(725,0,__PYX_ERR(0, 725, __pyx_L1_error)) - __pyx_t_4 = PyList_New(8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 725, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_INCREF(__pyx_n_u_bisonFile); - __Pyx_GIVEREF(__pyx_n_u_bisonFile); - PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_bisonFile); - __Pyx_INCREF(__pyx_n_u_bisonCFile); - __Pyx_GIVEREF(__pyx_n_u_bisonCFile); - PyList_SET_ITEM(__pyx_t_4, 1, __pyx_n_u_bisonCFile); - __Pyx_INCREF(__pyx_n_u_bisonHFile); - __Pyx_GIVEREF(__pyx_n_u_bisonHFile); - PyList_SET_ITEM(__pyx_t_4, 2, __pyx_n_u_bisonHFile); - __Pyx_INCREF(__pyx_n_u_bisonCFile1); - __Pyx_GIVEREF(__pyx_n_u_bisonCFile1); - PyList_SET_ITEM(__pyx_t_4, 3, __pyx_n_u_bisonCFile1); - __Pyx_INCREF(__pyx_n_u_bisonHFile1); - __Pyx_GIVEREF(__pyx_n_u_bisonHFile1); - PyList_SET_ITEM(__pyx_t_4, 4, __pyx_n_u_bisonHFile1); - __Pyx_INCREF(__pyx_n_u_flexFile); - __Pyx_GIVEREF(__pyx_n_u_flexFile); - PyList_SET_ITEM(__pyx_t_4, 5, __pyx_n_u_flexFile); - __Pyx_INCREF(__pyx_n_u_flexCFile); - __Pyx_GIVEREF(__pyx_n_u_flexCFile); - PyList_SET_ITEM(__pyx_t_4, 6, __pyx_n_u_flexCFile); - __Pyx_INCREF(__pyx_n_u_flexCFile1); - __Pyx_GIVEREF(__pyx_n_u_flexCFile1); - PyList_SET_ITEM(__pyx_t_4, 7, __pyx_n_u_flexCFile1); - - /* "src/bison/cython/bison_.pyx":728 - * 'bisonCFile1', 'bisonHFile1', 'flexFile', - * 'flexCFile', 'flexCFile1', - * ] + objs: # <<<<<<<<<<<<<< - * if hasattr(parser, name): - * fname = buildDirectory + getattr(parser, name) - */ - __Pyx_TraceLine(728,0,__PYX_ERR(0, 728, __pyx_L1_error)) - __pyx_t_12 = PyNumber_Add(__pyx_t_4, __pyx_v_objs); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 728, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "src/bison/cython/bison_.pyx":725 - * - * if os.path.isfile(self.libFilename_py): - * for name in ['bisonFile', 'bisonCFile', 'bisonHFile', # <<<<<<<<<<<<<< - * 'bisonCFile1', 'bisonHFile1', 'flexFile', - * 'flexCFile', 'flexCFile1', - */ - __Pyx_TraceLine(725,0,__PYX_ERR(0, 725, __pyx_L1_error)) - if (likely(PyList_CheckExact(__pyx_t_12)) || PyTuple_CheckExact(__pyx_t_12)) { - __pyx_t_4 = __pyx_t_12; __Pyx_INCREF(__pyx_t_4); __pyx_t_2 = 0; - __pyx_t_3 = NULL; - } else { - __pyx_t_2 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 725, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 725, __pyx_L1_error) - } - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - for (;;) { - if (likely(!__pyx_t_3)) { - if (likely(PyList_CheckExact(__pyx_t_4))) { - if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_4)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_12 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_12); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 725, __pyx_L1_error) - #else - __pyx_t_12 = PySequence_ITEM(__pyx_t_4, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 725, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - #endif - } else { - if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_4)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_12); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 725, __pyx_L1_error) - #else - __pyx_t_12 = PySequence_ITEM(__pyx_t_4, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 725, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - #endif - } - } else { - __pyx_t_12 = __pyx_t_3(__pyx_t_4); - if (unlikely(!__pyx_t_12)) { - PyObject* exc_type = PyErr_Occurred(); - if (exc_type) { - if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 725, __pyx_L1_error) - } - break; - } - __Pyx_GOTREF(__pyx_t_12); - } - __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_12); - __pyx_t_12 = 0; - - /* "src/bison/cython/bison_.pyx":729 - * 'flexCFile', 'flexCFile1', - * ] + objs: - * if hasattr(parser, name): # <<<<<<<<<<<<<< - * fname = buildDirectory + getattr(parser, name) - * else: - */ - __Pyx_TraceLine(729,0,__PYX_ERR(0, 729, __pyx_L1_error)) - __pyx_t_7 = __Pyx_HasAttr(__pyx_v_parser, __pyx_v_name); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 729, __pyx_L1_error) - __pyx_t_9 = (__pyx_t_7 != 0); - if (__pyx_t_9) { - - /* "src/bison/cython/bison_.pyx":730 - * ] + objs: - * if hasattr(parser, name): - * fname = buildDirectory + getattr(parser, name) # <<<<<<<<<<<<<< - * else: - * fname = None - */ - __Pyx_TraceLine(730,0,__PYX_ERR(0, 730, __pyx_L1_error)) - __pyx_t_12 = __Pyx_GetAttr(__pyx_v_parser, __pyx_v_name); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 730, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_14 = PyNumber_Add(__pyx_v_buildDirectory, __pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 730, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_XDECREF_SET(__pyx_v_fname, __pyx_t_14); - __pyx_t_14 = 0; - - /* "src/bison/cython/bison_.pyx":729 - * 'flexCFile', 'flexCFile1', - * ] + objs: - * if hasattr(parser, name): # <<<<<<<<<<<<<< - * fname = buildDirectory + getattr(parser, name) - * else: - */ - goto __pyx_L78; - } - - /* "src/bison/cython/bison_.pyx":732 - * fname = buildDirectory + getattr(parser, name) - * else: - * fname = None # <<<<<<<<<<<<<< - * if fname and os.path.isfile(fname): - * hitlist.append(fname) - */ - __Pyx_TraceLine(732,0,__PYX_ERR(0, 732, __pyx_L1_error)) - /*else*/ { - __Pyx_INCREF(Py_None); - __Pyx_XDECREF_SET(__pyx_v_fname, Py_None); - } - __pyx_L78:; - - /* "src/bison/cython/bison_.pyx":733 - * else: - * fname = None - * if fname and os.path.isfile(fname): # <<<<<<<<<<<<<< - * hitlist.append(fname) - * - */ - __Pyx_TraceLine(733,0,__PYX_ERR(0, 733, __pyx_L1_error)) - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_fname); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 733, __pyx_L1_error) - if (__pyx_t_7) { - } else { - __pyx_t_9 = __pyx_t_7; - goto __pyx_L80_bool_binop_done; - } - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_os); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 733, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_path); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 733, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_22, __pyx_n_s_isfile); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 733, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __pyx_t_22 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { - __pyx_t_22 = PyMethod_GET_SELF(__pyx_t_12); - if (likely(__pyx_t_22)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); - __Pyx_INCREF(__pyx_t_22); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_12, function); - } - } - __pyx_t_14 = (__pyx_t_22) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_22, __pyx_v_fname) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_fname); - __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; - if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 733, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 733, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_9 = __pyx_t_7; - __pyx_L80_bool_binop_done:; - if (__pyx_t_9) { - - /* "src/bison/cython/bison_.pyx":734 - * fname = None - * if fname and os.path.isfile(fname): - * hitlist.append(fname) # <<<<<<<<<<<<<< - * - * if not parser.keepfiles: - */ - __Pyx_TraceLine(734,0,__PYX_ERR(0, 734, __pyx_L1_error)) - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_hitlist, __pyx_v_fname); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 734, __pyx_L1_error) - - /* "src/bison/cython/bison_.pyx":733 - * else: - * fname = None - * if fname and os.path.isfile(fname): # <<<<<<<<<<<<<< - * hitlist.append(fname) - * - */ - } - - /* "src/bison/cython/bison_.pyx":725 - * - * if os.path.isfile(self.libFilename_py): - * for name in ['bisonFile', 'bisonCFile', 'bisonHFile', # <<<<<<<<<<<<<< - * 'bisonCFile1', 'bisonHFile1', 'flexFile', - * 'flexCFile', 'flexCFile1', - */ - __Pyx_TraceLine(725,0,__PYX_ERR(0, 725, __pyx_L1_error)) - } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "src/bison/cython/bison_.pyx":724 - * hitlist = [] - * - * if os.path.isfile(self.libFilename_py): # <<<<<<<<<<<<<< - * for name in ['bisonFile', 'bisonCFile', 'bisonHFile', - * 'bisonCFile1', 'bisonHFile1', 'flexFile', - */ - } - - /* "src/bison/cython/bison_.pyx":736 - * hitlist.append(fname) - * - * if not parser.keepfiles: # <<<<<<<<<<<<<< - * for f in hitlist: - * try: - */ - __Pyx_TraceLine(736,0,__PYX_ERR(0, 736, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_keepfiles); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 736, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 736, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = ((!__pyx_t_9) != 0); - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":737 - * - * if not parser.keepfiles: - * for f in hitlist: # <<<<<<<<<<<<<< - * try: - * os.remove(f) - */ - __Pyx_TraceLine(737,0,__PYX_ERR(0, 737, __pyx_L1_error)) - __pyx_t_4 = __pyx_v_hitlist; __Pyx_INCREF(__pyx_t_4); __pyx_t_2 = 0; - for (;;) { - if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_4)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_14 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_14); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 737, __pyx_L1_error) - #else - __pyx_t_14 = PySequence_ITEM(__pyx_t_4, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 737, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - #endif - __Pyx_DECREF_SET(__pyx_v_f, __pyx_t_14); - __pyx_t_14 = 0; - - /* "src/bison/cython/bison_.pyx":738 - * if not parser.keepfiles: - * for f in hitlist: - * try: # <<<<<<<<<<<<<< - * os.remove(f) - * except: - */ - __Pyx_TraceLine(738,0,__PYX_ERR(0, 738, __pyx_L1_error)) - { - __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:*/ { - - /* "src/bison/cython/bison_.pyx":739 - * for f in hitlist: - * try: - * os.remove(f) # <<<<<<<<<<<<<< - * except: - * print("Warning: failed to delete temporary file {}".format(f)) - */ - __Pyx_TraceLine(739,0,__PYX_ERR(0, 739, __pyx_L85_error)) - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_os); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 739, __pyx_L85_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_remove); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 739, __pyx_L85_error) - __Pyx_GOTREF(__pyx_t_22); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_22))) { - __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_22); - if (likely(__pyx_t_12)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_22); - __Pyx_INCREF(__pyx_t_12); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_22, function); - } - } - __pyx_t_14 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_22, __pyx_t_12, __pyx_v_f) : __Pyx_PyObject_CallOneArg(__pyx_t_22, __pyx_v_f); - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 739, __pyx_L85_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - - /* "src/bison/cython/bison_.pyx":738 - * if not parser.keepfiles: - * for f in hitlist: - * try: # <<<<<<<<<<<<<< - * os.remove(f) - * except: - */ - } - __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_L92_try_end; - __pyx_L85_error:; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - - /* "src/bison/cython/bison_.pyx":740 - * try: - * os.remove(f) - * except: # <<<<<<<<<<<<<< - * print("Warning: failed to delete temporary file {}".format(f)) - * - */ - __Pyx_TraceLine(740,0,__PYX_ERR(0, 740, __pyx_L87_except_error)) - /*except:*/ { - __Pyx_AddTraceback("bison.bison_.ParserEngine.buildLib", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_14, &__pyx_t_22, &__pyx_t_12) < 0) __PYX_ERR(0, 740, __pyx_L87_except_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_GOTREF(__pyx_t_22); - __Pyx_GOTREF(__pyx_t_12); - - /* "src/bison/cython/bison_.pyx":741 - * os.remove(f) - * except: - * print("Warning: failed to delete temporary file {}".format(f)) # <<<<<<<<<<<<<< - * - * if parser.verbose: - */ - __Pyx_TraceLine(741,0,__PYX_ERR(0, 741, __pyx_L87_except_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Warning_failed_to_delete_tempora, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 741, __pyx_L87_except_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_v_f) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_f); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L87_except_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 741, __pyx_L87_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - goto __pyx_L86_exception_handled; - } - __pyx_L87_except_error:; - - /* "src/bison/cython/bison_.pyx":738 - * if not parser.keepfiles: - * for f in hitlist: - * try: # <<<<<<<<<<<<<< - * os.remove(f) - * except: - */ - __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_L86_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_L92_try_end:; - } - - /* "src/bison/cython/bison_.pyx":737 - * - * if not parser.keepfiles: - * for f in hitlist: # <<<<<<<<<<<<<< - * try: - * os.remove(f) - */ - __Pyx_TraceLine(737,0,__PYX_ERR(0, 737, __pyx_L1_error)) - } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "src/bison/cython/bison_.pyx":743 - * print("Warning: failed to delete temporary file {}".format(f)) - * - * if parser.verbose: # <<<<<<<<<<<<<< - * print("Deleting temporary bison output files:") - * - */ - __Pyx_TraceLine(743,0,__PYX_ERR(0, 743, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_verbose); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 743, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 743, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":744 - * - * if parser.verbose: - * print("Deleting temporary bison output files:") # <<<<<<<<<<<<<< - * - * for f in [parser.bisonCFile, parser.bisonHFile, parser.flexCFile, "tmp.output"]: - */ - __Pyx_TraceLine(744,0,__PYX_ERR(0, 744, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 744, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "src/bison/cython/bison_.pyx":743 - * print("Warning: failed to delete temporary file {}".format(f)) - * - * if parser.verbose: # <<<<<<<<<<<<<< - * print("Deleting temporary bison output files:") - * - */ - } - - /* "src/bison/cython/bison_.pyx":746 - * print("Deleting temporary bison output files:") - * - * for f in [parser.bisonCFile, parser.bisonHFile, parser.flexCFile, "tmp.output"]: # <<<<<<<<<<<<<< - * if os.path.isfile(f): - * if parser.verbose: - */ - __Pyx_TraceLine(746,0,__PYX_ERR(0, 746, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_bisonCFile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 746, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_bisonHFile); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 746, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_flexCFile); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 746, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_22); - __pyx_t_14 = PyTuple_New(4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 746, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_12); - PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_12); - __Pyx_GIVEREF(__pyx_t_22); - PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_t_22); - __Pyx_INCREF(__pyx_kp_u_tmp_output); - __Pyx_GIVEREF(__pyx_kp_u_tmp_output); - PyTuple_SET_ITEM(__pyx_t_14, 3, __pyx_kp_u_tmp_output); - __pyx_t_4 = 0; - __pyx_t_12 = 0; - __pyx_t_22 = 0; - __pyx_t_22 = __pyx_t_14; __Pyx_INCREF(__pyx_t_22); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - for (;;) { - if (__pyx_t_2 >= 4) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_14 = PyTuple_GET_ITEM(__pyx_t_22, __pyx_t_2); __Pyx_INCREF(__pyx_t_14); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 746, __pyx_L1_error) - #else - __pyx_t_14 = PySequence_ITEM(__pyx_t_22, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 746, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - #endif - __Pyx_DECREF_SET(__pyx_v_f, __pyx_t_14); - __pyx_t_14 = 0; - - /* "src/bison/cython/bison_.pyx":747 - * - * for f in [parser.bisonCFile, parser.bisonHFile, parser.flexCFile, "tmp.output"]: - * if os.path.isfile(f): # <<<<<<<<<<<<<< - * if parser.verbose: - * print('rm {}'.format(f)) - */ - __Pyx_TraceLine(747,0,__PYX_ERR(0, 747, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_os); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 747, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 747, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_isfile); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 747, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && likely(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_14 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_4, __pyx_v_f) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_f); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 747, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 747, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":748 - * for f in [parser.bisonCFile, parser.bisonHFile, parser.flexCFile, "tmp.output"]: - * if os.path.isfile(f): - * if parser.verbose: # <<<<<<<<<<<<<< - * print('rm {}'.format(f)) - * os.remove(f) - */ - __Pyx_TraceLine(748,0,__PYX_ERR(0, 748, __pyx_L1_error)) - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_verbose); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 748, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 748, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - if (__pyx_t_7) { - - /* "src/bison/cython/bison_.pyx":749 - * if os.path.isfile(f): - * if parser.verbose: - * print('rm {}'.format(f)) # <<<<<<<<<<<<<< - * os.remove(f) - * - */ - __Pyx_TraceLine(749,0,__PYX_ERR(0, 749, __pyx_L1_error)) - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_rm, __pyx_n_s_format); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 749, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && likely(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_14 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_4, __pyx_v_f) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_f); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 749, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 749, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - - /* "src/bison/cython/bison_.pyx":748 - * for f in [parser.bisonCFile, parser.bisonHFile, parser.flexCFile, "tmp.output"]: - * if os.path.isfile(f): - * if parser.verbose: # <<<<<<<<<<<<<< - * print('rm {}'.format(f)) - * os.remove(f) - */ - } - - /* "src/bison/cython/bison_.pyx":750 - * if parser.verbose: - * print('rm {}'.format(f)) - * os.remove(f) # <<<<<<<<<<<<<< - * - * def closeLib(self): - */ - __Pyx_TraceLine(750,0,__PYX_ERR(0, 750, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_os); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 750, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_remove); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 750, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_14 = NULL; - 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_12 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_14, __pyx_v_f) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_f); - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 750, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - - /* "src/bison/cython/bison_.pyx":747 - * - * for f in [parser.bisonCFile, parser.bisonHFile, parser.flexCFile, "tmp.output"]: - * if os.path.isfile(f): # <<<<<<<<<<<<<< - * if parser.verbose: - * print('rm {}'.format(f)) - */ - } - - /* "src/bison/cython/bison_.pyx":746 - * print("Deleting temporary bison output files:") - * - * for f in [parser.bisonCFile, parser.bisonHFile, parser.flexCFile, "tmp.output"]: # <<<<<<<<<<<<<< - * if os.path.isfile(f): - * if parser.verbose: - */ - __Pyx_TraceLine(746,0,__PYX_ERR(0, 746, __pyx_L1_error)) - } - __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - - /* "src/bison/cython/bison_.pyx":736 - * hitlist.append(fname) - * - * if not parser.keepfiles: # <<<<<<<<<<<<<< - * for f in hitlist: - * try: - */ - } - - /* "src/bison/cython/bison_.pyx":270 - * return s - * - * def buildLib(self): # <<<<<<<<<<<<<< - * """ - * Creates the parser engine lib - */ - - /* 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_12); - __Pyx_XDECREF(__pyx_t_14); - __Pyx_XDECREF(__pyx_t_22); - __Pyx_AddTraceback("bison.bison_.ParserEngine.buildLib", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_parser); - __Pyx_XDECREF(__pyx_v_attribs); - __Pyx_XDECREF(__pyx_v_gHandlers); - __Pyx_XDECREF(__pyx_v_a); - __Pyx_XDECREF(__pyx_v_method); - __Pyx_XDECREF(__pyx_v_gOptions); - __Pyx_XDECREF(__pyx_v_gStart); - __Pyx_XDECREF(__pyx_v_gTokens); - __Pyx_XDECREF(__pyx_v_gPrecedences); - __Pyx_XDECREF(__pyx_v_gLex); - __Pyx_XDECREF(__pyx_v_buildDirectory); - __Pyx_XDECREF(__pyx_v_f); - __Pyx_XDECREF(__pyx_v_write); - __Pyx_XDECREF(__pyx_v_export); - __Pyx_XDECREF(__pyx_v_error_def); - __Pyx_XDECREF(__pyx_v_p); - __Pyx_XDECREF(__pyx_v_rules); - __Pyx_XDECREF(__pyx_v_h); - __Pyx_XDECREF(__pyx_v_doc); - __Pyx_XDECREF(__pyx_v_s); - __Pyx_XDECREF(__pyx_v_target); - __Pyx_XDECREF(__pyx_v_options); - __Pyx_XDECREF(__pyx_v_tmp); - __Pyx_XDECREF(__pyx_v_r); - __Pyx_XDECREF(__pyx_v_opts1); - __Pyx_XDECREF(__pyx_v_o); - __Pyx_XDECREF(__pyx_v_rule); - __Pyx_XDECREF(__pyx_v_idx); - __Pyx_XDECREF(__pyx_v_option); - __Pyx_XDECREF(__pyx_v_action); - __Pyx_XDECREF(__pyx_v_args); - __Pyx_XDECREF(__pyx_v_i); - __Pyx_XDECREF(__pyx_v_epilogue); - __Pyx_XDECREF(__pyx_v_env); - __Pyx_XDECREF(__pyx_v_bisonCmd); - __Pyx_XDECREF(__pyx_v_proc); - __Pyx_XDECREF(__pyx_v_out); - __Pyx_XDECREF(__pyx_v_err); - __Pyx_XDECREF(__pyx_v_flexCmd); - __Pyx_XDECREF(__pyx_v_libFileName); - __Pyx_XDECREF(__pyx_v_objs); - __Pyx_XDECREF(__pyx_v_hitlist); - __Pyx_XDECREF(__pyx_v_name); - __Pyx_XDECREF(__pyx_v_fname); - __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_d); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "src/bison/cython/bison_.pyx":752 - * os.remove(f) - * - * def closeLib(self): # <<<<<<<<<<<<<< - * """ - * Does the necessary cleanups and closes the parser library - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5bison_6bison__12ParserEngine_17closeLib(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_5bison_6bison__12ParserEngine_16closeLib[] = "\n Does the necessary cleanups and closes the parser library\n "; -static PyObject *__pyx_pw_5bison_6bison__12ParserEngine_17closeLib(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("closeLib (wrapper)", 0); - __pyx_r = __pyx_pf_5bison_6bison__12ParserEngine_16closeLib(((struct __pyx_obj_5bison_6bison__ParserEngine *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5bison_6bison__12ParserEngine_16closeLib(struct __pyx_obj_5bison_6bison__ParserEngine *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("closeLib", 0); - __Pyx_TraceCall("closeLib", __pyx_f[0], 752, 0, __PYX_ERR(0, 752, __pyx_L1_error)); - - /* "src/bison/cython/bison_.pyx":756 - * Does the necessary cleanups and closes the parser library - * """ - * bisondynlib_close(self.libHandle) # <<<<<<<<<<<<<< - * - * def runEngine(self, debug=0): - */ - __Pyx_TraceLine(756,0,__PYX_ERR(0, 756, __pyx_L1_error)) - (void)(bisondynlib_close(__pyx_v_self->libHandle)); - - /* "src/bison/cython/bison_.pyx":752 - * os.remove(f) - * - * def closeLib(self): # <<<<<<<<<<<<<< - * """ - * Does the necessary cleanups and closes the parser library - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("bison.bison_.ParserEngine.closeLib", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "src/bison/cython/bison_.pyx":758 - * bisondynlib_close(self.libHandle) - * - * def runEngine(self, debug=0): # <<<<<<<<<<<<<< - * """ - * Runs the binary parser engine, as loaded from the lib - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5bison_6bison__12ParserEngine_19runEngine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_5bison_6bison__12ParserEngine_18runEngine[] = "\n Runs the binary parser engine, as loaded from the lib\n "; -static PyObject *__pyx_pw_5bison_6bison__12ParserEngine_19runEngine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_debug = 0; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("runEngine (wrapper)", 0); - { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_debug,0}; - PyObject* values[1] = {0}; - values[0] = ((PyObject *)__pyx_int_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 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_debug); - if (value) { values[0] = value; kw_args--; } - } - } - if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "runEngine") < 0)) __PYX_ERR(0, 758, __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_debug = values[0]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("runEngine", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 758, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("bison.bison_.ParserEngine.runEngine", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5bison_6bison__12ParserEngine_18runEngine(((struct __pyx_obj_5bison_6bison__ParserEngine *)__pyx_v_self), __pyx_v_debug); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5bison_6bison__12ParserEngine_18runEngine(struct __pyx_obj_5bison_6bison__ParserEngine *__pyx_v_self, PyObject *__pyx_v_debug) { - void *__pyx_v_handle; - void *__pyx_v_cbvoid; - void *__pyx_v_invoid; - PyObject *__pyx_v_parser = NULL; - PyObject *__pyx_v_ret = NULL; - CYTHON_UNUSED PyObject *__pyx_v_e = NULL; - PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - void *__pyx_t_1; - 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; - int __pyx_t_9; - char const *__pyx_t_10; - 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; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("runEngine", 0); - __Pyx_TraceCall("runEngine", __pyx_f[0], 758, 0, __PYX_ERR(0, 758, __pyx_L1_error)); - - /* "src/bison/cython/bison_.pyx":767 - * cdef void *invoid - * - * handle = self.libHandle # <<<<<<<<<<<<<< - * parser = self.parser - * - */ - __Pyx_TraceLine(767,0,__PYX_ERR(0, 767, __pyx_L1_error)) - __pyx_t_1 = __pyx_v_self->libHandle; - __pyx_v_handle = __pyx_t_1; - - /* "src/bison/cython/bison_.pyx":768 - * - * handle = self.libHandle - * parser = self.parser # <<<<<<<<<<<<<< - * - * cbvoid = py_callback - */ - __Pyx_TraceLine(768,0,__PYX_ERR(0, 768, __pyx_L1_error)) - __pyx_t_2 = __pyx_v_self->parser; - __Pyx_INCREF(__pyx_t_2); - __pyx_v_parser = __pyx_t_2; - __pyx_t_2 = 0; - - /* "src/bison/cython/bison_.pyx":770 - * parser = self.parser - * - * cbvoid = py_callback # <<<<<<<<<<<<<< - * invoid = py_input - * - */ - __Pyx_TraceLine(770,0,__PYX_ERR(0, 770, __pyx_L1_error)) - __pyx_v_cbvoid = ((void *)py_callback); - - /* "src/bison/cython/bison_.pyx":771 - * - * cbvoid = py_callback - * invoid = py_input # <<<<<<<<<<<<<< - * - * try: - */ - __Pyx_TraceLine(771,0,__PYX_ERR(0, 771, __pyx_L1_error)) - __pyx_v_invoid = ((void *)py_input); - - /* "src/bison/cython/bison_.pyx":773 - * invoid = py_input - * - * try: # <<<<<<<<<<<<<< - * ret = bisondynlib_run(handle, parser, cbvoid, invoid, debug) - * except Exception as e: - */ - __Pyx_TraceLine(773,0,__PYX_ERR(0, 773, __pyx_L1_error)) - { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); - __Pyx_XGOTREF(__pyx_t_3); - __Pyx_XGOTREF(__pyx_t_4); - __Pyx_XGOTREF(__pyx_t_5); - /*try:*/ { - - /* "src/bison/cython/bison_.pyx":774 - * - * try: - * ret = bisondynlib_run(handle, parser, cbvoid, invoid, debug) # <<<<<<<<<<<<<< - * except Exception as e: - * ret=None - */ - __Pyx_TraceLine(774,0,__PYX_ERR(0, 774, __pyx_L3_error)) - __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_debug); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 774, __pyx_L3_error) - __pyx_t_2 = bisondynlib_run(__pyx_v_handle, __pyx_v_parser, __pyx_v_cbvoid, __pyx_v_invoid, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 774, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_v_ret = __pyx_t_2; - __pyx_t_2 = 0; - - /* "src/bison/cython/bison_.pyx":773 - * invoid = py_input - * - * try: # <<<<<<<<<<<<<< - * ret = bisondynlib_run(handle, parser, cbvoid, invoid, debug) - * except Exception as e: - */ - } - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - goto __pyx_L8_try_end; - __pyx_L3_error:; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "src/bison/cython/bison_.pyx":775 - * try: - * ret = bisondynlib_run(handle, parser, cbvoid, invoid, debug) - * except Exception as e: # <<<<<<<<<<<<<< - * ret=None - * - */ - __Pyx_TraceLine(775,0,__PYX_ERR(0, 775, __pyx_L5_except_error)) - __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_6) { - __Pyx_AddTraceback("bison.bison_.ParserEngine.runEngine", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 775, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GOTREF(__pyx_t_8); - __Pyx_INCREF(__pyx_t_7); - __pyx_v_e = __pyx_t_7; - /*try:*/ { - - /* "src/bison/cython/bison_.pyx":776 - * ret = bisondynlib_run(handle, parser, cbvoid, invoid, debug) - * except Exception as e: - * ret=None # <<<<<<<<<<<<<< - * - * return ret - */ - __Pyx_TraceLine(776,0,__PYX_ERR(0, 776, __pyx_L14_error)) - __Pyx_INCREF(Py_None); - __Pyx_XDECREF_SET(__pyx_v_ret, Py_None); - } - - /* "src/bison/cython/bison_.pyx":775 - * try: - * ret = bisondynlib_run(handle, parser, cbvoid, invoid, debug) - * except Exception as e: # <<<<<<<<<<<<<< - * ret=None - * - */ - __Pyx_TraceLine(775,0,__PYX_ERR(0, 775, __pyx_L14_error)) - /*finally:*/ { - /*normal exit:*/{ - __Pyx_DECREF(__pyx_v_e); - __pyx_v_e = NULL; - goto __pyx_L15; - } - __pyx_L14_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); - __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_13); - __Pyx_XGOTREF(__pyx_t_14); - __Pyx_XGOTREF(__pyx_t_15); - __Pyx_XGOTREF(__pyx_t_16); - __pyx_t_6 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename; - { - __Pyx_DECREF(__pyx_v_e); - __pyx_v_e = NULL; - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_XGIVEREF(__pyx_t_15); - __Pyx_XGIVEREF(__pyx_t_16); - __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); - } - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_ErrRestore(__pyx_t_11, __pyx_t_12, __pyx_t_13); - __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; - __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10; - goto __pyx_L5_except_error; - } - __pyx_L15:; - } - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - goto __pyx_L4_exception_handled; - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - - /* "src/bison/cython/bison_.pyx":773 - * invoid = py_input - * - * try: # <<<<<<<<<<<<<< - * ret = bisondynlib_run(handle, parser, cbvoid, invoid, debug) - * except Exception as e: - */ - __Pyx_XGIVEREF(__pyx_t_3); - __Pyx_XGIVEREF(__pyx_t_4); - __Pyx_XGIVEREF(__pyx_t_5); - __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); - goto __pyx_L1_error; - __pyx_L4_exception_handled:; - __Pyx_XGIVEREF(__pyx_t_3); - __Pyx_XGIVEREF(__pyx_t_4); - __Pyx_XGIVEREF(__pyx_t_5); - __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); - __pyx_L8_try_end:; - } - - /* "src/bison/cython/bison_.pyx":778 - * ret=None - * - * return ret # <<<<<<<<<<<<<< - * - * def __del__(self): - */ - __Pyx_TraceLine(778,0,__PYX_ERR(0, 778, __pyx_L1_error)) - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_ret); - __pyx_r = __pyx_v_ret; - goto __pyx_L0; - - /* "src/bison/cython/bison_.pyx":758 - * bisondynlib_close(self.libHandle) - * - * def runEngine(self, debug=0): # <<<<<<<<<<<<<< - * """ - * Runs the binary parser engine, as loaded from the lib - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_AddTraceback("bison.bison_.ParserEngine.runEngine", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_parser); - __Pyx_XDECREF(__pyx_v_ret); - __Pyx_XDECREF(__pyx_v_e); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "src/bison/cython/bison_.pyx":780 - * return ret - * - * def __del__(self): # <<<<<<<<<<<<<< - * """ - * Clean up and bail - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5bison_6bison__12ParserEngine_21__del__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_5bison_6bison__12ParserEngine_20__del__[] = "\n Clean up and bail\n "; -static PyObject *__pyx_pw_5bison_6bison__12ParserEngine_21__del__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); - __pyx_r = __pyx_pf_5bison_6bison__12ParserEngine_20__del__(((struct __pyx_obj_5bison_6bison__ParserEngine *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5bison_6bison__12ParserEngine_20__del__(struct __pyx_obj_5bison_6bison__ParserEngine *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__del__", 0); - __Pyx_TraceCall("__del__", __pyx_f[0], 780, 0, __PYX_ERR(0, 780, __pyx_L1_error)); - - /* "src/bison/cython/bison_.pyx":784 - * Clean up and bail - * """ - * self.closeLib() # <<<<<<<<<<<<<< - * - * - */ - __Pyx_TraceLine(784,0,__PYX_ERR(0, 784, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_closeLib); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 784, __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, 784, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":780 - * return ret - * - * def __del__(self): # <<<<<<<<<<<<<< - * """ - * Clean up and bail - */ - - /* 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("bison.bison_.ParserEngine.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "(tree fragment)":1 - * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * raise TypeError("self.libHandle cannot be converted to a Python object for pickling") - * def __setstate_cython__(self, __pyx_state): - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5bison_6bison__12ParserEngine_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_5bison_6bison__12ParserEngine_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_5bison_6bison__12ParserEngine_22__reduce_cython__(((struct __pyx_obj_5bison_6bison__ParserEngine *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5bison_6bison__12ParserEngine_22__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5bison_6bison__ParserEngine *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error)); - - /* "(tree fragment)":2 - * def __reduce_cython__(self): - * raise TypeError("self.libHandle cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< - * def __setstate_cython__(self, __pyx_state): - * raise TypeError("self.libHandle cannot be converted to a Python object for pickling") - */ - __Pyx_TraceLine(2,0,__PYX_ERR(1, 2, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_Raise(__pyx_t_1, 0, 0, 0); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 2, __pyx_L1_error) - - /* "(tree fragment)":1 - * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * raise TypeError("self.libHandle cannot be converted to a Python object for pickling") - * def __setstate_cython__(self, __pyx_state): - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("bison.bison_.ParserEngine.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "(tree fragment)":3 - * def __reduce_cython__(self): - * raise TypeError("self.libHandle cannot be converted to a Python object for pickling") - * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< - * raise TypeError("self.libHandle cannot be converted to a Python object for pickling") - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5bison_6bison__12ParserEngine_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ -static PyObject *__pyx_pw_5bison_6bison__12ParserEngine_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_5bison_6bison__12ParserEngine_24__setstate_cython__(((struct __pyx_obj_5bison_6bison__ParserEngine *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5bison_6bison__12ParserEngine_24__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5bison_6bison__ParserEngine *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { - PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error)); - - /* "(tree fragment)":4 - * raise TypeError("self.libHandle cannot be converted to a Python object for pickling") - * def __setstate_cython__(self, __pyx_state): - * raise TypeError("self.libHandle cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< - */ - __Pyx_TraceLine(4,0,__PYX_ERR(1, 4, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_Raise(__pyx_t_1, 0, 0, 0); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 4, __pyx_L1_error) - - /* "(tree fragment)":3 - * def __reduce_cython__(self): - * raise TypeError("self.libHandle cannot be converted to a Python object for pickling") - * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< - * raise TypeError("self.libHandle cannot be converted to a Python object for pickling") - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("bison.bison_.ParserEngine.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "src/bison/cython/bison_.pyx":787 - * - * - * def cmpLines(meth1, meth2): # <<<<<<<<<<<<<< - * """ - * Used as a sort() argument for sorting parse target handler methods by - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5bison_6bison__1cmpLines(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_5bison_6bison__cmpLines[] = "\n Used as a sort() argument for sorting parse target handler methods by\n the order of their declaration in their source file.\n "; -static PyMethodDef __pyx_mdef_5bison_6bison__1cmpLines = {"cmpLines", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5bison_6bison__1cmpLines, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5bison_6bison__cmpLines}; -static PyObject *__pyx_pw_5bison_6bison__1cmpLines(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_meth1 = 0; - PyObject *__pyx_v_meth2 = 0; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("cmpLines (wrapper)", 0); - { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_meth1,&__pyx_n_s_meth2,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_meth1)) != 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_meth2)) != 0)) kw_args--; - else { - __Pyx_RaiseArgtupleInvalid("cmpLines", 1, 2, 2, 1); __PYX_ERR(0, 787, __pyx_L3_error) - } - } - if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cmpLines") < 0)) __PYX_ERR(0, 787, __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_meth1 = values[0]; - __pyx_v_meth2 = values[1]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("cmpLines", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 787, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("bison.bison_.cmpLines", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5bison_6bison__cmpLines(__pyx_self, __pyx_v_meth1, __pyx_v_meth2); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5bison_6bison__cmpLines(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_meth1, PyObject *__pyx_v_meth2) { - PyObject *__pyx_v_line1 = NULL; - PyObject *__pyx_v_line2 = NULL; - PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations - __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_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_TraceFrameInit(__pyx_codeobj__39) - __Pyx_RefNannySetupContext("cmpLines", 0); - __Pyx_TraceCall("cmpLines", __pyx_f[0], 787, 0, __PYX_ERR(0, 787, __pyx_L1_error)); - - /* "src/bison/cython/bison_.pyx":792 - * the order of their declaration in their source file. - * """ - * try: # <<<<<<<<<<<<<< - * line1 = meth1.__code__.co_firstlineno - * line2 = meth2.__code__.co_firstlineno - */ - __Pyx_TraceLine(792,0,__PYX_ERR(0, 792, __pyx_L1_error)) - { - __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:*/ { - - /* "src/bison/cython/bison_.pyx":793 - * """ - * try: - * line1 = meth1.__code__.co_firstlineno # <<<<<<<<<<<<<< - * line2 = meth2.__code__.co_firstlineno - * except: - */ - __Pyx_TraceLine(793,0,__PYX_ERR(0, 793, __pyx_L3_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_meth1, __pyx_n_s_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 793, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_co_firstlineno); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 793, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_v_line1 = __pyx_t_5; - __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":794 - * try: - * line1 = meth1.__code__.co_firstlineno - * line2 = meth2.__code__.co_firstlineno # <<<<<<<<<<<<<< - * except: - * line1 = meth1.__init__.__code__.co_firstlineno - */ - __Pyx_TraceLine(794,0,__PYX_ERR(0, 794, __pyx_L3_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_meth2, __pyx_n_s_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 794, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_co_firstlineno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 794, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_v_line2 = __pyx_t_4; - __pyx_t_4 = 0; - - /* "src/bison/cython/bison_.pyx":792 - * the order of their declaration in their source file. - * """ - * try: # <<<<<<<<<<<<<< - * line1 = meth1.__code__.co_firstlineno - * line2 = meth2.__code__.co_firstlineno - */ - } - __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; - - /* "src/bison/cython/bison_.pyx":795 - * line1 = meth1.__code__.co_firstlineno - * line2 = meth2.__code__.co_firstlineno - * except: # <<<<<<<<<<<<<< - * line1 = meth1.__init__.__code__.co_firstlineno - * line2 = meth2.__init__.__code__.co_firstlineno - */ - __Pyx_TraceLine(795,0,__PYX_ERR(0, 795, __pyx_L5_except_error)) - /*except:*/ { - __Pyx_AddTraceback("bison.bison_.cmpLines", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 795, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - - /* "src/bison/cython/bison_.pyx":796 - * line2 = meth2.__code__.co_firstlineno - * except: - * line1 = meth1.__init__.__code__.co_firstlineno # <<<<<<<<<<<<<< - * line2 = meth2.__init__.__code__.co_firstlineno - * - */ - __Pyx_TraceLine(796,0,__PYX_ERR(0, 796, __pyx_L5_except_error)) - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_meth1, __pyx_n_s_init); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 796, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_code); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 796, __pyx_L5_except_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_co_firstlineno); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 796, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_XDECREF_SET(__pyx_v_line1, __pyx_t_7); - __pyx_t_7 = 0; - - /* "src/bison/cython/bison_.pyx":797 - * except: - * line1 = meth1.__init__.__code__.co_firstlineno - * line2 = meth2.__init__.__code__.co_firstlineno # <<<<<<<<<<<<<< - * - * return (line1 > line2) - (line1 < line2) - */ - __Pyx_TraceLine(797,0,__PYX_ERR(0, 797, __pyx_L5_except_error)) - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_meth2, __pyx_n_s_init); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 797, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_code); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 797, __pyx_L5_except_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_co_firstlineno); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 797, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_XDECREF_SET(__pyx_v_line2, __pyx_t_7); - __pyx_t_7 = 0; - __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_L4_exception_handled; - } - __pyx_L5_except_error:; - - /* "src/bison/cython/bison_.pyx":792 - * the order of their declaration in their source file. - * """ - * try: # <<<<<<<<<<<<<< - * line1 = meth1.__code__.co_firstlineno - * line2 = meth2.__code__.co_firstlineno - */ - __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:; - } - - /* "src/bison/cython/bison_.pyx":799 - * line2 = meth2.__init__.__code__.co_firstlineno - * - * return (line1 > line2) - (line1 < line2) # <<<<<<<<<<<<<< - * - * def keyLines(meth): - */ - __Pyx_TraceLine(799,0,__PYX_ERR(0, 799, __pyx_L1_error)) - __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = PyObject_RichCompare(__pyx_v_line1, __pyx_v_line2, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 799, __pyx_L1_error) - __pyx_t_5 = PyObject_RichCompare(__pyx_v_line1, __pyx_v_line2, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 799, __pyx_L1_error) - __pyx_t_4 = PyNumber_Subtract(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 799, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; - goto __pyx_L0; - - /* "src/bison/cython/bison_.pyx":787 - * - * - * def cmpLines(meth1, meth2): # <<<<<<<<<<<<<< - * """ - * Used as a sort() argument for sorting parse target handler methods by - */ - - /* 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_7); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_AddTraceback("bison.bison_.cmpLines", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_line1); - __Pyx_XDECREF(__pyx_v_line2); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "src/bison/cython/bison_.pyx":801 - * return (line1 > line2) - (line1 < line2) - * - * def keyLines(meth): # <<<<<<<<<<<<<< - * """ - * Used as a sort() 'key' argument for sorting parse target handler methods by - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5bison_6bison__3keyLines(PyObject *__pyx_self, PyObject *__pyx_v_meth); /*proto*/ -static char __pyx_doc_5bison_6bison__2keyLines[] = "\n Used as a sort() 'key' argument for sorting parse target handler methods by\n the order of their declaration in their source file.\n "; -static PyMethodDef __pyx_mdef_5bison_6bison__3keyLines = {"keyLines", (PyCFunction)__pyx_pw_5bison_6bison__3keyLines, METH_O, __pyx_doc_5bison_6bison__2keyLines}; -static PyObject *__pyx_pw_5bison_6bison__3keyLines(PyObject *__pyx_self, PyObject *__pyx_v_meth) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("keyLines (wrapper)", 0); - __pyx_r = __pyx_pf_5bison_6bison__2keyLines(__pyx_self, ((PyObject *)__pyx_v_meth)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5bison_6bison__2keyLines(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_meth) { - PyObject *__pyx_v_line = NULL; - PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations - __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_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_TraceFrameInit(__pyx_codeobj__40) - __Pyx_RefNannySetupContext("keyLines", 0); - __Pyx_TraceCall("keyLines", __pyx_f[0], 801, 0, __PYX_ERR(0, 801, __pyx_L1_error)); - - /* "src/bison/cython/bison_.pyx":806 - * the order of their declaration in their source file. - * """ - * try: # <<<<<<<<<<<<<< - * line = meth.__code__.co_firstlineno - * except: - */ - __Pyx_TraceLine(806,0,__PYX_ERR(0, 806, __pyx_L1_error)) - { - __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:*/ { - - /* "src/bison/cython/bison_.pyx":807 - * """ - * try: - * line = meth.__code__.co_firstlineno # <<<<<<<<<<<<<< - * except: - * line = meth.__init__.__code__.co_firstlineno - */ - __Pyx_TraceLine(807,0,__PYX_ERR(0, 807, __pyx_L3_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_meth, __pyx_n_s_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 807, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_co_firstlineno); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 807, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_v_line = __pyx_t_5; - __pyx_t_5 = 0; - - /* "src/bison/cython/bison_.pyx":806 - * the order of their declaration in their source file. - * """ - * try: # <<<<<<<<<<<<<< - * line = meth.__code__.co_firstlineno - * except: - */ - } - __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; - - /* "src/bison/cython/bison_.pyx":808 - * try: - * line = meth.__code__.co_firstlineno - * except: # <<<<<<<<<<<<<< - * line = meth.__init__.__code__.co_firstlineno - * - */ - __Pyx_TraceLine(808,0,__PYX_ERR(0, 808, __pyx_L5_except_error)) - /*except:*/ { - __Pyx_AddTraceback("bison.bison_.keyLines", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(0, 808, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GOTREF(__pyx_t_6); - - /* "src/bison/cython/bison_.pyx":809 - * line = meth.__code__.co_firstlineno - * except: - * line = meth.__init__.__code__.co_firstlineno # <<<<<<<<<<<<<< - * - * return line - */ - __Pyx_TraceLine(809,0,__PYX_ERR(0, 809, __pyx_L5_except_error)) - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_meth, __pyx_n_s_init); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 809, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_code); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 809, __pyx_L5_except_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_co_firstlineno); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 809, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_7); - __pyx_t_7 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - goto __pyx_L4_exception_handled; - } - __pyx_L5_except_error:; - - /* "src/bison/cython/bison_.pyx":806 - * the order of their declaration in their source file. - * """ - * try: # <<<<<<<<<<<<<< - * line = meth.__code__.co_firstlineno - * except: - */ - __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:; - } - - /* "src/bison/cython/bison_.pyx":811 - * line = meth.__init__.__code__.co_firstlineno - * - * return line # <<<<<<<<<<<<<< - * - * - */ - __Pyx_TraceLine(811,0,__PYX_ERR(0, 811, __pyx_L1_error)) - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_line); - __pyx_r = __pyx_v_line; - goto __pyx_L0; - - /* "src/bison/cython/bison_.pyx":801 - * return (line1 > line2) - (line1 < line2) - * - * def keyLines(meth): # <<<<<<<<<<<<<< - * """ - * Used as a sort() 'key' argument for sorting parse target handler methods by - */ - - /* 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_7); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_AddTraceback("bison.bison_.keyLines", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_line); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "src/bison/cython/bison_.pyx":814 - * - * - * def hashParserObject(parser): # <<<<<<<<<<<<<< - * """ - * Calculates an sha1 hex 'hash' of the lex script - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5bison_6bison__5hashParserObject(PyObject *__pyx_self, PyObject *__pyx_v_parser); /*proto*/ -static char __pyx_doc_5bison_6bison__4hashParserObject[] = "\n Calculates an sha1 hex 'hash' of the lex script\n and grammar rules in a parser class instance.\n\n This is based on the raw text of the lex script attribute,\n and the grammar rule docstrings within the handler methods.\n\n Used to detect if someone has changed any grammar rules or\n lex script, and therefore, whether a shared parser lib rebuild\n is required.\n "; -static PyMethodDef __pyx_mdef_5bison_6bison__5hashParserObject = {"hashParserObject", (PyCFunction)__pyx_pw_5bison_6bison__5hashParserObject, METH_O, __pyx_doc_5bison_6bison__4hashParserObject}; -static PyObject *__pyx_pw_5bison_6bison__5hashParserObject(PyObject *__pyx_self, PyObject *__pyx_v_parser) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("hashParserObject (wrapper)", 0); - __pyx_r = __pyx_pf_5bison_6bison__4hashParserObject(__pyx_self, ((PyObject *)__pyx_v_parser)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "src/bison/cython/bison_.pyx":828 - * hasher = hashlib.new('sha1') - * - * def update(o): # <<<<<<<<<<<<<< - * if type(o) == type(""): - * o=o.encode("utf-8") - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5bison_6bison__16hashParserObject_1update(PyObject *__pyx_self, PyObject *__pyx_v_o); /*proto*/ -static PyMethodDef __pyx_mdef_5bison_6bison__16hashParserObject_1update = {"update", (PyCFunction)__pyx_pw_5bison_6bison__16hashParserObject_1update, METH_O, 0}; -static PyObject *__pyx_pw_5bison_6bison__16hashParserObject_1update(PyObject *__pyx_self, PyObject *__pyx_v_o) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("update (wrapper)", 0); - __pyx_r = __pyx_pf_5bison_6bison__16hashParserObject_update(__pyx_self, ((PyObject *)__pyx_v_o)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5bison_6bison__16hashParserObject_update(PyObject *__pyx_self, PyObject *__pyx_v_o) { - struct __pyx_obj_5bison_6bison____pyx_scope_struct__hashParserObject *__pyx_cur_scope; - struct __pyx_obj_5bison_6bison____pyx_scope_struct__hashParserObject *__pyx_outer_scope; - PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("update", 0); - __pyx_outer_scope = (struct __pyx_obj_5bison_6bison____pyx_scope_struct__hashParserObject *) __Pyx_CyFunction_GetClosure(__pyx_self); - __pyx_cur_scope = __pyx_outer_scope; - __Pyx_TraceCall("update", __pyx_f[0], 828, 0, __PYX_ERR(0, 828, __pyx_L1_error)); - __Pyx_INCREF(__pyx_v_o); - - /* "src/bison/cython/bison_.pyx":829 - * - * def update(o): - * if type(o) == type(""): # <<<<<<<<<<<<<< - * o=o.encode("utf-8") - * hasher.update(o) - */ - __Pyx_TraceLine(829,0,__PYX_ERR(0, 829, __pyx_L1_error)) - __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_o)), ((PyObject *)Py_TYPE(__pyx_kp_u__2)), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 829, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 829, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_2) { - - /* "src/bison/cython/bison_.pyx":830 - * def update(o): - * if type(o) == type(""): - * o=o.encode("utf-8") # <<<<<<<<<<<<<< - * hasher.update(o) - * - */ - __Pyx_TraceLine(830,0,__PYX_ERR(0, 830, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_o, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 830, __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_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_utf_8); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 830, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF_SET(__pyx_v_o, __pyx_t_1); - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":829 - * - * def update(o): - * if type(o) == type(""): # <<<<<<<<<<<<<< - * o=o.encode("utf-8") - * hasher.update(o) - */ - } - - /* "src/bison/cython/bison_.pyx":831 - * if type(o) == type(""): - * o=o.encode("utf-8") - * hasher.update(o) # <<<<<<<<<<<<<< - * - * # add the lex script - */ - __Pyx_TraceLine(831,0,__PYX_ERR(0, 831, __pyx_L1_error)) - if (unlikely(!__pyx_cur_scope->__pyx_v_hasher)) { __Pyx_RaiseClosureNameError("hasher"); __PYX_ERR(0, 831, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_hasher, __pyx_n_s_update); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 831, __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_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_o) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_o); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 831, __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; - - /* "src/bison/cython/bison_.pyx":828 - * hasher = hashlib.new('sha1') - * - * def update(o): # <<<<<<<<<<<<<< - * if type(o) == type(""): - * o=o.encode("utf-8") - */ - - /* 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_AddTraceback("bison.bison_.hashParserObject.update", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_o); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "src/bison/cython/bison_.pyx":814 - * - * - * def hashParserObject(parser): # <<<<<<<<<<<<<< - * """ - * Calculates an sha1 hex 'hash' of the lex script - */ - -static PyObject *__pyx_pf_5bison_6bison__4hashParserObject(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_parser) { - struct __pyx_obj_5bison_6bison____pyx_scope_struct__hashParserObject *__pyx_cur_scope; - PyObject *__pyx_v_update = 0; - PyObject *__pyx_v_tokens = NULL; - PyObject *__pyx_v_direction = NULL; - PyObject *__pyx_v_handlerNames = NULL; - PyObject *__pyx_v_tmp = NULL; - PyObject *__pyx_v_name = NULL; - PyObject *__pyx_v_m = NULL; - PyObject *__pyx_v_attr = NULL; - PyObject *__pyx_v_handlers = NULL; - PyObject *__pyx_v_h = NULL; - PyObject *__pyx_v_docString = NULL; - PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations - __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; - PyObject *(*__pyx_t_8)(PyObject *); - int __pyx_t_9; - int __pyx_t_10; - int __pyx_t_11; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_TraceFrameInit(__pyx_codeobj__41) - __Pyx_RefNannySetupContext("hashParserObject", 0); - __pyx_cur_scope = (struct __pyx_obj_5bison_6bison____pyx_scope_struct__hashParserObject *)__pyx_tp_new_5bison_6bison____pyx_scope_struct__hashParserObject(__pyx_ptype_5bison_6bison____pyx_scope_struct__hashParserObject, __pyx_empty_tuple, NULL); - if (unlikely(!__pyx_cur_scope)) { - __pyx_cur_scope = ((struct __pyx_obj_5bison_6bison____pyx_scope_struct__hashParserObject *)Py_None); - __Pyx_INCREF(Py_None); - __PYX_ERR(0, 814, __pyx_L1_error) - } else { - __Pyx_GOTREF(__pyx_cur_scope); - } - __Pyx_TraceCall("hashParserObject", __pyx_f[0], 814, 0, __PYX_ERR(0, 814, __pyx_L1_error)); - - /* "src/bison/cython/bison_.pyx":826 - * is required. - * """ - * hasher = hashlib.new('sha1') # <<<<<<<<<<<<<< - * - * def update(o): - */ - __Pyx_TraceLine(826,0,__PYX_ERR(0, 826, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_hashlib); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 826, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 826, __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 && 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_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_n_u_sha1) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_u_sha1); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 826, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GIVEREF(__pyx_t_1); - __pyx_cur_scope->__pyx_v_hasher = __pyx_t_1; - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":828 - * hasher = hashlib.new('sha1') - * - * def update(o): # <<<<<<<<<<<<<< - * if type(o) == type(""): - * o=o.encode("utf-8") - */ - __Pyx_TraceLine(828,0,__PYX_ERR(0, 828, __pyx_L1_error)) - __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_5bison_6bison__16hashParserObject_1update, 0, __pyx_n_s_hashParserObject_locals_update, ((PyObject*)__pyx_cur_scope), __pyx_n_s_bison_bison, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 828, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_update = __pyx_t_1; - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":834 - * - * # add the lex script - * update(parser.lexscript) # <<<<<<<<<<<<<< - * - * # add the tokens - */ - __Pyx_TraceLine(834,0,__PYX_ERR(0, 834, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_lexscript); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 834, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __pyx_pf_5bison_6bison__16hashParserObject_update(__pyx_v_update, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 834, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "src/bison/cython/bison_.pyx":839 - * # workaround pyrex weirdness - * # tokens = list(parser.tokens) - * tokens = parser.tokens[0] # <<<<<<<<<<<<<< - * update(",".join(tokens)) - * - */ - __Pyx_TraceLine(839,0,__PYX_ERR(0, 839, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_tokens); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 839, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 839, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_tokens = __pyx_t_1; - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":840 - * # tokens = list(parser.tokens) - * tokens = parser.tokens[0] - * update(",".join(tokens)) # <<<<<<<<<<<<<< - * - * # add the precedences - */ - __Pyx_TraceLine(840,0,__PYX_ERR(0, 840, __pyx_L1_error)) - __pyx_t_1 = PyUnicode_Join(__pyx_kp_u__44, __pyx_v_tokens); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 840, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __pyx_pf_5bison_6bison__16hashParserObject_update(__pyx_v_update, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 840, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "src/bison/cython/bison_.pyx":843 - * - * # add the precedences - * for direction, tokens in parser.precedences: # <<<<<<<<<<<<<< - * tokens = tokens[0] - * update(direction + "".join(tokens)) - */ - __Pyx_TraceLine(843,0,__PYX_ERR(0, 843, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_precedences); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 843, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { - __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; - __pyx_t_5 = NULL; - } else { - __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 843, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 843, __pyx_L1_error) - } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - for (;;) { - if (likely(!__pyx_t_5)) { - if (likely(PyList_CheckExact(__pyx_t_1))) { - if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 843, __pyx_L1_error) - #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 843, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - #endif - } else { - if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 843, __pyx_L1_error) - #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 843, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - #endif - } - } else { - __pyx_t_3 = __pyx_t_5(__pyx_t_1); - 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, 843, __pyx_L1_error) - } - break; - } - __Pyx_GOTREF(__pyx_t_3); - } - 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, 843, __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_6 = PyTuple_GET_ITEM(sequence, 1); - } else { - __pyx_t_2 = PyList_GET_ITEM(sequence, 0); - __pyx_t_6 = PyList_GET_ITEM(sequence, 1); - } - __Pyx_INCREF(__pyx_t_2); - __Pyx_INCREF(__pyx_t_6); - #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 843, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 843, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - #endif - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 843, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; - index = 0; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed; - __Pyx_GOTREF(__pyx_t_2); - index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; - __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 843, __pyx_L1_error) - __pyx_t_8 = NULL; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - goto __pyx_L6_unpacking_done; - __pyx_L5_unpacking_failed:; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_8 = NULL; - if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 843, __pyx_L1_error) - __pyx_L6_unpacking_done:; - } - __Pyx_XDECREF_SET(__pyx_v_direction, __pyx_t_2); - __pyx_t_2 = 0; - __Pyx_DECREF_SET(__pyx_v_tokens, __pyx_t_6); - __pyx_t_6 = 0; - - /* "src/bison/cython/bison_.pyx":844 - * # add the precedences - * for direction, tokens in parser.precedences: - * tokens = tokens[0] # <<<<<<<<<<<<<< - * update(direction + "".join(tokens)) - * - */ - __Pyx_TraceLine(844,0,__PYX_ERR(0, 844, __pyx_L1_error)) - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_tokens, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 844, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF_SET(__pyx_v_tokens, __pyx_t_3); - __pyx_t_3 = 0; - - /* "src/bison/cython/bison_.pyx":845 - * for direction, tokens in parser.precedences: - * tokens = tokens[0] - * update(direction + "".join(tokens)) # <<<<<<<<<<<<<< - * - * # extract the parser target handler names - */ - __Pyx_TraceLine(845,0,__PYX_ERR(0, 845, __pyx_L1_error)) - __pyx_t_3 = PyUnicode_Join(__pyx_kp_u__2, __pyx_v_tokens); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 845, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyNumber_Add(__pyx_v_direction, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 845, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __pyx_pf_5bison_6bison__16hashParserObject_update(__pyx_v_update, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 845, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "src/bison/cython/bison_.pyx":843 - * - * # add the precedences - * for direction, tokens in parser.precedences: # <<<<<<<<<<<<<< - * tokens = tokens[0] - * update(direction + "".join(tokens)) - */ - __Pyx_TraceLine(843,0,__PYX_ERR(0, 843, __pyx_L1_error)) - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":848 - * - * # extract the parser target handler names - * handlerNames = dir(parser) # <<<<<<<<<<<<<< - * - * #handlerNames = filter(lambda m: m.startswith('on_'), dir(parser)) - */ - __Pyx_TraceLine(848,0,__PYX_ERR(0, 848, __pyx_L1_error)) - __pyx_t_1 = PyObject_Dir(__pyx_v_parser); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_handlerNames = __pyx_t_1; - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":851 - * - * #handlerNames = filter(lambda m: m.startswith('on_'), dir(parser)) - * tmp = [] # <<<<<<<<<<<<<< - * for name in handlerNames: - * if name.startswith('on_'): - */ - __Pyx_TraceLine(851,0,__PYX_ERR(0, 851, __pyx_L1_error)) - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 851, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_tmp = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":852 - * #handlerNames = filter(lambda m: m.startswith('on_'), dir(parser)) - * tmp = [] - * for name in handlerNames: # <<<<<<<<<<<<<< - * if name.startswith('on_'): - * tmp.append(name) - */ - __Pyx_TraceLine(852,0,__PYX_ERR(0, 852, __pyx_L1_error)) - if (likely(PyList_CheckExact(__pyx_v_handlerNames)) || PyTuple_CheckExact(__pyx_v_handlerNames)) { - __pyx_t_1 = __pyx_v_handlerNames; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; - __pyx_t_5 = NULL; - } else { - __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_handlerNames); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 852, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 852, __pyx_L1_error) - } - for (;;) { - if (likely(!__pyx_t_5)) { - if (likely(PyList_CheckExact(__pyx_t_1))) { - if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 852, __pyx_L1_error) - #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 852, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - #endif - } else { - if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 852, __pyx_L1_error) - #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 852, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - #endif - } - } else { - __pyx_t_3 = __pyx_t_5(__pyx_t_1); - 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, 852, __pyx_L1_error) - } - break; - } - __Pyx_GOTREF(__pyx_t_3); - } - __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3); - __pyx_t_3 = 0; - - /* "src/bison/cython/bison_.pyx":853 - * tmp = [] - * for name in handlerNames: - * if name.startswith('on_'): # <<<<<<<<<<<<<< - * tmp.append(name) - * handlerNames = tmp - */ - __Pyx_TraceLine(853,0,__PYX_ERR(0, 853, __pyx_L1_error)) - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 853, __pyx_L1_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_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_2, __pyx_n_u_on) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u_on); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 853, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 853, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_9) { - - /* "src/bison/cython/bison_.pyx":854 - * for name in handlerNames: - * if name.startswith('on_'): - * tmp.append(name) # <<<<<<<<<<<<<< - * handlerNames = tmp - * handlerNames.sort() - */ - __Pyx_TraceLine(854,0,__PYX_ERR(0, 854, __pyx_L1_error)) - __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_tmp, __pyx_v_name); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 854, __pyx_L1_error) - - /* "src/bison/cython/bison_.pyx":853 - * tmp = [] - * for name in handlerNames: - * if name.startswith('on_'): # <<<<<<<<<<<<<< - * tmp.append(name) - * handlerNames = tmp - */ - } - - /* "src/bison/cython/bison_.pyx":852 - * #handlerNames = filter(lambda m: m.startswith('on_'), dir(parser)) - * tmp = [] - * for name in handlerNames: # <<<<<<<<<<<<<< - * if name.startswith('on_'): - * tmp.append(name) - */ - __Pyx_TraceLine(852,0,__PYX_ERR(0, 852, __pyx_L1_error)) - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":855 - * if name.startswith('on_'): - * tmp.append(name) - * handlerNames = tmp # <<<<<<<<<<<<<< - * handlerNames.sort() - * - */ - __Pyx_TraceLine(855,0,__PYX_ERR(0, 855, __pyx_L1_error)) - __Pyx_INCREF(__pyx_v_tmp); - __Pyx_DECREF_SET(__pyx_v_handlerNames, __pyx_v_tmp); - - /* "src/bison/cython/bison_.pyx":856 - * tmp.append(name) - * handlerNames = tmp - * handlerNames.sort() # <<<<<<<<<<<<<< - * - * # extract method objects, filter down to callables - */ - __Pyx_TraceLine(856,0,__PYX_ERR(0, 856, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_handlerNames, __pyx_n_s_sort); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 856, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = NULL; - 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_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 856, __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; - - /* "src/bison/cython/bison_.pyx":861 - * #handlers = [getattr(parser, m) for m in handlerNames] - * #handlers = filter(lambda h: callable(h), handlers) - * tmp = [] # <<<<<<<<<<<<<< - * for m in handlerNames: - * attr = getattr(parser, m) - */ - __Pyx_TraceLine(861,0,__PYX_ERR(0, 861, __pyx_L1_error)) - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 861, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF_SET(__pyx_v_tmp, ((PyObject*)__pyx_t_1)); - __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":862 - * #handlers = filter(lambda h: callable(h), handlers) - * tmp = [] - * for m in handlerNames: # <<<<<<<<<<<<<< - * attr = getattr(parser, m) - * if callable(attr): - */ - __Pyx_TraceLine(862,0,__PYX_ERR(0, 862, __pyx_L1_error)) - __pyx_t_1 = __pyx_v_handlerNames; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; - for (;;) { - if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 862, __pyx_L1_error) - #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 862, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - #endif - __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_3); - __pyx_t_3 = 0; - - /* "src/bison/cython/bison_.pyx":863 - * tmp = [] - * for m in handlerNames: - * attr = getattr(parser, m) # <<<<<<<<<<<<<< - * if callable(attr): - * tmp.append(attr) - */ - __Pyx_TraceLine(863,0,__PYX_ERR(0, 863, __pyx_L1_error)) - __pyx_t_3 = __Pyx_GetAttr(__pyx_v_parser, __pyx_v_m); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 863, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_XDECREF_SET(__pyx_v_attr, __pyx_t_3); - __pyx_t_3 = 0; - - /* "src/bison/cython/bison_.pyx":864 - * for m in handlerNames: - * attr = getattr(parser, m) - * if callable(attr): # <<<<<<<<<<<<<< - * tmp.append(attr) - * handlers = tmp - */ - __Pyx_TraceLine(864,0,__PYX_ERR(0, 864, __pyx_L1_error)) - __pyx_t_9 = __Pyx_PyCallable_Check(__pyx_v_attr); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 864, __pyx_L1_error) - __pyx_t_11 = (__pyx_t_9 != 0); - if (__pyx_t_11) { - - /* "src/bison/cython/bison_.pyx":865 - * attr = getattr(parser, m) - * if callable(attr): - * tmp.append(attr) # <<<<<<<<<<<<<< - * handlers = tmp - * - */ - __Pyx_TraceLine(865,0,__PYX_ERR(0, 865, __pyx_L1_error)) - __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_tmp, __pyx_v_attr); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 865, __pyx_L1_error) - - /* "src/bison/cython/bison_.pyx":864 - * for m in handlerNames: - * attr = getattr(parser, m) - * if callable(attr): # <<<<<<<<<<<<<< - * tmp.append(attr) - * handlers = tmp - */ - } - - /* "src/bison/cython/bison_.pyx":862 - * #handlers = filter(lambda h: callable(h), handlers) - * tmp = [] - * for m in handlerNames: # <<<<<<<<<<<<<< - * attr = getattr(parser, m) - * if callable(attr): - */ - __Pyx_TraceLine(862,0,__PYX_ERR(0, 862, __pyx_L1_error)) - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":866 - * if callable(attr): - * tmp.append(attr) - * handlers = tmp # <<<<<<<<<<<<<< - * - * # now add in the methods' docstrings - */ - __Pyx_TraceLine(866,0,__PYX_ERR(0, 866, __pyx_L1_error)) - __Pyx_INCREF(__pyx_v_tmp); - __pyx_v_handlers = __pyx_v_tmp; - - /* "src/bison/cython/bison_.pyx":869 - * - * # now add in the methods' docstrings - * for h in handlers: # <<<<<<<<<<<<<< - * docString = h.__doc__ - * update(docString) - */ - __Pyx_TraceLine(869,0,__PYX_ERR(0, 869, __pyx_L1_error)) - __pyx_t_1 = __pyx_v_handlers; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; - for (;;) { - if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 869, __pyx_L1_error) - #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 869, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - #endif - __Pyx_XDECREF_SET(__pyx_v_h, __pyx_t_3); - __pyx_t_3 = 0; - - /* "src/bison/cython/bison_.pyx":870 - * # now add in the methods' docstrings - * for h in handlers: - * docString = h.__doc__ # <<<<<<<<<<<<<< - * update(docString) - * - */ - __Pyx_TraceLine(870,0,__PYX_ERR(0, 870, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_doc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 870, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_XDECREF_SET(__pyx_v_docString, __pyx_t_3); - __pyx_t_3 = 0; - - /* "src/bison/cython/bison_.pyx":871 - * for h in handlers: - * docString = h.__doc__ - * update(docString) # <<<<<<<<<<<<<< - * - * # done - */ - __Pyx_TraceLine(871,0,__PYX_ERR(0, 871, __pyx_L1_error)) - __pyx_t_3 = __pyx_pf_5bison_6bison__16hashParserObject_update(__pyx_v_update, __pyx_v_docString); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 871, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "src/bison/cython/bison_.pyx":869 - * - * # now add in the methods' docstrings - * for h in handlers: # <<<<<<<<<<<<<< - * docString = h.__doc__ - * update(docString) - */ - __Pyx_TraceLine(869,0,__PYX_ERR(0, 869, __pyx_L1_error)) - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":874 - * - * # done - * return hasher.hexdigest() # <<<<<<<<<<<<<< - */ - __Pyx_TraceLine(874,0,__PYX_ERR(0, 874, __pyx_L1_error)) - __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_hasher, __pyx_n_s_hexdigest); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 874, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = NULL; - 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_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 874, __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; - - /* "src/bison/cython/bison_.pyx":814 - * - * - * def hashParserObject(parser): # <<<<<<<<<<<<<< - * """ - * Calculates an sha1 hex 'hash' of the lex script - */ - - /* 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("bison.bison_.hashParserObject", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_update); - __Pyx_XDECREF(__pyx_v_tokens); - __Pyx_XDECREF(__pyx_v_direction); - __Pyx_XDECREF(__pyx_v_handlerNames); - __Pyx_XDECREF(__pyx_v_tmp); - __Pyx_XDECREF(__pyx_v_name); - __Pyx_XDECREF(__pyx_v_m); - __Pyx_XDECREF(__pyx_v_attr); - __Pyx_XDECREF(__pyx_v_handlers); - __Pyx_XDECREF(__pyx_v_h); - __Pyx_XDECREF(__pyx_v_docString); - __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_tp_new_5bison_6bison__ParserEngine(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5bison_6bison__ParserEngine *p; - PyObject *o; - if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { - o = (*t->tp_alloc)(t, 0); - } else { - o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); - } - if (unlikely(!o)) return 0; - p = ((struct __pyx_obj_5bison_6bison__ParserEngine *)o); - p->parser = Py_None; Py_INCREF(Py_None); - p->parserHash = Py_None; Py_INCREF(Py_None); - p->libFilename_py = Py_None; Py_INCREF(Py_None); - return o; -} - -static void __pyx_tp_dealloc_5bison_6bison__ParserEngine(PyObject *o) { - struct __pyx_obj_5bison_6bison__ParserEngine *p = (struct __pyx_obj_5bison_6bison__ParserEngine *)o; - #if CYTHON_USE_TP_FINALIZE - if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { - if (PyObject_CallFinalizerFromDealloc(o)) return; - } - #endif - PyObject_GC_UnTrack(o); - Py_CLEAR(p->parser); - Py_CLEAR(p->parserHash); - Py_CLEAR(p->libFilename_py); - (*Py_TYPE(o)->tp_free)(o); -} - -static int __pyx_tp_traverse_5bison_6bison__ParserEngine(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_5bison_6bison__ParserEngine *p = (struct __pyx_obj_5bison_6bison__ParserEngine *)o; - if (p->parser) { - e = (*v)(p->parser, a); if (e) return e; - } - if (p->parserHash) { - e = (*v)(p->parserHash, a); if (e) return e; - } - if (p->libFilename_py) { - e = (*v)(p->libFilename_py, a); if (e) return e; - } - return 0; -} - -static int __pyx_tp_clear_5bison_6bison__ParserEngine(PyObject *o) { - PyObject* tmp; - struct __pyx_obj_5bison_6bison__ParserEngine *p = (struct __pyx_obj_5bison_6bison__ParserEngine *)o; - tmp = ((PyObject*)p->parser); - p->parser = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->parserHash); - p->parserHash = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->libFilename_py); - p->libFilename_py = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; -} - -static PyMethodDef __pyx_methods_5bison_6bison__ParserEngine[] = { - {"distutils_dir_name", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5bison_6bison__12ParserEngine_3distutils_dir_name, METH_VARARGS|METH_KEYWORDS, 0}, - {"reset", (PyCFunction)__pyx_pw_5bison_6bison__12ParserEngine_5reset, METH_NOARGS, __pyx_doc_5bison_6bison__12ParserEngine_4reset}, - {"openCurrentLib", (PyCFunction)__pyx_pw_5bison_6bison__12ParserEngine_7openCurrentLib, METH_NOARGS, __pyx_doc_5bison_6bison__12ParserEngine_6openCurrentLib}, - {"possible_so", (PyCFunction)__pyx_pw_5bison_6bison__12ParserEngine_9possible_so, METH_O, 0}, - {"openLib", (PyCFunction)__pyx_pw_5bison_6bison__12ParserEngine_11openLib, METH_NOARGS, __pyx_doc_5bison_6bison__12ParserEngine_10openLib}, - {"generate_exception_handler", (PyCFunction)__pyx_pw_5bison_6bison__12ParserEngine_13generate_exception_handler, METH_NOARGS, 0}, - {"buildLib", (PyCFunction)__pyx_pw_5bison_6bison__12ParserEngine_15buildLib, METH_NOARGS, __pyx_doc_5bison_6bison__12ParserEngine_14buildLib}, - {"closeLib", (PyCFunction)__pyx_pw_5bison_6bison__12ParserEngine_17closeLib, METH_NOARGS, __pyx_doc_5bison_6bison__12ParserEngine_16closeLib}, - {"runEngine", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5bison_6bison__12ParserEngine_19runEngine, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5bison_6bison__12ParserEngine_18runEngine}, - {"__del__", (PyCFunction)__pyx_pw_5bison_6bison__12ParserEngine_21__del__, METH_NOARGS, __pyx_doc_5bison_6bison__12ParserEngine_20__del__}, - {"__reduce_cython__", (PyCFunction)__pyx_pw_5bison_6bison__12ParserEngine_23__reduce_cython__, METH_NOARGS, 0}, - {"__setstate_cython__", (PyCFunction)__pyx_pw_5bison_6bison__12ParserEngine_25__setstate_cython__, METH_O, 0}, - {0, 0, 0, 0} -}; - -static PyTypeObject __pyx_type_5bison_6bison__ParserEngine = { - PyVarObject_HEAD_INIT(0, 0) - "bison.bison_.ParserEngine", /*tp_name*/ - sizeof(struct __pyx_obj_5bison_6bison__ParserEngine), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5bison_6bison__ParserEngine, /*tp_dealloc*/ - #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ - #endif - #if PY_VERSION_HEX >= 0x030800b4 - 0, /*tp_vectorcall_offset*/ - #endif - 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_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - "\n Wraps the interface to the binary bison/lex-generated parser engine dynamic\n library.\n\n You shouldn't need to deal with this at all.\n\n Takes care of:\n - building the library (if the parser rules have changed)\n - loading the library and extracting the parser entry point\n - calling the entry point\n - closing the library\n\n Makes direct calls to the platform-dependent routines in\n bisondynlib-[linux|windows].c\n ", /*tp_doc*/ - __pyx_tp_traverse_5bison_6bison__ParserEngine, /*tp_traverse*/ - __pyx_tp_clear_5bison_6bison__ParserEngine, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - __pyx_methods_5bison_6bison__ParserEngine, /*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*/ - __pyx_pw_5bison_6bison__12ParserEngine_1__init__, /*tp_init*/ - 0, /*tp_alloc*/ - __pyx_tp_new_5bison_6bison__ParserEngine, /*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 - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif - #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 - 0, /*tp_print*/ - #endif -}; - -static struct __pyx_obj_5bison_6bison____pyx_scope_struct__hashParserObject *__pyx_freelist_5bison_6bison____pyx_scope_struct__hashParserObject[8]; -static int __pyx_freecount_5bison_6bison____pyx_scope_struct__hashParserObject = 0; - -static PyObject *__pyx_tp_new_5bison_6bison____pyx_scope_struct__hashParserObject(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - PyObject *o; - if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5bison_6bison____pyx_scope_struct__hashParserObject > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5bison_6bison____pyx_scope_struct__hashParserObject)))) { - o = (PyObject*)__pyx_freelist_5bison_6bison____pyx_scope_struct__hashParserObject[--__pyx_freecount_5bison_6bison____pyx_scope_struct__hashParserObject]; - memset(o, 0, sizeof(struct __pyx_obj_5bison_6bison____pyx_scope_struct__hashParserObject)); - (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_5bison_6bison____pyx_scope_struct__hashParserObject(PyObject *o) { - struct __pyx_obj_5bison_6bison____pyx_scope_struct__hashParserObject *p = (struct __pyx_obj_5bison_6bison____pyx_scope_struct__hashParserObject *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_hasher); - if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5bison_6bison____pyx_scope_struct__hashParserObject < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5bison_6bison____pyx_scope_struct__hashParserObject)))) { - __pyx_freelist_5bison_6bison____pyx_scope_struct__hashParserObject[__pyx_freecount_5bison_6bison____pyx_scope_struct__hashParserObject++] = ((struct __pyx_obj_5bison_6bison____pyx_scope_struct__hashParserObject *)o); - } else { - (*Py_TYPE(o)->tp_free)(o); - } -} - -static int __pyx_tp_traverse_5bison_6bison____pyx_scope_struct__hashParserObject(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_5bison_6bison____pyx_scope_struct__hashParserObject *p = (struct __pyx_obj_5bison_6bison____pyx_scope_struct__hashParserObject *)o; - if (p->__pyx_v_hasher) { - e = (*v)(p->__pyx_v_hasher, a); if (e) return e; - } - return 0; -} - -static int __pyx_tp_clear_5bison_6bison____pyx_scope_struct__hashParserObject(PyObject *o) { - PyObject* tmp; - struct __pyx_obj_5bison_6bison____pyx_scope_struct__hashParserObject *p = (struct __pyx_obj_5bison_6bison____pyx_scope_struct__hashParserObject *)o; - tmp = ((PyObject*)p->__pyx_v_hasher); - p->__pyx_v_hasher = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; -} - -static PyTypeObject __pyx_type_5bison_6bison____pyx_scope_struct__hashParserObject = { - PyVarObject_HEAD_INIT(0, 0) - "bison.bison_.__pyx_scope_struct__hashParserObject", /*tp_name*/ - sizeof(struct __pyx_obj_5bison_6bison____pyx_scope_struct__hashParserObject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5bison_6bison____pyx_scope_struct__hashParserObject, /*tp_dealloc*/ - #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ - #endif - #if PY_VERSION_HEX >= 0x030800b4 - 0, /*tp_vectorcall_offset*/ - #endif - 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_5bison_6bison____pyx_scope_struct__hashParserObject, /*tp_traverse*/ - __pyx_tp_clear_5bison_6bison____pyx_scope_struct__hashParserObject, /*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_5bison_6bison____pyx_scope_struct__hashParserObject, /*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 - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif - #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 - 0, /*tp_print*/ - #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_bison_(PyObject* module); /*proto*/ -static PyModuleDef_Slot __pyx_moduledef_slots[] = { - {Py_mod_create, (void*)__pyx_pymod_create}, - {Py_mod_exec, (void*)__pyx_pymod_exec_bison_}, - {0, NULL} -}; -#endif - -static struct PyModuleDef __pyx_moduledef = { - PyModuleDef_HEAD_INIT, - "bison_", - __pyx_k_Pyrex_generated_portion_of_pybi, /* 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_CMD_Output, __pyx_k_CMD_Output, sizeof(__pyx_k_CMD_Output), 0, 1, 0, 0}, - {&__pyx_kp_u_Compiling, __pyx_k_Compiling, sizeof(__pyx_k_Compiling), 0, 1, 0, 0}, - {&__pyx_kp_u_Deleting_temporary_bison_output, __pyx_k_Deleting_temporary_bison_output, sizeof(__pyx_k_Deleting_temporary_bison_output), 0, 1, 0, 0}, - {&__pyx_n_s_EXTENSION_SUFFIXES, __pyx_k_EXTENSION_SUFFIXES, sizeof(__pyx_k_EXTENSION_SUFFIXES), 0, 0, 1, 1}, - {&__pyx_kp_u_Hash_discrepancy_need_to_rebuild, __pyx_k_Hash_discrepancy_need_to_rebuild, sizeof(__pyx_k_Hash_discrepancy_need_to_rebuild), 0, 1, 0, 0}, - {&__pyx_kp_u_Hashes_match_no_need_to_rebuild, __pyx_k_Hashes_match_no_need_to_rebuild, sizeof(__pyx_k_Hashes_match_no_need_to_rebuild), 0, 1, 0, 0}, - {&__pyx_n_u_NULL, __pyx_k_NULL, sizeof(__pyx_k_NULL), 0, 1, 0, 1}, - {&__pyx_kp_u_Opening_library, __pyx_k_Opening_library, sizeof(__pyx_k_Opening_library), 0, 1, 0, 0}, - {&__pyx_n_s_PIPE, __pyx_k_PIPE, sizeof(__pyx_k_PIPE), 0, 0, 1, 1}, - {&__pyx_n_s_ParserEngine, __pyx_k_ParserEngine, sizeof(__pyx_k_ParserEngine), 0, 0, 1, 1}, - {&__pyx_kp_u_ParserEngine_openLib_error, __pyx_k_ParserEngine_openLib_error, sizeof(__pyx_k_ParserEngine_openLib_error), 0, 1, 0, 0}, - {&__pyx_n_s_Popen, __pyx_k_Popen, sizeof(__pyx_k_Popen), 0, 0, 1, 1}, - {&__pyx_kp_u_PyObject_SetAttrString_py_parse, __pyx_k_PyObject_SetAttrString_py_parse, sizeof(__pyx_k_PyObject_SetAttrString_py_parse), 0, 1, 0, 0}, - {&__pyx_kp_u_PyObject_args, __pyx_k_PyObject_args, sizeof(__pyx_k_PyObject_args), 0, 1, 0, 0}, - {&__pyx_kp_u_PyObject_error_PyErr_Occurred, __pyx_k_PyObject_error_PyErr_Occurred, sizeof(__pyx_k_PyObject_error_PyErr_Occurred), 0, 1, 0, 0}, - {&__pyx_kp_u_PyObject_fn_PyObject_GetAttrStr, __pyx_k_PyObject_fn_PyObject_GetAttrStr, sizeof(__pyx_k_PyObject_fn_PyObject_GetAttrStr), 0, 1, 0, 0}, - {&__pyx_kp_u_PyObject_lasterr_PyObject_GetAt, __pyx_k_PyObject_lasterr_PyObject_GetAt, sizeof(__pyx_k_PyObject_lasterr_PyObject_GetAt), 0, 1, 0, 0}, - {&__pyx_kp_u_PyObject_obj_PyErr_Occurred, __pyx_k_PyObject_obj_PyErr_Occurred, sizeof(__pyx_k_PyObject_obj_PyErr_Occurred), 0, 1, 0, 0}, - {&__pyx_kp_u_PyObject_res_PyObject_CallObjec, __pyx_k_PyObject_res_PyObject_CallObjec, sizeof(__pyx_k_PyObject_res_PyObject_CallObjec), 0, 1, 0, 0}, - {&__pyx_kp_u_Py_DECREF_args, __pyx_k_Py_DECREF_args, sizeof(__pyx_k_Py_DECREF_args), 0, 1, 0, 0}, - {&__pyx_kp_u_Py_DECREF_lasterr, __pyx_k_Py_DECREF_lasterr, sizeof(__pyx_k_Py_DECREF_lasterr), 0, 1, 0, 0}, - {&__pyx_kp_u_Py_INCREF_Py_None, __pyx_k_Py_INCREF_Py_None, sizeof(__pyx_k_Py_INCREF_Py_None), 0, 1, 0, 0}, - {&__pyx_kp_u_Py_XDECREF_res, __pyx_k_Py_XDECREF_res, sizeof(__pyx_k_Py_XDECREF_res), 0, 1, 0, 0}, - {&__pyx_kp_u_Successfully_loaded_library, __pyx_k_Successfully_loaded_library, sizeof(__pyx_k_Successfully_loaded_library), 0, 1, 0, 0}, - {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, - {&__pyx_kp_u_Warning_failed_to_delete_tempora, __pyx_k_Warning_failed_to_delete_tempora, sizeof(__pyx_k_Warning_failed_to_delete_tempora), 0, 1, 0, 0}, - {&__pyx_kp_u_YYERROR, __pyx_k_YYERROR, sizeof(__pyx_k_YYERROR), 0, 1, 0, 0}, - {&__pyx_kp_u_YYLTYPE, __pyx_k_YYLTYPE, sizeof(__pyx_k_YYLTYPE), 0, 1, 0, 0}, - {&__pyx_kp_u_YYLTYPE_yylloc, __pyx_k_YYLTYPE_yylloc, sizeof(__pyx_k_YYLTYPE_yylloc), 0, 1, 0, 0}, - {&__pyx_kp_u_YYSTYPE_pushed_value, __pyx_k_YYSTYPE_pushed_value, sizeof(__pyx_k_YYSTYPE_pushed_value), 0, 1, 0, 0}, - {&__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__19, __pyx_k__19, sizeof(__pyx_k__19), 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__23, __pyx_k__23, sizeof(__pyx_k__23), 0, 1, 0, 0}, - {&__pyx_kp_u__24, __pyx_k__24, sizeof(__pyx_k__24), 0, 1, 0, 0}, - {&__pyx_kp_u__26, __pyx_k__26, sizeof(__pyx_k__26), 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__29, __pyx_k__29, sizeof(__pyx_k__29), 0, 1, 0, 0}, - {&__pyx_kp_u__30, __pyx_k__30, sizeof(__pyx_k__30), 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__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__44, __pyx_k__44, sizeof(__pyx_k__44), 0, 1, 0, 0}, - {&__pyx_kp_u__5, __pyx_k__5, sizeof(__pyx_k__5), 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_n_s_add_include_dir, __pyx_k_add_include_dir, sizeof(__pyx_k_add_include_dir), 0, 0, 1, 1}, - {&__pyx_n_s_add_library, __pyx_k_add_library, sizeof(__pyx_k_add_library), 0, 0, 1, 1}, - {&__pyx_n_s_add_library_dir, __pyx_k_add_library_dir, sizeof(__pyx_k_add_library_dir), 0, 0, 1, 1}, - {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1}, - {&__pyx_kp_u_args_Py_BuildValue_s_s_i_i_i_i, __pyx_k_args_Py_BuildValue_s_s_i_i_i_i, sizeof(__pyx_k_args_Py_BuildValue_s_s_i_i_i_i), 0, 1, 0, 0}, - {&__pyx_kp_u_args_Py_BuildValue_s_s_i_i_i_i_2, __pyx_k_args_Py_BuildValue_s_s_i_i_i_i_2, sizeof(__pyx_k_args_Py_BuildValue_s_s_i_i_i_i_2), 0, 1, 0, 0}, - {&__pyx_n_u_ascii, __pyx_k_ascii, sizeof(__pyx_k_ascii), 0, 1, 0, 1}, - {&__pyx_n_s_attr, __pyx_k_attr, sizeof(__pyx_k_attr), 0, 0, 1, 1}, - {&__pyx_kp_u_attribute___dllexport, __pyx_k_attribute___dllexport, sizeof(__pyx_k_attribute___dllexport), 0, 1, 0, 0}, - {&__pyx_kp_u_bak, __pyx_k_bak, sizeof(__pyx_k_bak), 0, 1, 0, 0}, - {&__pyx_n_s_bisonCFile, __pyx_k_bisonCFile, sizeof(__pyx_k_bisonCFile), 0, 0, 1, 1}, - {&__pyx_n_u_bisonCFile, __pyx_k_bisonCFile, sizeof(__pyx_k_bisonCFile), 0, 1, 0, 1}, - {&__pyx_n_s_bisonCFile1, __pyx_k_bisonCFile1, sizeof(__pyx_k_bisonCFile1), 0, 0, 1, 1}, - {&__pyx_n_u_bisonCFile1, __pyx_k_bisonCFile1, sizeof(__pyx_k_bisonCFile1), 0, 1, 0, 1}, - {&__pyx_n_s_bisonCmd, __pyx_k_bisonCmd, sizeof(__pyx_k_bisonCmd), 0, 0, 1, 1}, - {&__pyx_n_s_bisonEngineLibName, __pyx_k_bisonEngineLibName, sizeof(__pyx_k_bisonEngineLibName), 0, 0, 1, 1}, - {&__pyx_n_s_bisonFile, __pyx_k_bisonFile, sizeof(__pyx_k_bisonFile), 0, 0, 1, 1}, - {&__pyx_n_u_bisonFile, __pyx_k_bisonFile, sizeof(__pyx_k_bisonFile), 0, 1, 0, 1}, - {&__pyx_n_s_bisonHFile, __pyx_k_bisonHFile, sizeof(__pyx_k_bisonHFile), 0, 0, 1, 1}, - {&__pyx_n_u_bisonHFile, __pyx_k_bisonHFile, sizeof(__pyx_k_bisonHFile), 0, 1, 0, 1}, - {&__pyx_n_s_bisonHFile1, __pyx_k_bisonHFile1, sizeof(__pyx_k_bisonHFile1), 0, 0, 1, 1}, - {&__pyx_n_u_bisonHFile1, __pyx_k_bisonHFile1, sizeof(__pyx_k_bisonHFile1), 0, 1, 0, 1}, - {&__pyx_n_s_bison_bison, __pyx_k_bison_bison, sizeof(__pyx_k_bison_bison), 0, 0, 1, 1}, - {&__pyx_kp_u_bison_cmd, __pyx_k_bison_cmd, sizeof(__pyx_k_bison_cmd), 0, 1, 0, 0}, - {&__pyx_kp_u_bison_library_s, __pyx_k_bison_library_s, sizeof(__pyx_k_bison_library_s), 0, 1, 0, 0}, - {&__pyx_n_s_buildDirectory, __pyx_k_buildDirectory, sizeof(__pyx_k_buildDirectory), 0, 0, 1, 1}, - {&__pyx_n_s_buildLib, __pyx_k_buildLib, sizeof(__pyx_k_buildLib), 0, 0, 1, 1}, - {&__pyx_n_s_buildOnlyCFiles, __pyx_k_buildOnlyCFiles, sizeof(__pyx_k_buildOnlyCFiles), 0, 0, 1, 1}, - {&__pyx_n_s_ccompiler, __pyx_k_ccompiler, sizeof(__pyx_k_ccompiler), 0, 0, 1, 1}, - {&__pyx_n_s_cflags_post, __pyx_k_cflags_post, sizeof(__pyx_k_cflags_post), 0, 0, 1, 1}, - {&__pyx_n_s_cflags_pre, __pyx_k_cflags_pre, sizeof(__pyx_k_cflags_pre), 0, 0, 1, 1}, - {&__pyx_kp_u_char_filename, __pyx_k_char_filename, sizeof(__pyx_k_char_filename), 0, 1, 0, 0}, - {&__pyx_kp_u_char_rules_hash_s, __pyx_k_char_rules_hash_s, sizeof(__pyx_k_char_rules_hash_s), 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_closeLib, __pyx_k_closeLib, sizeof(__pyx_k_closeLib), 0, 0, 1, 1}, - {&__pyx_n_s_cmpLines, __pyx_k_cmpLines, sizeof(__pyx_k_cmpLines), 0, 0, 1, 1}, - {&__pyx_n_s_co_firstlineno, __pyx_k_co_firstlineno, sizeof(__pyx_k_co_firstlineno), 0, 0, 1, 1}, - {&__pyx_n_s_code, __pyx_k_code, sizeof(__pyx_k_code), 0, 0, 1, 1}, - {&__pyx_kp_u_code_requires, __pyx_k_code_requires, sizeof(__pyx_k_code_requires), 0, 1, 0, 0}, - {&__pyx_kp_u_code_top, __pyx_k_code_top, sizeof(__pyx_k_code_top), 0, 1, 0, 0}, - {&__pyx_n_s_communicate, __pyx_k_communicate, sizeof(__pyx_k_communicate), 0, 0, 1, 1}, - {&__pyx_n_s_compile, __pyx_k_compile, sizeof(__pyx_k_compile), 0, 0, 1, 1}, - {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1}, - {&__pyx_kp_u_current_parser_class_s, __pyx_k_current_parser_class_s, sizeof(__pyx_k_current_parser_class_s), 0, 1, 0, 0}, - {&__pyx_n_u_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 1, 0, 1}, - {&__pyx_n_u_darwin, __pyx_k_darwin, sizeof(__pyx_k_darwin), 0, 1, 0, 1}, - {&__pyx_n_s_debug, __pyx_k_debug, sizeof(__pyx_k_debug), 0, 0, 1, 1}, - {&__pyx_n_s_debugSymbols, __pyx_k_debugSymbols, sizeof(__pyx_k_debugSymbols), 0, 0, 1, 1}, - {&__pyx_kp_u_declspec_dllexport, __pyx_k_declspec_dllexport, sizeof(__pyx_k_declspec_dllexport), 0, 1, 0, 0}, - {&__pyx_kp_u_declspec_x, __pyx_k_declspec_x, sizeof(__pyx_k_declspec_x), 0, 1, 0, 0}, - {&__pyx_n_s_dedent, __pyx_k_dedent, sizeof(__pyx_k_dedent), 0, 0, 1, 1}, - {&__pyx_kp_u_define_YYERROR_VERBOSE_1, __pyx_k_define_YYERROR_VERBOSE_1, sizeof(__pyx_k_define_YYERROR_VERBOSE_1), 0, 1, 0, 0}, - {&__pyx_kp_u_define_YYLTYPE_YYLTYPE, __pyx_k_define_YYLTYPE_YYLTYPE, sizeof(__pyx_k_define_YYLTYPE_YYLTYPE), 0, 1, 0, 0}, - {&__pyx_kp_u_define_api_pure_full, __pyx_k_define_api_pure_full, sizeof(__pyx_k_define_api_pure_full), 0, 1, 0, 0}, - {&__pyx_n_s_define_macro, __pyx_k_define_macro, sizeof(__pyx_k_define_macro), 0, 0, 1, 1}, - {&__pyx_n_s_direction, __pyx_k_direction, sizeof(__pyx_k_direction), 0, 0, 1, 1}, - {&__pyx_n_s_dirname, __pyx_k_dirname, sizeof(__pyx_k_dirname), 0, 0, 1, 1}, - {&__pyx_kp_u_dirname_platform_version_0_vers, __pyx_k_dirname_platform_version_0_vers, sizeof(__pyx_k_dirname_platform_version_0_vers), 0, 1, 0, 0}, - {&__pyx_n_s_distutils, __pyx_k_distutils, sizeof(__pyx_k_distutils), 0, 0, 1, 1}, - {&__pyx_n_s_distutils_ccompiler, __pyx_k_distutils_ccompiler, sizeof(__pyx_k_distutils_ccompiler), 0, 0, 1, 1}, - {&__pyx_n_s_distutils_dir_name, __pyx_k_distutils_dir_name, sizeof(__pyx_k_distutils_dir_name), 0, 0, 1, 1}, - {&__pyx_n_s_distutils_log, __pyx_k_distutils_log, sizeof(__pyx_k_distutils_log), 0, 0, 1, 1}, - {&__pyx_n_s_distutils_sysconfig, __pyx_k_distutils_sysconfig, sizeof(__pyx_k_distutils_sysconfig), 0, 0, 1, 1}, - {&__pyx_n_s_dname, __pyx_k_dname, sizeof(__pyx_k_dname), 0, 0, 1, 1}, - {&__pyx_kp_u_do, __pyx_k_do, sizeof(__pyx_k_do), 0, 1, 0, 0}, - {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1}, - {&__pyx_n_s_docString, __pyx_k_docString, sizeof(__pyx_k_docString), 0, 0, 1, 1}, - {&__pyx_n_u_dynamic_lookup, __pyx_k_dynamic_lookup, sizeof(__pyx_k_dynamic_lookup), 0, 1, 0, 1}, - {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1}, - {&__pyx_n_u_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 1, 0, 1}, - {&__pyx_n_s_extra_postargs, __pyx_k_extra_postargs, sizeof(__pyx_k_extra_postargs), 0, 0, 1, 1}, - {&__pyx_n_s_extra_preargs, __pyx_k_extra_preargs, sizeof(__pyx_k_extra_preargs), 0, 0, 1, 1}, - {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1}, - {&__pyx_n_s_filter, __pyx_k_filter, sizeof(__pyx_k_filter), 0, 0, 1, 1}, - {&__pyx_n_s_flexCFile, __pyx_k_flexCFile, sizeof(__pyx_k_flexCFile), 0, 0, 1, 1}, - {&__pyx_n_u_flexCFile, __pyx_k_flexCFile, sizeof(__pyx_k_flexCFile), 0, 1, 0, 1}, - {&__pyx_n_s_flexCFile1, __pyx_k_flexCFile1, sizeof(__pyx_k_flexCFile1), 0, 0, 1, 1}, - {&__pyx_n_u_flexCFile1, __pyx_k_flexCFile1, sizeof(__pyx_k_flexCFile1), 0, 1, 0, 1}, - {&__pyx_n_s_flexCmd, __pyx_k_flexCmd, sizeof(__pyx_k_flexCmd), 0, 0, 1, 1}, - {&__pyx_n_s_flexFile, __pyx_k_flexFile, sizeof(__pyx_k_flexFile), 0, 0, 1, 1}, - {&__pyx_n_u_flexFile, __pyx_k_flexFile, sizeof(__pyx_k_flexFile), 0, 1, 0, 1}, - {&__pyx_n_s_flexHFile, __pyx_k_flexHFile, sizeof(__pyx_k_flexHFile), 0, 0, 1, 1}, - {&__pyx_n_s_flexHFile1, __pyx_k_flexHFile1, sizeof(__pyx_k_flexHFile1), 0, 0, 1, 1}, - {&__pyx_kp_u_flex_cmd, __pyx_k_flex_cmd, sizeof(__pyx_k_flex_cmd), 0, 1, 0, 0}, - {&__pyx_n_s_fnmatch, __pyx_k_fnmatch, sizeof(__pyx_k_fnmatch), 0, 0, 1, 1}, - {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1}, - {&__pyx_n_s_generate_exception_handler, __pyx_k_generate_exception_handler, sizeof(__pyx_k_generate_exception_handler), 0, 0, 1, 1}, - {&__pyx_kp_u_generating_bison_file, __pyx_k_generating_bison_file, sizeof(__pyx_k_generating_bison_file), 0, 1, 0, 0}, - {&__pyx_n_s_get_platform, __pyx_k_get_platform, sizeof(__pyx_k_get_platform), 0, 0, 1, 1}, - {&__pyx_n_s_get_python_inc, __pyx_k_get_python_inc, sizeof(__pyx_k_get_python_inc), 0, 0, 1, 1}, - {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, - {&__pyx_n_s_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 0, 1, 1}, - {&__pyx_n_s_handlerNames, __pyx_k_handlerNames, sizeof(__pyx_k_handlerNames), 0, 0, 1, 1}, - {&__pyx_n_s_handlers, __pyx_k_handlers, sizeof(__pyx_k_handlers), 0, 0, 1, 1}, - {&__pyx_n_s_hashParserObject, __pyx_k_hashParserObject, sizeof(__pyx_k_hashParserObject), 0, 0, 1, 1}, - {&__pyx_n_s_hashParserObject_locals_update, __pyx_k_hashParserObject_locals_update, sizeof(__pyx_k_hashParserObject_locals_update), 0, 0, 1, 1}, - {&__pyx_n_s_hasher, __pyx_k_hasher, sizeof(__pyx_k_hasher), 0, 0, 1, 1}, - {&__pyx_n_s_hashlib, __pyx_k_hashlib, sizeof(__pyx_k_hashlib), 0, 0, 1, 1}, - {&__pyx_n_s_hexdigest, __pyx_k_hexdigest, sizeof(__pyx_k_hexdigest), 0, 0, 1, 1}, - {&__pyx_kp_u_if_args, __pyx_k_if_args, sizeof(__pyx_k_if_args), 0, 1, 0, 0}, - {&__pyx_kp_u_if_debug_yyset_debug_1_scanner_F, __pyx_k_if_debug_yyset_debug_1_scanner_F, sizeof(__pyx_k_if_debug_yyset_debug_1_scanner_F), 0, 1, 0, 0}, - {&__pyx_kp_u_if_error_PyErr_Clear, __pyx_k_if_error_PyErr_Clear, sizeof(__pyx_k_if_error_PyErr_Clear), 0, 1, 0, 0}, - {&__pyx_kp_u_if_fn, __pyx_k_if_fn, sizeof(__pyx_k_if_fn), 0, 1, 0, 0}, - {&__pyx_kp_u_if_obj, __pyx_k_if_obj, sizeof(__pyx_k_if_obj), 0, 1, 0, 0}, - {&__pyx_kp_u_if_res, __pyx_k_if_res, sizeof(__pyx_k_if_res), 0, 1, 0, 0}, - {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, - {&__pyx_n_s_importlib, __pyx_k_importlib, sizeof(__pyx_k_importlib), 0, 0, 1, 1}, - {&__pyx_kp_u_include_Python_h, __pyx_k_include_Python_h, sizeof(__pyx_k_include_Python_h), 0, 1, 0, 0}, - {&__pyx_kp_u_include_lex_yy_h, __pyx_k_include_lex_yy_h, sizeof(__pyx_k_include_lex_yy_h), 0, 1, 0, 0}, - {&__pyx_kp_u_include_tmp_tab_h, __pyx_k_include_tmp_tab_h, sizeof(__pyx_k_include_tmp_tab_h), 0, 1, 0, 0}, - {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1}, - {&__pyx_n_s_initialize, __pyx_k_initialize, sizeof(__pyx_k_initialize), 0, 0, 1, 1}, - {&__pyx_kp_u_int_debug, __pyx_k_int_debug, sizeof(__pyx_k_int_debug), 0, 1, 0, 0}, - {&__pyx_kp_u_int_first_column, __pyx_k_int_first_column, sizeof(__pyx_k_int_first_column), 0, 1, 0, 0}, - {&__pyx_kp_u_int_first_line, __pyx_k_int_first_line, sizeof(__pyx_k_int_first_line), 0, 1, 0, 0}, - {&__pyx_kp_u_int_last_column, __pyx_k_int_last_column, sizeof(__pyx_k_int_last_column), 0, 1, 0, 0}, - {&__pyx_kp_u_int_last_line, __pyx_k_int_last_line, sizeof(__pyx_k_int_last_line), 0, 1, 0, 0}, - {&__pyx_kp_u_int_status, __pyx_k_int_status, sizeof(__pyx_k_int_status), 0, 1, 0, 0}, - {&__pyx_kp_u_int_token_yylex_pushed_value_yy, __pyx_k_int_token_yylex_pushed_value_yy, sizeof(__pyx_k_int_token_yylex_pushed_value_yy), 0, 1, 0, 0}, - {&__pyx_kp_u_int_yyerror_char_msg, __pyx_k_int_yyerror_char_msg, sizeof(__pyx_k_int_yyerror_char_msg), 0, 1, 0, 0}, - {&__pyx_kp_u_int_yyerror_char_msg_2, __pyx_k_int_yyerror_char_msg_2, sizeof(__pyx_k_int_yyerror_char_msg_2), 0, 1, 0, 0}, - {&__pyx_n_s_isfile, __pyx_k_isfile, sizeof(__pyx_k_isfile), 0, 0, 1, 1}, - {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1}, - {&__pyx_n_s_keepfiles, __pyx_k_keepfiles, sizeof(__pyx_k_keepfiles), 0, 0, 1, 1}, - {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1}, - {&__pyx_n_s_keyLines, __pyx_k_keyLines, sizeof(__pyx_k_keyLines), 0, 0, 1, 1}, - {&__pyx_n_s_lexscript, __pyx_k_lexscript, sizeof(__pyx_k_lexscript), 0, 0, 1, 1}, - {&__pyx_kp_u_library_loading_failed, __pyx_k_library_loading_failed, sizeof(__pyx_k_library_loading_failed), 0, 1, 0, 0}, - {&__pyx_n_u_libs, __pyx_k_libs, sizeof(__pyx_k_libs), 0, 1, 0, 1}, - {&__pyx_n_s_line, __pyx_k_line, sizeof(__pyx_k_line), 0, 0, 1, 1}, - {&__pyx_n_s_line1, __pyx_k_line1, sizeof(__pyx_k_line1), 0, 0, 1, 1}, - {&__pyx_n_s_line2, __pyx_k_line2, sizeof(__pyx_k_line2), 0, 0, 1, 1}, - {&__pyx_n_s_link_shared_object, __pyx_k_link_shared_object, sizeof(__pyx_k_link_shared_object), 0, 0, 1, 1}, - {&__pyx_n_s_linker_so, __pyx_k_linker_so, sizeof(__pyx_k_linker_so), 0, 0, 1, 1}, - {&__pyx_kp_u_linking, __pyx_k_linking, sizeof(__pyx_k_linking), 0, 1, 0, 0}, - {&__pyx_kp_u_locations, __pyx_k_locations, sizeof(__pyx_k_locations), 0, 1, 0, 0}, - {&__pyx_kp_u_locp_first_line_locp_first_colu, __pyx_k_locp_first_line_locp_first_colu, sizeof(__pyx_k_locp_first_line_locp_first_colu), 0, 1, 0, 0}, - {&__pyx_kp_u_locp_last_line_locp_last_column, __pyx_k_locp_last_line_locp_last_column, sizeof(__pyx_k_locp_last_line_locp_last_column), 0, 1, 0, 0}, - {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1}, - {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1}, - {&__pyx_n_s_machinery, __pyx_k_machinery, sizeof(__pyx_k_machinery), 0, 0, 1, 1}, - {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, - {&__pyx_n_s_meth, __pyx_k_meth, sizeof(__pyx_k_meth), 0, 0, 1, 1}, - {&__pyx_n_s_meth1, __pyx_k_meth1, sizeof(__pyx_k_meth1), 0, 0, 1, 1}, - {&__pyx_n_s_meth2, __pyx_k_meth2, sizeof(__pyx_k_meth2), 0, 0, 1, 1}, - {&__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_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1}, - {&__pyx_n_s_new_compiler, __pyx_k_new_compiler, sizeof(__pyx_k_new_compiler), 0, 0, 1, 1}, - {&__pyx_n_s_o, __pyx_k_o, sizeof(__pyx_k_o), 0, 0, 1, 1}, - {&__pyx_n_u_on, __pyx_k_on, sizeof(__pyx_k_on), 0, 1, 0, 1}, - {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1}, - {&__pyx_n_s_openCurrentLib, __pyx_k_openCurrentLib, sizeof(__pyx_k_openCurrentLib), 0, 0, 1, 1}, - {&__pyx_n_s_openLib, __pyx_k_openLib, sizeof(__pyx_k_openLib), 0, 0, 1, 1}, - {&__pyx_n_s_options, __pyx_k_options, sizeof(__pyx_k_options), 0, 0, 1, 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_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1}, - {&__pyx_n_s_platform, __pyx_k_platform, sizeof(__pyx_k_platform), 0, 0, 1, 1}, - {&__pyx_n_s_possible_so, __pyx_k_possible_so, sizeof(__pyx_k_possible_so), 0, 0, 1, 1}, - {&__pyx_kp_u_prec, __pyx_k_prec, sizeof(__pyx_k_prec), 0, 1, 0, 0}, - {&__pyx_n_s_precedences, __pyx_k_precedences, sizeof(__pyx_k_precedences), 0, 0, 1, 1}, - {&__pyx_n_s_prefix, __pyx_k_prefix, sizeof(__pyx_k_prefix), 0, 0, 1, 1}, - {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1}, - {&__pyx_n_s_print_exc, __pyx_k_print_exc, sizeof(__pyx_k_print_exc), 0, 0, 1, 1}, - {&__pyx_kp_u_py_callback_cb, __pyx_k_py_callback_cb, sizeof(__pyx_k_py_callback_cb), 0, 1, 0, 0}, - {&__pyx_kp_u_py_callback_py_parser, __pyx_k_py_callback_py_parser, sizeof(__pyx_k_py_callback_py_parser), 0, 1, 0, 0}, - {&__pyx_kp_u_py_input_in, __pyx_k_py_input_in, sizeof(__pyx_k_py_input_in), 0, 1, 0, 0}, - {&__pyx_kp_u_py_parser_parser1, __pyx_k_py_parser_parser1, sizeof(__pyx_k_py_parser_parser1), 0, 1, 0, 0}, - {&__pyx_kp_u_python_v_major_v_minor, __pyx_k_python_v_major_v_minor, sizeof(__pyx_k_python_v_major_v_minor), 0, 1, 0, 0}, - {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, - {&__pyx_n_s_raw_c_rules, __pyx_k_raw_c_rules, sizeof(__pyx_k_raw_c_rules), 0, 0, 1, 1}, - {&__pyx_n_s_re, __pyx_k_re, sizeof(__pyx_k_re), 0, 0, 1, 1}, - {&__pyx_n_s_reSpaces, __pyx_k_reSpaces, sizeof(__pyx_k_reSpaces), 0, 0, 1, 1}, - {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, - {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1}, - {&__pyx_n_s_rename, __pyx_k_rename, sizeof(__pyx_k_rename), 0, 0, 1, 1}, - {&__pyx_kp_u_renaming_bison_output_files, __pyx_k_renaming_bison_output_files, sizeof(__pyx_k_renaming_bison_output_files), 0, 1, 0, 0}, - {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1}, - {&__pyx_kp_u_report_syntax_error, __pyx_k_report_syntax_error, sizeof(__pyx_k_report_syntax_error), 0, 1, 0, 0}, - {&__pyx_kp_u_return, __pyx_k_return, sizeof(__pyx_k_return), 0, 1, 0, 0}, - {&__pyx_kp_u_return_0, __pyx_k_return_0, sizeof(__pyx_k_return_0), 0, 1, 0, 0}, - {&__pyx_kp_u_return_1, __pyx_k_return_1, sizeof(__pyx_k_return_1), 0, 1, 0, 0}, - {&__pyx_kp_u_return_2, __pyx_k_return_2, sizeof(__pyx_k_return_2), 0, 1, 0, 0}, - {&__pyx_n_s_returncode, __pyx_k_returncode, sizeof(__pyx_k_returncode), 0, 0, 1, 1}, - {&__pyx_kp_u_rm, __pyx_k_rm, sizeof(__pyx_k_rm), 0, 1, 0, 0}, - {&__pyx_kp_u_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 1, 0, 0}, - {&__pyx_kp_u_s_2, __pyx_k_s_2, sizeof(__pyx_k_s_2), 0, 1, 0, 0}, - {&__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_kp_u_s_5, __pyx_k_s_5, sizeof(__pyx_k_s_5), 0, 1, 0, 0}, - {&__pyx_kp_u_s_lasterr, __pyx_k_s_lasterr, sizeof(__pyx_k_s_lasterr), 0, 1, 0, 0}, - {&__pyx_kp_s_self_libHandle_cannot_be_convert, __pyx_k_self_libHandle_cannot_be_convert, sizeof(__pyx_k_self_libHandle_cannot_be_convert), 0, 0, 1, 0}, - {&__pyx_n_s_set_verbosity, __pyx_k_set_verbosity, sizeof(__pyx_k_set_verbosity), 0, 0, 1, 1}, - {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, - {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, - {&__pyx_n_s_setuptools, __pyx_k_setuptools, sizeof(__pyx_k_setuptools), 0, 0, 1, 1}, - {&__pyx_n_u_sha1, __pyx_k_sha1, sizeof(__pyx_k_sha1), 0, 1, 0, 1}, - {&__pyx_n_s_shell, __pyx_k_shell, sizeof(__pyx_k_shell), 0, 0, 1, 1}, - {&__pyx_n_s_shutil, __pyx_k_shutil, sizeof(__pyx_k_shutil), 0, 0, 1, 1}, - {&__pyx_n_s_sort, __pyx_k_sort, sizeof(__pyx_k_sort), 0, 0, 1, 1}, - {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1}, - {&__pyx_kp_s_src_bison_cython_bison__pyx, __pyx_k_src_bison_cython_bison__pyx, sizeof(__pyx_k_src_bison_cython_bison__pyx), 0, 0, 1, 0}, - {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1}, - {&__pyx_kp_u_start_s, __pyx_k_start_s, sizeof(__pyx_k_start_s), 0, 1, 0, 0}, - {&__pyx_n_s_startswith, __pyx_k_startswith, sizeof(__pyx_k_startswith), 0, 0, 1, 1}, - {&__pyx_n_s_staticmethod, __pyx_k_staticmethod, sizeof(__pyx_k_staticmethod), 0, 0, 1, 1}, - {&__pyx_kp_u_status_yypush_parse_ps_token_pu, __pyx_k_status_yypush_parse_ps_token_pu, sizeof(__pyx_k_status_yypush_parse_ps_token_pu), 0, 1, 0, 0}, - {&__pyx_n_s_stderr, __pyx_k_stderr, sizeof(__pyx_k_stderr), 0, 0, 1, 1}, - {&__pyx_n_s_stdout, __pyx_k_stdout, sizeof(__pyx_k_stdout), 0, 0, 1, 1}, - {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1}, - {&__pyx_n_s_sub, __pyx_k_sub, sizeof(__pyx_k_sub), 0, 0, 1, 1}, - {&__pyx_n_s_subprocess, __pyx_k_subprocess, sizeof(__pyx_k_subprocess), 0, 0, 1, 1}, - {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1}, - {&__pyx_n_s_sysconfig, __pyx_k_sysconfig, sizeof(__pyx_k_sysconfig), 0, 0, 1, 1}, - {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, - {&__pyx_n_s_textwrap, __pyx_k_textwrap, sizeof(__pyx_k_textwrap), 0, 0, 1, 1}, - {&__pyx_n_s_tmp, __pyx_k_tmp, sizeof(__pyx_k_tmp), 0, 0, 1, 1}, - {&__pyx_kp_u_tmp_output, __pyx_k_tmp_output, sizeof(__pyx_k_tmp_output), 0, 1, 0, 0}, - {&__pyx_kp_u_token_s, __pyx_k_token_s, sizeof(__pyx_k_token_s), 0, 1, 0, 0}, - {&__pyx_n_s_tokens, __pyx_k_tokens, sizeof(__pyx_k_tokens), 0, 0, 1, 1}, - {&__pyx_n_s_traceback, __pyx_k_traceback, sizeof(__pyx_k_traceback), 0, 0, 1, 1}, - {&__pyx_kp_u_typedef_struct_YYLTYPE, __pyx_k_typedef_struct_YYLTYPE, sizeof(__pyx_k_typedef_struct_YYLTYPE), 0, 1, 0, 0}, - {&__pyx_kp_u_typedef_void_yyscan_t, __pyx_k_typedef_void_yyscan_t, sizeof(__pyx_k_typedef_void_yyscan_t), 0, 1, 0, 0}, - {&__pyx_kp_u_undefined, __pyx_k_undefined, sizeof(__pyx_k_undefined), 0, 1, 0, 0}, - {&__pyx_n_s_unlink, __pyx_k_unlink, sizeof(__pyx_k_unlink), 0, 0, 1, 1}, - {&__pyx_n_s_unquoted, __pyx_k_unquoted, sizeof(__pyx_k_unquoted), 0, 0, 1, 1}, - {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1}, - {&__pyx_kp_u_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 1, 0, 0}, - {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1}, - {&__pyx_n_s_verbose, __pyx_k_verbose, sizeof(__pyx_k_verbose), 0, 0, 1, 1}, - {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1}, - {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1}, - {&__pyx_kp_u_void_cb_void_char_int_int, __pyx_k_void_cb_void_char_int_int, sizeof(__pyx_k_void_cb_void_char_int_int), 0, 1, 0, 0}, - {&__pyx_kp_u_void_do_parse_void_parser1, __pyx_k_void_do_parse_void_parser1, sizeof(__pyx_k_void_do_parse_void_parser1), 0, 1, 0, 0}, - {&__pyx_kp_u_void_in_void_char_int_int, __pyx_k_void_in_void_char_int_int, sizeof(__pyx_k_void_in_void_char_int_int), 0, 1, 0, 0}, - {&__pyx_kp_u_void_py_callback_void_char_int_i, __pyx_k_void_py_callback_void_char_int_i, sizeof(__pyx_k_void_py_callback_void_char_int_i), 0, 1, 0, 0}, - {&__pyx_kp_u_void_py_input_void_char_int_int, __pyx_k_void_py_input_void_char_int_int, sizeof(__pyx_k_void_py_input_void_char_int_int), 0, 1, 0, 0}, - {&__pyx_kp_u_void_py_parser, __pyx_k_void_py_parser, sizeof(__pyx_k_void_py_parser), 0, 1, 0, 0}, - {&__pyx_kp_u_void_yyerror_YYLTYPE_locp_yyscan, __pyx_k_void_yyerror_YYLTYPE_locp_yyscan, sizeof(__pyx_k_void_yyerror_YYLTYPE_locp_yyscan), 0, 1, 0, 0}, - {&__pyx_kp_u_void_yyerror_YYLTYPE_locp_yyscan_2, __pyx_k_void_yyerror_YYLTYPE_locp_yyscan_2, sizeof(__pyx_k_void_yyerror_YYLTYPE_locp_yyscan_2), 0, 1, 0, 0}, - {&__pyx_n_u_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 1, 0, 1}, - {&__pyx_n_s_walk, __pyx_k_walk, sizeof(__pyx_k_walk), 0, 0, 1, 1}, - {&__pyx_kp_u_while_status_YYPUSH_MORE, __pyx_k_while_status_YYPUSH_MORE, sizeof(__pyx_k_while_status_YYPUSH_MORE), 0, 1, 0, 0}, - {&__pyx_n_u_win32, __pyx_k_win32, sizeof(__pyx_k_win32), 0, 1, 0, 1}, - {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1}, - {&__pyx_kp_u_yyclearin, __pyx_k_yyclearin, sizeof(__pyx_k_yyclearin), 0, 1, 0, 0}, - {&__pyx_kp_u_yydebug_debug_For_Bison_still_g, __pyx_k_yydebug_debug_For_Bison_still_g, sizeof(__pyx_k_yydebug_debug_For_Bison_still_g), 0, 1, 0, 0}, - {&__pyx_kp_u_yyerrok, __pyx_k_yyerrok, sizeof(__pyx_k_yyerrok), 0, 1, 0, 0}, - {&__pyx_kp_u_yyerror_yylloc_exception_raised, __pyx_k_yyerror_yylloc_exception_raised, sizeof(__pyx_k_yyerror_yylloc_exception_raised), 0, 1, 0, 0}, - {&__pyx_kp_u_yylex_destroy_scanner_return, __pyx_k_yylex_destroy_scanner_return, sizeof(__pyx_k_yylex_destroy_scanner_return), 0, 1, 0, 0}, - {&__pyx_kp_u_yylex_init_scanner, __pyx_k_yylex_init_scanner, sizeof(__pyx_k_yylex_init_scanner), 0, 1, 0, 0}, - {&__pyx_kp_u_yylloc_first_line_yylloc_first, __pyx_k_yylloc_first_line_yylloc_first, sizeof(__pyx_k_yylloc_first_line_yylloc_first), 0, 1, 0, 0}, - {&__pyx_kp_u_yylloc_first_line_yylloc_first_c, __pyx_k_yylloc_first_line_yylloc_first_c, sizeof(__pyx_k_yylloc_first_line_yylloc_first_c), 0, 1, 0, 0}, - {&__pyx_kp_u_yylloc_last_line_yylloc_last_co, __pyx_k_yylloc_last_line_yylloc_last_co, sizeof(__pyx_k_yylloc_last_line_yylloc_last_co), 0, 1, 0, 0}, - {&__pyx_kp_u_yyparse, __pyx_k_yyparse, sizeof(__pyx_k_yyparse), 0, 1, 0, 0}, - {&__pyx_kp_u_yypstate_delete_ps, __pyx_k_yypstate_delete_ps, sizeof(__pyx_k_yypstate_delete_ps), 0, 1, 0, 0}, - {&__pyx_kp_u_yypstate_ps_yypstate_new, __pyx_k_yypstate_ps_yypstate_new, sizeof(__pyx_k_yypstate_ps_yypstate_new), 0, 1, 0, 0}, - {&__pyx_kp_u_yyscan_t_scanner, __pyx_k_yyscan_t_scanner, sizeof(__pyx_k_yyscan_t_scanner), 0, 1, 0, 0}, - {0, 0, 0, 0, 0, 0, 0} -}; -static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 137, __pyx_L1_error) - __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(0, 190, __pyx_L1_error) - __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s_open); if (!__pyx_builtin_open) __PYX_ERR(0, 315, __pyx_L1_error) - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 438, __pyx_L1_error) - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __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); - - /* "src/bison/cython/bison_.pyx":190 - * if self.parserHash != libHash: - * if verbose: - * print("Hash discrepancy, need to rebuild bison lib") # <<<<<<<<<<<<<< - * print(" current parser class: %s" % self.parserHash) - * print(" bison library: %s" % libHash) - */ - __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_Hash_discrepancy_need_to_rebuild); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 190, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__3); - __Pyx_GIVEREF(__pyx_tuple__3); - - /* "src/bison/cython/bison_.pyx":198 - * else: - * if verbose: - * print("Hashes match, no need to rebuild bison engine lib") # <<<<<<<<<<<<<< - * - * def possible_so(self, so_dir): - */ - __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_Hashes_match_no_need_to_rebuild); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 198, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__4); - __Pyx_GIVEREF(__pyx_tuple__4); - - /* "src/bison/cython/bison_.pyx":245 - * handle = bisondynlib_open(libFilename) - * if handle == NULL: - * raise Exception('library loading failed!') # <<<<<<<<<<<<<< - * self.libHandle = handle - * - */ - __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_library_loading_failed); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 245, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__6); - __Pyx_GIVEREF(__pyx_tuple__6); - - /* "src/bison/cython/bison_.pyx":257 - * - * if parser.verbose: - * print("Successfully loaded library") # <<<<<<<<<<<<<< - * - * def generate_exception_handler(self): - */ - __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Successfully_loaded_library); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 257, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__7); - __Pyx_GIVEREF(__pyx_tuple__7); - - /* "src/bison/cython/bison_.pyx":442 - * i = i - 1 - * break # hack for rules using '%prec' - * o = option[i].replace('"', '\\"') # <<<<<<<<<<<<<< - * if o == 'error': - * args.append('"%s", lasterr' % (o)) - */ - __pyx_tuple__25 = PyTuple_Pack(2, __pyx_kp_u__23, __pyx_kp_u__24); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 442, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__25); - __Pyx_GIVEREF(__pyx_tuple__25); - - /* "src/bison/cython/bison_.pyx":627 - * - * if parser.verbose: - * print("renaming bison output files") # <<<<<<<<<<<<<< - * print("{} => {}{}".format(parser.bisonCFile, buildDirectory, - * parser.bisonCFile1)) - */ - __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_u_renaming_bison_output_files); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 627, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__33); - __Pyx_GIVEREF(__pyx_tuple__33); - - /* "src/bison/cython/bison_.pyx":744 - * - * if parser.verbose: - * print("Deleting temporary bison output files:") # <<<<<<<<<<<<<< - * - * for f in [parser.bisonCFile, parser.bisonHFile, parser.flexCFile, "tmp.output"]: - */ - __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_u_Deleting_temporary_bison_output); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 744, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__36); - __Pyx_GIVEREF(__pyx_tuple__36); - - /* "(tree fragment)":2 - * def __reduce_cython__(self): - * raise TypeError("self.libHandle cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< - * def __setstate_cython__(self, __pyx_state): - * raise TypeError("self.libHandle cannot be converted to a Python object for pickling") - */ - __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_s_self_libHandle_cannot_be_convert); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(1, 2, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__37); - __Pyx_GIVEREF(__pyx_tuple__37); - - /* "(tree fragment)":4 - * raise TypeError("self.libHandle cannot be converted to a Python object for pickling") - * def __setstate_cython__(self, __pyx_state): - * raise TypeError("self.libHandle cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< - */ - __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_s_self_libHandle_cannot_be_convert); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(1, 4, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__38); - __Pyx_GIVEREF(__pyx_tuple__38); - - /* "src/bison/cython/bison_.pyx":828 - * hasher = hashlib.new('sha1') - * - * def update(o): # <<<<<<<<<<<<<< - * if type(o) == type(""): - * o=o.encode("utf-8") - */ - __pyx_tuple__42 = PyTuple_Pack(1, __pyx_n_s_o); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 828, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__42); - __Pyx_GIVEREF(__pyx_tuple__42); - __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_bison_cython_bison__pyx, __pyx_n_s_update, 828, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 828, __pyx_L1_error) - - /* "src/bison/cython/bison_.pyx":80 - * import textwrap - * - * reSpaces = re.compile("\\s+") # <<<<<<<<<<<<<< - * - * unquoted = '[^\'"]%s[^\'"]?' - */ - __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_u_s_4); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 80, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__45); - __Pyx_GIVEREF(__pyx_tuple__45); - - /* "src/bison/cython/bison_.pyx":138 - * - * @staticmethod - * def distutils_dir_name(dname): # <<<<<<<<<<<<<< - * import sysconfig, sys - * """Returns the name of a distutils build directory""" - */ - __pyx_tuple__46 = PyTuple_Pack(4, __pyx_n_s_dname, __pyx_n_s_sysconfig, __pyx_n_s_sys, __pyx_n_s_f); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 138, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__46); - __Pyx_GIVEREF(__pyx_tuple__46); - __pyx_codeobj_ = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_bison_cython_bison__pyx, __pyx_n_s_distutils_dir_name, 138, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj_)) __PYX_ERR(0, 138, __pyx_L1_error) - - /* "src/bison/cython/bison_.pyx":787 - * - * - * def cmpLines(meth1, meth2): # <<<<<<<<<<<<<< - * """ - * Used as a sort() argument for sorting parse target handler methods by - */ - __pyx_tuple__47 = PyTuple_Pack(4, __pyx_n_s_meth1, __pyx_n_s_meth2, __pyx_n_s_line1, __pyx_n_s_line2); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 787, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__47); - __Pyx_GIVEREF(__pyx_tuple__47); - __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_bison_cython_bison__pyx, __pyx_n_s_cmpLines, 787, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 787, __pyx_L1_error) - - /* "src/bison/cython/bison_.pyx":801 - * return (line1 > line2) - (line1 < line2) - * - * def keyLines(meth): # <<<<<<<<<<<<<< - * """ - * Used as a sort() 'key' argument for sorting parse target handler methods by - */ - __pyx_tuple__48 = PyTuple_Pack(2, __pyx_n_s_meth, __pyx_n_s_line); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 801, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__48); - __Pyx_GIVEREF(__pyx_tuple__48); - __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_bison_cython_bison__pyx, __pyx_n_s_keyLines, 801, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 801, __pyx_L1_error) - - /* "src/bison/cython/bison_.pyx":814 - * - * - * def hashParserObject(parser): # <<<<<<<<<<<<<< - * """ - * Calculates an sha1 hex 'hash' of the lex script - */ - __pyx_tuple__49 = PyTuple_Pack(14, __pyx_n_s_parser, __pyx_n_s_hasher, __pyx_n_s_update, __pyx_n_s_update, __pyx_n_s_tokens, __pyx_n_s_direction, __pyx_n_s_handlerNames, __pyx_n_s_tmp, __pyx_n_s_name_2, __pyx_n_s_m, __pyx_n_s_attr, __pyx_n_s_handlers, __pyx_n_s_h, __pyx_n_s_docString); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 814, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__49); - __Pyx_GIVEREF(__pyx_tuple__49); - __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(1, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_bison_cython_bison__pyx, __pyx_n_s_hashParserObject, 814, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 814, __pyx_L1_error) - __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_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __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 - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); - /*--- Type init code ---*/ - if (PyType_Ready(&__pyx_type_5bison_6bison__ParserEngine) < 0) __PYX_ERR(0, 84, __pyx_L1_error) - #if PY_VERSION_HEX < 0x030800B1 - __pyx_type_5bison_6bison__ParserEngine.tp_print = 0; - #endif - if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5bison_6bison__ParserEngine.tp_dictoffset && __pyx_type_5bison_6bison__ParserEngine.tp_getattro == PyObject_GenericGetAttr)) { - __pyx_type_5bison_6bison__ParserEngine.tp_getattro = __Pyx_PyObject_GenericGetAttr; - } - #if CYTHON_COMPILING_IN_CPYTHON - { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_5bison_6bison__ParserEngine, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 84, __pyx_L1_error) - if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_5bison_6bison__12ParserEngine___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_5bison_6bison__12ParserEngine___init__.doc = __pyx_doc_5bison_6bison__12ParserEngine___init__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5bison_6bison__12ParserEngine___init__; - } - } - #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ParserEngine, (PyObject *)&__pyx_type_5bison_6bison__ParserEngine) < 0) __PYX_ERR(0, 84, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5bison_6bison__ParserEngine) < 0) __PYX_ERR(0, 84, __pyx_L1_error) - __pyx_ptype_5bison_6bison__ParserEngine = &__pyx_type_5bison_6bison__ParserEngine; - if (PyType_Ready(&__pyx_type_5bison_6bison____pyx_scope_struct__hashParserObject) < 0) __PYX_ERR(0, 814, __pyx_L1_error) - #if PY_VERSION_HEX < 0x030800B1 - __pyx_type_5bison_6bison____pyx_scope_struct__hashParserObject.tp_print = 0; - #endif - if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5bison_6bison____pyx_scope_struct__hashParserObject.tp_dictoffset && __pyx_type_5bison_6bison____pyx_scope_struct__hashParserObject.tp_getattro == PyObject_GenericGetAttr)) { - __pyx_type_5bison_6bison____pyx_scope_struct__hashParserObject.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; - } - __pyx_ptype_5bison_6bison____pyx_scope_struct__hashParserObject = &__pyx_type_5bison_6bison____pyx_scope_struct__hashParserObject; - __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; -} - - -#ifndef CYTHON_NO_PYINIT_EXPORT -#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -#elif PY_MAJOR_VERSION < 3 -#ifdef __cplusplus -#define __Pyx_PyMODINIT_FUNC extern "C" void -#else -#define __Pyx_PyMODINIT_FUNC void -#endif -#else -#ifdef __cplusplus -#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * -#else -#define __Pyx_PyMODINIT_FUNC PyObject * -#endif -#endif - - -#if PY_MAJOR_VERSION < 3 -__Pyx_PyMODINIT_FUNC initbison_(void) CYTHON_SMALL_CODE; /*proto*/ -__Pyx_PyMODINIT_FUNC initbison_(void) -#else -__Pyx_PyMODINIT_FUNC PyInit_bison_(void) CYTHON_SMALL_CODE; /*proto*/ -__Pyx_PyMODINIT_FUNC PyInit_bison_(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_bison_(PyObject *__pyx_pyinit_module) -#endif -#endif -{ - __Pyx_TraceDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannyDeclarations - #if CYTHON_PEP489_MULTI_PHASE_INIT - if (__pyx_m) { - if (__pyx_m == __pyx_pyinit_module) return 0; - PyErr_SetString(PyExc_RuntimeError, "Module 'bison_' 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_bison_(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("bison_", __pyx_methods, __pyx_k_Pyrex_generated_portion_of_pybi, 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) - Py_INCREF(__pyx_b); - __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) - Py_INCREF(__pyx_cython_runtime); - 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_bison__bison_) { - 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, "bison.bison_")) { - if (unlikely(PyDict_SetItemString(modules, "bison.bison_", __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)) __PYX_ERR(0, 1, __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 - __Pyx_TraceCall("__Pyx_PyMODINIT_FUNC PyInit_bison_(void)", __pyx_f[0], 1, 0, __PYX_ERR(0, 1, __pyx_L1_error)); - - /* "src/bison/cython/bison_.pyx":70 - * - * - * import sys, os, hashlib, re, traceback # <<<<<<<<<<<<<< - * import shutil - * import setuptools - */ - __Pyx_TraceLine(70,0,__PYX_ERR(0, 70, __pyx_L1_error)) - __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 70, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) __PYX_ERR(0, 70, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_Import(__pyx_n_s_hashlib, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_hashlib, __pyx_t_1) < 0) __PYX_ERR(0, 70, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_Import(__pyx_n_s_re, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_re, __pyx_t_1) < 0) __PYX_ERR(0, 70, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_Import(__pyx_n_s_traceback, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_traceback, __pyx_t_1) < 0) __PYX_ERR(0, 70, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":71 - * - * import sys, os, hashlib, re, traceback - * import shutil # <<<<<<<<<<<<<< - * import setuptools - * import distutils.log - */ - __Pyx_TraceLine(71,0,__PYX_ERR(0, 71, __pyx_L1_error)) - __pyx_t_1 = __Pyx_Import(__pyx_n_s_shutil, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_shutil, __pyx_t_1) < 0) __PYX_ERR(0, 71, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":72 - * import sys, os, hashlib, re, traceback - * import shutil - * import setuptools # <<<<<<<<<<<<<< - * import distutils.log - * import distutils.sysconfig - */ - __Pyx_TraceLine(72,0,__PYX_ERR(0, 72, __pyx_L1_error)) - __pyx_t_1 = __Pyx_Import(__pyx_n_s_setuptools, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_setuptools, __pyx_t_1) < 0) __PYX_ERR(0, 72, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":73 - * import shutil - * import setuptools - * import distutils.log # <<<<<<<<<<<<<< - * import distutils.sysconfig - * import distutils.ccompiler - */ - __Pyx_TraceLine(73,0,__PYX_ERR(0, 73, __pyx_L1_error)) - __pyx_t_1 = __Pyx_Import(__pyx_n_s_distutils_log, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_distutils, __pyx_t_1) < 0) __PYX_ERR(0, 73, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":74 - * import setuptools - * import distutils.log - * import distutils.sysconfig # <<<<<<<<<<<<<< - * import distutils.ccompiler - * import subprocess - */ - __Pyx_TraceLine(74,0,__PYX_ERR(0, 74, __pyx_L1_error)) - __pyx_t_1 = __Pyx_Import(__pyx_n_s_distutils_sysconfig, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_distutils, __pyx_t_1) < 0) __PYX_ERR(0, 74, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":75 - * import distutils.log - * import distutils.sysconfig - * import distutils.ccompiler # <<<<<<<<<<<<<< - * import subprocess - * from importlib import machinery - */ - __Pyx_TraceLine(75,0,__PYX_ERR(0, 75, __pyx_L1_error)) - __pyx_t_1 = __Pyx_Import(__pyx_n_s_distutils_ccompiler, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_distutils, __pyx_t_1) < 0) __PYX_ERR(0, 75, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":76 - * import distutils.sysconfig - * import distutils.ccompiler - * import subprocess # <<<<<<<<<<<<<< - * from importlib import machinery - * import textwrap - */ - __Pyx_TraceLine(76,0,__PYX_ERR(0, 76, __pyx_L1_error)) - __pyx_t_1 = __Pyx_Import(__pyx_n_s_subprocess, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_subprocess, __pyx_t_1) < 0) __PYX_ERR(0, 76, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":77 - * import distutils.ccompiler - * import subprocess - * from importlib import machinery # <<<<<<<<<<<<<< - * import textwrap - * - */ - __Pyx_TraceLine(77,0,__PYX_ERR(0, 77, __pyx_L1_error)) - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_n_s_machinery); - __Pyx_GIVEREF(__pyx_n_s_machinery); - PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_machinery); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_importlib, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __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_machinery); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_machinery, __pyx_t_1) < 0) __PYX_ERR(0, 77, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "src/bison/cython/bison_.pyx":78 - * import subprocess - * from importlib import machinery - * import textwrap # <<<<<<<<<<<<<< - * - * reSpaces = re.compile("\\s+") - */ - __Pyx_TraceLine(78,0,__PYX_ERR(0, 78, __pyx_L1_error)) - __pyx_t_2 = __Pyx_Import(__pyx_n_s_textwrap, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_textwrap, __pyx_t_2) < 0) __PYX_ERR(0, 78, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "src/bison/cython/bison_.pyx":80 - * import textwrap - * - * reSpaces = re.compile("\\s+") # <<<<<<<<<<<<<< - * - * unquoted = '[^\'"]%s[^\'"]?' - */ - __Pyx_TraceLine(80,0,__PYX_ERR(0, 80, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_re); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_compile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_reSpaces, __pyx_t_2) < 0) __PYX_ERR(0, 80, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "src/bison/cython/bison_.pyx":82 - * reSpaces = re.compile("\\s+") - * - * unquoted = '[^\'"]%s[^\'"]?' # <<<<<<<<<<<<<< - * - * cdef class ParserEngine: - */ - __Pyx_TraceLine(82,0,__PYX_ERR(0, 82, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_d, __pyx_n_s_unquoted, __pyx_kp_u_s_5) < 0) __PYX_ERR(0, 82, __pyx_L1_error) - - /* "src/bison/cython/bison_.pyx":138 - * - * @staticmethod - * def distutils_dir_name(dname): # <<<<<<<<<<<<<< - * import sysconfig, sys - * """Returns the name of a distutils build directory""" - */ - __Pyx_TraceLine(138,0,__PYX_ERR(0, 138, __pyx_L1_error)) - __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5bison_6bison__12ParserEngine_3distutils_dir_name, NULL, __pyx_n_s_bison_bison); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 138, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5bison_6bison__ParserEngine->tp_dict, __pyx_n_s_distutils_dir_name, __pyx_t_2) < 0) __PYX_ERR(0, 138, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5bison_6bison__ParserEngine); - - /* "src/bison/cython/bison_.pyx":137 - * self.openCurrentLib() - * - * @staticmethod # <<<<<<<<<<<<<< - * def distutils_dir_name(dname): - * import sysconfig, sys - */ - __Pyx_TraceLine(137,0,__PYX_ERR(0, 137, __pyx_L1_error)) - __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_5bison_6bison__ParserEngine, __pyx_n_s_distutils_dir_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 138, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_5bison_6bison__ParserEngine->tp_dict, __pyx_n_s_distutils_dir_name, __pyx_t_1) < 0) __PYX_ERR(0, 138, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - PyType_Modified(__pyx_ptype_5bison_6bison__ParserEngine); - - /* "src/bison/cython/bison_.pyx":787 - * - * - * def cmpLines(meth1, meth2): # <<<<<<<<<<<<<< - * """ - * Used as a sort() argument for sorting parse target handler methods by - */ - __Pyx_TraceLine(787,0,__PYX_ERR(0, 787, __pyx_L1_error)) - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5bison_6bison__1cmpLines, NULL, __pyx_n_s_bison_bison); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 787, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_cmpLines, __pyx_t_1) < 0) __PYX_ERR(0, 787, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":801 - * return (line1 > line2) - (line1 < line2) - * - * def keyLines(meth): # <<<<<<<<<<<<<< - * """ - * Used as a sort() 'key' argument for sorting parse target handler methods by - */ - __Pyx_TraceLine(801,0,__PYX_ERR(0, 801, __pyx_L1_error)) - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5bison_6bison__3keyLines, NULL, __pyx_n_s_bison_bison); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 801, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_keyLines, __pyx_t_1) < 0) __PYX_ERR(0, 801, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":814 - * - * - * def hashParserObject(parser): # <<<<<<<<<<<<<< - * """ - * Calculates an sha1 hex 'hash' of the lex script - */ - __Pyx_TraceLine(814,0,__PYX_ERR(0, 814, __pyx_L1_error)) - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5bison_6bison__5hashParserObject, NULL, __pyx_n_s_bison_bison); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 814, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_hashParserObject, __pyx_t_1) < 0) __PYX_ERR(0, 814, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "src/bison/cython/bison_.pyx":1 - * # cython: language_level=3, linetrace=True # <<<<<<<<<<<<<< - * """ - * Pyrex-generated portion of pybison - */ - __Pyx_TraceLine(1,0,__PYX_ERR(0, 1, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_TraceReturn(Py_None, 0); - - /*--- Wrapped vars code ---*/ - - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - if (__pyx_m) { - if (__pyx_d) { - __Pyx_AddTraceback("init bison.bison_", __pyx_clineno, __pyx_lineno, __pyx_filename); - } - Py_CLEAR(__pyx_m); - } else if (!PyErr_Occurred()) { - PyErr_SetString(PyExc_ImportError, "init bison.bison_"); - } - __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; -} - -/* 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_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 - (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(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 - (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(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; -} - -/* 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); -} - -/* 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 - -/* Profile */ -#if CYTHON_PROFILE -static int __Pyx_TraceSetupAndCall(PyCodeObject** code, - PyFrameObject** frame, - PyThreadState* tstate, - const char *funcname, - const char *srcfile, - int firstlineno) { - PyObject *type, *value, *traceback; - int retval; - if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) { - if (*code == NULL) { - *code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno); - if (*code == NULL) return 0; - } - *frame = PyFrame_New( - tstate, /*PyThreadState *tstate*/ - *code, /*PyCodeObject *code*/ - __pyx_d, /*PyObject *globals*/ - 0 /*PyObject *locals*/ - ); - if (*frame == NULL) return 0; - if (CYTHON_TRACE && (*frame)->f_trace == NULL) { - Py_INCREF(Py_None); - (*frame)->f_trace = Py_None; - } -#if PY_VERSION_HEX < 0x030400B1 - } else { - (*frame)->f_tstate = tstate; -#endif - } - __Pyx_PyFrame_SetLineNumber(*frame, firstlineno); - retval = 1; - tstate->tracing++; - tstate->use_tracing = 0; - __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); - #if CYTHON_TRACE - if (tstate->c_tracefunc) - retval = tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL) == 0; - if (retval && tstate->c_profilefunc) - #endif - retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0; - tstate->use_tracing = (tstate->c_profilefunc || - (CYTHON_TRACE && tstate->c_tracefunc)); - tstate->tracing--; - if (retval) { - __Pyx_ErrRestoreInState(tstate, type, value, traceback); - return tstate->use_tracing && retval; - } else { - Py_XDECREF(type); - Py_XDECREF(value); - Py_XDECREF(traceback); - return -1; - } -} -static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno) { - PyCodeObject *py_code = 0; -#if PY_MAJOR_VERSION >= 3 - py_code = PyCode_NewEmpty(srcfile, funcname, firstlineno); - if (likely(py_code)) { - py_code->co_flags |= CO_OPTIMIZED | CO_NEWLOCALS; - } -#else - PyObject *py_srcfile = 0; - PyObject *py_funcname = 0; - py_funcname = PyString_FromString(funcname); - if (unlikely(!py_funcname)) goto bad; - py_srcfile = PyString_FromString(srcfile); - if (unlikely(!py_srcfile)) goto bad; - py_code = PyCode_New( - 0, - 0, - 0, - CO_OPTIMIZED | CO_NEWLOCALS, - __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,*/ - firstlineno, - __pyx_empty_bytes /*PyObject *lnotab*/ - ); -bad: - Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); -#endif - return py_code; -} -#endif - -/* PyDictVersioning */ -#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS -static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { - PyObject *dict = Py_TYPE(obj)->tp_dict; - return likely(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) { -#if CYTHON_COMPILING_IN_CPYTHON - dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); -#else - dictptr = _PyObject_GetDictPtr(obj); -#endif - } - 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 (unlikely(!dict) || unlikely(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); -} - -/* 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)); -} - -/* 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, Py_ssize_t 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, (int)nargs, - k, (int)nk, - d, (int)nd, kwdefs, closure); -#else - result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, - args, (int)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 - -/* 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 ((1) && (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; -} - -/* 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); -} - -/* 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"); -} - -/* 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 -} - -/* 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; -} - -/* 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 - -/* 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); -} - -/* 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 -} - -/* 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 -} - -/* 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 - -/* PyIntBinop */ -#if !CYTHON_COMPILING_IN_PYPY -static PyObject* __Pyx_PyInt_SubtractObjC(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_subtract(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_subtract(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("subtract", return NULL) - result = ((double)a) - (double)b; - PyFPE_END_PROTECT(result) - return PyFloat_FromDouble(result); - } - return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2); -} -#endif - -/* 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 - -/* 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; -} - -/* 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; -} - -/* 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 - -/* 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; - } -} - -/* 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; icurexc_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 - -/* 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); -} - -/* 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; -} - -/* CythonFunctionShared */ -#include -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_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, - PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { - if (unlikely(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_size = 0; - op->defaults = NULL; - op->defaults_tuple = NULL; - op->defaults_kwdict = NULL; - op->defaults_getter = NULL; - op->func_annotations = NULL; - 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) -{ -#if PY_MAJOR_VERSION < 3 - __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; -#endif - return __Pyx_PyMethod_New(func, obj, type); -} -static PyObject* -__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) -{ -#if PY_MAJOR_VERSION >= 3 - return PyUnicode_FromFormat("", - op->func_qualname, (void *)op); -#else - return PyString_FromFormat("", - 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 -#if PY_VERSION_HEX >= 0x030800b1 - 0, -#endif -#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 - 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; - m->defaults_size = size; - 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); -} - -/* CythonFunction */ -static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, - PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { - PyObject *op = __Pyx_CyFunction_Init( - PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType), - ml, flags, qualname, closure, module, globals, code - ); - if (likely(op)) { - PyObject_GC_Track(op); - } - return op; -} - -/* 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 - -/* PyObject_GenericGetAttr */ -#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 -static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) { - if (unlikely(Py_TYPE(obj)->tp_dictoffset)) { - return PyObject_GenericGetAttr(obj, attr_name); - } - return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name); -} -#endif - -/* PyObjectGetAttrStrNoError */ -static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) - __Pyx_PyErr_Clear(); -} -static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { - PyObject *result; -#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 - PyTypeObject* tp = Py_TYPE(obj); - if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { - return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); - } -#endif - result = __Pyx_PyObject_GetAttrStr(obj, attr_name); - if (unlikely(!result)) { - __Pyx_PyObject_GetAttrStr_ClearAttributeError(); - } - return result; -} - -/* SetupReduce */ -static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { - int ret; - PyObject *name_attr; - name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name); - if (likely(name_attr)) { - ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); - } else { - ret = -1; - } - if (unlikely(ret < 0)) { - PyErr_Clear(); - ret = 0; - } - Py_XDECREF(name_attr); - return ret; -} -static int __Pyx_setup_reduce(PyObject* type_obj) { - int ret = 0; - PyObject *object_reduce = NULL; - PyObject *object_reduce_ex = NULL; - PyObject *reduce = NULL; - PyObject *reduce_ex = NULL; - PyObject *reduce_cython = NULL; - PyObject *setstate = NULL; - PyObject *setstate_cython = NULL; -#if CYTHON_USE_PYTYPE_LOOKUP - if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; -#else - if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; -#endif -#if CYTHON_USE_PYTYPE_LOOKUP - object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; -#else - object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; -#endif - reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; - if (reduce_ex == object_reduce_ex) { -#if CYTHON_USE_PYTYPE_LOOKUP - object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; -#else - object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; -#endif - reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; - if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { - reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); - if (likely(reduce_cython)) { - ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; - ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; - } else if (reduce == object_reduce || PyErr_Occurred()) { - goto __PYX_BAD; - } - setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); - if (!setstate) PyErr_Clear(); - if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { - setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); - if (likely(setstate_cython)) { - ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; - ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; - } else if (!setstate || PyErr_Occurred()) { - goto __PYX_BAD; - } - } - PyType_Modified((PyTypeObject*)type_obj); - } - } - goto __PYX_GOOD; -__PYX_BAD: - if (!PyErr_Occurred()) - PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); - ret = -1; -__PYX_GOOD: -#if !CYTHON_USE_PYTYPE_LOOKUP - Py_XDECREF(object_reduce); - Py_XDECREF(object_reduce_ex); -#endif - Py_XDECREF(reduce); - Py_XDECREF(reduce_ex); - Py_XDECREF(reduce_cython); - Py_XDECREF(setstate); - Py_XDECREF(setstate_cython); - return ret; -} - -/* 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; -} - -/* GetNameInClass */ -static PyObject *__Pyx_GetGlobalNameAfterAttributeLookup(PyObject *name) { - PyObject *result; - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) - return NULL; - __Pyx_PyErr_Clear(); - __Pyx_GetModuleGlobalNameUncached(result, name); - return result; -} -static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) { - PyObject *result; - result = __Pyx_PyObject_GetAttrStr(nmspace, name); - if (!result) { - result = __Pyx_GetGlobalNameAfterAttributeLookup(name); - } - return result; -} - -/* CLineInTraceback */ -#ifndef CYTHON_CLINE_IN_TRACEBACK -static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED 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 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; -} - -/* 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; -} - -/* 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; ip) { - #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 */ diff --git a/src/bison/cython/bison_.pyx b/src/bison/cython/bison_.pyx index d9ed8b9..0995e1c 100644 --- a/src/bison/cython/bison_.pyx +++ b/src/bison/cython/bison_.pyx @@ -2,6 +2,9 @@ """ Pyrex-generated portion of pybison """ +import logging +LOGGER = logging.getLogger(__name__) + cdef extern from "Python.h": IF PY3: @@ -69,7 +72,6 @@ cdef extern from "../c/bisondynlib.h": import sys, os, hashlib, re, traceback import shutil -import setuptools import distutils.log import distutils.sysconfig import distutils.ccompiler @@ -81,6 +83,7 @@ reSpaces = re.compile("\\s+") unquoted = '[^\'"]%s[^\'"]?' + cdef class ParserEngine: """ Wraps the interface to the binary bison/lex-generated parser engine dynamic @@ -155,6 +158,7 @@ cdef class ParserEngine: Opens the library and imports the parser entry point. """ + parser = self.parser verbose = parser.verbose @@ -184,20 +188,20 @@ cdef class ParserEngine: libHash = PyUnicode_FromString(self.libHash) ELSE: libHash = PyString_FromString(self.libHash) - if self.parserHash != libHash: if verbose: - print("Hash discrepancy, need to rebuild bison lib") - print(" current parser class: %s" % self.parserHash) - print(" bison library: %s" % libHash) + LOGGER.info("Hash discrepancy, need to rebuild bison lib") + LOGGER.info(" current parser class: %s" % self.parserHash) + LOGGER.info(" bison library: %s" % libHash) self.closeLib() self.buildLib() self.openLib() else: if verbose: - print("Hashes match, no need to rebuild bison engine lib") + LOGGER.info("Hashes match, no need to rebuild bison engine lib") def possible_so(self, so_dir): + LOGGER.debug("call def possible_so") import fnmatch regex_str = '*' + self.parser.bisonEngineLibName + machinery.EXTENSION_SUFFIXES[0] return [ @@ -222,6 +226,7 @@ cdef class ParserEngine: use glib instead (or create windows equivalents), in which case I'd greatly appreciate you sending me a patch. """ + LOGGER.debug("call def openLib") cdef char *libFilename cdef char *err cdef void *handle @@ -238,7 +243,7 @@ cdef class ParserEngine: parser = self.parser if parser.verbose: - print("Opening library {}".format(self.libFilename_py)) + LOGGER.debug("Opening library {}".format(self.libFilename_py)) handle = bisondynlib_open(libFilename) if handle == NULL: @@ -247,24 +252,25 @@ cdef class ParserEngine: err = bisondynlib_err() if err: - print('ParserEngine.openLib: error "{}"\n'.format(err)) + LOGGER.error('ParserEngine.openLib: error "{}"\n'.format(err)) return # extract symbols self.libHash = bisondynlib_lookup_hash(handle) if parser.verbose: - print("Successfully loaded library") + LOGGER.info("Successfully loaded library") def generate_exception_handler(self): - s = '' - s += ' {\n' - s += ' PyObject* obj = PyErr_Occurred();\n' - s += ' if (obj) {\n' - s += ' //yyerror(&yylloc, "exception raised");\n' - s += ' YYERROR;\n' - s += ' }\n' - s += ' }\n' + LOGGER.debug("call generate_exception_handler") + s = ''' + { + PyObject* obj = PyErr_Occurred(); + if (obj) { + // yyerror(&yylloc, "exception raised"); + YYERROR; + } + }''' return s def buildLib(self): @@ -278,7 +284,7 @@ cdef class ParserEngine: 3. Compiling bison/lex files to C 4. Compiling the C files, and link into a dynamic lib """ - + LOGGER.debug("call def buildLib") # ------------------------------------------------- # rip the pertinent grammar specs from parser class parser = self.parser @@ -310,7 +316,7 @@ cdef class ParserEngine: os.unlink(buildDirectory + parser.bisonFile) if parser.verbose: - print("generating bison file: {}".format(buildDirectory + parser.bisonFile)) + LOGGER.debug("generating bison file: {}".format(buildDirectory + parser.bisonFile)) f = open(buildDirectory + parser.bisonFile, "w") write = f.write @@ -612,7 +618,7 @@ cdef class ParserEngine: bisonCmd = parser.bisonCmd + [buildDirectory + parser.bisonFile] if parser.verbose: - print("bison cmd: {}".format(' '.join(bisonCmd))) + LOGGER.info("bison cmd: {}".format(' '.join(bisonCmd))) # env.spawn(bisonCmd) proc = subprocess.Popen(' '.join(bisonCmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) @@ -621,13 +627,13 @@ cdef class ParserEngine: raise Exception(err) if parser.verbose: - print("CMD Output: {}".format(out)) + LOGGER.info("CMD Output: {}".format(out)) if parser.verbose: - print("renaming bison output files") - print("{} => {}{}".format(parser.bisonCFile, buildDirectory, + LOGGER.info("renaming bison output files") + LOGGER.info("{} => {}{}".format(parser.bisonCFile, buildDirectory, parser.bisonCFile1)) - print("{} => {}{}".format(parser.bisonHFile, buildDirectory, + LOGGER.info("{} => {}{}".format(parser.bisonHFile, buildDirectory, parser.bisonHFile1)) if os.path.isfile(buildDirectory + parser.bisonCFile1): @@ -650,7 +656,7 @@ cdef class ParserEngine: flexCmd = parser.flexCmd + [buildDirectory + parser.flexFile] if parser.verbose: - print("flex cmd: {}".format(' '.join(flexCmd))) + LOGGER.info("flex cmd: {}".format(' '.join(flexCmd))) # env.spawn(flexCmd) proc = subprocess.Popen(' '.join(flexCmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) @@ -659,12 +665,12 @@ cdef class ParserEngine: raise Exception(err) if parser.verbose: - print("CMD Output: {}".format(out)) + LOGGER.info("CMD Output: {}".format(out)) if os.path.isfile(buildDirectory + parser.flexCFile1): os.unlink(buildDirectory + parser.flexCFile1) if parser.verbose: - print("{} => {}{}".format(parser.flexCFile, buildDirectory, parser.flexCFile1)) + LOGGER.info("{} => {}{}".format(parser.flexCFile, buildDirectory, parser.flexCFile1)) shutil.copy(parser.flexCFile, buildDirectory + parser.flexCFile1) # delete 'local' file os.remove(parser.flexCFile) @@ -672,7 +678,7 @@ cdef class ParserEngine: if os.path.isfile(buildDirectory + parser.flexHFile1): os.unlink(buildDirectory + parser.flexHFile1) if parser.verbose: - print("{} => {}{}".format(parser.flexHFile, buildDirectory, parser.flexHFile1)) + LOGGER.info("{} => {}{}".format(parser.flexHFile, buildDirectory, parser.flexHFile1)) shutil.copy(parser.flexHFile, buildDirectory + parser.flexHFile1) # delete 'local' file # os.remove(parser.flexHFile) @@ -685,7 +691,7 @@ cdef class ParserEngine: + machinery.EXTENSION_SUFFIXES[0] if parser.verbose: - print("Compiling: {}".format(libFileName)) + LOGGER.info("Compiling: {}".format(libFileName)) # ----------------------------------------- # Now compile the files into a shared lib objs = env.compile([buildDirectory + parser.bisonCFile1, @@ -701,7 +707,7 @@ cdef class ParserEngine: os.rename(libFileName, libFileName+".bak") if parser.verbose: - print("linking: {} => {}".format(', '.join(objs), libFileName)) + LOGGER.info("linking: {} => {}".format(', '.join(objs), libFileName)) if sys.platform.startswith("darwin"): # on OSX, ld throws undefined symbol for shared library references @@ -738,27 +744,29 @@ cdef class ParserEngine: try: os.remove(f) except: - print("Warning: failed to delete temporary file {}".format(f)) + LOGGER.warning("failed to delete temporary file {}".format(f)) if parser.verbose: - print("Deleting temporary bison output files:") + LOGGER.info("Deleting temporary bison output files:") for f in [parser.bisonCFile, parser.bisonHFile, parser.flexCFile, "tmp.output"]: if os.path.isfile(f): if parser.verbose: - print('rm {}'.format(f)) + LOGGER.info('rm {}'.format(f)) os.remove(f) def closeLib(self): """ Does the necessary cleanups and closes the parser library """ + LOGGER.debug("call def closeLib") bisondynlib_close(self.libHandle) def runEngine(self, debug=0): """ Runs the binary parser engine, as loaded from the lib """ + LOGGER.debug("call def runEngine") cdef void *handle cdef void *cbvoid @@ -781,6 +789,7 @@ cdef class ParserEngine: """ Clean up and bail """ + LOGGER.debug("call __del__") self.closeLib()