


BIBLEX(1)                                               BIBLEX(1)


NNAAMMEE
       biblex  -  lexically analyze BibTeX bibliography data base
       files

SSYYNNOOPPSSIISS
       bbiibblleexx _<_i_n_f_i_l_e _>_o_u_t_f_i_l_e
       or
       bbiibblleexx _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

DDEESSCCRRIIPPTTIIOONN
       bbiibblleexx 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 bbiibbuunnlleexx(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 bbiibbcclleeaann(1).

       Only minimal checks are made on  the  correctness  of  the
       input  stream, and bbiibblleexx 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  bbiibblleexx's  output  token
       stream is meaningful, the input files can be given to bbiibb--
       ppaarrssee(1) for parsing  analysis  according  to  a  proposed
       grammar for BibTeX.

LLEEXXIICCAALL AANNAALLYYSSIISS
       bbiibblleexx 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  bbiibblleexx,  the  UNIX  command
       pipeline
              bbiibblleexx _m_y_l_i_b_._b_i_b | \
                  aawwkk '$2 == "KEY" {print $3}' | \
                  sseedd -e 's/"//g' | \
                  ssoorrtt
       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
       bbiibblleexx 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.

BBUUGGSS
       Limitations of the lleexx(1) lexical analyzer generator  used
       to  construct  bbiibblleexx prevent handling of files containing
       ASCII NUL; that character will be interpreted as  an  end-
       of-file condition.

       Older  versions  of  lleexx(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.

SSEEEE AALLSSOO
       bbiibbcchheecckk(1), bbiibbcclleeaann(1), bbiibbdduupp(1),  bbiibbeexxttrraacctt(1),  bbiibb--
       jjooiinn(1),   bbiibbllaabbeell(1),   bbiibboorrddeerr(1),  bbiibbppaarrssee(1),  bbiibb--
       sseeaarrcchh(1),     bbiibbssoorrtt(1),     bbiibbtteexx(1),     bbiibbuunnlleexx(1),



Version 1.04               08 May 1999                          2





BIBLEX(1)                                               BIBLEX(1)


       cciitteeffiinndd(1), cciitteessuubb(1), cciitteettaaggss(1), llaatteexx(1), ssccrriibbee(1),
       tteexx(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.

AAUUTTHHOORR
       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,, bbeeeebbee@@aaccmm..oorrgg, beebe@ieee.org ((IInntteerrnneett))
       WWWWWW UURRLL:: hhttttpp::////wwwwww..mmaatthh..uuttaahh..eedduu//~~bbeeeebbee
       Telephone: +1 801 581 5254
       FAX: +1 801 585 1640, +1 801 581 4148







































Version 1.04               08 May 1999                          3


