home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / sgml / msdos / sgml07 / arclexrf.c < prev    next >
Encoding:
Text File  |  1992-02-05  |  34.0 KB  |  659 lines

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