Package: emacs;
Reported by: stephen_leake <at> stephe-leake.org
Date: Thu, 31 Jan 2013 08:37:02 UTC
Severity: normal
Tags: notabug
Found in version 24.2.91
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
View this message in rfc822 format
From: stephen_leake <at> stephe-leake.org To: 13593 <at> debbugs.gnu.org Subject: bug#13593: 24.2.91; wisent-production-bounds broken Date: Thu, 31 Jan 2013 03:33:30 -0500
wisent-production-bounds (in lisp/semantic/wisent/wisent.el) computes the value for the $regioni variables in semantic actions when the region covers a non-terminal. It assumes regions are a simple cons (first . last), but the rest of the wisent parser represents regions as a nested list ((first last)). This code fixes that: (defsubst wisent-production-bounds (stack i j) "Determine the start and end locations of a production value. Return a pair (START . END), where START is the first available start location, and END the last available end location, in components values of the rule currently reduced. Return nil when no component location is available. STACK is the parser stack. I and J are the indices in STACK of respectively the value of the first and last components of the current rule. This function is for internal use by semantic actions' generated lambda-expression." (let ((f (caadr (aref stack i))) (l (cadadr (aref stack j)))) (while (/= i j) (cond ((not f) ;; item i is an empty production (setq f (caadr (aref stack (setq i (+ i 2)))))) ((not l) ;; item j is an empty production (setq l (cadadr (aref stack (setq j (- j 2)))))) ((setq i j)))) (and f l (list (list f l))))) In GNU Emacs 24.2.91.1 (i386-mingw-nt6.1.7601) of 2012-12-15 on MS-W7-DANI Bzr revision: 111040 cyd <at> gnu.org-20121215141602-c4qmr11gc39rrpng Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --with-gcc (4.7) --no-opt --enable-checking --cflags -Ic:/emacs/libs/libXpm-3.5.10/include -Ic:/emacs/libs/libXpm-3.5.10/src -Ic:/emacs/libs/libpng-1.2.37-lib/include -Ic:/emacs/libs/zlib-1.2.5 -Ic:/emacs/libs/giflib-4.1.4-1-lib/include -Ic:/emacs/libs/jpeg-6b-4-lib/include -Ic:/emacs/libs/tiff-3.8.2-1-lib/include -Ic:/emacs/libs/libxml2-2.7.8-w32-bin/include/libxml2 -Ic:/emacs/libs/gnutls-3.0.9-w32-bin/include -Ic:/emacs/libs/libiconv-1.9.2-1-lib/include' Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: cp1252 default enable-multibyte-characters: t Major mode: Text Minor modes in effect: shell-dirtrack-mode: t diff-auto-refine-mode: t display-time-mode: t delete-selection-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: <M-left> <M-S-right> c e d e t <end> e c t SPC c a n SPC s u m <backspace> b m i t SPC s o u r c e f o r g e SPC b u g s ! <switch-frame> <switch-frame> <M-next> <M-next> <M-next> <M-next> <M-next> <M-next> C-s c o m p <up> <return> c o m p i <backspace> l e t i o n <return> <tab> C-y <switch-frame> C-h f w i s e n t - d e b u g - o n - e n t r y <return> C-g <switch-frame> <M-prior> <M-prior> <M-prior> <M-prior> <M-prior> <M-prior> <down> <down> <down> <left> <return> <tab> <insert> ? M-w <switch-frame> <help-echo> <f11> p r j <backspace> o <return> <M-next> <down> <down> <down> <down> <M-right> <f11> . h <return> <lwindow> <f11> <return> <M-home> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <return> C a b i n <right> <tab> <M-right> SPC a f t e r <down> <home> <tab> <down> <tab> <return> <tab> c a r o l SPC f i r s t SPC w e e k SPC o f SPC a u g u s t <return> <return> <tab> J a n e t ? <up> <up> <M-left> C-w <up> <up> <up> <M-left> C-w <down> <down> <down> <down> <down> <down> <return> <tab> J i m SPC L a b o r SPC D a y ? <return> <left> <left> SPC ( f i r s t SPC M o n d a y SPC i n SPC S e p t a <backspace> e m b e r ) <up> <up> <up> <up> <up> <up> <up> <right> <insert> <S-down> C-SPC <up> <up> <up> <up> <up> <up> <C-M-right> C-SPC <help-echo> M-x M-w r e p <tab> o r <tab> <return> Recent messages: Saving file c:/Projects/org.emacs.ada-mode.smie/notes.text... Wrote c:/Projects/org.emacs.ada-mode.smie/notes.text Mark set Auto-saving...done Auto-saving...done Mark set [2 times] Auto-saving...done Saving file c:/home/stephe/projects.text... Wrote c:/home/stephe/projects.text Making completion list... Load-path shadows: c:/Projects/org.emacs.ada-mode.smie/gpr-mode hides c:/Projects/emacs_stephe.work/emacs_stephe_site_lisp/gpr-mode c:/Projects/org.emacs.ada-mode.smie/ada-mode hides c:/Projects/emacs_stephe.work/emacs_stephe_site_lisp/ada-mode c:/Projects/emacs_stephe.work/emacs_stephe_site_lisp/vc-git hides c:/Apps/emacs-24.2.91/lisp/vc/vc-git c:/Projects/emacs_stephe.work/emacs_stephe_site_lisp/ada-xref hides c:/Apps/emacs-24.2.91/lisp/progmodes/ada-xref c:/Projects/emacs_stephe.work/emacs_stephe_site_lisp/ada-stmt hides c:/Apps/emacs-24.2.91/lisp/progmodes/ada-stmt c:/Projects/emacs_stephe.work/emacs_stephe_site_lisp/ada-prj hides c:/Apps/emacs-24.2.91/lisp/progmodes/ada-prj c:/Projects/org.emacs.ada-mode.smie/ada-mode hides c:/Apps/emacs-24.2.91/lisp/progmodes/ada-mode c:/Projects/emacs_stephe.work/emacs_stephe_site_lisp/nnnil hides c:/Apps/emacs-24.2.91/lisp/gnus/nnnil c:/Projects/org.emacs.ada-mode.smie/smie hides c:/Apps/emacs-24.2.91/lisp/emacs-lisp/smie Features: (shadow sort mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils tabify html-mode asp-html-helper-mode php-html-helper-mode html-helper-mode warnings tempo etags cc-langs cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs jka-compr xmtn-multi-status xmtn-revlist dvc-revlist dvc-state xmtn-sync dvc-config sh-script smie executable shell pcomplete copyright find-func edebug help-mode debug semantic/wisent/grammar semantic/grammar semantic/idle semantic/grammar-wy semantic/format ezimage semantic/tag-ls semantic/find semantic/ctxt misearch multi-isearch sal-diff-mode make-mode xmtn-dvc dvc-status dvc-diff dvc-fileinfo diff-mode xmtn-conflicts xmtn-ids xmtn-match xmtn-automate xmtn-compat parse-time xmtn-run xmtn-basic-io xmtn-base gpr-mode gpr-indent-engine gpr-wisi gpr-grammar-wy else-mode ada-mode ada-compiler ada-gnat ada-fix-error which-func imenu align find-file ada-indent-engine ada-wisi ada-grammar-wy semantic/wisent/comp semantic/wisent wisi wisent-patch semantic/wisent/wisent semantic/bovine semantic/util-modes semantic/util semantic semantic/tag cedet semantic/lex semantic/fw loaddefs mode-local ada-indent-user-options xgit-core bzr-core xmtn-minimal dvc-log log-edit easy-mmode pcvs-util vc vc-dispatcher ediff-merg ediff-diff ediff-wind ediff-help ediff-util ediff-mult ediff-init ediff dvc-unified dvc-tips ffap url-parse auth-source eieio byte-opt bytecomp byte-compile cconv gnus-util mm-util mail-prsvr password-cache url-vars add-log dvc-autoloads dvc-core dvc-lisp dvc-buffers dvc-ui dvc-register dvc-utils dvc-emacs ewoc dvc-defs dvc-site uniquify advice help-fns advice-preload time delsel cus-start cus-load color-theme edmacro kmacro wid-edit iswitchb whitespace dired-x easymenu dired-aux dired compile comint ansi-color ring cl-macs gv cl cl-lib time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp w32-common-fns disp-table w32-win w32-vars tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process w32 multi-tty emacs)
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.