home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / x / volume8 / xdbx / part01 / datadpy.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-08-28  |  2.3 KB  |  63 lines

  1. /*****************************************************************************
  2.  *
  3.  *  xdbx - X Window System interface to the dbx debugger
  4.  *
  5.  *  Copyright 1989 The University of Texas at Austin
  6.  *  Copyright 1990 Microelectronics and Computer Technology Corporation
  7.  *
  8.  *  Permission to use, copy, modify, and distribute this software and its
  9.  *  documentation for any purpose and without fee is hereby granted,
  10.  *  provided that the above copyright notice appear in all copies and that
  11.  *  both that copyright notice and this permission notice appear in
  12.  *  supporting documentation, and that the name of The University of Texas
  13.  *  and Microelectronics and Computer Technology Corporation (MCC) not be 
  14.  *  used in advertising or publicity pertaining to distribution of
  15.  *  the software without specific, written prior permission.  The
  16.  *  University of Texas and MCC makes no representations about the 
  17.  *  suitability of this software for any purpose.  It is provided "as is" 
  18.  *  without express or implied warranty.
  19.  *
  20.  *  THE UNIVERSITY OF TEXAS AND MCC DISCLAIMS ALL WARRANTIES WITH REGARD TO
  21.  *  THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
  22.  *  FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF TEXAS OR MCC BE LIABLE FOR
  23.  *  ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
  24.  *  RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
  25.  *  CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  26.  *  CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  27.  *
  28.  *  Author:      Po Cheung
  29.  *  Created:       March 10, 1989
  30.  *
  31.  *****************************************************************************/
  32.  
  33. /*  datadpy.h:
  34.  *
  35.  *  Regular expression pattern matching for C structures
  36.  *
  37.  *  The reg_token array indicates the register no. for each token type.
  38.  *      reg_token[0] : level of indentation
  39.  *      reg_token[2] : field name
  40.  *      reg_token[4] : pointer string
  41.  */
  42.  
  43. #define TK_INDENT       0
  44. #define TK_FIELD        2
  45. #define TK_POINTER      4
  46.  
  47. #define D_POINTER    0
  48. #define D_FIELD        1
  49. #define D_STRUCT    2
  50.  
  51. PatternRec dataPattern[] = {
  52.     {"0x[0-9a-f]+",                   
  53.      NULL, {-1, -1, -1, -1, -1, -1}
  54.     },
  55.     {"\\([ ]*\\)\\(.*[^ ]+\\)[ ]* = \\(0x[0-9a-f]+\\)\n", 
  56.      NULL, { 1, -1,  2, -1,  3, -1}
  57.     },
  58.     {"\\([ ]*\\)\\(.*[^ ]*\\)[ ]* = {\n",           
  59.      NULL, { 1, -1,  2, -1, -1, -1}
  60.     },
  61.     NULL
  62. };
  63.