home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 10
/
Fresh_Fish_10_2352.bin
/
new
/
dev
/
lang
/
sgmls
/
src
/
lextaba.c
< prev
next >
Wrap
Text File
|
1994-07-10
|
40KB
|
751 lines
/* lextaba.c: lexical tables for ASCII. */
/* These tables are munged by setnonsgml(). */
#include "config.h"
#include "entity.h"
#include "lexcode.h"
#include "sgmldecl.h"
/* LEXCNM: Lexical table for mixed content (PCBCONM) parse.
*/
/* Symbols for SGML character set divisions and function characters. */
#define NU 1 /* NUMERAL Numerals */
#define NMC 2 /* LC/UCNMCHAR . - Period and hyphen */
#define NMS 3 /* LC/UCNMSTRT Lower and uppercase letters */
#define SPC 4 /* SPACE 32 Space */
#define NON 5 /* NONSGML 0-31 127 255 Unused, except for: */
#define EE 6 /* NONSGML 00 26 Entity end (end of file) */
#define EOB 7 /* NONSGML 28 End disk buffer */
#define RS 8 /* Function 10 Line feed */
#define RE 9 /* Function 13 Carrier return */
#define SEP 10 /* SEPCHAR 09 TAB: horizontal tab */
#define NSC 12 /* NONSGML delnonch Non-SGML character prefix */
/* Symbols for SGML delimiter roles in CON and CXT.
ETI and NET must be the same in LEXCNM and LEXCON.
FRE characters are changed to FCE if an FCE entity is declared.
They are changed back to FRE when the entity is canceled.
*/
#define ERO 13 /* & Also CRO[1] */
#define NMRE 14 /* 08 Generated non-markup RE */
#define COM 15 /* - For MDO context; also SR19 and SR20. */
#undef LIT1
#define LIT1 18 /* " SR10 */
#define MDO 20 /* ! Actually MDO[2] */
#define MSC1 21 /* ] Both MSC[1] and MSC[2]; also SR26. */
#define MSO 22 /* [ For MDO context; also SR25. */
#define PIO 23 /* ? Actually PIO[2] */
#define RNI 24 /* # For CRO[2]; also SR11. */
#define TGC1 25 /* > For TAGO and MSC context; also MDC, PIC */
#define TGO1 26 /* < TAGO; also MDO[1], PIO[1] */
UNCH lexcnm[256] = { /*
000 001 bs tab lf home ff cr so si */
EE, NON, NON, NON, NON, NON, NON, NON, NMRE,SEP, RS, NON, NON, RE, NON, NON, /*
eof esc rt left up down */
NON, NON, NON, NON, NON, NON, NON, NON, NON, NON, EE, NON, EOB, NON, NON, NSC, /*
032 ! " # $ % & ' ( ) * + , - . / */
SPC, MDO, LIT1,RNI, FRE, FRE ,ERO, FRE, FRE, FRE, FRE, FRE, FRE, COM, NMC, ETI, /*
0 1 2 3 4 5 6 7 8 9 : ; < = > ? */
NU , NU , NU , NU , NU , NU , NU , NU , NU , NU , FRE, FRE, TGO1,FRE, TGC1,PIO, /*
@ A B C D E F G H I J K L M N O */
FRE, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
P Q R S T U V W X Y Z [ \ ] ^ _ */
NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, MSO, FRE, MSC1,FRE, FRE, /*
` a b c d e f g h i j k l m n o */
FRE, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
p q r s t u v w x y z { | } ~ 127 */
NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, FRE, FRE, FRE, FRE, NON,
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, NON
};
/* free nu nmc nms spc non ee eob rs re sep cde nsc ero
nmre com eti lit spcr mdo msc mso net pio rni tagc tago fce */
#undef ERO
#undef NMRE
#undef COM
#undef LIT1
/* def SPCR*/
#undef MDO
#undef MSC1
#undef MSO
#undef PIO
#undef RNI
#undef TGC1
/* def TGO1*/
/* def FCE*/
/* LEXCON: Lexical table for RCDATA and CDATA content (PCBCON?),
prolog (PCBPRO), and nested declaration set (PCBMDS) parses.
Note: NMC is same as FRE; kept for consistency with LEXCNM and LEXLMS.
*/
/* Symbols for SGML character set divisions and function characters. */
/* Same as for LEXCNM. */
/* Symbols for SGML delimiter roles in CON, CXT, and DS.
ETI and NET must be the same in LEXCNM and LEXCON.
FRE characters are changed to FCE if an FCE entity is declared.
They are changed back to FRE when the entity is canceled.
*/
#define ERO 13 /* & Also CRO[1] */
#define NMRE 14 /* 08 Generated non-markup RE */
#define COM 15 /* - For MDO context. */
/*#define ETI 16 / Actually ETAGO[2] */
/*#define NET 17 / When enabled. */
#define MDO 18 /* ! Actually MDO[2] */
#define MSC2 19 /* ] Both MSC[1] and MSC[2]. */
#define MSO 20 /* [ For MDO context. */
#define PERO 21 /* % For prolog */
#define PIO 22 /* ? Actually PIO[2] */
#define RNI 23 /* # For CRO[2]. */
#define TGC2 24 /* > For TAGO and MSC context; also MDC, PIC */
UNCH lexcon[256] = { /*
000 001 bs tab lf home ff cr so si */
EE, NON, NON, NON, NON, NON, NON, NON, NMRE,SEP, RS, NON, NON, RE, NON, NON, /*
eof esc rt left up down */
NON, NON, NON, NON, NON, NON, NON, NON, NON, NON, EE, NON, EOB, NON, NON, NSC, /*
032 ! " # $ % & ' ( ) * + , - . / */
SPC, MDO, FRE, RNI, FRE, PERO,ERO, FRE, FRE, FRE, FRE, FRE, FRE, COM, NMC, ETI, /*
0 1 2 3 4 5 6 7 8 9 : ; < = > ? */
NU , NU , NU , NU , NU , NU , NU , NU , NU , NU , FRE, FRE, TGO2,FRE, TGC2,PIO, /*
@ A B C D E F G H I J K L M N O */
FRE, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
P Q R S T U V W X Y Z [ \ ] ^ _ */
NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, MSO, FRE, MSC2,FRE, FRE, /*
` a b c d e f g h i j k l m n o */
FRE, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
p q r s t u v w x y z { | } ~ 127 */
NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, FRE, FRE, FRE, FRE, NON,
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, NON
};
/* free nu nmc nms spc non ee eob rs re sep cde nsc ero
nmre com eti net mdo msc mso pero pio rni tagc tago */
#undef FRE
#undef NU
#undef NMC
#undef NMS
#undef SPC
#undef NON
#undef EE
#undef EOB
#undef RS
#undef RE
#undef SEP
#undef NSC
#undef ERO
#undef NMRE
#undef COM
/* def ETI*/
/* def NET*/
#undef MDO
#undef MSC2
#undef MSO
#undef PERO
#undef PIO
#undef RNI
#undef TGC2
/* LEXGRP: Lexical table for group parses, including PCBREF.
*/
/* Symbols for SGML character set divisions. */
#define BIT 0 /* Bit combinations (not NONCHAR) not allowed in a group. */
#define NMC 1 /* NAMECHAR . - Period, underscore, and numerals */
#define NMS 2 /* NAMESTRT Lower and uppercase letters */
#define RE 3 /* Function 13 Carrier return */
#define SPC 4 /* SPACE 32 09 Space; includes TAB *