


BIBLEX(1)                                               BIBLEX(1)


NNAAMMEE
       biblex  -  lexically analyze BibTeX bibliography data base
       files

SSYYNNOOPPSSIISS
       bbiibblleexx _<_i_n_f_i_l_e _>_o_u_t_f_i_l_e
       or
       bbiibblleexx _b_i_b_f_i_l_e_1 _b_i_b_f_i_l_e_2 _b_i_b_f_i_l_e_3 _._._.  _>_o_u_t_f_i_l_e

DDEESSCCRRIIPPTTIIOONN
       bbiibblleexx converts one or more bibliography data  base  files
       in  BibTeX format to a lexical token stream that is conve-
       nient for processing by other tools.

       The companion bbiibbuunnlleexx(1) program can be used to recombine
       such a token stream back into a BibTeX file.

       Scribe-format bibliography files can be handled as well if
       they are first converted to BibTeX form by bbiibbcclleeaann(1).

       Only minimal checks are made on  the  correctness  of  the
       input  stream, and bbiibblleexx will happily carry out a lexical
       analysis of nonsensical input, without issuing warnings or
       errors  of  any  kind, other than possible internal string
       buffer overflow.  To verify  that  bbiibblleexx's  output  token
       stream is meaningful, the input files can be given to bbiibb--
       ppaarrssee(1) for parsing  analysis  according  to  a  proposed
       grammar for BibTeX.

LLEEXXIICCAALL AANNAALLYYSSIISS
       bbiibblleexx produces output in lines of the form

              <token-number><tab><token-name><tab>"<token-value>"

       Each output line contains a single complete token, identi-
       fied by a small integer number for use by a computer  pro-
       gram,  a  token  type name for human readers, and a string
       value in quotes.

       Special characters in the token value  string  are  repre-
       sented  with  ANSI/ISO Standard C escape sequences, so all
       characters other than NUL are  representable,  and  multi-
       line values can be represented in a single line.

       Here  are  the token numbers and token type names that can
       appear in the output:

               0   UNKNOWN
               1   ABBREV
               2   AT
               3   COMMA
               4   COMMENT
               5   ENTRY
               6   EQUALS



Version 1.04               08 May 1999                          1





BIBLEX(1)                                               BIBLEX(1)


               7   FIELD
               8   INCLUDE
               9   INLINE
              10   KEY
              11   LBRACE
              12   LITERAL
              13   NEWLINE
              14   PREAMBLE
              15   RBRACE
              16   SHARP
              17   SPACE
              18   STRING
              19   VALUE

       Programs that parse such output should  also  be  prepared
       for  lines  beginning  with the warning prefix, %%, or the
       error prefix, ??, and for ANSI/ISO Standard C line  number
       directives of the form
              # line 273 "texbook1.bib"
       which  record the line number and file name of the current
       input file.

       As an example of the  use  of  bbiibblleexx,  the  UNIX  command
       pipeline
              bbiibblleexx _m_y_l_i_b_._b_i_b | \
                  aawwkk '$2 == "KEY" {print $3}' | \
                  sseedd -e 's/"//g' | \
                  ssoorrtt
       will  extract  a  sorted  list of all citation keys in the
       file _m_y_l_i_b_._b_i_b.

       The LITERAL token type is used  for  arbitrary  text  that
       bbiibblleexx does not examine further, such as the contents of a
       @Preamble{...} or a @Comment{...}.

       The UNKNOWN token type should never appear in  the  output
       stream.   It  is  used internally to initialize token type
       variables.

BBUUGGSS
       Limitations of the lleexx(1) lexical analyzer generator  used
       to  construct  bbiibblleexx prevent handling of files containing
       ASCII NUL; that character will be interpreted as  an  end-
       of-file condition.

       Older  versions  of  lleexx(1) are not _8_-_b_i_t _c_l_e_a_n; they will
       not reliably handle characters 128-255.  This latter defi-
       ciency  is being remedied by the X/Open Consortium activi-
       ties to internationalize and standard UNIX applications.

SSEEEE AALLSSOO
       bbiibbcchheecckk(1), bbiibbcclleeaann(1), bbiibbdduupp(1),  bbiibbeexxttrraacctt(1),  bbiibb--
       jjooiinn(1),   bbiibbllaabbeell(1),   bbiibboorrddeerr(1),  bbiibbppaarrssee(1),  bbiibb--
       sseeaarrcchh(1),     bbiibbssoorrtt(1),     bbiibbtteexx(1),     bbiibbuunnlleexx(1),



Version 1.04               08 May 1999                          2





BIBLEX(1)                                               BIBLEX(1)


       cciitteeffiinndd(1), cciitteessuubb(1), cciitteettaaggss(1), llaatteexx(1), ssccrriibbee(1),
       tteexx(1).
       X/Open Company, Ltd., _X_/_O_p_e_n _P_o_r_t_a_b_i_l_i_t_y _G_u_i_d_e_,  _X_S_I  _C_o_m_-
       _m_a_n_d_s  _a_n_d  _U_t_i_l_i_t_i_e_s, volume 1.  Prentice-Hall, Englewood
       Cliffs, NJ 07632, USA, 1989.  ISBN 0-13-685835-X.

AAUUTTHHOORR
       Nelson H. F. Beebe
       Center for Scientific Computing
       University of Utah
       Department of Mathematics, 322 INSCC
       155 S 1400 E RM 233
       Salt Lake City, UT 84112-0090
       USA
       Email: beebe@math.utah.edu,, bbeeeebbee@@aaccmm..oorrgg, beebe@ieee.org ((IInntteerrnneett))
       WWWWWW UURRLL:: hhttttpp::////wwwwww..mmaatthh..uuttaahh..eedduu//~~bbeeeebbee
       Telephone: +1 801 581 5254
       FAX: +1 801 585 1640, +1 801 581 4148







































Version 1.04               08 May 1999                          3


