home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / dev / lang / sgmls / src / lextaba.c < prev    next >
Encoding:
Text File  |  1994-07-10  |  38.7 KB  |  751 lines

  1. /* lextaba.c: lexical tables for ASCII. */
  2.  
  3. /* These tables are munged by setnonsgml(). */
  4.  
  5. #include "config.h"
  6. #include "entity.h"
  7. #include "lexcode.h"
  8. #include "sgmldecl.h"
  9.  
  10. /* LEXCNM: Lexical table for mixed content (PCBCONM) parse.
  11. */
  12. /* Symbols for SGML character set divisions and function characters. */
  13. #define NU      1   /* NUMERAL            Numerals */
  14. #define NMC     2   /* LC/UCNMCHAR . -    Period and hyphen */
  15. #define NMS     3   /* LC/UCNMSTRT        Lower and uppercase letters */
  16. #define SPC     4   /* SPACE     32       Space */
  17. #define NON     5   /* NONSGML   0-31 127 255 Unused, except for: */
  18. #define EE      6   /* NONSGML   00 26    Entity end (end of file) */
  19. #define EOB     7   /* NONSGML   28       End disk buffer */
  20. #define RS      8   /* Function  10       Line feed */
  21. #define RE      9   /* Function  13       Carrier return */
  22. #define SEP    10   /* SEPCHAR   09       TAB: horizontal tab */
  23. #define NSC    12   /* NONSGML   delnonch Non-SGML character prefix */
  24.  
  25. /* Symbols for SGML delimiter roles in CON and CXT.
  26.    ETI and NET must be the same in LEXCNM and LEXCON.
  27.    FRE characters are changed to FCE if an FCE entity is declared.
  28.    They are changed back to FRE when the entity is canceled.
  29. */
  30. #define ERO    13   /* &    Also CRO[1] */
  31. #define NMRE   14   /* 08   Generated non-markup RE */
  32. #define COM    15   /* -    For MDO context; also SR19 and SR20. */
  33. #undef LIT1
  34. #define LIT1   18   /* "    SR10 */
  35. #define MDO    20   /* !    Actually MDO[2] */
  36. #define MSC1   21   /* ]    Both MSC[1] and MSC[2]; also SR26. */
  37. #define MSO    22   /* [    For MDO context; also SR25. */
  38. #define PIO    23   /* ?    Actually PIO[2] */
  39. #define RNI    24   /* #    For CRO[2]; also SR11. */
  40. #define TGC1   25   /* >    For TAGO and MSC context; also MDC, PIC */
  41. #define TGO1   26   /* <    TAGO; also MDO[1], PIO[1] */
  42.  
  43. UNCH    lexcnm[256] = { /*
  44. 000  001                          bs   tab  lf   home ff   cr   so   si   */
  45. EE,  NON, NON, NON, NON, NON, NON, NON, NMRE,SEP, RS,  NON, NON, RE,  NON, NON, /*
  46.                                         eof  esc  rt   left up   down */
  47. NON, NON, NON, NON, NON, NON, NON, NON, NON, NON, EE,  NON, EOB, NON, NON, NSC, /*
  48. 032  !    "    #    $    %    &    '    (    )    *    +    ,    -    .    /    */
  49. SPC, MDO, LIT1,RNI, FRE, FRE ,ERO, FRE, FRE, FRE, FRE, FRE, FRE, COM, NMC, ETI, /*
  50. 0    1    2    3    4    5    6    7    8    9    :    ;    <    =    >    ?    */
  51. NU , NU , NU , NU , NU , NU , NU , NU , NU , NU , FRE, FRE, TGO1,FRE, TGC1,PIO, /*
  52. @    A    B    C    D    E    F    G    H    I    J    K    L    M    N    O    */
  53. FRE, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
  54. P    Q    R    S    T    U    V    W    X    Y    Z    [    \    ]    ^    _    */
  55. NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, MSO, FRE, MSC1,FRE, FRE, /*
  56. `    a    b    c    d    e    f    g    h    i    j    k    l    m    n    o    */
  57. FRE, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
  58. p    q    r    s    t    u    v    w    x    y    z    {    |    }    ~    127  */
  59. NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, FRE, FRE, FRE, FRE, NON,
  60. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
  61. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
  62. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
  63. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
  64. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
  65. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
  66. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
  67. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, NON
  68. };
  69. /*      free nu   nmc  nms  spc  non  ee   eob  rs   re   sep  cde  nsc  ero
  70.         nmre com  eti  lit  spcr mdo  msc  mso  net  pio  rni  tagc tago fce   */
  71. #undef ERO
  72. #undef NMRE
  73. #undef COM
  74. #undef LIT1
  75. /* def SPCR*/
  76. #undef MDO
  77. #undef MSC1
  78. #undef MSO
  79. #undef PIO
  80. #undef RNI
  81. #undef TGC1
  82. /* def TGO1*/
  83. /* def FCE*/
  84. /* LEXCON: Lexical table for RCDATA and CDATA content (PCBCON?),
  85.            prolog (PCBPRO), and nested declaration set (PCBMDS) parses.
  86.    Note: NMC is same as FRE; kept for consistency with LEXCNM and LEXLMS.
  87. */
  88. /* Symbols for SGML character set divisions and function characters. */
  89. /* Same as for LEXCNM. */
  90.  
  91. /* Symbols for SGML delimiter roles in CON, CXT, and DS.
  92.    ETI and NET must be the same in LEXCNM and LEXCON.
  93.    FRE characters are changed to FCE if an FCE entity is declared.
  94.    They are changed back to FRE when the entity is canceled.
  95. */
  96. #define ERO    13   /* &    Also CRO[1] */
  97. #define NMRE   14   /* 08   Generated non-markup RE */
  98. #define COM    15   /* -    For MDO context. */
  99. /*#define ETI    16    /    Actually ETAGO[2] */
  100. /*#define NET    17    /    When enabled. */
  101. #define MDO    18   /* !    Actually MDO[2] */
  102. #define MSC2   19   /* ]    Both MSC[1] and MSC[2]. */
  103. #define MSO    20   /* [    For MDO context. */
  104. #define PERO   21   /* %    For prolog */
  105. #define PIO    22   /* ?    Actually PIO[2] */
  106. #define RNI    23   /* #    For CRO[2]. */
  107. #define TGC2   24   /* >    For TAGO and MSC context; also MDC, PIC */
  108.  
  109. UNCH    lexcon[256] = { /*
  110. 000  001                          bs   tab  lf   home ff   cr   so   si   */
  111. EE,  NON, NON, NON, NON, NON, NON, NON, NMRE,SEP, RS,  NON, NON, RE,  NON, NON, /*
  112.                                         eof  esc  rt   left up   down */
  113. NON, NON, NON, NON, NON, NON, NON, NON, NON, NON, EE,  NON, EOB, NON, NON, NSC, /*
  114. 032  !    "    #    $    %    &    '    (    )    *    +    ,    -    .    /    */
  115. SPC, MDO, FRE, RNI, FRE, PERO,ERO, FRE, FRE, FRE, FRE, FRE, FRE, COM, NMC, ETI, /*
  116. 0    1    2    3    4    5    6    7    8    9    :    ;    <    =    >    ?    */
  117. NU , NU , NU , NU , NU , NU , NU , NU , NU , NU , FRE, FRE, TGO2,FRE, TGC2,PIO, /*
  118. @    A    B    C    D    E    F    G    H    I    J    K    L    M    N    O    */
  119. FRE, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
  120. P    Q    R    S    T    U    V    W    X    Y    Z    [    \    ]    ^    _    */
  121. NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, MSO, FRE, MSC2,FRE, FRE, /*
  122. `    a    b    c    d    e    f    g    h    i    j    k    l    m    n    o    */
  123. FRE, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
  124. p    q    r    s    t    u    v    w    x    y    z    {    |    }    ~    127  */
  125. NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, FRE, FRE, FRE, FRE, NON,
  126. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
  127. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
  128. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
  129. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
  130. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
  131. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
  132. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
  133. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, NON
  134. };
  135. /*      free nu   nmc  nms  spc  non  ee   eob  rs   re   sep  cde  nsc  ero
  136.         nmre com  eti  net  mdo  msc  mso  pero pio  rni  tagc tago  */
  137. #undef FRE
  138. #undef NU
  139. #undef NMC
  140. #undef NMS
  141. #undef SPC
  142. #undef NON
  143. #undef EE
  144. #undef EOB
  145. #undef RS
  146. #undef RE
  147. #undef SEP
  148. #undef NSC
  149. #undef ERO
  150. #undef NMRE
  151. #undef COM
  152. /* def ETI*/
  153. /* def NET*/
  154. #undef MDO
  155. #undef MSC2
  156. #undef MSO
  157. #undef PERO
  158. #undef PIO
  159. #undef RNI
  160. #undef TGC2
  161. /* LEXGRP: Lexical table for group parses, including PCBREF.
  162. */
  163. /* Symbols for SGML character set divisions. */
  164. #define BIT     0   /* Bit combinations (not NONCHAR) not allowed in a group. */
  165. #define NMC     1   /* NAMECHAR  . -      Period, underscore, and numerals */
  166. #define NMS     2   /* NAMESTRT           Lower and uppercase letters */
  167. #define RE      3   /* Function  13       Carrier return */
  168. #define SPC     4   /* SPACE     32 09    Space; includes TAB */
  169. #define NON     5   /* NONCHAR   0-31 127 255 Unused, except for: */
  170. #define EE      6   /* Function  26 00    EE: entity end (end of file) */
  171. #define EOB     7   /* NONCHAR   28       End disk buffer. */
  172. #define RS      8   /* Function  10       RS: record start (line feed) */
  173.  
  174. /* Symbols for SGML delimiter roles in GRP. */
  175. #define AND1    9   /* &    */
  176. #define GRPC   10   /* )    */
  177. #define GRPO   11   /* (    */
  178. #undef LIT2
  179. #define LIT2   12   /* "    For datatags. */
  180. #define LITA   13   /* '    For datatags. */
  181. #define DTGC   14   /* ]    For datatags. */
  182. #define DTGO   15   /* [    For datatags. */
  183. #define OPT1   16   /* ?    */
  184. #define OR1    17   /* |    */
  185. #define PERO   18   /* %    */
  186. #define PLUS   19   /* +    */
  187. #define REP1   20   /* *    */
  188. #define RNI    21   /* #    For #CHARS */
  189. #define SEQ1   22   /* ,    */
  190. #define REFC   23   /* ;    For references */
  191.  
  192. UNCH lexgrp[256] = { /*
  193. 000  001                          bs   tab  lf   home ff   cr   so   si   */
  194. EE , NON, NON, NON, NON, NON, NON, NON, NON, SPC, RS,  NON, NON, RE,  NON, NON, /*
  195.                                         eof  esc  rt   left up   down */
  196. NON, NON, NON, NON, NON, NON, NON, NON, NON, NON, EE , NON, EOB, NON, NON, NON, /*
  197. 032  !    "    #    $    %    &    '    (    )    *    +    ,    -    .    /    */
  198. SPC, BIT, LIT2,RNI, BIT, PERO,AND1,LITA,GRPO,GRPC,REP1,PLUS,SEQ1,NMC, NMC, BIT, /*
  199. 0    1    2    3    4    5    6    7    8    9    :    ;    <    =    >    ?    */
  200. NMC, NMC, NMC, NMC, NMC, NMC, NMC, NMC, NMC, NMC, BIT, REFC,BIT, BIT, BIT, OPT1,/*
  201. @    A    B    C    D    E    F    G    H    I    J    K    L    M    N    O    */
  202. BIT, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
  203. P    Q    R    S    T    U    V    W    X    Y    Z    [    \    ]    ^    _    */
  204. NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, DTGO,BIT, DTGC,BIT, BIT, /*
  205. `    a    b    c    d    e    f    g    h    i    j    k    l    m    n    o    */
  206. BIT, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
  207. p    q    r    s    t    u    v    w    x    y    z    {    |    }    ~    127  */
  208. NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, BIT, OR1, BIT, BIT, NON,
  209. BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT,
  210. BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT,
  211. BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT,
  212. BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT,
  213. BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT,
  214. BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT,
  215. BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT,
  216. BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, NON
  217. };
  218. /*      bit  nmc  nms  re   spc  non  ee   eob  rs   and  grpc grpo lit  lita
  219.         dtgc dtgo opt  or   pero plus rep  rni  seq  refc */
  220. #undef BIT
  221. #undef NMC
  222. #undef NMS
  223. #undef RE
  224. #undef SPC
  225. #undef NON
  226. #undef EE
  227. #undef EOB
  228. #undef RS
  229. #undef AND1
  230. #undef GRPC
  231. #undef GRPO
  232. #undef LIT2
  233. #undef LITA
  234. #undef DTGC
  235. #undef DTGO
  236. #undef OPT1
  237. #undef OR1
  238. #undef PERO
  239. #undef PLUS
  240. #undef REP1
  241. #undef RNI
  242. #undef SEQ1
  243. #undef REFC
  244. /* LEXLMS: Lexical table for literal parses and marked sections.
  245. */
  246. /* Symbols for SGML character set divisions and function characters.
  247. */
  248. #define FRE     0   /* Free char: not in a delimiter or minimum literal. */
  249. #define NU      1   /* Numeral            Numerals */
  250. #undef MIN
  251. #define MIN     2   /* Minimum literal    '()+,-./:?= */
  252. #define NMS     3   /* LC/UCNMSTRT        Lower and uppercase letters */
  253. #define SPC     4   /* SPACE     32       Space */
  254. #define NON     5   /* NONSGML   0-31 127 255 Unused, except for: */
  255. #define EE      6   /* NONSGML   00 26    Entity end (end of file) */
  256. #define EOB     7   /* NONSGML   28       End disk buffer */
  257. #define RS      8   /* Function  10       Line feed */
  258. #define RE      9   /* Function  13       Carrier return */
  259. #define SEP    10   /* SEPCHAR   09       TAB: horizontal tab */
  260. /*#define CDE    11    NONSGML   delcdata CDATA/SDATA delimiter */
  261. #define NSC    12   /* NONSGML   delnonch Non-SGML character prefix */
  262. /* Symbols for SGML delimiter roles in LIT, PI, and marked sections.
  263.    Either LIT, LITA, PIC, or EE, is changed to LITC when a literal is begun.
  264.    It is changed back when the LITC occurs (i.e., when the literal ends).
  265. */
  266. #define ERO    13   /* &    */
  267. #define MDO    14   /* !    Actually MDO[2] */
  268. #define MSO    16   /* [    For MDO context. */
  269. #define PERO   17   /* %    For prolog. */
  270. #define RNI    18   /* #    For CRO[2] */
  271. #define TGC3   19   /* >    Also MDC for MSC context. */
  272. #define TGO3   20   /* <    TAGO; also MDO[1] */
  273.  
  274. /* Room has been left in the parse tables in case re-parsing of text
  275.    is eventually supported (i.e., saved parsed text is used by the
  276.    application to create a new SGML document, but CDATA and SDATA
  277.    entities in literals, and non-SGML characters, are left in their
  278.    parsed state to avoid the overhead of reconstituting the original
  279.    markup).  In such a case, the two non-SGML characters DELCDATA and
  280.    DELSDATA are changed to CDE.
  281.    NOTE: The idea is a bad one, because the generated document would
  282.    be non-conforming, as it would contain non-SGML characters.
  283. */
  284. UNCH    lexlms[256] = { /*
  285. 000  001                          bs   tab  lf   home ff   cr   so   si   */
  286. EE,  NON, NON, NON, NON, NON, NON, NON, NON ,SEP, RS,  NON, NON, RE,  NON, NON, /*
  287.                                         eof  esc  rt   left up   down */
  288. NON, NON, NON, NON, NON, NON, NON, NON, NON, NON, EE,  NON, EOB, NON, NON, NSC, /*
  289. 032  !    "    #    $    %    &    '    (    )    *    +    ,    -    .    /    */
  290. SPC, MDO, FRE, RNI, FRE, PERO,ERO, MIN, MIN, MIN, FRE, MIN, MIN, MIN, MIN, MIN, /*
  291. 0    1    2    3    4    5    6    7    8    9    :    ;    <    =    >    ?    */
  292. NU , NU , NU , NU , NU , NU , NU , NU , NU , NU , MIN, FRE, TGO3,MIN, TGC3,MIN, /*
  293. @    A    B    C    D    E    F    G    H    I    J    K    L    M    N    O    */
  294. FRE, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
  295. P    Q    R    S    T    U    V    W    X    Y    Z    [    \    ]    ^    _    */
  296. NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, MSO, FRE, MSC3,FRE, FRE, /*
  297. `    a    b    c    d    e    f    g    h    i    j    k    l    m    n    o    */
  298. FRE, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
  299. p    q    r    s    t    u    v    w    x    y    z    {    |    }    ~    127  */
  300. NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, FRE, FRE, FRE, FRE, NON,
  301. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
  302. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
  303. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
  304. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
  305. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
  306. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
  307. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
  308. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, NON
  309. };
  310. /*      free nu   min  nms  spc  non  ee   eob  rs   re   sep  cde  nsc  ero
  311.         mdo  msc  mso  pero rni  tago tagc litc */
  312. /* def FRE*/
  313. #undef NU
  314. #undef MIN
  315. #undef NMS
  316. #undef SPC
  317. #undef NON
  318. #undef EE
  319. #undef EOB
  320. #undef RS
  321. #undef RE
  322. #undef SEP
  323. /* def CDE*/
  324. /* def NSC*/
  325. #undef ERO
  326. #undef MDO
  327. /* def MSC3*/
  328. #undef MSO
  329. #undef PERO
  330. #undef RNI
  331. #undef TGC3
  332. #undef TGO3
  333. /* def LITC*/
  334. /* LEXMIN: Lexical table for minimum data literals.
  335. */
  336. /* Symbols for SGML character set divisions and function characters.
  337. */
  338. #define FRE     0   /* Free char: not in a delimiter or minimum literal. */
  339. #define NU      1   /* Numeral            Numerals */
  340. #undef MIN
  341. #define MIN     2   /* Minimum literal    '()+,-./:?= */
  342. #define NMS     3   /* LC/UCNMSTRT        Lower and uppercase letters */
  343. #define SPC     4   /* SPACE     32       Space */
  344. #define NON     5   /* NONSGML   0-31 127 255 Unused, except for: */
  345. #define EE      6   /* NONSGML   00 26    Entity end (end of file) */
  346. #define EOB     7   /* NONSGML   28       End disk buffer */
  347. #define RS      8   /* Function  10       Line feed */
  348. #define RE      9   /* Function  13       Carrier return */
  349. #define SEP    10   /* SEPCHAR   09       TAB: horizontal tab */
  350. /*#define CDE    11    NONSGML   delcdata CDATA/SDATA delimiter */
  351. #define NSC    12   /* NONSGML   delnonch Non-SGML character prefix */
  352. /* Either LIT or LITA changed to LITC when a literal is begun.
  353.    It is changed back when the LITC occurs (i.e., when the literal ends).
  354. */
  355. UNCH    lexmin[256] = { /*
  356. 000  001                          bs   tab  lf   home ff   cr   so   si   */
  357. EE,  NON, NON, NON, NON, NON, NON, NON, NON ,SEP, RS,  NON, NON, RE,  NON, NON, /*
  358.                                         eof  esc  rt   left up   down */
  359. NON, NON, NON, NON, NON, NON, NON, NON, NON, NON, EE,  NON, EOB, NON, NON, NSC, /*
  360. 032  !    "    #    $    %    &    '    (    )    *    +    ,    -    .    /    */
  361. SPC, FRE, FRE, FRE, FRE, FRE, FRE, MIN, MIN, MIN, FRE, MIN, MIN, MIN, MIN, MIN, /*
  362. 0    1    2    3    4    5    6    7    8    9    :    ;    <    =    >    ?    */
  363. NU , NU , NU , NU , NU , NU , NU , NU , NU , NU , MIN, FRE, FRE, MIN, FRE, MIN, /*
  364. @    A    B    C    D    E    F    G    H    I    J    K    L    M    N    O    */
  365. FRE, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
  366. P    Q    R    S    T    U    V    W    X    Y    Z    [    \    ]    ^    _    */
  367. NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, FRE, FRE, FRE, FRE, FRE, /*
  368. `    a    b    c    d    e    f    g    h    i    j    k    l    m    n    o    */
  369. FRE, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
  370. p    q    r    s    t    u    v    w    x    y    z    {    |    }    ~    127  */
  371. NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, FRE, FRE, FRE, FRE, NON,
  372. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
  373. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
  374. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
  375. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
  376. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
  377. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
  378. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE,
  379. FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, FRE, NON
  380. };
  381. /*      free nu   min  nms  spc  non  ee   eob  rs   re   sep  cde  nsc  ero
  382.         mdo  msc  mso  pero rni  tago tagc litc */
  383. /* def FRE*/
  384. #undef NU
  385. #undef MIN
  386. #undef NMS
  387. #undef SPC
  388. #undef NON
  389. #undef EE
  390. #undef EOB
  391. #undef RS
  392. #undef RE
  393. #undef SEP
  394. /* def CDE*/
  395. /* def NSC*/
  396. /* def LITC*/
  397. /* LEXMARK: Lexical scan table for markup: PCBMD? and PCB?TAG.
  398. */
  399. /* Symbols for SGML character set divisions. */
  400. #define BIT     0   /* Bit combinations not allowed; includes ESC SO SI */
  401. #define NMC     1   /* NAMECHAR  . _      Period and underscore */
  402. #define NU      2   /* NUMERAL            Numerals */
  403. #define NMS     3   /* NAMESTRT           Lower and uppercase letters */
  404. #define SPC     4   /* SPACE     32 13 09 Space; includes RE TAB */
  405. #define NON     5   /* NONCHAR   0-31 127 255 Unused, except for: */
  406. #define EE      6   /* Function  26 00    EE: entity end (end of file) */
  407. #define EOB     7   /* NONCHAR   28       End disk buffer. */
  408. #define RS      8   /* Function  10       RS: record start (line feed) */
  409.  
  410. /* Symbols for SGML delimiter roles in MD and TAG. */
  411. #define COM1    9   /* -    Actually COM[1]; also COM[2], MINUS. */
  412. #define ETIB   10   /* /    ETI; actually ETAGO[2]. */
  413. #define GRPO   11   /* (    */
  414. #define LIT3   12   /* "    */
  415. #define LITA   13   /* '    */
  416. #define DSO    14   /* [    */
  417. #define DSC1   15   /* ]    For data attribute specifications */
  418. #define PERO   16   /* %    */
  419. #define PLUS   17   /* +    */
  420. #define REFC   18   /* ;    For references */
  421. #define RNI    19   /* #    Also CRO[2] */
  422. #define TGC4   20   /* >    Also MDC, PIC */
  423. #define TGO4   21   /* <    TAGO; also MDO[1] */
  424. #define VI     22   /* =    */
  425.  
  426. UNCH lexmark[256] = { /*
  427. 000  001                          bs   tab  lf   home ff   cr   so   si   */
  428. EE , NON, NON, NON, NON, NON, NON, NON, NON, SPC, RS,  NON, NON, SPC, NON, NON, /*
  429.                                         eof  esc  rt   left up   down */
  430. NON, NON, NON, NON, NON, NON, NON, NON, NON, NON, EE , NON, EOB, NON, NON, NON, /*
  431. 032  !    "    #    $    %    &    '    (    )    *    +    ,    -    .    /    */
  432. SPC, BIT, LIT3,RNI, BIT, PERO,BIT, LITA,GRPO,BIT, BIT, PLUS,BIT, COM1,NMC ,ETIB,/*
  433. 0    1    2    3    4    5    6    7    8    9    :    ;    <    =    >    ?    */
  434. NU,  NU,  NU,  NU,  NU,  NU,  NU,  NU,  NU,  NU,  BIT, REFC,TGO4,VI,  TGC4,BIT, /*
  435. @    A    B    C    D    E    F    G    H    I    J    K    L    M    N    O    */
  436. BIT, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
  437. P    Q    R    S    T    U    V    W    X    Y    Z    [    \    ]     ^    _    */
  438. NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, DSO, BIT, DSC1, BIT, BIT, /*
  439. `    a    b    c    d    e    f    g    h    i    j    k    l    m    n    o    */
  440. BIT, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
  441. p    q    r    s    t    u    v    w    x    y    z    {    |    }    ~    127  */
  442. NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, BIT, BIT, BIT, BIT, NON,
  443. BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT,
  444. BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT,
  445. BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT,
  446. BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT,
  447. BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT,
  448. BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT,
  449. BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT,
  450. BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, BIT, NON
  451. };
  452. /*      bit  nmc  nu   nms  spc  non  ee   eob  rs   com  eti  grpo lit  lita
  453.         dso  pero plus refc rni  tagc tago vi   */
  454. #undef BIT
  455. #undef NMC
  456. #undef NU
  457. #undef NMS
  458. #undef SPC
  459. #undef NON
  460. #undef EE
  461. #undef EOB
  462. #undef RS
  463. #undef COM1
  464. #undef ETIB
  465. #undef GRPO
  466. #undef LIT3
  467. #undef LITA
  468. #undef DSO
  469. #undef DSC
  470. #undef PERO
  471. #undef PLUS
  472. #undef REFC
  473. #undef RNI
  474. #undef TGC4
  475. #undef TGO4
  476. #undef VI
  477. /* LEXSD: Lexical scan table for SGML declaration.
  478. */
  479.  
  480. /* Symbols for SGML character set divisions. */
  481. #define SIG     0   /* Significant SGML characters. */
  482. #define DAT     1   /* DATACHAR  Not significant, and not non-sgml. */
  483. #define NU      2   /* NUMERAL            Numerals */
  484. #define NMS     3   /* NAMESTRT           Lower and uppercase letters */
  485. #define SPC     4   /* SPACE     32 13 09 Space; includes RE TAB */
  486. #define NON     5   /* NONCHAR   NONSGML */
  487. #define EE      6   /* Function  26 00    EE: entity end (end of file) */
  488. #define EOB     7   /* NONCHAR   28       End disk buffer. */
  489. #define RS      8   /* Function  10       RS: record start (line feed) */
  490. /* Symbols for SGML delimiter roles in SGML declaration. */
  491. #define COM1    9   /* -    Actually COM[1]; also COM[2]. */
  492. #define LIT3   10   /* "    */
  493. #define LITA   11   /* '    */
  494. #define TGC4   12   /* >    Also MDC, PIC */
  495.  
  496. UNCH lexsd[256] = { /*
  497. 000  001                          bs   tab  lf   home ff   cr   so   si   */
  498. EE , NON, NON, NON, NON, NON, NON, NON, NON, SPC, RS,  NON, NON, SPC, NON, NON, /*
  499.                                         eof  esc  rt   left up   down */
  500. NON, NON, NON, NON, NON, NON, NON, NON, NON, NON, EE , NON, EOB, NON, NON, NON, /*
  501. 032  !    "    #    $    %    &    '    (    )    *    +    ,    -    .    /    */
  502. SPC, SIG, LIT3,SIG, DAT, SIG ,SIG, LITA,SIG, SIG, SIG, SIG, SIG, COM1,SIG ,SIG,/*
  503. 0    1    2    3    4    5    6    7    8    9    :    ;    <    =    >    ?    */
  504. NU,  NU,  NU,  NU,  NU,  NU,  NU,  NU,  NU,  NU,  SIG, SIG, SIG, SIG, TGC4,SIG, /*
  505. @    A    B    C    D    E    F    G    H    I    J    K    L    M    N    O    */
  506. SIG, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
  507. P    Q    R    S    T    U    V    W    X    Y    Z    [    \    ]     ^    _    */
  508. NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, SIG, DAT, SIG, SIG, SIG, /*
  509. `    a    b    c    d    e    f    g    h    i    j    k    l    m    n    o    */
  510. DAT, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
  511. p    q    r    s    t    u    v    w    x    y    z    {    |    }    ~    127  */
  512. NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, SIG, SIG, SIG, SIG, NON,
  513. DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT,
  514. DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT,
  515. DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT,
  516. DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT,
  517. DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT,
  518. DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT,
  519. DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT,
  520. DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, DAT, NON
  521. };
  522.  
  523. #undef SIG 
  524. #undef DAT 
  525. #undef NON 
  526. #undef NU  
  527. #undef NMS 
  528. #undef SPC 
  529. #undef EE  
  530. #undef EOB 
  531. #undef RS  
  532. #undef COM1
  533. #undef LIT3
  534. #undef LITA
  535. #undef TGC4
  536.  
  537. /* LEXTRAN: Translation table for SGML names.
  538. */
  539. UNCH lextran[256] = { /*
  540. 000  001                          bs   tab  lf  home  ff   cr   so   si   */
  541. 0  , 1  , 2  , 3  , 4  , 5  , 6  , 7  , 8  , 9  , 10 , 11 , 12 , 13 , 14 , 15 , /*
  542.                                         eof  esc  rt   left up   down */
  543. 16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 , 24 , 25 , 26 , 27 , 28 , 29 , 30 , 31 , /*
  544. space!    "    #    $    %    &    '    (    )    *    +    ,    -    .    /    */
  545. 32 , 33 , 34 , 35 , 36 , 37 , 38 , 39 , 40 , 41 , 42 , 43 , 44 , 45 , 46 , 47 , /*
  546. 0    1    2    3    4    5    6    7    8    9    :    ;    <    =    >    ?    */
  547. 48 , 49 , 50 , 51 , 52 , 53 , 54 , 55 , 56 , 57 , 58 , 59 , 60 , 61 , 62 , 63 , /*
  548. @    A    B    C    D    E    F    G    H    I    J    K    L    M    N    O    */
  549. 64 , 65 , 66 , 67 , 68 , 69 , 70 , 71 , 72 , 73 , 74 , 75 , 76 , 77 , 78 , 79 , /*
  550. P    Q    R    S    T    U    V    W    X    Y    Z    [    \    ]    ^    _    */
  551. 80 , 81 , 82 , 83 , 84 , 85 , 86 , 87 , 88 , 89 , 90 , 91 , 92 , 93 , 94 , 95 , /*
  552. `    a    b    c    d    e    f    g    h    i    j    k    l    m    n    o    */
  553. 96 , 65 , 66 , 67 , 68 , 69 , 70 , 71 , 72 , 73 , 74 , 75 , 76 , 77 , 78 , 79 , /*
  554. p    q    r    s    t    u    v    w    x    y    z    {    |    }    ~    127  */
  555. 80 , 81 , 82 , 83 , 84 , 85 , 86 , 87 , 88 , 89 , 90 , 123, 124, 125, 126, 127,
  556. 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
  557. 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
  558. 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
  559. 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
  560. 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
  561. 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
  562. 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
  563. 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255
  564. };
  565. /* LEXTOKE: Lexical class table for tokenization scan.
  566. */
  567. #include "lextoke.h"          /* Symbols for tokenization lexical classes. */
  568. UNCH lextoke[256] = { /*
  569.  
  570. 000  001                     bs  tab  lf  home  ff   cr         */
  571. INV, INV, INV, INV, INV, INV, INV, INV, INV, SEP, REC, INV, INV, REC, INV, INV, /*
  572.                               eof  esc  rt   left up   down */
  573. INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, EOB, INV, INV, INV, /*
  574. space!    "    #    $    %    &    '    (    )    *    +    ,    -    .    /    */
  575. SP , INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, NMC, NMC, INV, /*
  576. 0    1    2    3    4    5    6    7    8    9    :    ;    <    =    >    ?    */
  577. NU , NU , NU , NU , NU , NU , NU , NU , NU , NU , INV, INV, INV, INV, INV, INV, /*
  578. @    A    B    C    D    E    F    G    H    I    J    K    L    M    N    O    */
  579. INV, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
  580. P    Q    R    S    T    U    V    W    X    Y    Z    [    \    ]    ^    _    */
  581. NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, INV, INV, INV, INV, INV, /*
  582. `    a    b    c    d    e    f    g    h    i    j    k    l    m    n    o    */
  583. INV, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, /*
  584. p    q    r    s    t    u    v    w    x    y    z    {    |    }    ~    127  */
  585. NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, NMS, INV, INV, INV, INV, INV,
  586. INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV,
  587. INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV,
  588. INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV,
  589. INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV,
  590. INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV,
  591. INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV,
  592. INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV,
  593. INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV, INV
  594. };
  595.  
  596. /* This table maps ASCII to the system character set. */
  597. int iso646charset[] = {
  598. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
  599. 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
  600. 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
  601. 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
  602. 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
  603. 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
  604. 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
  605. 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
  606. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  607. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  608. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  609. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  610. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  611. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  612. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  613. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  614. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  615. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  616. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  617. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  618. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  619. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  620. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  621. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  622. };
  623.  
  624. /* This table maps the C0 part of ISO646 to the system character set. */
  625. /* We through in 32 and 127 for free, since ISO 2022 maps them in
  626. automatically. */
  627. int iso646C0charset[] = {
  628. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
  629. 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
  630. 32, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  631. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  632. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  633. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  634. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  635. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  636. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  637. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  638. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  639. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  640. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  641. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, 127,
  642. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  643. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  644. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  645. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  646. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  647. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  648. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  649. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  650. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  651. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  652. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  653. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  654. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  655. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  656. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  657. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  658. };
  659.  
  660. /* This table maps the G0 part of ISO646 to the system character set. */
  661. int iso646G0charset[] = {
  662. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  663. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  664. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  665. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  666. 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
  667. 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
  668. 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
  669. 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
  670. 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
  671. 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
  672. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  673. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  674. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  675. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  676. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  677. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  678. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  679. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  680. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  681. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  682. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  683. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  684. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  685. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  686. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  687. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  688. };
  689.  
  690. int iso8859_1charset[] = {
  691. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  692. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  693. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  694. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  695. 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
  696. 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
  697. 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
  698. 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
  699. 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
  700. 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
  701. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  702. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  703. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  704. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  705. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  706. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  707. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  708. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  709. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  710. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  711. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  712. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  713. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  714. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  715. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  716. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  717. };
  718.  
  719. int iso6429C1charset[] = {
  720. 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
  721. 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
  722. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  723. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  724. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  725. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  726. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  727. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  728. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  729. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  730. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  731. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  732. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  733. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  734. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  735. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  736. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  737. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  738. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  739. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  740. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  741. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  742. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  743. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  744. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  745. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  746. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  747. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  748. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  749. UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED,
  750. };
  751.