Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #865

Re: parsing bibtex file with flex/bison

From Evangelos Drikos <drikosev@otenet.gr>
Newsgroups comp.compilers
Subject Re: parsing bibtex file with flex/bison
Date 2013-03-06 13:45 +0200
Organization An OTEnet S.A. customer
Message-ID <13-03-004@comp.compilers> (permalink)
References <13-03-003@comp.compilers>

Show all headers | View raw


On 3/5/13 1:48 AM, bnrj.rudra@gmail.com wrote:
> I want to parse bibtex file using flex/bison...

A summary of BibTex can be found here:

http://maverick.inria.fr/~Xavier.Decoret/resources/xdkbibtex/bibtex_summary.html#file_format

According to the documentation found in the link above
-you can have arbitrarily nested pairs of braces.
-but braces must also be balanced inside quotes

Provided the documentation above is accurate,one cannot describe with a
regular grammar the quoted strings used in BibTex.

Ev. Drikos
[Quite right.  The lexer would recognize them in chunks and the
parser, which uses a pushdown automaton, puts them together.  Or the
other usual approach is a kludge with code in the lexer to count the
braces and set start states that control what's returned. -John]

Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

parsing bibtex file with flex/bison bnrj.rudra@gmail.com - 2013-03-04 15:48 -0800
  Re: parsing bibtex file with flex/bison Evangelos Drikos <drikosev@otenet.gr> - 2013-03-06 13:45 +0200
    Re: parsing bibtex file with flex/bison Rudra Banerjee <bnrj.rudra@gmail.com> - 2013-03-07 11:20 +0000
      Re: parsing bibtex file with flex/bison Rudra Banerjee <bnrj.rudra@gmail.com> - 2013-03-17 00:18 +0000
        Re: parsing bibtex file with flex/bison Torsten Eichstädt <torsten.eichstaedt@FernUni-Hagen.de> - 2013-03-25 13:41 +0100
  Re: parsing bibtex file with flex/bison glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2013-03-08 03:59 +0000

csiph-web