default   Racket Bugs
Main PageQuick QueryStandard QueryAdvanced QueryHelp
Log in

View Problem Report: 12779

send email to interested parties or send email followup to audit-trail
Reporter's email: dyoo at hashcollision dot org
Number: 12779
Category: all
Synopsis: missing use of slurp-whitespace in the scriblib/bibtex library
Class: sw-bug
Responsible: jay
Notify-List:
Severity: serious
Priority: medium
State: closed
Confidential: no
Arrival-Date: Mon May 21 11:48:01 -0400 2012
Closed-Date: Mon May 28 13:53:18 -0400 2012
Last-Modified: Mon May 28 13:53:18 -0400 2012
Originator: Danny Yoo
Organization: plt
Submitter-Id: unknown
Release: 5.2.1
Environment: Linux i686 / Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.8 (KHTML, like Gecko) Chrome/17.0.932.0 Safari/535.8
Description: Identified by Laurent on the racket-lang mailing list.  The current parser in scriblib/bibtex does not appear to work under the following case:

(define text (open-input-string "@article{hochreiter_long_1997,
    author = {Hochreiter, S. and Schmidhuber, J.},
    title = {Long {Short-Term} Memory},
    volume = {9},
    number = {8},
    journal = {Neural Computation},
    year = {1997},
    pages = {1735--1780}
} "))

(bibtex-parse text)


I think there's a missing call to slurp-whitespace after the use of read-value:


kui ~/local/racket/collects/scriblib $ git diff bibtex.rkt
diff --git a/collects/scriblib/bibtex.rkt b/collects/scriblib/bibtex.rkt
index 11d5636..c826187 100644
--- a/collects/scriblib/bibtex.rkt
+++ b/collects/scriblib/bibtex.rkt
@@ -81,6 +81,7 @@
              [#\=
               (slurp-whitespace ip)
               (define aval (read-value ip))
+              (slurp-whitespace ip)
               (match (read-char ip)
                 [#\,
                  (hash-set (loop) atag aval)]


File Attachments:
How-To-Repeat:
Fix:
Release-Note:
Unformatted:

send email to interested parties or send email followup to audit-trail

Audit Trail:

From: Danny Yoo <dyoo at hashcollision.org>
To: bugs at racket-lang.org, bug-notification at racket-lang.org
Cc: 
Subject: Re: [racket-bug] all/12779: missing use of slurp-whitespace in the
 scriblib/bibtex library
Date: Mon, 21 May 2012 12:17:15 -0400

 Ah!  The documentation in:
 
     http://artis.imag.fr/~Xavier.Decoret/resources/xdkbibtex/bibtex_summary.html
 
 offers an explanation of the file format.  Revisions to the bibtex
 parser should satisfy its examples.
From: Laurent <laurent.orseau at gmail.com>
To: nobody at racket-lang.org, bugs at racket-lang.org,
        bug-notification at racket-lang.org, dyoo at hashcollision.org
Cc: 
Subject: Re: all/12779: missing use of slurp-whitespace in the scriblib/bibtex library
Date: Mon, 21 May 2012 21:12:37 +0200

 --047d7b15a521a3b10c04c090b026
 Content-Type: text/plain; charset=ISO-8859-1
 
 FWIW, Danny's patch worked for me.
 
 And while you're at patching the bibtex.rkt file (sorry to hijack the bug
 thread; Should I make a separate report?), it would be wonderful if the
 file could also export `path->bibdb' and `(struct-out bibdb)'.
 I need these because I don't use the scribble facility, but only the bibtex
 parser (for slideshow output).
 
 Laurent
 
 --047d7b15a521a3b10c04c090b026
 Content-Type: text/html; charset=ISO-8859-1
 Content-Transfer-Encoding: quoted-printable
 
 <div>FWIW, Danny&#39;s patch worked for me.</div><div><br></div>And while y=
 ou&#39;re at patching the=A0bibtex.rkt=A0file (sorry to hijack the bug thre=
 ad; Should I make a separate report?),=A0it would be wonderful if the file =
 could also export `path-&gt;bibdb&#39; and `(struct-out bibdb)&#39;.<div>
 
 I need these because I don&#39;t use the scribble facility, but only the bi=
 btex parser (for slideshow output).</div><div><br></div><div>Laurent</div>
 
 --047d7b15a521a3b10c04c090b026--
Responsible changed from "nobody" to "jay" by jay at racket-lang.org at Mon, 28 May 2012 13:53:18 -0400
Reason>>> A commit by jay at racket-lang.org has resolved this report
  http://git.racket-lang.org/plt/commit/8b035f3c73
State changed from "open" to "closed" by jay at racket-lang.org at Mon, 28 May 2012 13:53:18 -0400
Reason>>> A commit by jay at racket-lang.org has resolved this report
  http://git.racket-lang.org/plt/commit/8b035f3c73