home *** CD-ROM | disk | FTP | other *** search
/ ftp.ee.lbl.gov / 2014.05.ftp.ee.lbl.gov.tar / ftp.ee.lbl.gov / bmd-1.0beta.tar.Z / bmd-1.0beta.tar / bmd-1.0beta / app / omtd / readline.h < prev    next >
C/C++ Source or Header  |  1991-01-22  |  1KB  |  41 lines

  1. /*
  2.  * Copyright (c) 1990 Regents of the University of California.
  3.  * All rights reserved.
  4.  *
  5.  * Redistribution and use in source and binary forms are permitted
  6.  * provided that the above copyright notice and this paragraph are
  7.  * duplicated in all such forms and that any documentation,
  8.  * advertising materials, and other materials related to such
  9.  * distribution and use acknowledge that the software was developed
  10.  * by the University of California, Lawrence Berkeley Laboratory,
  11.  * Berkeley, CA.  The name of the University may not be used to
  12.  * endorse or promote products derived from this software without
  13.  * specific prior written permission.
  14.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  15.  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  16.  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  17.  */
  18. struct token {
  19.     int t_id;
  20.     union {
  21.         char *tu_str;
  22.         int tu_int;
  23.         float tu_real;
  24.     } t_u;
  25.     struct token *next;
  26. #define t_int t_u.tu_int
  27. #define t_str t_u.tu_str
  28. #define t_real t_u.tu_real
  29. };
  30.  
  31. #define TK_EOF        'z'
  32. /* XXX IDENT needs to go. */
  33. #define TK_IDENT    's'
  34. #define TK_STR        's'
  35. #define TK_INT        'i'
  36. #define TK_REAL        'r'
  37.  
  38. struct token *readline();
  39. char *intern();
  40. char *token_string();
  41.