1 /* PCBRF: Parse tables for reference concrete syntax. 2 */ 3 #include "config.h" 4 #include "entity.h" /* Templates for entity control blocks. */ 5 #include "action.h" /* Action names for all parsing. */ 6 #include "synxtrn.h" /* Declarations for concrete syntax constants. */ 7 #include "adl.h" /* Definitions for attribute list processing. */ 8 /* PCBCONM: State and action table for content parse of mixed content. 9 Initial state assumes a start-tag was just processed. 10 */ 11 /* Symbols for state names (end with a number). */ 12 #define ET0 0 /* Markup found or buffer flushed; no data. */ 13 #define DA0 2 /* Data in buffer. */ 14 #define DA1 4 /* Data and space in buffer. */ 15 #define ER0 6 /* ERO found; start lookahead buffer. */ 16 #define CR0 8 /* CRO found (ERO, RNI). */ 17 #define RS0 10 /* RS found; possible SR 3-6. */ 18 #define ME0 12 /* MSC found; possible SR26. */ 19 #define ME1 14 /* MSC, MSC found. */ 20 #define ES0 16 /* TAGO found; start lookahead buffer. */ 21 #define EE0 18 /* End-tag start (TAGO,ETI); move to lookahead buffer. */ 22 #define NE0 20 /* End-tag start (TAGO,NET); process NET if not end-tag. */ 23 #define MD0 22 /* MDO found (TAGO, MDO[2]). */ 24 #define MC0 24 /* MDO, COM found. */ 25 #define SC0 26 /* COM found; possible SR19-20. */ 26 #define SP0 28 /* Space found; data pending; possible SR7 or SR9. */ 27 #define SR0 30 /* SPCR found; possible SR7 or SR9. */ 28 #define TB0 32 /* TAB found; possible SR7 or SR9. */ 29 30 int pcbcnet = ET0; /* PCBCONM: markup found or data buffer flushed.*/ 31 int pcbcnda = DA0; /* PCBCONM: data in buffer. */ 32 33 static UNCH 34 /* free nu nmc nms spc non ee eob rs re sep cde nsc ero 35 nmre com eti net lit spcr mdo msc mso pio rni tagc tago fce */ 36 et0 []={DA0 ,DA0 ,DA0 ,DA0 ,SP0 ,ET0 ,ET0 ,ET0 ,RS0 ,ET0 ,TB0 ,DA0 ,ET0 ,ER0 , 37 ET0 ,SC0 ,DA0 ,ET0 ,ET0 ,SR0 ,DA0 ,ME0 ,ET0 ,DA0 ,ET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,ET0 ,ET0 ,ET0 ,ET0 ,ET0 },/*sr0*/ 121 sr0a[]={SR8_,SR8_,SR8_,SR8_,SR9_,SR8_,SR8_,GET_,SR8_,SR7_,SR9_,SR8_,SR8_,SR8_, 122 SR8_,SR8_,SR8_,SR8_,SR8_,SR9_,SR8_,SR8_,SR8_,SR8_,SR8_,SR8_,SR8_,SR8_}, 123 124 tb0 []={ET0 ,ET0 ,ET0 ,ET0 ,ET0 ,ET0 ,ET0 ,TB0 ,ET0 ,ET0 ,ET0 ,ET0 ,ET0 ,ET0 , 125 ET0 ,ET0 ,ET0 ,ET0 ,ET0 ,ET0 ,ET0 ,ET0 ,ET0 ,ET0 ,ET0 ,ET0 ,ET0 ,ET0 },/*tb0*/ 126 tb0a[]={SR1_,SR1_,SR1_,SR1_,SR9_,SR1_,SR1_,GET_,SR1_,SR7_,SR9_,SR1_,SR1_,SR1_, 127 SR1_,SR1_,SR1_,SR1_,SR1_,SR9_,SR1_,SR1_,SR1_,SR1_,SR1_,SR1_,SR1_,SR1_}, 128 129 /* free nu nmc nms spc non ee eob rs re sep cde nsc ero 130 nmre com eti net lit spcr mdo msc mso pio rni tagc tago fce */ 131 132 *conmtab[] = {et0, et0a, da0, da0a, da1, da1a, er0, er0a, cr0, cr0a, rs0, rs0a, 133 me0, me0a, me1, me1a, es0, es0a, ee0, ee0a, ne0, ne0a, md0, md0a, 134 mc0, mc0a, sc0, sc0a, sp0, sp0a, sr0, sr0a, tb0, tb0a }; 135 struct parse pcbconm = {"CONM", lexcnm, conmtab, 0, 0, 0, 0}; 136 #undef ET0 137 #undef DA0 138 #undef DA1 139 #undef ER0 140 #undef CR0 141 #undef RS0 142 #undef ME0 143 #undef ME1 144 #undef ES0 145 #undef EE0 146 #undef NE0 147 #undef MD0 148 #undef MC0 149 #undef SC0 150 #undef SP0 151 #undef SR0 152 #undef TB0 153 /* PCBCONE: State and action table for content parse of element content. 154 Initial state assumes a start-tag was just processed. 155 */ 156 /* Symbols for state names (end with a number). */ 157 #define ET2 0 /* Markup found. */ 158 #define ER2 2 /* ERO found; start lookahead buffer. */ 159 #define CR2 4 /* CRO found (ERO, RNI). */ 160 #define RS2 6 /* RS found; possible SR 3-6 if they were declared. */ 161 #define ME2 8 /* MSC found. */ 162 #define ME3 10 /* MSC, MSC found. */ 163 #define ES2 12 /* TAGO found; start lookahead buffer. */ 164 #define EE2 14 /* End-tag start (TAGO,ETI); move to lookahead buffer. */ 165 #define NE2 16 /* End-tag start (TAGO,NET); process NET if not end-tag. */ 166 #define MD2 18 /* MDO found (TAGO, MDO[2]). */ 167 #define MC2 20 /* MDO, COM found. */ 168 #define SC2 22 /* COM found; possible SR19-20 if they were mapped. */ 169 #define SP2 24 /* Space found; possible SR7 or SR9. */ 170 #define SR2 26 /* SPCR found; possible SR7 or SR9. */ 171 #define TB2 28 /* TAB found; possible SR7 or SR9. */ 172 173 static UNCH 174 /* free nu nmc nms spc non ee eob rs re sep cde nsc ero 175 nmre com eti net lit spcr mdo msc mso pio rni tagc tago fce */ 176 et2 []={ET2 ,ET2 ,ET2 ,ET2 ,SP2 ,ET2 ,ET2 ,ET2 ,RS2 ,ET2 ,TB2 ,ET2 ,ET2 ,ER2 , 177 ET2 ,SC2 ,ET2 ,ET2 ,ET2 ,SR2 ,ET2 ,ME2 ,ET2 ,ET2 ,ET2 ,ET2 ,ES2 ,ET2 },/*et2*/ 178 et2a[]={DCE_,DCE_,DCE_,DCE_,NOP_,DCE_,GET_,GET_,RS_ ,SR2_,NOP_,DCE_,DCE_,LAS_, 179 NOP_,NOP_,DCE_,NED_,SR10,NOP_,DCE_,NOP_,SR25,DCE_,SR11,DCE_,LAS_,FCE_}, 180 181 er2 []={ET2 ,ET2 ,ET2 ,ET2 ,ET2 ,ET2 ,ET2 ,ER2 ,ET2 ,ET2 ,ET2 ,ET2 ,ET2 ,ET2 , 182 ET2 ,ET2 ,ET2 ,ET2 ,ET2 ,ET2 ,ET2 ,ET2 ,ET2 ,ET2 ,CR2 ,ET2 ,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,SR8_,GET_,SR8_,SR7_,SR9_,SR8_,SR8_,SR8_, 250 SR8_,SR8_,SR8_,SR8_,SR8_,SR9_,SR8_,SR8_,SR8_,SR8_,SR8_,SR8_,SR8_,SR8_}, 251 252 tb2 []={ET2 ,ET2 ,ET2 ,ET2 ,ET2 ,ET2 ,ET2 ,TB2 ,ET2 ,ET2 ,ET2 ,ET2 ,ET2 ,ET2 , 253 ET2 ,ET2 ,ET2 ,ET2 ,ET2 ,ET2 ,ET2 ,ET2 ,ET2 ,ET2 ,ET2 ,ET2 ,ET2 ,ET2 },/*tb2*/ 254 tb2a[]={SR1_,SR1_,SR1_,SR1_,SR9_,SR1_,SR1_,GET_,SR1_,SR7_,SR9_,SR1_,SR1_,SR1_, 255 SR1_,SR1_,SR1_,SR1_,SR1_,SR9_,SR1_,SR1_,SR1_,SR1_,SR1_,SR1_,SR1_,SR1_}, 256 257 *conetab[] = {et2, et2a, er2, er2a, cr2, cr2a, rs2, rs2a, me2, me2a, me3, me3a, 258 es2, es2a, ee2, ee2a, ne2, ne2a, md2, md2a, mc2, mc2a, sc2, sc2a, 259 sp2, sp2a, sr2, sr2a, tb2, tb2a }; 260 struct parse pcbcone = {"CONE", lexcnm, conetab, 0, 0, 0, 0}; 261 #undef ET2 262 #undef ER2 263 #undef CR2 264 #undef RS2 265 #undef ME2 266 #undef ME3 267 #undef ES2 268 #undef EE2 269 #undef NE2 270 #undef MD2 271 #undef MC2 272 #undef SC2 273 #undef SP2 274 #undef SR2 275 #undef TB2 276 /* PCBCONR: State and action table for content parse of replaceable character 277 data. Initial state assumes a start-tag was just processed. 278 Only entity references and character references are recognized. 279 */ 280 /* Symbols for state names (end with a number). */ 281 #define ET4 0 /* Markup found or buffer flushed; no data. */ 282 #define DA4 2 /* Data in buffer. */ 283 #define ER4 4 /* ERO found; start lookahead buffer. */ 284 #define CR4 6 /* CRO found (ER2, RNI). */ 285 #define ES4 8 /* TAGO found; start lookahead buffer. */ 286 #define EE4 10 /* End-tag start (TAGO,ETI); move to lookahead buffer. */ 287 #define NE4 12 /* End-tag start (TAGO,NET); process NET if not end-tag. */ 288 289 static UNCH 290 /* free nu nmc nms spc non ee eob rs re sep cde nsc ero 291 nmre com eti net mdo msc mso pero pio rni tagc tago */ 292 et4 []={DA4 ,DA4 ,DA4 ,DA4 ,DA4 ,ET4 ,ET4 ,ET4 ,ET4 ,ET4 ,DA4 ,DA4 ,ET4 ,ER4 , 293 ET4 ,DA4 ,DA4 ,ET4 ,DA4 ,DA4 ,DA4 ,DA4 ,DA4 ,DA4 ,DA4 ,ES4 },/*et4*/ 294 et4a[]={DAS_,DAS_,DAS_,DAS_,DAS_,NON_,EE_ ,GET_,RS_ ,REF_,DAS_,DAS_,NSC_,LAS_, 295 REF_,DAS_,DAS_,NED_,DAS_,DAS_,DAS_,DAS_,DAS_,DAS_,DAS_,LAS_}, 296 297 da4 []={DA4 ,DA4 ,DA4 ,DA4 ,DA4 ,ET4 ,ET4 ,ET4 ,ET4 ,ET4 ,DA4 ,DA4 ,ET4 ,ET4 , 298 ET4 ,DA4 ,DA4 ,ET4 ,DA4 ,DA4 ,DA4 ,DA4 ,DA4 ,DA4 ,DA4 ,ET4 },/*da4*/ 299 da4a[]={NOP_,NOP_,NOP_,NOP_,NOP_,DAF_,DAF_,DAF_,DAF_,DAF_,NOP_,NOP_,DAF_,DAF_, 300 DAF_,NOP_,NOP_,DAF_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,DAF_}, 301 302 er4 []={ET4 ,ET4 ,ET4 ,ET4 ,ET4 ,ET4 ,ET4 ,ER4 ,ET4 ,ET4 ,ET4 ,ET4 ,ET4 ,ET4 , 303 ET4 ,ET4 ,ET4 ,ET4 ,ET4 ,ET4 ,ET4 ,ET4 ,ET4 ,CR4 ,ET4 ,ET4 },/*er4*/ 304 er4a[]={LAF_,LAF_,LAF_,ERX_,LAF_,LAF_,LAF_,GET_,LAF_,LAF_,LAF_,LAF_,LAF_,LAF_, 305 LAF_,LAF_,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_,LAF_,LAF_,LAF_,LAF_,LAF_,LAF_,NET_,LAF_}, 323 324 ne4 []={EE4 ,EE4 ,EE4 ,ET4 ,EE4 ,EE4 ,EE4 ,NE4 ,EE4 ,EE4 ,EE4 ,EE4 ,EE4 ,EE4 , 325 EE4 ,EE4 ,EE4 ,EE4 ,EE4 ,EE4 ,EE4 ,EE4 ,EE4 ,EE4 ,ET4 ,EE4 },/*ne4*/ 326 ne4a[]={RC2_,RC2_,RC2_,ETC_,RC2_,RC2_,RC2_,GET_,RC2_,RC2_,RC2_,RC2_,RC2_,RC2_, 327 RC2_,RC2_,RC2_,RC2_,RC2_,RC2_,RC2_,RC2_,RC2_,RC2_,NET_,RC2_}, 328 329 *conrtab[] = {et4, et4a, da4, da4a, er4, er4a, cr4, cr4a, 330 es4, es4a, ee4, ee4a, ne4, ne4a}; 331 struct parse pcbconr = {"CONR", lexcon, conrtab, 0, 0, 0, 0}; 332 #undef ET4 333 #undef DA4 334 #undef ER4 335 #undef CR4 336 #undef ES4 337 #undef EE4 338 #undef NE4 339 /* PCBCONC: State and action table for content parse of character data. 340 Initial state assumes a start-tag was just processed. 341 */ 342 /* Symbols for state names (end with a number). */ 343 #define ET6 0 /* Markup found or buffer flushed; no data. */ 344 #define DA6 2 /* Data in buffer. */ 345 #define ES6 4 /* TAGO found; start lookahead buffer. */ 346 #define EE6 6 /* End-tag start (TAGO,ETI); move to lookahead buffer. */ 347 #define NE6 8 /* End-tag start (TAGO,NET); process NET if not end-tag. */ 348 349 static UNCH 350 /* free nu nmc nms spc non ee eob rs re sep cde nsc ero 351 nmre com eti net mdo msc mso pero pio rni tagc tago */ 352 et6 []={DA6 ,DA6 ,DA6 ,DA6 ,DA6 ,ET6 ,ET6 ,ET6 ,ET6 ,ET6 ,DA6 ,DA6 ,ET6 ,DA6 , 353 ET6 ,DA6 ,DA6 ,ET6 ,DA6 ,DA6 ,DA6 ,DA6 ,DA6 ,DA6 ,DA6 ,ES6 },/*et6*/ 354 et6a[]={DAS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ETC_,LAF_,LAF_,LAF_,GET_,LAF_,LAF_,LAF_,LAF_,LAF_,LAF_, 372 LAF_,LAF_,LAF_,LAF_,LAF_,LAF_,LAF_,LAF_,LAF_,LAF_,NET_,LAF_}, 373 374 ne6 []={EE6 ,EE6 ,EE6 ,ET6 ,EE6 ,EE6 ,EE6 ,NE6 ,EE6 ,EE6 ,EE6 ,EE6 ,EE6 ,EE6 , 375 EE6 ,EE6 ,EE6 ,EE6 ,EE6 ,EE6 ,EE6 ,EE6 ,EE6 ,EE6 ,ET6 ,EE6 },/*ne6*/ 376 ne6a[]={RC2_,RC2_,RC2_,ETC_,RC2_,RC2_,RC2_,GET_,RC2_,RC2_,RC2_,RC2_,RC2_,RC2_, 377 RC2_,RC2_,RC2_,RC2_,RC2_,RC2_,RC2_,RC2_,RC2_,RC2_,NET_,RC2_}, 378 379 *conctab[] = {et6, et6a, da6, da6a, es6, es6a, ee6, ee6a, ne6, ne6a}; 380 struct parse pcbconc = {"CONC", lexcon, conctab, 0, 0, 0, 0}; 381 #undef ET6 382 #undef DA6 383 #undef ES6 384 #undef EE6 385 #undef NE6 386 /* PCBPRO: State and action table for prolog parse. 387 Initial state assumes document just began. 388 */ 389 /* Symbols for state names (end with a number). */ 390 #define ET7 0 /* Markup found. */ 391 #define ES7 2 /* TAGO found; start lookahead buffer. */ 392 #define MD7 4 /* MDO found (TAGO, MDO[2]). */ 393 #define MC7 6 /* MDO, COM found. */ 394 #define EE7 8 /* TAGO, ETI found */ 395 396 static UNCH 397 /* free nu nmc nms spc non ee eob rs re sep cde nsc ero 398 nmre com eti net mdo msc mso pero pio rni tagc tago */ 399 et7 []={ET7 ,ET7 ,ET7 ,ET7 ,ET7 ,ET7 ,ET7 ,ET7 ,ET7 ,ET7 ,ET7 ,ET7 ,ET7 ,ET7 , 400 ET7 ,ET7 ,ET7 ,ET7 ,ET7 ,ET7 ,ET7 ,ET7 ,ET7 ,ET7 ,ET7 ,ES7 },/*et7*/ 401 et7a[]={DCE_,DC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7 ,ET7 ,ET7 ,ET7 ,ET7 ,ET7 ,EE7 ,ET7 ,ET7 ,ET7 ,ET7 ,ET7 ,ET7 , 420 ET7 ,ET7 ,ET7 ,ET7 ,ET7 ,ET7 ,ET7 ,ET7 ,ET7 ,ET7 ,ET7 ,ET7 },/*ee7*/ 421 ee7a[]={LAF_,LAF_,LAF_,ETE_,LAF_,LAF_,LAF_,GET_,LAF_,LAF_,LAF_,LAF_,LAF_,LAF_, 422 LAF_,LAF_,LAF_,LAF_,LAF_,LAF_,LAF_,LAF_,LAF_,LAF_,ETE_,LAF_}, 423 424 *protab[] = {et7, et7a, es7, es7a, md7, md7a, mc7, mc7a, ee7, ee7a}; 425 struct parse pcbpro = {"PRO", lexcon, protab, 0, 0, 0, 0}; 426 #undef ET7 427 #undef ES7 428 #undef MD7 429 #undef MC7 430 #undef EE7 431 /* PCBMDS: State and action table for parse of markup declaration subset. 432 Initial state assumes subset just began (MSO found). 433 */ 434 /* Symbols for state names (end with a number). */ 435 #define ET8 0 /* Markup found. */ 436 #define ER8 2 /* PERO found; start lookahead buffer. */ 437 #define ME8 4 /* MSC found. */ 438 #define ME9 6 /* MSC, MSC found. */ 439 #define ES8 8 /* TAGO found; start lookahead buffer. */ 440 #define MD8 10 /* MDO found (TAGO, MDO[2]). */ 441 #define MC8 12 /* MDO, CD found. */ 442 #define DC8 14 /* Data characters found (erroneously). */ 443 444 static UNCH 445 /* free nu nmc nms spc non ee eob rs re sep cde nsc ero 446 nmre com eti net mdo msc mso pero pio rni tagc tago */ 447 et8 []={DC8 ,DC8 ,DC8 ,DC8 ,ET8 ,DC8 ,ET8 ,ET8 ,ET8 ,ET8 ,ET8 ,DC8 ,DC8 ,DC8 , 448 DC8 ,DC8 ,DC8 ,DC8 ,DC8 ,ME8 ,DC8 ,ER8 ,DC8 ,DC8 ,DC8 ,ES8 },/*et8*/ 449 et8a[]={NOP_,NOP_,NOP_,NOP_,NOP_,SYS_,GET_,GET_,RS_ ,NOP_,NOP_,NOP_,SYS_,NOP_, 450 NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_}, 451 452 er8 []={DC8 ,DC8 ,DC8 ,ET8 ,DC8 ,DC8 ,DC8 ,ER8 ,DC8 ,DC8 ,DC8 ,DC8 ,DC8 ,DC8 , 453 DC8 ,DC8 ,DC8 ,DC8 ,DC8 ,DC8 ,DC8 ,DC8 ,DC8 ,DC8 ,DC8 ,DC8 },/*er8*/ 454 er8a[]={NOP_,NOP_,NOP_,PER_,NOP_,SYS_,NOP_,GET_,NOP_,NOP_,NOP_,NOP_,SYS_,NOP_, 455 NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_}, 456 457 me8 []={ET8, ET8, ET8, ET8, ET8 ,ET8, ET8, ME8, ET8 ,ET8 ,ET8 ,ET8, ET8, ET8, 458 ET8 ,ET8, ET8 ,ET8, ET8, ME9 ,ET8, ET8, ET8, ET8 ,ET8, ET8 },/*me8*/ 459 me8a[]={DTE_,DTE_,DTE_,DTE_,DTE_,DTE_,DTE_,GET_,DTE_,DTE_,DTE_,DTE_,DTE_,DTE_, 460 DTE_,DTE_,DTE_,DTE_,DTE_,NOP_,DTE_,DTE_,DTE_,DTE_,DTE_,DTE_}, 461 462 me9 []={DC8, DC8, DC8, DC8, DC8 ,DC8, DC8, ME9, DC8 ,DC8 ,DC8 ,DC8, DC8, DC8, 463 DC8 ,DC8, DC8 ,DC8, DC8, DC8 ,DC8, DC8, DC8, DC8 ,ET8, DC8 },/*me9*/ 464 me9a[]={NOP_,NOP_,NOP_,NOP_,NOP_,SYS_,NOP_,GET_,NOP_,NOP_,NOP_,NOP_,SYS_,NOP_, 465 NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,MSE_,NOP_}, 466 467 /* free nu nmc nms spc non ee eob rs re sep cde nsc ero 468 nmre com eti net mdo msc mso pero pio rni tagc tago */ 469 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8 ,DC8 ,DC8 ,DC8 ,ET8 },/*dc8*/ 486 dc8a[]={NOP_,NOP_,NOP_,NOP_,NOP_,SYS_,GET_,GET_,RS_ ,NOP_,NOP_,NOP_,SYS_,NOP_, 487 NOP_,NOP_,NOP_,NOP_,NOP_,CIR_,NOP_,CIR_,NOP_,NOP_,NOP_,CIR_}, 488 489 *mdstab[] = {et8, et8a, er8, er8a, me8, me8a, me9, me9a, 490 es8, es8a, md8, md8a, mc8, mc8a, dc8, dc8a}; 491 struct parse pcbmds = {"MDS", lexcon, mdstab, 0, 0, 0, 0}; 492 #undef ET8 493 #undef ER8 494 #undef ME8 495 #undef ME9 496 #undef ES8 497 #undef MD8 498 #undef MC8 499 #undef DC8 500 /* PCBGRCM: State and action table for content model group. 501 Groups can nest. Reserved names are allowed. 502 Data tag token groups are allowed. 503 A non-reserved name or model group can have a suffix. 504 Columns are based on LEXGRP.C. 505 */ 506 /* Symbols for state names (end with a number). */ 507 #define TK1 0 /* Token expected: name, #CHARS, data tag grp, model. */ 508 #define CO1 2 /* Connector between tokens expected. */ 509 #define ER1 4 /* PERO found when token was expected. */ 510 #define SP1 6 /* Name or model: suffix or connector expected. */ 511 #define RN1 8 /* RNI found; possible #PCDATA. */ 512 #define DG1 10 /* Data tag: group begun; name expected. */ 513 #define DN1 12 /* Data tag: name found; SEQ connector expected. */ 514 #define DT1 14 /* Data tag: ignore template and pattern; MSC expected. */ 515 #define DR1 16 /* PERO found when data tag name was expected. */ 516 #define LI1 18 /* Literal in data tag group; search for LIT. */ 517 #define LA1 20 /* Literal in data tag group; search for LITA. */ 518 519 static UNCH 520 /* bit nmc nms re spc non ee eob rs and grpc grpo lit lita 521 dtgc dtgo opt or pero plus rep rni seq refc */ 522 tk01 []={TK1 ,TK1 ,SP1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 , 523 TK1 ,DG1 ,TK1 ,TK1 ,ER1 ,TK1 ,TK1 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S_,EOF_,GET_,RS_ ,NOP_,NOP_,NOP_,NOP_,NOP_, 579 NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_}, 580 581 *grcmtab[] = {tk01, tk01a, co01, co01a, er01, er01a, sp01, sp01a, 582 rn01, rn01a, dg01, dg01a, dn01, dn01a, dt01, dt01a, 583 dr01, dr01a, li01, li01a, la01, la01a}; 584 struct parse pcbgrcm = {"GRCM", lexgrp, grcmtab, 0, 0, 0, 0}; 585 #undef TK1 586 #undef CO1 587 #undef ER1 588 #undef SP1 589 #undef RN1 590 #undef DG1 591 #undef DN1 592 #undef DT1 593 #undef DR1 594 #undef LI1 595 #undef LA1 596 /* PCBGRCS: State and action table for content model suffix. 597 If suffix occurs, process it. Otherwise, put character 598 back for the next parse. 599 */ 600 /* Symbols for state names (end with a number). */ 601 #define SP4 0 /* Suffix expected. */ 602 603 static UNCH 604 /* bit nmc nms re spc non ee eob rs and grpc grpo lit lita 605 dtgc dtgo opt or pero plus rep rni seq refc */ 606 sp04 []={SP4 ,SP4 ,SP4 ,SP4 ,SP4 ,SP4 ,SP4 ,SP4 ,SP4 ,SP4 ,SP4 ,SP4 ,SP4 ,SP4 , 607 SP4 ,SP4 ,SP4 ,SP4 ,SP4 ,SP4 ,SP4 ,SP4 ,SP4 ,SP4 },/*sp4*/ 608 sp04a[]={RCR_,RCR_,RCR_,RCR_,RCR_,SYS_,EE_ ,GET_,RCR_,RCR_,RCR_,RCR_,RCR_,RCR_, 609 RCR_,RCR_,OPT ,RCR_,RCR_,REP ,OREP,RCR_,RCR_,RCR_}, 610 611 *grcstab[] = {sp04, sp04a}; 612 struct parse pcbgrcs = {"GRCS", lexgrp, grcstab, 0, 0, 0, 0}; 613 #undef SP4 614 /* PCBGRNT: State and action table for name token group parse. 615 Groups cannot nest. Reserved names are not allowed. 616 No suffixes or data tag pattern groups. 617 */ 618 /* Symbols for state names (end with a number). */ 619 #define TK1 0 /* Token expected: name, #CHARS, data tag grp, model. */ 620 #define CO1 2 /* Connector between tokens expected. */ 621 #define ER1 4 /* PERO found when token was expected. */ 622 623 static UNCH 624 /* bit nmc nms re spc non ee eob rs and grpc grpo lit lita 625 dtgc dtgo opt or pero plus rep rni seq refc */ 626 tk02 []={TK1 ,CO1 ,CO1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 , 627 TK1 ,TK1 ,TK1 ,TK1 ,ER1 ,TK1 ,TK1 ,TK1 ,TK1 ,CO1 },/*tk1*/ 628 tk02a[]={INV_,NMT_,NMT_,NOP_,NOP_,SYS_,EOF_,GET_,RS_ ,INV_,INV_,INV_,INV_,INV_, 629 INV_,INV_,INV_,INV_,NOP_,INV_,INV_,INV_,INV_,NMT_}, 630 631 co02 []={TK1 ,TK1 ,TK1 ,CO1 ,CO1 ,CO1 ,CO1 ,CO1 ,CO1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 , 632 TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 },/*co1*/ 633 co02a[]={INV_,INV_,INV_,NOP_,NOP_,SYS_,EE_ ,GET_,RS_ ,NOP_,GRPE,INV_,INV_,INV_, 634 INV_,INV_,INV_,NOP_,INV_,INV_,INV_,INV_,NOP_,INV_}, 635 636 er02 []={TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,ER1 ,TK1 ,ER1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 , 637 TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 },/*er1*/ 638 er02a[]={PCI_,PCI_,PER_,PCI_,PCI_,SYS_,PCI_,GET_,PCI_,PCI_,PCI_,PCI_,PCI_,PCI_, 639 PCI_,PCI_,PCI_,PCI_,PCI_,PCI_,PCI_,PCI_,PCI_,PCI_}, 640 641 *grnttab[] = {tk02, tk02a, co02, co02a, er02, er02a}; 642 struct parse pcbgrnt = {"GRNT", lexgrp, grnttab, 0, 0, 0, 0}; 643 #undef TK1 644 #undef CO1 645 #undef ER1 646 /* PCBGRNM: State and action table for name group parse. 647 Groups cannot nest. Reserved names are not allowed. 648 No suffixes or data tag pattern groups. 649 */ 650 /* Symbols for state names (end with a number). */ 651 #define TK1 0 /* Token expected: name, #CHARS, data tag grp, model. */ 652 #define CO1 2 /* Connector between tokens expected. */ 653 #define ER1 4 /* PERO found when token was expected. */ 654 655 static UNCH 656 /* bit nmc nms re spc non ee eob rs and grpc grpo lit lita 657 dtgc dtgo opt or pero plus rep rni seq refc */ 658 tk03 []={TK1 ,TK1 ,CO1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 , 659 TK1 ,TK1 ,TK1 ,TK1 ,ER1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 },/*tk1*/ 660 tk03a[]={INV_,INV_,NAS_,NOP_,NOP_,SYS_,EOF_,GET_,RS_ ,INV_,INV_,INV_,INV_,INV_, 661 INV_,INV_,INV_,INV_,NOP_,INV_,INV_,INV_,INV_,INV_}, 662 663 co03 []={TK1 ,TK1 ,TK1 ,CO1 ,CO1 ,CO1 ,CO1 ,CO1 ,CO1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 , 664 TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 },/*co1*/ 665 co03a[]={INV_,INV_,INV_,NOP_,NOP_,SYS_,EE_ ,GET_,RS_ ,NOP_,GRPE,INV_,INV_,INV_, 666 INV_,INV_,INV_,NOP_,INV_,INV_,INV_,INV_,NOP_,INV_}, 667 668 er03 []={TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,ER1 ,TK1 ,ER1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 , 669 TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 },/*er1*/ 670 er03a[]={PCI_,PCI_,PER_,PCI_,PCI_,SYS_,PCI_,GET_,PCI_,PCI_,PCI_,PCI_,PCI_,PCI_, 671 PCI_,PCI_,PCI_,PCI_,PCI_,PCI_,PCI_,PCI_,PCI_,PCI_}, 672 673 *grnmtab[] = {tk03, tk03a, co03, co03a, er03, er03a}; 674 struct parse pcbgrnm = {"GRNM", lexgrp, grnmtab, 0, 0, 0, 0}; 675 #undef TK1 676 #undef CO1 677 #undef ER1 678 /* PCBREF: State and action table to find the end of entity, parameter entity, 679 and character references. The opening delimiter and name 680 have already been found; the parse determines whether the 681 tokenization of the name ended normally and processes the REFC. 682 */ 683 /* Symbols for state names (end with a number). */ 684 #define ER5 0 /* Handle REFC or other entity reference termination. */ 685 #define ER6 2 /* Return to caller and reset state for next call. */ 686 687 static UNCH 688 /* bit nmc nms re spc non ee eob rs and grpc grpo lit lita 689 dtgc dtgo opt or pero plus rep rni seq refc */ 690 er05 []={ER5 ,ER6 ,ER6 ,ER6 ,ER5 ,ER5 ,ER5 ,ER5 ,ER5 ,ER5 ,ER5 ,ER5 ,ER5 ,ER5 , 691 ER5 ,ER5 ,ER5 ,ER5 ,ER5 ,ER5 ,ER5 ,ER5 ,ER5 ,ER6 },/*er5*/ 692 er05a[]={RCR_,LEN_,LEN_,NOP_,RCR_,SYS_,RCR_,GET_,RCR_,RCR_,RCR_,RCR_,RCR_,RCR_, 693 RCR_,RCR_,RCR_,RCR_,RCR_,RCR_,RCR_,RCR_,RCR_,NOP_}, 694 695 er06 []={ER5 ,ER5 ,ER5 ,ER5 ,ER5 ,ER5 ,ER5 ,ER5 ,ER5 ,ER5 ,ER5 ,ER5 ,ER5 ,ER5 , 696 ER5 ,ER5 ,ER5 ,ER5 ,ER5 ,ER5 ,ER5 ,ER5 ,ER5 ,ER5 },/*er6*/ 697 er06a[]={RCR_,RCR_,RCR_,RCR_,RCR_,RCR_,RCR_,RCR_,RCR_,RCR_,RCR_,RCR_,RCR_,RCR_, 698 RCR_,RCR_,RCR_,RCR_,RCR_,RCR_,RCR_,RCR_,RCR_,RCR_}, 699 700 *reftab[]={er05, er05a, er06, er06a}; 701 struct parse pcbref = {"ENTREF", lexgrp, reftab, 0, 0, 0, 0}; 702 #undef ER5 703 #undef ER6 704 /* 705 Use (typical) Name Ending Chsw References RS RE SEP 706 Parameter literal LITPC LIT/A OK Parm,Char RSM_ LAM_ LAM_ 707 Data tag template NO 708 System ID LITC LIT/A n/a none RSM_ LAM_ LAM_ 709 Processing instruction PIC 710 Attribute value LITRV LIT/A NO Gen,Char RS_ FUN_ FUN_ 711 Minimum literal LITV LIT/A n/a none RS_ FUN_ MLE_ 712 */ 713 /* PCBLITP: Literal parse with parameter and character references; 714 no function character translation. 715 */ 716 /* Symbols for state names (end with a number). */ 717 #define DA0 0 /* Data in buffer. */ 718 #define ER0 2 /* ERO found. */ 719 #define CR0 4 /* CRO found (ER0, RNI). */ 720 #define PR0 6 /* PRO found (for PCBLITP). */ 721 722 static UNCH 723 /* free num min nms spc non ee eob rs re sep cde nsc ero 724 mdo msc mso pero rni tagc tago litc */ 725 da13 []={DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,ER0 , 726 DA0 ,DA0 ,DA0 ,PR0 ,DA0 ,DA0 ,DA0 ,DA0 },/*da3*/ 727 da13a[]={MLA_,MLA_,MLA_,MLA_,MLA_,NON_,EE_ ,GET_,RSM_,MLA_,MLA_,MLA_,NSC_,NOP_, 728 MLA_,MLA_,MLA_,NOP_,MLA_,MLA_,MLA_,TER_}, 729 730 er13 []={DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,ER0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 , 731 DA0 ,DA0 ,DA0 ,DA0 ,CR0 ,DA0 ,DA0 ,DA0 },/*er3*/ 732 er13a[]={LPR_,LPR_,LPR_,LPR_,LPR_,LPR_,LPR_,GET_,LPR_,LPR_,LPR_,LPR_,LPR_,LPR_, 733 LPR_,LPR_,LPR_,LPR_,NOP_,LPR_,LPR_,LPR_}, 734 735 cr13 []={DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,CR0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 , 736 DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 },/*cr3*/ 737 cr13a[]={LP2_,CRN_,LP2_,CRA_,LP2_,LP2_,LP2_,GET_,LP2_,LP2_,LP2_,LP2_,LP2_,LP2_, 738 LP2_,LP2_,LP2_,LP2_,LP2_,LP2_,LP2_,LP2_}, 739 740 pr13 []={DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,PR0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 , 741 DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 },/*pr3*/ 742 pr13a[]={LPR_,LPR_,LPR_,PEX_,LPR_,LPR_,LPR_,GET_,LPR_,LPR_,LPR_,LPR_,LPR_,LPR_, 743 LPR_,LPR_,LPR_,LPR_,LPR_,LPR_,LPR_,LPR_}, 744 745 *litptab[] = {da13, da13a, er13, er13a, cr13, cr13a, pr13, pr13a}; 746 struct parse pcblitp = {"LITP", lexlms, litptab, 0, 0, 0, 0}; 747 #undef DA0 748 #undef ER0 749 #undef CR0 750 #undef PR0 751 /* PCBLITC: Literal parse; no references; no function char translation. 752 Used for character data (system data). 753 */ 754 /* Symbols for state names (end with a number). */ 755 #define DA0 0 /* Data in buffer. */ 756 757 static UNCH 758 /* free num min nms spc non ee eob rs re sep cde nsc ero 759 mdo msc mso pero rni tagc tago litc */ 760 da2 []={DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 , 761 DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 },/*da2*/ 762 da2a[]={MLA_,MLA_,MLA_,MLA_,MLA_,SYS_,EOF_,GET_,RSM_,MLA_,MLA_,MLA_,SYS_,MLA_, 763 MLA_,MLA_,MLA_,MLA_,MLA_,MLA_,MLA_,TER_}, 764 765 *litctab[] = {da2, da2a}; 766 struct parse pcblitc = {"LITC", lexlms, litctab, 0, 0, 0, 0}; 767 #undef DA0 768 /* PCBLITR: Attribute value parse; general and character references; 769 function chars are translated. 770 */ 771 /* Symbols for state names (end with a number). */ 772 #define DA0 0 /* Data in buffer. */ 773 #define ER0 2 /* ERO found. */ 774 #define CR0 4 /* CRO found (ER0, RNI). */ 775 776 static UNCH 777 /* free num min nms spc non ee eob rs re sep cde nsc ero 778 mdo msc mso pero rni tagc tago litc */ 779 da11 []={DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,ER0 , 780 DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 },/*da1*/ 781 da11a[]={MLA_,MLA_,MLA_,MLA_,MLA_,NON_,EE_ ,GET_,RS_ ,FUN_,FUN_,MLA_,NSC_,NOP_, 782 MLA_,MLA_,MLA_,MLA_,MLA_,MLA_,MLA_,TER_}, 783 784 er11 []={DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,ER0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 , 785 DA0 ,DA0 ,DA0 ,DA0 ,CR0 ,DA0 ,DA0 ,DA0 },/*er1*/ 786 er11a[]={LPR_,LPR_,LPR_,ERX_,LPR_,LPR_,LPR_,GET_,LPR_,LPR_,LPR_,LPR_,LPR_,LPR_, 787 LPR_,LPR_,LPR_,LPR_,NOP_,LPR_,LPR_,LPR_}, 788 789 cr11 []={DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,CR0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 , 790 DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 },/*cr1*/ 791 cr11a[]={LP2_,CRN_,LP2_,CRA_,LP2_,LP2_,LP2_,GET_,LP2_,LP2_,LP2_,LP2_,LP2_,LP2_, 792 LP2_,LP2_,LP2_,LP2_,LP2_,LP2_,LP2_,LP2_}, 793 794 *litrtab[] = {da11, da11a, er11, er11a, cr11, cr11a}; 795 struct parse pcblitr = {"LITR", lexlms, litrtab, 0, 0, 0, 0}; 796 #undef DA0 797 #undef ER0 798 #undef CR0 799 /* PCBLITV: Literal parse; no references; RS ignored; RE/SPACE sequences 800 become single SPACE. Only minimum data characters allowed. 801 */ 802 /* Symbols for state names (end with a number). */ 803 #define LS0 0 /* Leading SPACE or RE found. */ 804 #define VA0 2 /* Valid character found. */ 805 #define SP0 4 /* SPACE/RE sequence begun. */ 806 807 static UNCH 808 /* free num min nms spc non ee eob rs re sep cde nsc 809 litc */ 810 ls10 []={VA0 ,VA0 ,VA0 ,VA0 ,LS0 ,VA0 ,LS0 ,LS0 ,LS0 ,LS0 ,LS0 ,VA0 ,VA0 , 811 LS0 },/*ls0*/ 812 ls10a[]={MLE_,MLA_,MLA_,MLA_,NOP_,SYS_,EOF_,GET_,RS_ ,NOP_,MLE_,SYS_,SYS_, 813 TER_}, 814 va10 []={VA0 ,VA0 ,VA0 ,VA0 ,SP0 ,VA0 ,VA0 ,VA0 ,VA0 ,SP0 ,SP0 ,VA0 ,VA0 , 815 LS0 },/*va0*/ 816 da10a[]={MLE_,MLA_,MLA_,MLA_,MLA_,SYS_,EOF_,GET_,RS_ ,FUN_,MLE_,SYS_,SYS_, 817 TER_}, 818 sp10 []={VA0 ,VA0 ,VA0 ,VA0 ,SP0 ,VA0 ,VA0 ,SP0 ,SP0 ,SP0 ,SP0 ,VA0 ,VA0 , 819 LS0 },/*sp0*/ 820 sp10a[]={MLE_,MLA_,MLA_,MLA_,NOP_,SYS_,EOF_,GET_,RS_ ,NOP_,MLE_,SYS_,SYS_, 821 RPR_}, 822 823 *litvtab[] = {ls10, ls10a, va10, da10a, sp10, sp10a}; 824 struct parse pcblitv = {"LITV", lexmin, litvtab, 0, 0, 0, 0}; 825 #undef LS0 826 #undef VA0 827 #undef SP0 828 /* PCBLITT: Tokenized attribute value parse. 829 */ 830 831 /* PCBLITT: Attribute value parse; general and character references; 832 function chars are translated. 833 */ 834 /* Symbols for state names (end with a number). */ 835 #define SP0 0 /* Ignore spaces */ 836 #define DA0 2 /* Data character */ 837 #define ER0 4 /* ERO found; ignore space */ 838 #define ER1 6 /* ERO found; don't ignore space */ 839 #define CR0 8 /* CRO found (ER0, RNI); ignore space */ 840 #define CR1 10 /* CR0 found; don't ignore space */ 841 842 int pcblittda = DA0; 843 844 static UNCH 845 /* free num min nms spc non ee eob rs re sep cde nsc ero 846 mdo msc mso pero rni tagc tago litc */ 847 848 sp14 []={DA0 ,DA0 ,DA0 ,DA0 ,SP0 ,DA0 ,DA0 ,SP0 ,SP0 ,SP0 ,SP0 ,DA0 ,DA0 ,ER0 , 849 DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 },/*sp0*/ 850 sp14a[]={MLA_,MLA_,MLA_,MLA_,NOP_,NON_,EE_ ,GET_,RS_ ,NOP_,NOP_,MLA_,NSC_,NOP_, 851 MLA_,MLA_,MLA_,MLA_,MLA_,MLA_,MLA_,TER_}, 852 853 da14 []={DA0 ,DA0 ,DA0 ,DA0 ,SP0 ,DA0 ,DA0 ,DA0 ,DA0 ,SP0 ,SP0 ,DA0 ,DA0 ,ER1 , 854 DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,SP0 },/*da0*/ 855 da14a[]={MLA_,MLA_,MLA_,MLA_,MLA_,NON_,EE_ ,GET_,RS_ ,FUN_,FUN_,MLA_,NSC_,NOP_, 856 MLA_,MLA_,MLA_,MLA_,MLA_,MLA_,MLA_,TER_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2_,LP2_,LP2_,LP2_,LP2_,LP2_, 876 LP2_,LP2_,LP2_,LP2_,LP2_,LP2_,LP2_,LP2_}, 877 878 *litttab[] = {sp14, sp14a, da14, da14a, er14, er14a, er15, er15a, cr14, cr14a, 879 cr15, cr15a}; 880 struct parse pcblitt = {"LITT", lexlms, litttab, 0, 0, 0, 0}; 881 #undef SP0 882 #undef DA0 883 #undef ER0 884 #undef ER1 885 #undef CR0 886 #undef CR1 887 /* PCBMD: State and action table for markup declaration tokenization. 888 Columns are based on LEXMARK.C. 889 */ 890 /* Symbols for state names (end with a number). */ 891 #define SP1 0 /* Separator before token expected (but not -). */ 892 #define SP2 2 /* Separator before token expected. */ 893 #define TK1 4 /* Token expected. */ 894 #define CM1 6 /* COM[1] found: possible comment, MGRP, or minus.*/ 895 #define CM2 8 /* COM[2] found; in comment. */ 896 #define CM3 10 /* Ending COM[1] found; end comment or continue it. */ 897 #define PR1 12 /* PERO found when token was expected. */ 898 #define PX1 14 /* PLUS found: PGRP or error. */ 899 #define RN1 16 /* RNI found; possible reserved name start. */ 900 901 int pcbmdtk = TK1; /* PCBMD: token expected. */ 902 903 static UNCH 904 /* bit nmc num nms spc non ee eob rs com eti grpo lit lita 905 dso dsc pero plus refc rni tagc tago vi */ 906 sp21 []={SP1 ,SP1 ,SP1 ,SP1 ,TK1 ,SP1 ,TK1 ,SP1 ,TK1 ,SP1 ,SP1 ,TK1 ,TK1 ,TK1 , 907 TK1 ,SP1 ,PR1 ,PX1 ,SP1 ,RN1 ,SP1 ,SP1 ,SP1 }, 908 sp21a[]={INV_,LEN_,LEN_,LEN_,NOP_,SYS_,EE_ ,GET_,RS_ ,LEN_,INV_,GRPS,LIT ,LITE, 909 MDS ,INV_,NOP_,NOP_,INV_,NOP_,EMD ,INV_,INV_}, 910 911 sp22 []={SP2 ,SP2 ,SP2 ,SP2 ,TK1 ,SP2 ,TK1 ,SP2 ,TK1 ,CM1 ,SP2 ,TK1 ,TK1 ,TK1 , 912 TK1 ,SP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 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 }, 953 rn21a[]={PCI_,PCI_,PCI_,RNS ,PCI_,SYS_,PCI_,GET_,PCI_,PCI_,PCI_,PCI_,PCI_,PCI_, 954 PCI_,PCI_,PCI_,PCI_,PCI_,PCI_,PCI_,PCI_,PCI_}, 955 956 *mdtab[] = {sp21, sp21a, sp22, sp22a, tk21, tk21a, cm21, cm21a, cm22, cm22a, 957 cm23, cm23a, pr21, pr21a, px21, px21a, rn21, rn21a}; 958 struct parse pcbmd = {"MD", lexmark, mdtab, 0, 0, 0, 0}; 959 #undef SP1 960 #undef SP2 961 #undef TK1 962 #undef CM1 963 #undef CM2 964 #undef CM3 965 #undef PR1 966 #undef PX1 967 #undef RN1 968 /* PCBMDC: State and action table for comment declaration. 969 */ 970 /* Symbols for state names (end with a number). */ 971 #define CD2 0 /* COM[2] found; in comment. */ 972 #define CD3 2 /* Ending COM[1] found; end comment or continue it. */ 973 #define EM1 4 /* Ending COM[2] found; start new comment or end. */ 974 #define CD1 6 /* COM[1] found; new comment or error. */ 975 976 static UNCH 977 /* bit nmc num nms spc non ee eob rs com eti grpo lit lita 978 dso dsc pero plus refc rni tagc tago vi */ 979 cd22 []={CD2 ,CD2 ,CD2 ,CD2 ,CD2 ,CD2 ,CD2 ,CD2 ,CD2 ,CD3 ,CD2 ,CD2 ,CD2 ,CD2 , 980 CD2 ,CD2 ,CD2 ,CD2 ,CD2 ,CD2 ,CD2 ,CD2 ,CD2 }, 981 cd22a[]={NOP_,NOP_,NOP_,NOP_,NOP_,SYS_,EOF_,GET_,RS_ ,NOP_,NOP_,NOP_,NOP_,NOP_, 982 NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_}, 983 984 cd23 []={CD2 ,CD2 ,CD2 ,CD2 ,CD2 ,CD3 ,CD2 ,CD3 ,CD2 ,EM1 ,CD2 ,CD2 ,CD2 ,CD2 , 985 CD2 ,CD2 ,CD2 ,CD2 ,CD2 ,CD2 ,CD2 ,CD2 ,CD2 }, 986 cd23a[]={NOP_,NOP_,NOP_,NOP_,NOP_,SYS_,EOF_,GET_,RS_ ,NOP_,NOP_,NOP_,NOP_,NOP_, 987 NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_}, 988 989 em21 []={CD2 ,CD2 ,CD2 ,CD2 ,EM1 ,EM1 ,CD2 ,EM1 ,EM1 ,CD1 ,CD2 ,CD2 ,CD2 ,CD2 , 990 CD2 ,CD2 ,CD2 ,CD2 ,CD2 ,CD2 ,CD2 ,CD2 ,CD2 }, 991 em21a[]={INV_,INV_,INV_,INV_,NOP_,SYS_,EOF_,GET_,RS_ ,NOP_,INV_,INV_,INV_,INV_, 992 INV_,INV_,INV_,INV_,INV_,INV_,EMD ,INV_,INV_}, 993 994 cd21 []={CD2 ,CD2 ,CD2 ,CD2 ,CD2 ,CD1 ,CD2 ,CD1 ,CD2 ,CD2 ,CD2 ,CD2 ,CD2 ,CD2 , 995 CD2 ,CD2 ,CD2 ,CD2 ,CD2 ,CD2 ,CD2 ,CD2 ,CD2 }, 996 cd21a[]={PCI_,PCI_,PCI_,PCI_,PCI_,SYS_,EOF_,GET_,PCI_,NOP_,PCI_,PCI_,PCI_,PCI_, 997 PCI_,PCI_,PCI_,PCI_,PCI_,PCI_,PCI_,PCI_,PCI_}, 998 999 *mdctab[] = {cd22, cd22a, cd23, cd23a, em21, em21a, cd21, cd21a}; 1000 struct parse pcbmdc = {"MDC", lexmark, mdctab, 0, 0, 0, 0}; 1001 #undef CD2 1002 #undef CD3 1003 #undef EM1 1004 #undef CD1 1005 /* PCBMDI: State and action table for ignoring markup declarations. 1006 Literals are handled properly so a TAGC won't end the declaration. 1007 An error is noted if the entity ends within a declaration that 1008 is being ignored. 1009 TO DO: Handle nested declaration sets. 1010 */ 1011 /* Symbols for state names (end with a number). */ 1012 #define NC1 0 /* Not in a comment; TAGC ends declaration. */ 1013 #define IC1 2 /* COM[1] found; possible comment. */ 1014 #define IC2 4 /* COM[2] found; in comment. */ 1015 #define IC3 6 /* Ending COM[1] found; end comment or continue it. */ 1016 #define LI1 8 /* Literal parameter; search for LIT. */ 1017 #define LA1 10 /* Literal parameter; search for LITA. */ 1018 1019 static UNCH 1020 /* bit nmc num nms spc non ee eob rs com eti grpo lit lita 1021 dso dsc pero plus refc rni tagc tago vi */ 1022 nc21 []={NC1 ,NC1 ,NC1 ,NC1 ,NC1 ,NC1 ,NC1 ,NC1 ,NC1 ,IC1 ,NC1 ,NC1 ,LI1 ,LA1 , 1023 NC1 ,NC1 ,NC1 ,NC1 ,NC1 ,NC1 ,NC1 ,NC1 ,NC1 }, 1024 nc21a[]={NOP_,NOP_,NOP_,NOP_,NOP_,SYS_,EOF_,GET_,RS_ ,NOP_,NOP_,NOP_,NOP_,NOP_, 1025 NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,EMD ,NOP_,NOP_}, 1026 1027 ic21 []={NC1 ,NC1 ,NC1 ,NC1 ,NC1 ,IC1 ,NC1 ,IC1 ,NC1 ,IC2 ,NC1 ,NC1 ,LI1 ,LA1 , 1028 NC1 ,NC1 ,NC1 ,NC1 ,NC1 ,NC1 ,NC1 ,NC1 ,NC1 }, 1029 ic21a[]={NOP_,NOP_,NOP_,NOP_,NOP_,SYS_,EOF_,GET_,RS_ ,NOP_,NOP_,NOP_,NOP_,NOP_, 1030 NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,EMD ,NOP_,NOP_}, 1031 1032 ic22 []={IC2 ,IC2 ,IC2 ,IC2 ,IC2 ,IC2 ,NC1 ,IC2 ,IC2 ,IC3 ,IC2 ,IC2 ,IC2 ,IC2 , 1033 IC2 ,IC2 ,IC2 ,IC2 ,IC2 ,IC2 ,IC2 ,IC2 ,IC2 }, 1034 ic22a[]={NOP_,NOP_,NOP_,NOP_,NOP_,SYS_,EOF_,GET_,RS_ ,NOP_,NOP_,NOP_,NOP_,NOP_, 1035 NOP_,NOP_,NOP_,NOP_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}; 1056 struct parse pcbmdi = {"MDI", lexmark, mditab, 0, 0, 0, 0}; 1057 #undef NC1 1058 #undef IC1 1059 #undef IC2 1060 #undef IC3 1061 #undef LI1 1062 #undef LA1 1063 /* PCBMSRC: State and action table for marked section in RCDATA mode. 1064 Nested marked sections are not recognized; the first MSE ends it. 1065 Initial state assumes an MS declaration was processed. 1066 Columns are based on LEXLMS.C but LITC column needn't exist. 1067 */ 1068 /* Symbols for state names (end with a number). */ 1069 #define ET0 0 /* MSS processed or buffer flushed; no data. */ 1070 #define DA0 2 /* Data in buffer. */ 1071 #define ER0 4 /* ERO found; start lookahead buffer. */ 1072 #define CR0 6 /* CRO found (ER0, RNI). */ 1073 #define ME0 8 /* MSC found. */ 1074 #define ME1 10 /* MSC, MSC found. */ 1075 1076 static UNCH 1077 /* free nu min nms spc non ee eob rs re sep cde nsc ero 1078 mdo msc mso pero rni tagc tago litc */ 1079 et30 []={DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,ET0 ,ET0 ,ET0 ,ET0 ,ET0 ,DA0 ,DA0 ,ET0 ,ER0 , 1080 DA0 ,ME0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 },/*et0*/ 1081 et30a[]={DAS_,DAS_,DAS_,DAS_,DAS_,NON_,EE_ ,GET_,RS_ ,REF_,DAS_,DAS_,NSC_,LAS_, 1082 DAS_,LAS_,DAS_,DAS_,DAS_,DAS_,DAS_,DAS_}, 1083 1084 da30 []={DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,ET0 ,ET0 ,ET0 ,ET0 ,ET0 ,DA0 ,DA0 ,ET0 ,ET0 , 1085 DA0 ,ET0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 ,DA0 },/*da0*/ 1086 da30a[]={NOP_,NOP_,NOP_,NOP_,NOP_,DAF_,DAF_,DAF_,DAF_,DAF_,NOP_,NOP_,DAF_,DAF_, 1087 NOP_,DAF_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_}, 1088 1089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AF_,LAF_,GET_,LAF_,LAF_,LAF_,LAF_,LAF_,LAF_, 1109 LAF_,LAF_,LAF_,LAF_,LAF_,MSE_,LAF_,LAF_}, 1110 1111 *msrctab[]={et30, et30a, da30, da30a, er30, er30a, cr30, cr30a, 1112 me30, me30a, me31, me31a}; 1113 struct parse pcbmsrc = {"MSRCDATA", lexlms, msrctab, 0, 0, 0, 0}; 1114 #undef ET0 1115 #undef DA0 1116 #undef ER0 1117 #undef CR0 1118 #undef ME0 1119 #undef ME1 1120 /* PCBMSC: State and action table for marked section in CDATA mode. 1121 Nested marked sections are not recognized; the first MSE ends it. 1122 Initial state assumes an MS declaration was processed. 1123 */ 1124 /* Symbols for state names (end with a number). */ 1125 #define ET2 0 /* MSS processed or buffer flushed; no data. */ 1126 #define DA2 2 /* Data in buffer. */ 1127 #define ME2 4 /* MSC found. */ 1128 #define ME3 6 /* MSC, MSC found. */ 1129 1130 static UNCH 1131 /* free nu min nms spc non ee eob rs re sep cde nsc ero 1132 mdo msc mso pero rni tagc tago litc */ 1133 et32 []={DA2 ,DA2 ,DA2 ,DA2 ,DA2 ,ET2 ,ET2 ,ET2 ,ET2 ,ET2 ,DA2 ,DA2 ,ET2 ,DA2 , 1134 DA2 ,ME2 ,DA2 ,DA2 ,DA2 ,DA2 ,DA2 ,DA2 },/*et2*/ 1135 et32a[]={DAS_,DAS_,DAS_,DAS_,DAS_,NON_,EOF_,GET_,RS_ ,REF_,DAS_,DAS_,NSC_,DAS_, 1136 DAS_,LAS_,DAS_,DAS_,DAS_,DAS_,DAS_,DAS_}, 1137 1138 da32 []={DA2 ,DA2 ,DA2 ,DA2 ,DA2 ,ET2 ,ET2 ,ET2 ,ET2 ,ET2 ,DA2 ,DA2 ,ET2 ,DA2 , 1139 DA2 ,ET2 ,DA2 ,DA2 ,DA2 ,DA2 ,DA2 ,DA2 },/*da2*/ 1140 da32a[]={NOP_,NOP_,NOP_,NOP_,NOP_,DAF_,DAF_,DAF_,DAF_,DAF_,NOP_,NOP_,DAF_,NOP_, 1141 NOP_,DAF_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_}, 1142 1143 me32 []={ET2, ET2, ET2, ET2, ET2 ,ET2, ET2, ME2, ET2 ,ET2 ,ET2 ,ET2, ET2 ,ET2 , 1144 ET2, ME3, ET2 ,ET2, ET2 ,ET2, ET2, ET2,},/*me2*/ 1145 me32a[]={LAF_,LAF_,LAF_,LAF_,LAF_,LAF_,LAF_,GET_,LAF_,LAF_,LAF_,LAF_,LAF_,LAF_, 1146 LAF_,LAM_,LAF_,LAF_,LAF_,LAF_,LAF_,LAF_}, 1147 1148 me33 []={ET2, ET2, ET2, ET2, ET2 ,ET2, ET2, ME3, ET2 ,ET2 ,ET2 ,ET2, ET2 ,ET2 , 1149 ET2, ET2, ET2 ,ET2, ET2 ,ET2, ET2, ET2,},/*me3*/ 1150 me33a[]={LAF_,LAF_,LAF_,LAF_,LAF_,LAF_,LAF_,GET_,LAF_,LAF_,LAF_,LAF_,LAF_,LAF_, 1151 LAF_,LAF_,LAF_,LAF_,LAF_,MSE_,LAF_,LAF_}, 1152 1153 *msctab[]={et32, et32a, da32, da32a, me32, me32a, me33, me33a}; 1154 struct parse pcbmsc = {"MSCDATA", lexlms, msctab, 0, 0, 0, 0}; 1155 #undef ET2 1156 #undef DA2 1157 #undef ME2 1158 #undef ME3 1159 /* PCBMSI: State and action table for marked section in IGNORE mode. 1160 Nested marked sections are recognized; the matching MSE ends it. 1161 Initial state assumes an MS declaration, MSS, or MSE was processed. 1162 */ 1163 /* Symbols for state names (end with a number). */ 1164 #define ET4 0 /* Markup found or buffer flushed; no data. */ 1165 #define ME4 2 /* MSC found. */ 1166 #define ME5 4 /* MSC, MSC found. */ 1167 #define ES4 6 /* TAGO found. */ 1168 #define MD4 8 /* MDO found (TAGO, MDO[2]). */ 1169 1170 static UNCH 1171 /* free nu min nms spc non ee eob rs re sep cde nsc ero 1172 mdo msc mso pero rni tagc tago litc refc */ 1173 et34 []={ET4 ,ET4 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P_,SYS_,EOF_,GET_,RS_ ,NOP_,NOP_,NOP_,SYS_,NOP_, 1193 NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_,NOP_}, 1194 1195 md34 []={ET4, ET4, ET4, ET4, ET4 ,MD4, ET4, MD4, ET4 ,ET4 ,ET4 ,ET4, ET4, ET4 , 1196 ET4, ET4 ,ET4, ET4, ET4 ,ET4, ET4, ET4,},/*md4*/ 1197 md34a[]={NOP_,NOP_,NOP_,NOP_,NOP_,SYS_,EOF_,GET_,RS_ ,NOP_,NOP_,NOP_,SYS_,NOP_, 1198 NOP_,NOP_,MSS_,NOP_,NOP_,NOP_,NOP_,NOP_}, 1199 1200 *msitab[]={et34, et34a, me34, me34a, me35, me35a, es34, es34a, md34, md34a}; 1201 struct parse pcbmsi = {"MSIGNORE", lexlms, msitab, 0, 0, 0, 0}; 1202 #undef ET4 1203 #undef ME4 1204 #undef ME5 1205 #undef ES4 1206 #undef MD4 1207 #undef NS4 1208 /* PCBSTAG: State and action table for start-tag parse. 1209 Columns are based on LEXMARK.C. 1210 */ 1211 /* Symbols for state names (end with a number). */ 1212 #define SP1 0 /* Separator before name expected. */ 1213 #define AN1 2 /* Attribute name expected. */ 1214 #define SP2 4 /* Separator or value indicator expected. */ 1215 #define VI1 6 /* Value indicator expected. */ 1216 #define AV1 8 /* Attribute value expected. */ 1217 1218 int pcbstan = AN1; /* PCBSTAG: attribute name expected. */ 1219 1220 static UNCH 1221 /* bit nmc num nms spc non ee eob rs com eti grpo lit lita 1222 dso dsc pero plus refc rni tagc tago vi */ 1223 sp41 []={SP1 ,SP1 ,SP1 ,SP1 ,AN1 ,SP1 ,SP1 ,SP1 ,AN1 ,SP1 ,SP1 ,SP1 ,SP1 ,SP1 , 1224 SP1 ,SP1 ,SP1 ,SP1 ,SP1 ,SP1 ,SP1 ,SP1 ,SP1 }, 1225 sp41a[]={INV_,LEN_,LEN_,LEN_,NOP_,SYS_,EOF_,GET_,RS_ ,LEN_,ETIC,INV_,IN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1 ,SP1 ,SP1 ,SP1 ,SP1 ,SP1 ,SP1 ,SP1 ,SP1 }, 1247 av41a[]={INV_,AVU ,AVU ,AVU ,NOP_,SYS_,EOF_,GET_,RS_ ,AVU ,INV_,INV_,AVD ,AVDA, 1248 INV_,INV_,INV_,INV_,INV_,INV_,INV_,INV_,INV_}, 1249 1250 *stagtab[] = {sp41, sp41a, an41, an41a, sp42, sp42a, vi41, vi41a, av41, av41a}; 1251 struct parse pcbstag = {"STAG", lexmark, stagtab, 0, 0, 0, 0}; 1252 #undef SP1 1253 #undef AN1 1254 #undef SP2 1255 #undef VI1 1256 #undef AV1 1257 /* PCBETAG: State and action table for end-tag parse. 1258 */ 1259 #define TC1 0 /* Tag close expected (no attributes allowed). */ 1260 1261 static UNCH 1262 /* bit nmc nu nms spc non ee eob rs com eti grpo lit lita 1263 dso dsc pero plus refc rni tagc tago vi */ 1264 tc41 []={TC1 ,TC1 ,TC1 ,TC1 ,TC1 ,TC1 ,TC1 ,TC1 ,TC1 ,TC1 ,TC1 ,TC1 ,TC1 ,TC1 , 1265 TC1 ,TC1 ,TC1 ,TC1 ,TC1 ,TC1 ,TC1 ,TC1 ,TC1 },/*tc1*/ 1266 tc41a[]={INV_,INV_,INV_,INV_,NOP_,SYS_,EOF_,GET_,RS_ ,INV_,INV_,INV_,INV_,INV_, 1267 INV_,INV_,INV_,INV_,INV_,INV_,TAGC,TAGO,INV_}, 1268 1269 *etagtab[] = {tc41, tc41a}; 1270 struct parse pcbetag = {"ETAG", lexmark, etagtab, 0, 0, 0, 0}; 1271 #undef TC1 1272 /* PCBVAL: State and action table for tokenizing attribute values. 1273 Columns are based on lextoke (but EOB cannot occur). 1274 */ 1275 /* Symbols for state names (end with a number). */ 1276 #define TK1 0 /* Token expected. */ 1277 #define SP1 2 /* Separator before token expected. */ 1278 1279 static UNCH 1280 /* inv rec sep sp nmc nms nu eob */ 1281 tk51 []={TK1 ,TK1 ,TK1 ,TK1 ,SP1 ,SP1 ,SP1 },/*tk1*/ 1282 tk51a[]={INVA,INVA,INVA,NOPA,NMTA,NASA,NUMA}, 1283 1284 sp51 []={TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 ,TK1 },/*sp1*/ 1285 sp51a[]={INVA,INVA,INVA,NOPA,LENA,LENA,LENA}, 1286 1287 *valtab[] = {tk51, tk51a, sp51, sp51a}; 1288 struct parse pcbval = {"VAL", lextoke, valtab, 0, 0, 0, 0}; 1289 #undef TK1 1290 #undef SP1 1291 /* PCBEAL: State and action table for end of attribute specification list. 1292 If delimiter occurs, process it. Otherwise, put invalid character 1293 back for the next parse. 1294 */ 1295 /* Symbols for state names (end with a number). */ 1296 #define AL0 0 /* Delimiter expected. */ 1297 1298 static UNCH 1299 /* bit nmc nms re spc non ee eob rs and grpc grpo lit lita 1300 dtgc dtgo opt or pero plus rep rni seq refc */ 1301 al00 []={AL0 ,AL0 ,AL0 ,AL0 ,AL0 ,AL0 ,AL0 ,AL0 ,AL0 ,AL0 ,AL0 ,AL0 ,AL0 ,AL0 , 1302 AL0 ,AL0 ,AL0 ,AL0 ,AL0 ,AL0 ,AL0 ,AL0 ,AL0 ,AL0 },/*al0*/ 1303 al00a[]={INV_,INV_,INV_,INV_,INV_,SYS_,EE_ ,GET_,INV_,INV_,INV_,INV_,INV_,INV_, 1304 GRPE,INV_,INV_,INV_,INV_,INV_,INV_,INV_,INV_,INV_}, 1305 1306 *ealtab[] = {al00, al00a}; 1307 struct parse pcbeal = {"EAL", lexgrp, ealtab, 0, 0, 0, 0}; 1308 #undef AL0 1309 1310 /* PCBSD: State and action tables for SGML declaration parsing. */ 1311 1312 /* Symbols for state names. */ 1313 1314 #define SP1 0 /* Separator before token expected (but not -) */ 1315 #define SP2 2 /* Separator before token expected. */ 1316 #define TK1 4 /* Token expected. */ 1317 #define CM1 6 /* COM[1] found: possible comment.*/ 1318 #define CM2 8 /* COM[2] found; in comment. */ 1319 #define CM3 10 /* Ending COM[1] found; end comment or continue it. */ 1320 static UNCH 1321 /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