# 2.11BSD#431 - /usr/src/ucb/ex/ex_re.h

##### Variables

    braelist          X
    braslist          X
    re                X
    rhsbuf            X
    scanre            X
    subre             X

##### Macros

    CBRA              X
    CBRC              X
    CCHR              X
    CCL               X
    CDOL              X
    CDOT              X
    CEOFC             X
    CKET              X
    CLET              X
    NCCL              X
    STAR              X
    circfl            X
    expbuf            X
    nbra              X
    resre             X
    savere            X

##### struct's

    regexp            X

       1: /*
       2:  * Copyright (c) 1980 Regents of the University of California.
       3:  * All rights reserved.  The Berkeley software License Agreement
       4:  * specifies the terms and conditions for redistribution.
       5:  *
       6:  *	@(#)ex_re.h	7.3 (Berkeley) 5/31/85
       7:  */
       8:
       9: /*
      10:  * Regular expression definitions.
      11:  * The regular expressions in ex are similar to those in ed,
      12:  * with the addition of the word boundaries from Toronto ed
      13:  * and allowing character classes to have [a-b] as in the shell.
      14:  * The numbers for the nodes below are spaced further apart then
      15:  * necessary because I at one time partially put in + and | (one or
      16:  * more and alternation.)
      17:  */
      18: struct  regexp {
      19:     char    Expbuf[ESIZE + 2];
      20:     bool    Circfl;
      21:     short   Nbra;
      22: };
      23:
      24: /*
      25:  * There are three regular expressions here, the previous (in re),
      26:  * the previous substitute (in subre) and the previous scanning (in scanre).
      27:  * It would be possible to get rid of "re" by making it a stack parameter
      28:  * to the appropriate routines.
      29:  */
      30: var struct  regexp re;      /* Last re */
      31: var struct  regexp scanre;      /* Last scanning re */
      32: var struct  regexp subre;       /* Last substitute re */
      33:
      34: /*
      35:  * Defining circfl and expbuf like this saves us from having to change
      36:  * old code in the ex_re.c stuff.
      37:  */
      38: #define expbuf  re.Expbuf
      39: #define circfl  re.Circfl
      40: #define nbra    re.Nbra
      41:
      42: /*
      43:  * Since the phototypesetter v7-epsilon
      44:  * C compiler doesn't have structure assignment...
      45:  */
      46: #define savere(a)   copy(&a, &re, sizeof (struct regexp))
      47: #define resre(a)    copy(&re, &a, sizeof (struct regexp))
      48:
      49: /*
      50:  * Definitions for substitute
      51:  */
      52: var char    *braslist[NBRA];    /* Starts of \(\)'ed text in lhs */
      53: var char    *braelist[NBRA];    /* Ends... */
      54: var char    rhsbuf[RHSSIZE];    /* Rhs of last substitute */
      55:
      56: /*
      57:  * Definitions of codes for the compiled re's.
      58:  * The re algorithm is described in a paper
      59:  * by K. Thompson in the CACM about 10 years ago
      60:  * and is the same as in ed.
      61:  */
      62: #define STAR    1
      63:
      64: #define CBRA    1
      65: #define CDOT    4
      66: #define CCL 8
      67: #define NCCL    12
      68: #define CDOL    16
      69: #define CEOFC   17
      70: #define CKET    18
      71: #define CCHR    20
      72: #define CBRC    24
      73: #define CLET    25

#### Defined variables

braelist defined in line 53; used 2 times

- in /usr/src/ucb/ex/ex_re.c line 473, 874

braslist defined in line 52; used 2 times

- in /usr/src/ucb/ex/ex_re.c line 473, 870

re defined in line 30; used 6 times

- in line 38-40(3), 46-47(2)
- in /usr/src/ucb/ex/ex_re.c line 246

rhsbuf defined in line 54; used 5 times

- in /usr/src/ucb/ex/ex_re.c line 288, 314, 334, 429, 643

scanre defined in line 31; used 5 times

- in /usr/src/ucb/ex/ex_addr.c line 200
- in /usr/src/ucb/ex/ex_re.c line 49, 555-557(2)
- in /usr/src/ucb/ex/ex_v.c line 85

subre defined in line 32; used 5 times

- in /usr/src/ucb/ex/ex_re.c line 248, 273-275(2), 561-563(2)

#### Defined struct's

regexp defined in line 18; used 6 times

- in line 30-32(6)

#### Defined macros

CBRA defined in line 64; used 2 times

- in /usr/src/ucb/ex/ex_re.c line 615, 662

CBRC defined in line 72; used 1 times

- in /usr/src/ucb/ex/ex_re.c line 627

CCHR defined in line 71; used 6 times

- in /usr/src/ucb/ex/ex_re.c line 654, 664, 699, 739, 787, 883

CCL defined in line 66; used 3 times

- in /usr/src/ucb/ex/ex_re.c line 670, 891-894(2)

CDOL defined in line 68; used 1 times

- in /usr/src/ucb/ex/ex_re.c line 726

CDOT defined in line 65; used 2 times

- in /usr/src/ucb/ex/ex_re.c line 639, 877

CEOFC defined in line 69; used 2 times

- in /usr/src/ucb/ex/ex_re.c line 594, 719

CKET defined in line 70; used 2 times

- in /usr/src/ucb/ex/ex_re.c line 622, 662

CLET defined in line 73; used 1 times

- in /usr/src/ucb/ex/ex_re.c line 631

NCCL defined in line 67; used 2 times

- in /usr/src/ucb/ex/ex_re.c line 676, 892

STAR defined in line 62; used 2 times

- in /usr/src/ucb/ex/ex_re.c line 666, 894

circfl defined in line 39; used 4 times

- in /usr/src/ucb/ex/ex_re.c line 580-583(2), 771, 782

expbuf defined in line 38; used 9 times

- in /usr/src/ucb/ex/ex_re.c line 548, 587, 600-603(2), 652, 660, 687, 750, 781

nbra defined in line 40; used 5 times

- in /usr/src/ucb/ex/ex_re.c line 472, 579, 612-616(3)

resre defined in line 47; used 3 times

- in /usr/src/ucb/ex/ex_re.c line 275, 557, 563

savere defined in line 46; used 4 times

- in /usr/src/ucb/ex/ex_addr.c line 200
- in /usr/src/ucb/ex/ex_re.c line 49, 273
- in /usr/src/ucb/ex/ex_v.c line 85

#### Usage of this include

ex_re.h used 5 times

- in /usr/src/ucb/ex/ex_addr.c line 12
- in /usr/src/ucb/ex/ex_extern.c line 22
- in /usr/src/ucb/ex/ex_re.c line 12
- in /usr/src/ucb/ex/ex_subr.c line 12
- in /usr/src/ucb/ex/ex_v.c line 12

Last modified: 1987-02-17 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1021 |