home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / program / language / perl / Source / H / Spat < prev    next >
Encoding:
Text File  |  1989-11-19  |  1.3 KB  |  39 lines

  1. /* $Header: spat.h,v 3.0 89/10/18 15:23:14 lwall Locked $
  2.  *
  3.  *    Copyright (c) 1989, Larry Wall
  4.  *
  5.  *    You may distribute under the terms of the GNU General Public License
  6.  *    as specified in the README file that comes with the perl 3.0 kit.
  7.  *
  8.  * $Log:    spat.h,v $
  9.  * Revision 3.0  89/10/18  15:23:14  lwall
  10.  * 3.0 baseline
  11.  * 
  12.  */
  13.  
  14. struct scanpat {
  15.     SPAT    *spat_next;        /* list of all scanpats */
  16.     REGEXP    *spat_regexp;        /* compiled expression */
  17.     ARG        *spat_repl;        /* replacement string for subst */
  18.     ARG        *spat_runtime;        /* compile pattern at runtime */
  19.     STR        *spat_short;        /* for a fast bypass of execute() */
  20.     bool    spat_flags;
  21.     char    spat_slen;
  22. };
  23.  
  24. #define SPAT_USED 1            /* spat has been used once already */
  25. #define SPAT_ONCE 2            /* use pattern only once per reset */
  26. #define SPAT_SCANFIRST 4        /* initial constant not anchored */
  27. #define SPAT_ALL 8            /* initial constant is whole pat */
  28. #define SPAT_SKIPWHITE 16        /* skip leading whitespace for split */
  29. #define SPAT_FOLD 32            /* case insensitivity */
  30. #define SPAT_CONST 64            /* subst replacement is constant */
  31. #define SPAT_KEEP 128            /* keep 1st runtime pattern forever */
  32.  
  33. EXT SPAT *curspat;        /* what to do \ interps from */
  34. EXT SPAT *lastspat;        /* what to use in place of null pattern */
  35.  
  36. EXT char *hint INIT(Nullch);    /* hint from cmd_exec to do_match et al */
  37.  
  38. #define Nullspat Null(SPAT*)
  39.