Re: parsing bibtex file with flex/bison

Evangelos Drikos <drikosev@otenet.gr>
Wed, 06 Mar 2013 13:45:01 +0200

          From comp.compilers

Related articles
parsing bibtex file with flex/bison bnrj.rudra@gmail.com (2013-03-04)
Re: parsing bibtex file with flex/bison drikosev@otenet.gr (Evangelos Drikos) (2013-03-06)
Re: parsing bibtex file with flex/bison bnrj.rudra@gmail.com (Rudra Banerjee) (2013-03-07)
Re: parsing bibtex file with flex/bison gah@ugcs.caltech.edu (glen herrmannsfeldt) (2013-03-08)
Re: parsing bibtex file with flex/bison bnrj.rudra@gmail.com (Rudra Banerjee) (2013-03-17)
Re: parsing bibtex file with flex/bison torsten.eichstaedt@FernUni-Hagen.de (Torsten =?UTF-8?B?RWljaHN0w6RkdA==?=) (2013-03-25)
| List of all articles for this month |

From: Evangelos Drikos <drikosev@otenet.gr>
Newsgroups: comp.compilers
Date: Wed, 06 Mar 2013 13:45:01 +0200
Organization: An OTEnet S.A. customer
References: 13-03-003
Keywords: parse, lex
Posted-Date: 06 Mar 2013 12:34:41 EST

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]



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.