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


Groups > comp.compilers > #865

Re: parsing bibtex file with flex/bison

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED!nerds-end
From Evangelos Drikos <drikosev@otenet.gr>
Newsgroups comp.compilers
Subject Re: parsing bibtex file with flex/bison
Date Wed, 06 Mar 2013 13:45:01 +0200
Organization An OTEnet S.A. customer
Lines 20
Sender johnl@iecc.com
Approved comp.compilers@iecc.com
Message-ID <13-03-004@comp.compilers> (permalink)
References <13-03-003@comp.compilers>
NNTP-Posting-Host news.iecc.com
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Trace leila.iecc.com 1362591281 9995 64.57.183.58 (6 Mar 2013 17:34:41 GMT)
X-Complaints-To abuse@iecc.com
NNTP-Posting-Date Wed, 6 Mar 2013 17:34:41 +0000 (UTC)
Keywords parse, lex
Posted-Date 06 Mar 2013 12:34:41 EST
X-submission-address compilers@iecc.com
X-moderator-address compilers-request@iecc.com
X-FAQ-and-archives http://compilers.iecc.com
Xref csiph.com comp.compilers:865

Show key headers only | 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