[racket] Reading bibtex files

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Mon May 28 13:53:51 EDT 2012

I just pushed a fix for all this. Including all the examples linked.

However, it still doesn't support ()s as the entry delimiter as it should.

Jay

On Mon, May 21, 2012 at 4:07 PM, Laurent <laurent.orseau at gmail.com> wrote:
>
>
> On Tue, May 22, 2012 at 12:01 AM, Jay McCarthy <jay.mccarthy at gmail.com>
> wrote:
>>
>> I'll get on it. As you know, BibTex is a very poorly described format.
>> It can parse my humongous Bibtex file, but I haven't spent a ton of
>> tiny searching for problematic ones in the wild.
>
>
> It parses mine too, except mostly for one thing: anything except @...
> outside bib entries should be treated as comments.
> With that it would be sufficient for me (my file is generated by Mendeley
> which always adds some comments at the top).
>
> Thanks!
> Laurent
>
>
>>
>>
>> Jay
>>
>> On Mon, May 21, 2012 at 10:15 AM, Danny Yoo <dyoo at hashcollision.org>
>> wrote:
>> > On Mon, May 21, 2012 at 11:42 AM, Danny Yoo <dyoo at hashcollision.org>
>> > wrote:
>> >> I think there's a bug in the library.  There appears to be a missing
>> >> call to (slurp-whitespace ip) in the parsing library.  I'll send a bug
>> >> report and a patch to the Racket developers.  A diff follows below for
>> >> those who like looking at patch files.  :)
>> >
>> > Until the library gets patched, here's a possible workaround: put the
>> > trailing "}" on the same line, like this:
>> >
>> > %%%%%%%%%%%%%%%%%%%%%%%%%%%%
>> > @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}}
>> > %%%%%%%%%%%%%%%%%%%%%%%%%%%%
>> >
>> >
>> > The bug involves the parser not properly discarding the whitespace
>> > right after reading the value "{1735--1780}".
>> >
>> >
>> > I agree with you that the parser needs to be a bit better.  It does
>> > not currently follow the description in:
>> >
>> >
>> >  http://artis.imag.fr/~Xavier.Decoret/resources/xdkbibtex/bibtex_summary.html
>> >
>> > so it will reject some bibtex files that it shouldn't.
>> >
>> >
>> >
>> > I've submitted the bug report as:
>> >
>> >    http://bugs.racket-lang.org/query/?cmd=view&pr=12779
>> >
>> > ____________________
>> >  Racket Users list:
>> >  http://lists.racket-lang.org/users
>>
>>
>>
>> --
>> Jay McCarthy <jay at cs.byu.edu>
>> Assistant Professor / Brigham Young University
>> http://faculty.cs.byu.edu/~jay
>>
>> "The glory of God is Intelligence" - D&C 93
>
>



-- 
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

"The glory of God is Intelligence" - D&C 93


Posted on the users mailing list.