BIBLEX(1)                                                            BIBLEX(1)



[1mNAME[0m
       biblex - lexically analyze BibTeX bibliography data base files

[1mSYNOPSIS[0m
       [1mbiblex [4m[22m<infile[24m [4m>outfile[0m
       or
       [1mbiblex [4m[22mbibfile1[24m [4mbibfile2[24m [4mbibfile3[24m [4m...[24m  [4m>outfile[0m

[1mDESCRIPTION[0m
       [1mbiblex [22mconverts one or more bibliography data base files in BibTeX for-
       mat to a lexical token stream that  is  convenient  for  processing  by
       other tools.

       The companion [1mbibunlex[22m(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 [1mbibclean[22m(1).

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

[1mLEXICAL ANALYSIS[0m
       [1mbiblex [22mproduces output in lines of the form

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

       Each output line contains a single  complete  token,  identified  by  a
       small  integer  number for use by a computer program, a token type name
       for human readers, and a string value in quotes.

       Special characters in the  token  value  string  are  represented  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
               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 [1mbiblex[22m, the UNIX command pipeline
              [1mbiblex [4m[22mmylib.bib[24m | \
                  [1mawk [22m'$2 == "KEY" {print $3}' | \
                  [1msed [22m-e 's/"//g' | \
                  [1msort[0m
       will extract a sorted list of all citation keys in the file  [4mmylib.bib[24m.

       The  LITERAL token type is used for arbitrary text that [1mbiblex [22mdoes not
       examine further, such as the contents of a @Preamble{...}  or  a  @Com-
       ment{...}.

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

[1mBUGS[0m
       Limitations of the [1mlex[22m(1) lexical analyzer generator used to  construct
       [1mbiblex  [22mprevent  handling of files containing ASCII NUL; that character
       will be interpreted as an end-of-file condition.

       Older versions of [1mlex[22m(1) are not [4m8-bit[24m [4mclean[24m; they  will  not  reliably
       handle characters 128-255.  This latter deficiency is being remedied by
       the X/Open Consortium activities to internationalize and standard  UNIX
       applications.

[1mSEE ALSO[0m
       [1mbibcheck[22m(1),  [1mbibclean[22m(1), [1mbibdup[22m(1), [1mbibextract[22m(1), [1mbibjoin[22m(1), [1mbibla-[0m
       [1mbel[22m(1), [1mbiborder[22m(1), [1mbibparse[22m(1), [1mbibsearch[22m(1), [1mbibsort[22m(1),  [1mbibtex[22m(1),
       [1mbibunlex[22m(1), [1mcitefind[22m(1), [1mcitesub[22m(1), [1mcitetags[22m(1), [1mlatex[22m(1), [1mscribe[22m(1),
       [1mtex[22m(1).
       X/Open Company, Ltd., [4mX/Open[24m [4mPortability[24m [4mGuide,[24m [4mXSI[24m [4mCommands[24m [4mand[24m [4mUtili-[0m
       [4mties[24m,  volume 1.  Prentice-Hall, Englewood Cliffs, NJ 07632, USA, 1989.
       ISBN 0-13-685835-X.

[1mAUTHOR[0m
       Nelson H. F. Beebe
       University of Utah
       Department of Mathematics, 110 LCB
       155 S 1400 E RM 233
       Salt Lake City, UT 84112-0090
       USA
       Email: beebe@math.utah.edu, beebe@acm.org, beebe@computer.org (Internet)
       WWW URL: http://www.math.utah.edu/~beebe
       Telephone: +1 801 581 5254
       FAX: +1 801 581 4148



1.06"                          23 September 2004                     BIBLEX(1)
