Initial import of the CDE 2.1.30 sources from the Open Group.
[oweals/cde.git] / cde / programs / dtdocbook / sgmls / action.h
1 /* $XConsortium: action.h /main/3 1996/06/19 17:14:03 drk $ */
2 /* ACTION.H: Symbols for all PCB action codes. */
3 /* CONACT.H: Symbols for content parse action names (end with '_').
4              There must be no conflict with PARSEACT.H, which
5              uses 0 through 19, or SGMLACT.H, which uses 20 through 32
6              (except that 31 - 32 can be defined here because they are
7              used only by PARSEPRO and do not conflict with SGML.C).
8 */
9 #define CIR_   31   /* Invalid character(s) ignored in MDS; restarting parse. */
10 #define DTD_   32   /* Process DOCTYPE declaration. */
11 #define DTE_   33   /* End of DOCTYPE declaration. */
12 #define PEP_   34   /* TEMP: Previous character ended prolog. */
13 #define DAS_   35   /* Current character begins data. */
14 #define FCE_   36   /* Process free character (SR12-18, 21-30). */
15 #define DCE_   37   /* Data character in element text; change PCB. */
16 #define LAS_   38   /* Start lookahead buffer with current character. */
17 #define LAM_   39   /* Move character to lookahead buffer. */
18 #define LAF_   40   /* Flush the lookahead buffer; REPEATCC. */
19 #define NED_   41   /* Process null end-tag delimiter. */
20 #define NET_   42   /* Process null end-tag. */
21 #define NST_   43   /* Process null start-tag. */
22 #define NLF_   44   /* Flush lookahead buffer except for trailing NET or SR. */
23 #define ETC_   45   /* End-tag in CDATA or RCDATA; treat as data if invalid. */
24 #define SRMIN  46   /* Dummy for SHORT REFERENCES: srn = SRn - SRMIN. */
25 #define SR1_   47   /* TAB */
26 #define SR2_   48   /* RE */
27 #define SR3_   49   /* RS */
28 #define SR4_   50   /* Leading blanks */
29 #define SR5_   51   /* Null record */
30 #define DAR_   52   /* Flush data buffer after repeating current character. */
31 #define SR7_   53   /* Trailing blanks */
32 #define SR8_   54   /* Space */
33 #define SR9_   55   /* Two or more blanks */
34 #define SR10   56   /* Quotation mark (first data character) */
35 #define SR11   57   /* Number sign */
36 #define SR12   58   /* FCE CHARACTERS start here */
37 /*         _   59   */
38 #define BSQ_   60   /* Blank sequence begun; find its end. */
39 /*             61      In use by PARSEACT.H */
40 /*             62      In use by PARSEACT.H */
41 /*             63      In use by PARSEACT.H */
42 /*             64      In use by PARSEACT.H */
43 #define SR19   65   /* Hyphen */
44 #define SR20   66   /* Two hyphens */
45 #define SR25   71   /* Left bracket */
46 #define SR26   72   /* Right bracket */
47 #define RBR_   73   /* Two right brackets. */
48 #define GTR_   74   /* EOB with pending data character */
49 #define MSP_   75   /* Marked section start in prolog outside DTD */
50 #define APP_   76   /* APPINFO (other than NONE) */
51 #define STE_   77   /* Start tag ended prolog */
52
53 /* GRPACT.H: Symbols for group tokenization action names (all alpha).
54              There must be no conflict with PARSEACT.H, which
55              uses 0 - 19.
56 */
57 #define AND    20   /* AND connector found. */
58 #define DTAG   21   /* Data tag token group occurred (treat as #CHARS). */
59 #define GRPE   22   /* Group ended. */
60 #define GRP_   23   /* Group started. */
61 #define NAS_   24   /* Name started in content model or name group. */
62 #define NMT_   25   /* Name or name token started in name token group. */
63 #define OPT    26   /* OPT occurrence indicator for previous token. */
64 #define OR     27   /* OR connector found. */
65 #define OREP   28   /* OREP occurrence indicator for previous token. */
66 #define REP    29   /* REP occurrence indicator for previous token. */
67 #define RNS_   30   /* Reserved name started (#PCDATA). */
68 #define SEQ    31   /* SEQ connector found. */
69 /* LITACT.H: Symbols for content parse action names (end with '_').
70              There must be no conflict with PARSEACT.H, which
71              uses 0 through 19.
72 */
73 #define MLA_   20   /* Move character to look-aside data buffer. */
74 #define LPR_   21   /* Move previous character to data buffer. */
75 #define RSM_   22   /* Process record start and move it to data buffer. */
76 #define FUN_   23   /* Replace function character with a space. */
77 #define LP2_   24   /* Move previous two characters to data buffer. */
78 #define MLE_   25   /* Minimum literal error: invalid character ignored. */
79 #define RPR_   26   /* Remove previous character from data buffer; terminate. */
80 #define TER_   27   /* Terminate the parse. */
81 /* MDACT.H: Symbols for markup declaration parse action names (all alpha).
82             There must be no conflict with PARSEACT.H, which
83             uses 0 - 19.
84 */
85 #define CDR    20   /* CD[1] (MINUS) occurred previously. */
86 #define EMD    21   /* End of markup declaration. */
87 #define GRPS   22   /* Group started. */
88 #define LIT    23   /* Literal started: character data. */
89 #define LITE   24   /* Literal started: character data; LITA is delimiter. */
90 #define MGRP   25   /* Minus exception group (MINUS,GRPO). */
91 #define NAS    26   /* Name started. */
92 #define NMT    27   /* Name token started. */
93 #define NUM    28   /* Number or number token started. */
94 #define PEN    29   /* Parameter entity name being defined (PERO found). */
95 #define PGRP   30   /* Plus exception group (PLUS,GRPO). */
96 #define RNS    31   /* Reserved name started. */
97 #define MDS    32   /* Markup declaration subset start. */
98 #define PENR   33   /* REPEATCC; PERO found. */
99 /* PARSEACT.H: Symbols for common parse action names (end with '_').
100                There must be no conflict with other action name
101                files, which use numbers greater than 19.
102 */
103 #define CRA_    1   /* Character reference: alphabetic. */
104 #define CRN_    2   /* Character reference: numeric; non-char refs o.k.. */
105 #define NON_    3   /* Single byte of non-character data found. */
106 #define EOF_    4   /* Error: illegal entity end; resume old input; return. */
107 #define ER_     5   /* Entity reference; start new input source; continue. */
108 #define GET_    6   /* EOB, EOS, or EE: resume old input source; continue. */
109 #define INV_    7   /* Error: invalid char terminated markup; repeat char. */
110 #define LEN_    8   /* Error: length limit exceeded; end markup; repeat char. */
111 #define NOP_    9   /* No action necessary. */
112 #define PCI_   10   /* Previous character was invalid. */
113 #define PER_   11   /* Parameter reference; start new input source; continue. */
114 #define RC2_   12   /* Back up two characters. */
115 #define RCC_   13   /* Repeat current character. */
116 #define RCR_   14   /* Repeat current character and return to caller. */
117 #define EE_    15   /* EOS or EE: resume old input source; return to caller. */
118 #define RS_    16   /* Record start: ccnt=0; ++rcnt. */
119 #define ERX_   17   /* Entity reference; start new input source; return. */
120 #define SYS_   18   /* Error allowed: SYSCHAR in input stream; replace it. */
121 #define EOD_   19   /* End of document. */
122 /* Number way out of order to avoid recompilation. */
123 #define NSC_   58   /* Handle DELNONCH/DELXNONCH when NON_ is allowed */
124 #define PEX_   61   /* Parameter entity ref; start new input source; return. */
125 #define DEF_   62   /* Data entity found. */
126 #define PIE_   63   /* PI entity found (needed in markup). */
127 #define LNR_   64   /* LEN_ error with extra REPEATCC. */
128 /* SGMLACT.H: Symbols for content parse action names (end with '_')
129               that are returned to SGML.C for processing.
130               There must be no conflict with PARSEACT.H, which
131               uses 0 through 19, or CONACT.H, which uses 34 and above.
132               (Note: 31 is also used in CONACT.H, but no conflict
133               is created because they are tested only in PARSEPRO.C, which
134               completes before SGML.C starts to examine those codes.
135               Also, when EOD_ is returned from PARSECON, it is changed
136               to LOP_.)
137 */
138 #define CON_   20   /* Normal content action (one of the following). */
139 #define DAF_   21   /* Data found. */
140 #define ETG_   22   /* Process end-tag. */
141 #define MD_    23   /* Process markup declaration (NAMESTRT found). */
142 #define MDC_   24   /* Process markup declaration comment (CD found). */
143 #define MSS_   25   /* Process marked section start. */
144 #define MSE_   26   /* Process marked section end. */
145 #define PIS_   27   /* Processing instruction (string). */
146 #define REF_   28   /* Record end found. */
147 #define STG_   29   /* Process start-tag. */
148 #define RSR_   30   /* Return RS to effect SGML state transition. */
149 #define LOP_   31   /* Loop for new content without returning anything. */
150 /* TAGACT.H: Symbols for tag parse action names (all alpha).
151              There must be no conflict with PARSEACT.H, which
152              uses 0 - 19.
153 */
154 #define AVD    20   /* Delimited attribute value started: normal delimiter. */
155 #define AVU    21   /* Undelimited value started. */
156 #define ETIC   22   /* Tag closed with ETI. */
157 #define NVS    23   /* Name of attribute or value started. */
158 #define NASV   24   /* Saved NAS was actually an NTV. */
159 #define NTV    25   /* Name token value started; get name and full value. */
160 #define TAGC   26   /* Tag closed normally. */
161 #define TAGO   27   /* Tag closed implicitly by TAGO character. */
162 #define AVDA   28   /* Delimited attribute value started: alternative delim. */
163 #define DSC    29   /* Closed by DSC character. */
164 /* VALACT.H: Symbols for attribute value tokenization action names (all alpha).
165 */
166 #define NOPA    0   /* No action necessary. */
167 #define INVA    1   /* Invalid character; terminate parse. */
168 #define LENA    2   /* Length limit of token exceeded; terminate parse. */
169 #define NASA    3   /* Name started. */
170 #define NMTA    4   /* Name token started. */
171 #define NUMA    5   /* Number or number token started. */
172
173 /* SGML declaration parsing actions. */
174
175 #define ESGD 20                 /* End of SGML declaration. */
176 #define LIT1 21                 /* Literal started. */
177 #define LIT2 22                 /* Literal started with LITA delimiter. */
178 #define NUM1 23                 /* Number started. */
179 #define NAS1 24                 /* Name started. */
180 #define ISIG 25                 /* Insignificant character occurred. */