home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / fweb153.zip / fweb-1.53 / web / reserved.c < prev    next >
C/C++ Source or Header  |  1995-09-23  |  50KB  |  2,280 lines

  1. #if(0)
  2.   FTANGLE v1.53, created with UNIX on "Thursday, September 21, 1995 at 15:06."  \
  3.   COMMAND LINE: "web/ftangle web/reserved -A -# --F -= 1.53/web/reserved.c" \
  4.   RUN TIME: "Saturday, September 23, 1995 at 16:17." \
  5.   WEB FILE:    "web/reserved.web" \
  6.   CHANGE FILE: (none)
  7. #endif
  8. #define normal  0 /* ordinary identifiers have |normal| ilk */
  9. #define roman  1 /* normal index entries have |roman| ilk */
  10. #define wildcard  2 /* user-formatted index entries have |wildcard| ilk */
  11. #define typewriter  3 /* `typewriter type' entries have |typewriter| ilk */ \
  12.  
  13. #define is_reserved(a)(a->ilk>typewriter)/* tells if a name is a reserved word */ \
  14.  
  15. #define append_xref(c)if(xref_ptr==xmem_end) \
  16. OVERFLW("cross-references","r"); \
  17. else \
  18. { \
  19. (++xref_ptr)->num= c; \
  20. xref_ptr->Language= (boolean)language; \
  21. } \
  22.  
  23. #define def_flag  ID_FLAG /* must be strictly larger than |max_modules| */ \
  24.  
  25. #define xref  equiv_or_xref /* The trouble with this is that |xref| is a \
  26.     |xref_pointer| whereas |equiv_or_xref| is |ASCII|. This means that \
  27.     lots of casting needs to be done to keep the compiler happy. Hence \
  28.     the previous |typedef|. */ \
  29.  
  30. #undef expr  
  31. #define expr  1 /* An expression, including perhaps a single identifier. */ \
  32.  
  33. #undef unop  
  34. #define unop  2 /* A unary operator. */ \
  35.  
  36. #undef binop  
  37. #define binop  3 /* A binary operator. */ \
  38.  
  39. #define unorbinop  4 \
  40. /* An operator that can be unary or binary, depending on context. */
  41. #define cast  5 /* A cast. */
  42. #define question  6 /* A question mark and possibly the expressions flanking it. */
  43. #define lbrace  7 /* A left brace. */
  44. #define rbrace  8 /* A right brace. */
  45. #define decl_hd  9 /* An incomplete declaration. */
  46. #define comma  10 /* A comma. */
  47. #define lpar  11 /* A left parenthesis. */
  48. #define rpar  12 /* A right parenthesis. */
  49. #define lbracket  13 /* A left bracket. */
  50. #define rbracket  14 /* A right bracket. */
  51. #define exp_op  18 /* Exponentiation. */ \
  52.  
  53. #define max_math  19 \
  54. /* Category codes less than this can only be printed in math mode. */ \
  55.  
  56. #define struct_hd  21 /* The beginning of a structure specifier. */
  57. #define decl  20 /* A complete declaration. */
  58. #define label  22 /* Fortran statement label. */
  59. #define stmt  23 /* A complete statement. */
  60. #define functn  24 /* A complete function. */
  61. #define fn_decl  25 /* A function declarator. */
  62. #define else_like  26 /* The beginning of a conditional. */
  63. #define semi  27 /* A semicolon. */
  64. #define colon  28 /* A colon. */
  65. #define tag  29 /* A statement label. */
  66. #define if_hd  30 /* The beginning of a conditional. */
  67. #define common_hd  31
  68. #define read_hd  32
  69. #define slashes  33
  70. #define implicit_hd  34
  71. #define lproc  35 /* Begins a preprocessor command. */
  72. #define rproc  36 /* Ends a preprocessor command. */
  73. #define ignore_scrap  37 /* A full preprocessor command. */
  74. #define for_hd  38
  75. #define newline  39
  76. #define language_scrap  40 /* So we can change languages during translation. */ \
  77.  
  78. #define do_like  55 /* \&{do}. */
  79. #define for_like  56 /* \&{for}, \&{switch}. */
  80. #define if_like  57 /* \&{if}, \&{while},  \&{ifdef}, \&{ifndef}, \&{endif}. */
  81. #define int_like  58 /* \&{int}, \&{char}, \&{extern}, \dots. */
  82. #define case_like  59 /* \&{return}, \&{goto}, \&{break}, \&{continue}. */
  83. #define sizeof_like  60 /* \&{sizeof}. */
  84. #define struct_like  61 /* \&{struct}. */
  85. #define typedef_like  62 /* \&{typedef}. */
  86. #define define_like  63 /* \&{define}. */
  87. #define common_like  64 /* \&{common}, \&{save}, \&{namelist} . */
  88. #define read_like  65 /* \&{read}, \&{write}, \&{print}, \&{backspace}, \
  89.     \&{rewind}, \&{open}, \&{close}, \&{endfile}, \&{inquire}, \&{decode}, \
  90.     \&{encode}.  */
  91. #define entry_like  66 /* \&{entry} . */
  92. #define implicit_like  67 /* \&{implicit}. */
  93. #define assign_like  68 /* \&{assign}. */
  94. #define built_in  69 /* \&{changequote}, \&{define}, \&{divert}, \&{eval}, \
  95.     \&{ifdef}, \&{ifdef}, \&{incr}, \&{len}, \&{undefine}, \&{undivert}. */
  96. #define Rdo_like  70 /* \Ratfor\ \&{do}. */
  97. #define endif_like  71 /* \&{endif}, \&{enddo}. */
  98. #define end_like  72 /* \&{end}. */
  99. #define END_like  73
  100. #define go_like  74 /* \&{go}. */
  101. #define no_order  75 /* \&{include}. */
  102. #define until_like  76 /* \&{until}. */
  103. #define IF_like  77
  104. #define IF_top  78
  105. #define else_hd  79
  106. #define ELSE_like  80
  107. #define space  81 /* For C~preprocessor. */
  108. #define LPROC  82
  109. #define UNOP  83 /* ``\.{{\it unop}\ }''. */
  110. #define BINOP  84 /* ``\.{\ {\it binop}\ }''. */
  111. #define COMMA  85 /* ``\.{\ {\it comma}\ }''. */
  112. #define _EXPR  86 /* ``\.{\ {\it expr}}''. */
  113. #define _EXPR_  87 /* ``\.{\ {\it expr}\ }''. */
  114. #define EXPR_  88 /* ''\.{{\it expr}\ }''. */
  115. #define Decl_hd  89
  116. #define key_wd  90 /* May be unused now. */
  117. #define program_like  91 /* |@r program|, |@r subroutine|, |@r function|. */
  118. #define CASE_like  92
  119. #define modifier  93 /* |const|, |volatile|. */
  120. #define class_like  94 /* \Cpp: |class|. */
  121. #define op_like  95 /* \Cpp: |operator|. */
  122. #define new_like  96 /* \Cpp: |new|, |delete|. */
  123. #define proc_like  97 /* \Fortran-90: |@r procedure|. */
  124. #define private_like  98 /* \Fortran-90: |@r private|, |@r public|, |@r sequence|. */
  125. #define slash_like  99 /* \Fortran: slash in |@r data| statement. */
  126. #define fcn_hd  100 /* \Fortran: Beginning of function. */
  127. #define END_stmt  101 /* \Fortran: |@r end;|. */
  128. #define huge_like  102 /* For |huge|. */
  129. #define imp_reserved  103 /* The result of~\.{@`}. */
  130. #define extern_like  104 /* |extern|. */
  131. #define while_do  105 /* |while| after |do|. */
  132. #define template  106 /* |@c++ template| */
  133. #define langle  107 /* A '\.<'. */
  134. #define tstart  108 /* The '\.<' beginning a template list. */
  135. #define tlist  109 /* |@c++ int<int, int>| */
  136. #define rangle  110 /* A '\.>'. */
  137. #define namespace  111 /* |@c++ namespace| */
  138. #define virtual  112 /* |@c++ virtual| */
  139. #define reference  113 /* |@c++ int& ref;| */ \
  140.  
  141. #define SAVE_ID(word_type0,language0,words) \
  142. save_id(word_type0,language0,(CONST outer_char HUGE**)(words)) \
  143.  
  144. #define ALREADY_RESERVED(L)if(is_reservd.L)break;else is_reservd.L= YES \
  145.  
  146.  
  147.  
  148.  
  149. #ifndef part
  150. #define part 0 /* Standard value, when the files aren't split. */
  151. #else
  152. #if(part != 1 && part != 2 && part != 3)
  153. #define part 1 /* Should issue error message here. */
  154. #endif
  155. #endif /* |part| */
  156.  
  157.  
  158.  
  159.  
  160. #if(part == 0 || part == 1)
  161. #define part1_or_extern
  162. #define SET1(stuff)  =  stuff
  163. #define TSET1(stuff)  =  stuff
  164. #else
  165. #define part1_or_extern extern
  166. #define SET1(stuff)
  167. #define TSET1(stuff)
  168. #endif
  169.  
  170.  
  171.  
  172.  
  173.  
  174. #include "typedefs.h"
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182. typedef struct xref_info0
  183. {
  184. sixteen_bits num;/* module number plus zero or |def_flag| */
  185. struct xref_info0 HUGE*xlink;/* pointer to the previous \
  186.                 cross-reference */
  187. boolean Language;/* Language in force for this module. */
  188. }xref_info;
  189.  
  190. typedef xref_info HUGE*xref_pointer;
  191. typedef ASCII HUGE*XREF_POINTER;/* For assignments like |name_dir->xref = \
  192.                 (XREF_POINTER)xref_ptr|. See the comment \
  193.                 immediately below about~|xref|. */
  194.  
  195.  
  196.  
  197.  
  198. #include "c_type.h" /* Function prototypes for \.{common} (includes \
  199.                 reserved words). */
  200.  
  201.  
  202.  
  203.  
  204. /* The shorter length here is primarily to keep the stack under control. \
  205. Now that |N_MSGBUF| is used  dynamically, maybe this statement isn't \
  206. necessary. */
  207. #ifdef SMALL_MEMORY
  208. #define N_MSGBUF 2000
  209. #else
  210. #define N_MSGBUF 10000
  211. #endif
  212.  
  213.  
  214.  
  215.  
  216.  
  217. EXTERN boolean change_exists;/* has any module changed? */
  218.  
  219.  
  220.  
  221. #ifndef COMMON_FCNS_
  222. IN_COMMON BUF_SIZE max_modules;/* Size allocated in \.{common.web}. */
  223. #endif
  224.  
  225. EXTERN BUF_SIZE max_refs;
  226. EXTERN xref_info HUGE*xmem;/* contains cross-reference information */
  227. EXTERN xref_pointer xmem_end;
  228.  
  229. EXTERN xref_pointer xref_ptr;/* the largest occupied position in |xmem| */
  230.  
  231. EXTERN sixteen_bits xref_switch,mod_xref_switch;/* either zero or |def_flag|. */
  232. EXTERN boolean defd_switch;/* Set by `\.{@[}'. */
  233. EXTERN NAME_TYPE defd_type SET(NEVER_DEFINED);
  234. EXTERN boolean typd_switch;/* Set by `\.{@]}'. */
  235. EXTERN boolean index_short;/* Set by `\.{@+}'. */
  236.  
  237.  
  238.  
  239.  
  240.  
  241. /* For pc's, the file is split into two compilable parts using the \
  242. compiler-line macro |part|, which must equal either~1 or~2. */
  243. #if(part != 2)
  244.  
  245.  
  246. SRTN save_words FCN((language0,words))
  247. LANGUAGE language0 C0("The words are to be attached to this language.")
  248. CONST RESERVED_WORD HUGE*words C1("Array of words to be stored.")
  249. {
  250. CONST RESERVED_WORD HUGE*r;
  251. LANGUAGE outer_language;
  252.  
  253. outer_language= language;
  254. language= language0;
  255. language_num= (short)lan_num(language);
  256. word_type= RESERVED_WD;/* Set global flag for |id_lookup|. */
  257.  
  258. for(r= words;r->type!=0;++r)
  259. id_lookup(x_to_ASCII(OC(r->reserved_word)),NULL,
  260. (eight_bits)CHOICE(r->type==(eight_bits)expr,normal,r->type));
  261. /* Enter as reserved word. */
  262.  
  263. language= outer_language;
  264. language_num= (short)lan_num(language);
  265. }
  266.  
  267.  
  268.  
  269. SRTN save_id FCN((word_type0,language0,words))
  270. WORD_TYPE word_type0 C0("|INTRINSIC_FCN| or |KEYWD|")
  271. LANGUAGE language0 C0("They're for this language.")
  272. CONST outer_char HUGE**words C1("Intrinsic names to be stored.")
  273. {
  274. CONST outer_char HUGE**i;
  275. LANGUAGE outer_language;
  276.  
  277. outer_language= language;
  278. language= language0;
  279. language_num= (short)lan_num(language);
  280. word_type= word_type0;
  281.  
  282. for(i= words;**i;i++)
  283. id_lookup(x_to_ASCII(*i),
  284. NULL,normal);/* Mark as intrinsic. \
  285.                 It's an ordinary identifier; will be \
  286.                 entered in index. */
  287.  
  288. language= outer_language;
  289. language_num= (short)lan_num(language);
  290. }
  291.  
  292.  
  293.  
  294. SRTN ini_special_tokens FCN((language0,tokens))
  295. LANGUAGE language0 C0("")
  296. SPEC HUGE*tokens C1("Array of tokens to be initialized.")
  297. {
  298. SPEC HUGE*s;
  299. int n;
  300. name_pointer np;
  301.  
  302. /* Fill in id token for keyword. */
  303. for(s= tokens;(n= STRLEN(s->name))!=0;s++)
  304. {
  305. ASCII HUGE*p= x_to_ASCII(OC(s->name));
  306.  
  307. s->len= n;
  308. *s->pid= ID_NUM_ptr(np,p,p+n);
  309. np->expandable|= language0;
  310. if(!np->x_translate)np->x_translate= 
  311. (X_FCN(HUGE_FCN_PTR*HUGE*)(VOID))get_mem0(OC("x array"),
  312. (unsigned long)(NUM_LANGUAGES),
  313. sizeof(X_FCN(HUGE_FCN_PTR*)(VOID)));
  314. np->x_translate[lan_num(language0)]= s->expand;
  315. }
  316. }
  317.  
  318.  
  319.  
  320. SRTN ini_out_tokens FCN((tokens))
  321. SPEC HUGE*tokens C1("")
  322. {
  323. SPEC HUGE*s;
  324.  
  325. /* Fill in id token for keyword. */
  326. for(s= tokens;(s->len= STRLEN(s->name))!=0;s++)
  327. {
  328. ASCII HUGE*p;
  329. char HUGE*name,HUGE*p0,HUGE*p1;
  330.  
  331. /* We need a new memory area both in order to convert to |ASCII| and \
  332. possibly to convert to lower case. */
  333. name= (char HUGE*)(mod_text+1);
  334.  
  335. /* When the \.{-U} option is used, the output tokens must be converted to \
  336. lower case. */
  337. if(lowercase_tokens)
  338. for(p1= name,p0= (char HUGE*)s->name;*p0;p0++)
  339. *p1++= (ASCII)tolower(*p0);
  340. else
  341. STRCPY(name,s->name);
  342.  
  343. p= to_ASCII(OC(name));
  344.  
  345. *s->pid= ID_NUM(p,p+s->len);
  346. }
  347.  
  348. }
  349.  
  350.  
  351.  
  352. static SPEC general_tokens[]= {
  353. {"defined",0,NULL,&id_defined},/* For the expression evaluator. */
  354. {"",0,NULL,NULL}
  355. };
  356.  
  357.  
  358.  
  359. static RESERVED_WORD old_WEB_words[]= {
  360. {"_A",built_in},
  361. {"_ABS",built_in},
  362. {"_ASSERT",built_in},
  363. {"_COMMENT",built_in},
  364. {"_DATE",built_in},
  365. {"_DAY",built_in},
  366. {"_DECR",built_in},
  367. {"_DEFINE",built_in},
  368. {"_DEFINED",built_in},
  369. {"_DO",built_in},
  370. {"_DUMPDEF",built_in},
  371. {"_ERROR",built_in},
  372. {"_EVAL",built_in},
  373. {"_GETENV",built_in},
  374. {"_HOME",built_in},
  375. {"_IF",built_in},
  376. {"_IFCASE",built_in},
  377. {"_IFDEF",built_in},
  378. {"_IFELSE",built_in},
  379. {"_IFNDEF",built_in},
  380. {"_INCR",built_in},
  381. {"_INPUT_LINE",built_in},
  382. {"_L",built_in},
  383. {"_LANGUAGE",built_in},
  384. {"_LANGUAGE_NUM",built_in},
  385. {"_LEN",built_in},
  386. {"_M",built_in},
  387. {"_MAX",built_in},
  388. {"_MIN",built_in},
  389. {"_MODULES",built_in},
  390. {"_MODULE_NAME",built_in},
  391. {"_NARGS",built_in},
  392. {"_OUTPUT_LINE",built_in},
  393. {"_P",built_in},
  394. {"_POW",built_in},
  395. {"_ROUTINE",built_in},
  396. {"_SECTION_NUM",built_in},
  397. {"_SECTIONS",built_in},
  398. {"_STRING",built_in},
  399. {"_TIME",built_in},
  400. {"_TRANSLIT",built_in},
  401. {"_U",built_in},
  402. {"_UNDEF",built_in},
  403. {"_UNQUOTE",built_in},
  404. {"_VERBATIM",built_in},
  405. {"_VERSION",built_in},
  406. {"",0}
  407. };
  408.  
  409. static RESERVED_WORD WEB_words[]= {
  410. {"$A",built_in},
  411. {"$ABS",built_in},
  412. {"$ASSERT",built_in},
  413. {"$_BINOP_",BINOP},
  414. {"$_COMMA_",COMMA},
  415. {"$COMMENT",built_in},
  416. {"$DATE",built_in},
  417. {"$DAY",built_in},
  418. {"$DECR",built_in},
  419. {"$DEFINE",built_in},
  420. {"$DEFINED",built_in},
  421. {"defined",EXPR_},
  422. {"$DO",built_in},
  423. {"$DUMPDEF",built_in},
  424. {"$ERROR",built_in},
  425. {"$EVAL",built_in},
  426. {"$_EXPR",_EXPR},
  427. {"$_EXPR_",_EXPR_},
  428. {"$EXPR_",EXPR_},
  429. {"$GETENV",built_in},
  430. {"$HOME",built_in},
  431. {"$IF",built_in},
  432. {"$IFCASE",built_in},
  433. {"$IFDEF",built_in},
  434. {"$IFELSE",built_in},
  435. {"$IFNDEF",built_in},
  436. {"$INCR",built_in},
  437. {"$INPUT_LINE",built_in},
  438. {"$L",built_in},
  439. {"$LANGUAGE",built_in},
  440. {"$LANGUAGE_NUM",built_in},
  441. {"$LEN",built_in},
  442. {"$M",built_in},
  443. {"$MAX",built_in},
  444. {"$MIN",built_in},
  445. {"$MODULES",built_in},
  446. {"$MODULE_NAME",built_in},
  447. {"$NARGS",built_in},
  448. {"$OUTPUT_LINE",built_in},
  449. {"$P",built_in},
  450. {"$POW",built_in},
  451. {"$ROUTINE",built_in},
  452. {"$SECTION_NUM",built_in},
  453. {"$SECTIONS",built_in},
  454. {"$STRING",built_in},
  455. {"$TIME",built_in},
  456. {"$TRANSLIT",built_in},
  457. {"$UNOP_",UNOP},
  458. {"$U",built_in},
  459. {"$UNDEF",built_in},
  460. {"$UNQUOTE",built_in},
  461. {"$VERBATIM",built_in},
  462. {"$VERSION",built_in},
  463. {"",0}
  464. };
  465.  
  466.  
  467.  
  468. SRTN save_WEB FCN((language0))
  469. LANGUAGE language0 C1("")
  470. {
  471. save_words(language0,old_WEB_words);
  472. save_words(language0,WEB_words);
  473. }
  474.  
  475.  
  476.  
  477. static RESERVED_WORD M4_words[]= {
  478. {"changequote",built_in},
  479. {"define",built_in},
  480. {"divert",built_in},
  481. {"divnum",built_in},
  482. {"dnl",built_in},
  483. {"dumpdef",built_in},
  484. {"errprint",built_in},
  485. {"eval",built_in},
  486. {"ifdef",built_in},
  487. {"ifelse",built_in},
  488. {"include",built_in},
  489. {"incr",built_in},
  490. {"index",built_in},
  491. {"len",built_in},
  492. {"maketemp",built_in},
  493. {"sinclude",built_in},
  494. {"substr",built_in},
  495. {"syscmd",built_in},
  496. {"translit",built_in},
  497. {"undefine",built_in},
  498. {"undivert",built_in},
  499. {"",0}
  500. };
  501.  
  502.  
  503.  
  504.  
  505. static RESERVED_WORD C_words[]= {
  506. {"auto",int_like},
  507. {"break",case_like},
  508. {"case",case_like},
  509. {"char",int_like},
  510. {"clock_t",int_like},/* ANSI. */
  511. {"complex",int_like},/* EXTENSION. */
  512. {"const",modifier},/* ANSI. */
  513. {"continue",case_like},
  514. {"default",case_like},
  515. {"#define",define_like},/* (Preprocessor). */
  516. {"div_t",int_like},/* ANSI. */
  517. {"do",do_like},
  518. {"double",int_like},
  519. {"#elif",else_like},/* ANSI (Preprocessor). */
  520. {"else",else_like},
  521. {"#else",else_like},/* (Preprocessor). */
  522. {"#endif",if_like},/* (Preprocessor). */
  523. {"#error",if_like},/* ANSI (Preprocessor). */
  524. {"extern",extern_like},
  525. {"FILE",int_like},
  526. {"float",int_like},
  527. {"fortran",int_like},/* EXTENSION. */
  528. {"fpos_t",int_like},/* ANSI. */
  529. {"for",for_like},{"FOR",for_like},/* JAK. */
  530. {"goto",case_like},
  531. {"huge",huge_like},/* EXTENSION for personal computers. */
  532. {"if",if_like},
  533. {"#if",if_like},/* (Preprocessor). */
  534. {"#ifdef",if_like},/* (Preprocessor). */
  535. {"#ifndef",if_like},/* (Preprocessor). */
  536. {"#include",if_like},/* (Preprocesor). */
  537. {"int",int_like},
  538. {"ldiv_t",int_like},/* ANSI. */
  539. {"long",int_like},
  540. {"#line",if_like},/* (Preprocessor). */
  541. {"noalias",int_like},/* ANSI. */
  542. {"#pragma",if_like},/* ANSI (Preprocessor). */
  543. {"ptrdiff_t",int_like},/* ANSI. */
  544. {"register",int_like},
  545. {"return",case_like},
  546. {"short",int_like},
  547. {"sig_atomic_t",int_like},/* ANSI. */
  548. {"signed",int_like},/* ANSI. */
  549. {"size_t",int_like},/* ANSI. */
  550. {"sizeof",sizeof_like},
  551. {"static",int_like},
  552. {"switch",for_like},
  553. {"time_t",int_like},/* ANSI. */
  554. {"typedef",typedef_like},
  555. {"#undef",if_like},/* (Preprocessor). */
  556. {"unsigned",int_like},
  557. {"va_list",int_like},/* ANSI. */
  558. {"volatile",modifier},/* ANSI. */
  559. {"void",int_like},/* ANSI. */
  560. {"wchar_t",int_like},/* ANSI. */
  561. {"while",for_like},
  562. {"",0}
  563. };
  564.  
  565. static RESERVED_WORD C_words1[]= 
  566. {
  567. {"enum",struct_like},
  568. {"struct",struct_like},
  569. {"union",struct_like},
  570. {"",0}
  571. };
  572.  
  573.  
  574.  
  575. CONST char*C_intrinsics[]= {
  576. "abort","atexit","exit","getenv","system",
  577. "abs","div","labs","ldiv",
  578. "acos","asin","atan","atan2","cos","sin","tan",
  579. "asctime","ctime","gmtime","localtime","strftime","clock","difftime",
  580. "mktime","time",
  581. "assert",
  582. "atof","atoi","atol","strtod","strtol","strtoul",
  583. "bsearch","qsort",
  584. "calloc","free","malloc","realloc",
  585. "ceil","fabs","floor","fmod",
  586. "fclose","fflush","fopen","freopen","setbuf","setvbuf",
  587. "clearerr","feof","ferror","perror",
  588. "cosh","sinh","tanh",
  589. "exp","frexp","ldexp","log","log10","modf",
  590. "fgetc","fgets","fprintf","fputc","fputs","fread","fscanf",
  591. "fwrite","getc","getchar","gets","printf","putc","putchar",
  592. "puts","scanf","sprintf","sscanf","ungetc",
  593. "vfprintf","vprintf","vsprintf",
  594. "fgetpos","fseek","fsetpos","ftell","rewind",
  595. "printf","sprintf",
  596. "isalnum","isalpha","iscntrl","isdigit","isgraph","islower",
  597. "isprint","ispunct","isspace","isupper","isxdigit",
  598. "localeconv","setlocale",
  599. "longjmp","setjmp",
  600. "mblen","mbstowcs","mbtowc","wcstombs","wctomb",
  601. "memcmp","strcmp","strcoll","strncmp","strxfrm","strcat","strncat",
  602. "memcpy","memmove","strcpy","strncpy",
  603. "memset","strerror","strlen",
  604. "memchr","strchr","strcspn","strpbrk","strrchr",
  605. "strspn","strstr","strtok",
  606. "offsetof",
  607. "pow","sqrt",
  608. "raise",
  609. "rand","srand",
  610. "remove","rename","tmpfile","tmpnam",
  611. "strcpy","strcmp","strncpy","strlen",
  612. "tolower","toupper",
  613. "ungetc",
  614. "va_arg","va_end","va_start",
  615. "write",
  616. ""
  617. };
  618.  
  619.  
  620.  
  621. static RESERVED_WORD Cpp_words[]= 
  622. {
  623. {"bool",int_like},/* ANSI. */
  624. {"catch",expr},/* \Cpp--3.0 */
  625. {"class",class_like},
  626. {"const_cast",int_like},/* ANSI */
  627. {"delete",new_like},
  628. {"dynamic_cast",int_like},/* ANSI RTTI. */
  629. {"friend",int_like},
  630. {"inline",int_like},
  631. {"mutable",int_like},/* ANSI. */
  632. {"namespace",namespace},/* ANSI. */
  633. {"new",new_like},
  634. {"operator",op_like},
  635. {"private",case_like},
  636. {"protected",case_like},
  637. {"public",case_like},
  638. {"reinterpret_cast",int_like},/* ANSI */
  639. {"static_cast",int_like},/* ANSI */
  640. {"template",template},/* \Cpp--3.0. */
  641. {"this",expr},
  642. {"throw",case_like},/* \Cpp--3.0; it's like |return|. */
  643. {"try",fn_decl},/* \Cpp--3.0 */
  644. {"typeid",int_like},/* ANSI RTTI. */
  645. {"using",int_like},/* ANSI namespaces. */
  646. {"virtual",virtual},
  647. {"",0}
  648. };
  649.  
  650. static RESERVED_WORD Cpp_words1[]= 
  651. {
  652. {"enum",class_like},
  653. {"struct",class_like},/* Overrides C ilk. */
  654. {"union",class_like},
  655. {"",0}
  656. };
  657.  
  658. CONST char*Cpp_intrinsics[]= 
  659. {
  660. "set_new_handler",
  661. ""
  662. };
  663.  
  664.  
  665.  
  666. static RESERVED_WORD F77_words[]= {
  667. {"accept",read_like},
  668. {"assign",assign_like},
  669. {"backspace",read_like},
  670. {"block",program_like},
  671. {"blockdata",program_like},
  672. {"call",case_like},
  673. {"character",int_like},
  674. {"close",read_like},
  675. {"common",common_like},
  676. {"complex",int_like},
  677. {"continue",case_like},
  678. {"data",no_order},
  679. {"$decl_hd",decl_hd},
  680. {"dimension",int_like},
  681. {"do",Rdo_like},{"DO",for_like},
  682. {"double",int_like},
  683. {"doubleprecision",int_like},
  684. {"else",else_like},
  685. {"elseif",else_like},
  686. {"end",end_like},
  687. {"enddo",endif_like},
  688. {"endif",endif_like},
  689. {"endfile",read_like},
  690. {"endfunction",end_like},
  691. {"endprogram",end_like},
  692. {"endsubroutine",end_like},
  693. {"entry",entry_like},
  694. {"equivalence",int_like},
  695. {"external",int_like},
  696. {"format",read_like},
  697. {"function",program_like},
  698. {"go",go_like},/* Can be combined with \&{to}. */
  699. {"goto",case_like},
  700. {"if",if_like},
  701. {"implicit",implicit_like},
  702. {"integer",int_like},
  703. {"inquire",read_like},
  704. {"intrinsic",int_like},
  705. {"logical",int_like},
  706. {"open",read_like},
  707. {"parameter",int_like},
  708. {"pause",case_like},
  709. {"precision",int_like},
  710. {"print",read_like},
  711. {"program",program_like},
  712. {"read",read_like},
  713. {"REAL",int_like},/* EXTENSION. */
  714. {"real",int_like},
  715. {"return",case_like},
  716. {"rewind",read_like},
  717. {"save",common_like},
  718. {"subroutine",program_like},
  719. {"stop",case_like},
  720. {"then",built_in},
  721. {"to",built_in},
  722. {"TYPE",read_like},/* Conflicts with \FORTRAN-88's |@r type| \
  723. statement. */
  724. {"write",read_like},
  725. {"",0}
  726. };
  727.  
  728.  
  729.  
  730. #ifdef VAXC
  731. static RESERVED_WORD VAX_words[]= {
  732. {"decode",read_like},
  733. {"delete",read_like},
  734. {"dictionary",int_like},
  735. {"encode",read_like},
  736. {"endmap",end_like},
  737. {"endstructure",end_like},
  738. {"endunion",end_like},
  739. {"find",read_like},
  740. {"INCLUDE",no_order},
  741. {"map",struct_like},
  742. {"namelist",common_like},
  743. {"options",int_like},
  744. {"record",common_like},
  745. {"rewrite",read_like},
  746. {"union",struct_like},
  747. {"unlock",read_like},
  748. {"virtual",int_like},
  749. {"volatile",common_like},
  750. {"",0}
  751. };
  752. #endif /* |VAXC| */
  753.  
  754.  
  755.  
  756. CONST char*F77_intrinsics[]= {
  757. "abs","dabs","cabs",
  758. "acos","dacos",
  759. "aimag",
  760. "aint","dint",
  761. "amax0",
  762. "amin0",
  763. "anint","dnint",
  764. "areal",
  765. "asin","dasin",
  766. "atan","datan",
  767. "atan2","datan2","atan2d",
  768. "char",
  769. "cmplx",
  770. "conjg",
  771. "cos","dcos","ccos",
  772. "cosh","dcosh",
  773. "dble",
  774. "dfloat",
  775. "dim","ddim",
  776. "dprod",
  777. "exp","dexp","cexp",
  778. "float",
  779. "iabs",
  780. "iand","ior","ieor","not",
  781. "ichar",
  782. "idim",
  783. "idint","iqint",
  784. "idnint","iqnint",
  785. "ifix",
  786. "int",
  787. "isign",
  788. "jnint",
  789. "llt","lle","lgt","lge",
  790. "log","alog","dlog","clog",
  791. "log10","alog10","dlog10",
  792. "max","amax1","dmax1",
  793. "max0",
  794. "max1",
  795. "min","amin1","dmin1",
  796. "min0",
  797. "min1",
  798. "mod","amod","dmod",
  799. "Real",
  800. "sngl",
  801. "sign","dsign",
  802. "sin","dsin","csin",
  803. "sinh","dsinh",
  804. "sqrt","dsqrt","csqrt",
  805. "tan","dtan",
  806. "tanh","dtanh",
  807. "%val","%loc","%descr",
  808. ""
  809. };
  810.  
  811.  
  812.  
  813. #ifdef VAXC
  814. CONST char*VAX_intrinsics[]= {
  815. "qsqrt","cdsqrt",
  816. "qlog","cdlog","qlog10",
  817. "qexp","cdexp",
  818. "qsin","cdsin",
  819. "sind","dsind","qsind",
  820. "qcos","cdcod",
  821. "cods","dcods","qcods",
  822. "qtan",
  823. "tand","dtand","qtand",
  824. "qasin",
  825. "asind","dasind","qasind",
  826. "qacos",
  827. "acosd","dacosd","qacosd",
  828. "qatan",
  829. "atand","datand","qatand",
  830. "qatan2",
  831. "atan2d","datan2d","qatan2d",
  832. "qsinh","qcosh","qtanh",
  833. "iiabs","jiabs","qabs","cdabs",
  834. "iint","jint","iidint","jidint","iiqint","jiqint","qint",
  835. "nint","inint","iidnnt","jidnnt","iiqnnt","jiqnnt","qnint",
  836. "zext","izext","jzext",
  837. "floati","floatj","snglq","dbleq",
  838. "qext","qextd",
  839. "iifix","jifix",
  840. "floati","floatj",
  841. "dfloti","dflotj",
  842. "qfloat",
  843. "dcmplx",
  844. "dreal","dimag","dconjg",
  845. "imax0","jmax0","qmax1","aimax0","ajmax0",
  846. "imin0","jmin0","qmin1","aimin0","ajmin0",
  847. "iidim","jidim","qdim",
  848. "imod","jmod","qmod",
  849. "iisign","jisign","qsign",
  850. "iiand","jiand",
  851. "iior","jior",
  852. "iieor","jieor",
  853. "inot","jnot",
  854. "ishft","iishft","jishft",
  855. "ibits","iibits","jibits",
  856. "ibset","iibset","jibset",
  857. "btest","bitest","bjtest",
  858. "ibclr","iibclr","jibclr",
  859. "ishftc","iishftc","jishftc",
  860. ""
  861. };
  862. #endif /* |VAXC| */
  863.  
  864.  
  865.  
  866. CONST char*F77_Keywords[]= {
  867. "ACCESS",
  868. "ASSOCIATEVARIABLE",
  869. "BLANK",
  870. "BLOCKSIZE",
  871. "BUFFERCOUNT",
  872. "CARRIAGECONTROL",
  873. "DEFAULTFILE",
  874. "DIRECT",
  875. "DISP",
  876. "END",
  877. "ERR",
  878. "EXIST",
  879. "FILE",
  880. "FMT",
  881. "FORM",
  882. "FORMATTED",
  883. "IOSTAT",
  884. "NAME",
  885. "NAMED",
  886. "NEXTREC",
  887. "NUMBER",
  888. "OPENED",
  889. "RECL",
  890. "SEQUENTIAL",
  891. "STATUS",
  892. "UNFORMATTED",
  893. "UNIT",
  894. ""
  895. };
  896.  
  897. CONST char*F77_keywords[]= {
  898. "access",
  899. "associatevariable",
  900. "blank",
  901. "blocksize",
  902. "buffercount",
  903. "carriagecontrol",
  904. "defaultfile",
  905. "direct",
  906. "disp",
  907. #if 0
  908. "end",/* This has special meaning to \Fortran. */
  909. #endif
  910. "err",
  911. "exist",
  912. "file",
  913. "fmt",
  914. "form",
  915. "formatted",
  916. "iostat",
  917. "name",
  918. "named",
  919. "nextrec",
  920. "number",
  921. "opened",
  922. "recl",
  923. "sequential",
  924. "status",
  925. "unformatted",
  926. "unit",
  927. ""
  928. };
  929.  
  930.  
  931.  
  932. #ifdef VAXC
  933. CONST char*VAX_Keywords[]= {
  934. "DISPOSE",
  935. "EXTENDSIZE",
  936. "INITIALSIZE",
  937. "KEY",
  938. "KEYED",
  939. "MAXREC",
  940. "NML",
  941. "NOSPANBLOCKS",
  942. "ORGANIZATION",
  943. "READONLY",
  944. "REC",
  945. "RECORDSIZE","RECORDTYPE","RECORDSIZE",
  946. "SHARED",
  947. "TYPE",
  948. "USEROPEN",
  949. ""
  950. };
  951. #endif /* |VAXC| */
  952.  
  953.  
  954.  
  955. static RESERVED_WORD F90_words[]= {
  956. {"allocate",read_like},
  957. {"allocatable",int_like},
  958. {"assignment",op_like},
  959. {"contains",entry_like},
  960. {"cycle",case_like},
  961. {"deallocate",read_like},
  962. {"elsewhere",else_like},
  963. {"endinterface",end_like},
  964. {"endmodule",end_like},
  965. {"endselect",end_like},
  966. {"endtype",end_like},
  967. {"endwhere",end_like},
  968. {"exit",case_like},
  969. {"include",no_order},
  970. {"intent",int_like},
  971. {"interface",struct_like},
  972. {"module",program_like},
  973. {"only",built_in},
  974. {"optional",int_like},
  975. {"nullify",read_like},
  976. {"operator",op_like},
  977. {"pointer",int_like},
  978. {"private",private_like},
  979. {"procedure",proc_like},
  980. {"public",private_like},
  981. {"recursive",int_like},
  982. {"result",_EXPR},
  983. {"save",int_like},
  984. {"select",if_like},
  985. {"sequence",private_like},
  986. {"target",int_like},
  987. {"type",struct_like},
  988. {"use",no_order},
  989. {"where",if_like},
  990. {"while",for_like},
  991. {"",0}
  992. };
  993.  
  994.  
  995.  
  996. CONST char*F90_intrinsics[]= {
  997. "achar",
  998. "adjustl","adjustr",
  999. "all","any",
  1000. "associated",
  1001. "bit_size",
  1002. "btest",
  1003. "ceiling",
  1004. "count",
  1005. "cshift",
  1006. "date_and_time",
  1007. "floor",
  1008. "digits",
  1009. "dotproduct",
  1010. "eoshift",
  1011. "epsilon",
  1012. "exponent","fraction",
  1013. "huge",
  1014. "iachar",
  1015. "ibclr","ibits","ibset","ishft","ishftc",
  1016. "kind",
  1017. "len_trim",
  1018. "LOGICAL",
  1019. "matmul",
  1020. "maxexponent","minexponent",
  1021. "maxloc","minloc",
  1022. "maxval","minval",
  1023. "merge",
  1024. "modulo",
  1025. "mvbits",
  1026. "nearest",
  1027. "pack",
  1028. "PRECISION",
  1029. "present",
  1030. "product",
  1031. "radix",
  1032. "random","randomseed",
  1033. "range",
  1034. "REPEAT",
  1035. "reshape",
  1036. "rrspacing",
  1037. "scale",
  1038. "scan",
  1039. "selected_int_kind","selected_real_kind",
  1040. "setexponent",
  1041. "spacing",
  1042. "spread",
  1043. "sum",
  1044. "system_clock",
  1045. "tiny",
  1046. "transfer",
  1047. "transpose",
  1048. "trim",
  1049. "ubound",
  1050. "unpack",
  1051. "verify",
  1052. ""
  1053. };
  1054.  
  1055.  
  1056.  
  1057. CONST char*F90_Keywords[]= {
  1058. "ACTION",
  1059. "ADVANCE",
  1060. "DELIM",
  1061. "EOR",
  1062. "IN","INOUT","OUT",
  1063. "KIND",
  1064. "LEN",
  1065. "NML",
  1066. "NULLS",
  1067. "ONLY",
  1068. "PAD",
  1069. "POSITION",
  1070. "READ","READWRITE",
  1071. "REC",
  1072. "SIZE",
  1073. "STAT",
  1074. "WRITE",
  1075. ""
  1076. };
  1077.  
  1078. CONST char*F90_keywords[]= {
  1079. "action",
  1080. "advance",
  1081. "delim",
  1082. "eor",
  1083. "in","inout","out",
  1084. "kind",
  1085. "len",
  1086. "nml",
  1087. "nulls",
  1088. "only",
  1089. "pad",
  1090. "position",
  1091. #if 0
  1092. "read",
  1093. #endif
  1094. "readwrite",
  1095. "rec",
  1096. "size",
  1097. "stat",
  1098. #if 0
  1099. "write",
  1100. #endif
  1101. ""
  1102. };
  1103.  
  1104.  
  1105.  
  1106. static RESERVED_WORD RATFOR_words[]= {
  1107. {"break",case_like},
  1108. {"case",CASE_like},
  1109. {"default",case_like},
  1110. {"for",for_like},{"FOR",for_like},
  1111. {"next",case_like},
  1112. {"repeat",do_like},
  1113. {"switch",for_like},
  1114. {"until",until_like},
  1115. {"while",for_like},
  1116. {"",0}
  1117. };
  1118.  
  1119.  
  1120.  
  1121. CONST char*R77_keywords[]= {
  1122. "end",
  1123. ""
  1124. };
  1125.  
  1126.  
  1127.  
  1128. extern RESERVED_WORD TEX_words[];
  1129.  
  1130.  
  1131.  
  1132. extern CONST char*TEX_intrinsics[];
  1133.  
  1134.  
  1135.  
  1136. typedef struct
  1137. {
  1138. boolean C,RATFOR,FORTRAN,TEX,LITERAL,C_PLUS_PLUS,RATFOR_90,FORTRAN_90;
  1139. }IS_RESERVED;
  1140.  
  1141. IS_RESERVED is_reservd= {NO,NO,NO,NO,NO,NO,NO,NO};
  1142.  
  1143. SRTN ini_reserved FCN((l))
  1144. LANGUAGE l C1("")
  1145. {
  1146. switch(l)
  1147. {
  1148. case NO_LANGUAGE:
  1149. CONFUSION("ini_reserved","Language should already be defined here");
  1150.  
  1151. case C:
  1152.  
  1153.  
  1154. ALREADY_RESERVED(C);
  1155.  
  1156. save_words(C,C_words);
  1157. save_words(C,C_words1);
  1158.  
  1159. save_WEB(C);
  1160.  
  1161. SAVE_ID(INTRINSIC_FCN,C,C_intrinsics);
  1162.  
  1163. ini_tokens(C)
  1164.  
  1165. ;
  1166. break;
  1167.  
  1168. case C_PLUS_PLUS:
  1169.  
  1170.  
  1171. ALREADY_RESERVED(C_PLUS_PLUS);
  1172.  
  1173. save_words(C_PLUS_PLUS,C_words);
  1174. save_words(C_PLUS_PLUS,Cpp_words);/* Extra; don't change order here. */
  1175. save_words(C_PLUS_PLUS,Cpp_words1);
  1176.  
  1177. save_WEB(C_PLUS_PLUS);
  1178.  
  1179. SAVE_ID(INTRINSIC_FCN,C_PLUS_PLUS,C_intrinsics);
  1180. SAVE_ID(INTRINSIC_FCN,C_PLUS_PLUS,Cpp_intrinsics);/* Extra. */
  1181.  
  1182. ini_tokens(C_PLUS_PLUS)
  1183.  
  1184. ;
  1185. break;
  1186.  
  1187. case FORTRAN:
  1188.  
  1189.  
  1190. ALREADY_RESERVED(FORTRAN);
  1191.  
  1192. save_words(FORTRAN,F77_words);
  1193. save_WEB(FORTRAN);
  1194.  
  1195. if(m4)
  1196. save_words(FORTRAN,M4_words);
  1197.  
  1198. SAVE_ID(INTRINSIC_FCN,FORTRAN,F77_intrinsics);
  1199. SAVE_ID(KEYWD,FORTRAN,F77_Keywords);
  1200.  
  1201. if(lc_keywords)
  1202. SAVE_ID(KEYWD,FORTRAN,F77_keywords);
  1203.  
  1204. #ifdef VAXC
  1205. save_words(FORTRAN,VAX_words);
  1206. SAVE_ID(INTRINSIC_FCN,FORTRAN,VAX_intrinsics);
  1207. SAVE_ID(KEYWD,FORTRAN,VAX_Keywords);
  1208. #endif /* |VAXC| */
  1209.  
  1210. ini_tokens(FORTRAN)
  1211.  
  1212. ;
  1213. break;
  1214.  
  1215. case FORTRAN_90:
  1216.  
  1217.  
  1218. ALREADY_RESERVED(FORTRAN_90);
  1219.  
  1220. save_words(FORTRAN_90,F77_words);
  1221. save_words(FORTRAN_90,F90_words);/* Extra. */
  1222. save_WEB(FORTRAN_90);
  1223.  
  1224. if(m4)
  1225. save_words(FORTRAN_90,M4_words);
  1226.  
  1227. SAVE_ID(INTRINSIC_FCN,FORTRAN_90,F77_intrinsics);
  1228. SAVE_ID(INTRINSIC_FCN,FORTRAN_90,F90_intrinsics);/* Extra. */
  1229. SAVE_ID(KEYWD,FORTRAN_90,F77_Keywords);
  1230. SAVE_ID(KEYWD,FORTRAN_90,F90_Keywords);
  1231.  
  1232. if(lc_keywords)
  1233. {
  1234. SAVE_ID(KEYWD,FORTRAN_90,F77_keywords);
  1235. SAVE_ID(KEYWD,FORTRAN_90,F90_keywords);
  1236. }
  1237.  
  1238. #ifdef VAXC
  1239. save_words(FORTRAN_90,VAX_words);
  1240. SAVE_ID(INTRINSIC_FCN,FORTRAN_90,VAX_intrinsics);
  1241. SAVE_ID(KEYWD,FORTRAN_90,VAX_Keywords);
  1242. #endif /* |VAXC| */
  1243.  
  1244. ini_tokens(FORTRAN_90)
  1245.  
  1246. ;
  1247. break;
  1248.  
  1249. case RATFOR:
  1250. if(!Rat_is_loaded)break;
  1251.  
  1252.  
  1253. ALREADY_RESERVED(RATFOR);
  1254.  
  1255. save_words(RATFOR,F77_words);
  1256. save_words(RATFOR,RATFOR_words);/* Extra. */
  1257. save_WEB(RATFOR);
  1258.  
  1259. if(m4)save_words(RATFOR,M4_words);
  1260.  
  1261. SAVE_ID(INTRINSIC_FCN,RATFOR,F77_intrinsics);
  1262. SAVE_ID(KEYWD,RATFOR,F77_Keywords);
  1263.  
  1264. if(lc_keywords)
  1265. {
  1266. SAVE_ID(KEYWD,RATFOR,F77_keywords);
  1267. SAVE_ID(KEYWD,RATFOR,R77_keywords);
  1268. }
  1269.  
  1270. #ifdef VAXC
  1271. save_words(RATFOR,VAX_words);
  1272. SAVE_ID(INTRINSIC_FCN,RATFOR,VAX_intrinsics);
  1273. SAVE_ID(KEYWD,RATFOR,VAX_Keywords);
  1274. #endif /* |VAXC| */
  1275.  
  1276. ini_RAT_tokens(RATFOR)
  1277.  
  1278. ;
  1279. break;
  1280.  
  1281. case RATFOR_90:
  1282. if(!Rat_is_loaded)break;
  1283.  
  1284.  
  1285. ALREADY_RESERVED(RATFOR_90);
  1286.  
  1287. save_words(RATFOR_90,F77_words);
  1288. save_words(RATFOR_90,F90_words);
  1289. save_words(RATFOR_90,RATFOR_words);/* Extra. */
  1290. save_WEB(RATFOR_90);
  1291.  
  1292. if(m4)
  1293. save_words(RATFOR_90,M4_words);
  1294.  
  1295. SAVE_ID(INTRINSIC_FCN,RATFOR_90,F77_intrinsics);
  1296. SAVE_ID(INTRINSIC_FCN,RATFOR_90,F90_intrinsics);
  1297. SAVE_ID(KEYWD,RATFOR_90,F77_Keywords);
  1298. SAVE_ID(KEYWD,RATFOR_90,F90_Keywords);
  1299.  
  1300. if(lc_keywords)
  1301. {
  1302. SAVE_ID(KEYWD,RATFOR_90,F77_keywords);
  1303. SAVE_ID(KEYWD,RATFOR_90,R77_keywords);
  1304. SAVE_ID(KEYWD,RATFOR_90,F90_keywords);
  1305. }
  1306.  
  1307. #ifdef VAXC
  1308. save_words(RATFOR_90,VAX_words);
  1309. SAVE_ID(INTRINSIC_FCN,RATFOR_90,VAX_intrinsics);
  1310. SAVE_ID(KEYWD,RATFOR_90,VAX_Keywords);
  1311. #endif /* |VAXC| */
  1312.  
  1313. ini_RAT_tokens(RATFOR_90)
  1314.  
  1315. ;
  1316. break;
  1317.  
  1318. case TEX:
  1319.  
  1320.  
  1321. ALREADY_RESERVED(TEX);
  1322.  
  1323. save_words(TEX,TEX_words);
  1324. save_WEB(TEX);
  1325.  
  1326. SAVE_ID(INTRINSIC_FCN,TEX,TEX_intrinsics);
  1327.  
  1328. ini_tokens(TEX)
  1329.  
  1330. ;
  1331. break;
  1332.  
  1333. case LITERAL:
  1334.  
  1335.  
  1336. ALREADY_RESERVED(LITERAL);
  1337.  
  1338.  
  1339. ;
  1340. break;
  1341.  
  1342. case NUWEB_OFF:
  1343. case NUWEB_ON:
  1344. CONFUSION("ini_reserved","Invalid language");
  1345. }
  1346.  
  1347. ini_out_tokens(general_tokens);/* For things such as |id_defined|. */
  1348. }
  1349.  
  1350.  
  1351. #endif /* Part 1 */
  1352.  
  1353. #if(part != 1)
  1354.  
  1355.  
  1356. RESERVED_WORD TEX_words[]= {
  1357.  
  1358. {"\\above",built_in},
  1359. {"\\abovedisplayshortskip",built_in},
  1360. {"\\abovedisplayskip",built_in},
  1361. {"\\abovewithdelims",built_in},
  1362. {"\\accent",built_in},
  1363. {"\\adjdemerits",built_in},
  1364. {"\\advance",built_in},
  1365. {"\\afterassignment",built_in},
  1366. {"\\aftergroup",built_in},
  1367. {"\\atop",built_in},
  1368. {"\\atopwithdelims",built_in}
  1369.  
  1370. ,
  1371.  
  1372. {"\\baselineskip",built_in},
  1373. {"\\batchmode",built_in},
  1374. {"\\begingroup",built_in},
  1375. {"\\belowdisplayshortskip",built_in},
  1376. {"\\belowdisplayskip",built_in},
  1377. {"\\binoppenalty",built_in},
  1378. {"\\botmark",built_in},
  1379. {"\\box",built_in},{"\\bowmaxdepth",built_in},
  1380. {"\\brokenpenalty",built_in}
  1381.  
  1382. ,
  1383.  
  1384. {"\\catcode",built_in},
  1385. {"\\char",built_in},{"\\chardef",typedef_like},
  1386. {"\\cleaders",built_in},
  1387. {"\\closein",built_in},{"\\closeout",built_in},
  1388. {"\\clubpenalty",built_in},
  1389. {"\\copy",built_in},
  1390. {"\\count",built_in},{"\\countdef",typedef_like},
  1391. {"\\cr",built_in},{"\\crcr",built_in},
  1392. {"\\csname",built_in}
  1393.  
  1394. ,
  1395.  
  1396. {"\\day",built_in},/* \rm\the\day */
  1397. {"\\deadcycles",built_in},
  1398. {"\\def",typedef_like},
  1399. {"\\defaulthyphenchar",built_in},{"\\defaultskewchar",built_in},
  1400. {"\\delcode",built_in},
  1401. {"\\delimiter",built_in},{"\\delimiterfactor",built_in},
  1402. {"\\deflimitershortfall",built_in},
  1403. {"\\dimen",built_in},{"\\dimendef",typedef_like},
  1404. {"\\discretionary",built_in},
  1405. {"\\displayindent",built_in},
  1406. {"\\displaylimits",built_in},
  1407. {"\\displaystyle",built_in},
  1408. {"\\displaywidowpenalty",built_in},
  1409. {"\\displaywidth",built_in},
  1410. {"\\divide",built_in},
  1411. {"\\doublehyphendemerits",built_in},
  1412. {"\\dp",built_in},
  1413. {"\\dump",built_in}
  1414.  
  1415. ,
  1416.  
  1417. {"\\edef",typedef_like},
  1418. {"\\eject",built_in},
  1419. {"\\else",built_in},
  1420. {"\\end",built_in},{"\\endcsname",built_in},
  1421. {"\\endcsname",built_in},
  1422. {"\\endgroup",built_in},
  1423. {"\\endinput",built_in},
  1424. {"\\endlinechar",built_in},
  1425. {"\\eqno",built_in},
  1426. {"\\errhelp",built_in},{"\\errmessage",built_in},
  1427. {"\\errorstopmode",built_in},
  1428. {"\\escapechar",built_in},
  1429. {"\\everycr",built_in},{"\\everydisplay",built_in},
  1430. {"\\everyhbox",built_in},{"\\everyjob",built_in},
  1431. {"\\everymath",built_in},{"\\everypar",built_in},
  1432. {"\\everyvbox",built_in},
  1433. {"\\exhyphenpenalty",built_in},
  1434. {"\\expandafter",built_in}
  1435.  
  1436. ,
  1437.  
  1438. {"\\fam",built_in},
  1439. {"\\fi",built_in},
  1440. {"\\finalhyphendemerits",built_in},
  1441. {"\\firstmark",built_in},
  1442. {"\\floatingpenalty",built_in},
  1443. {"\\font",built_in},{"\\fontdimen",built_in},
  1444. {"\\fontname",built_in},
  1445. {"\\futurelet",typedef_like},
  1446. {"\\gdef",typedef_like},
  1447. {"\\global",built_in},{"\\globaldefs",built_in},
  1448. {"\\halign",built_in},
  1449. {"\\hangafter",built_in},{"\\hangindent",built_in},
  1450. {"\\hbadness",built_in},
  1451. {"\\hbox",built_in},
  1452. {"\\hfil",built_in},{"\\hfill",built_in},
  1453. {"\\hfilneg",built_in},
  1454. {"\\hfuzz",built_in},
  1455. {"\\hoffset",built_in},
  1456. {"\\hrule",built_in},
  1457. {"\\hskip",built_in},
  1458. {"\\hss",built_in},
  1459. {"\\ht",built_in},
  1460. {"\\hyphenation",built_in},
  1461. {"\\hyphenchar",built_in},{"\\hyphenpenalty",built_in}
  1462.  
  1463. ,
  1464.  
  1465. {"\\if",built_in},{"\\ifcase",built_in},
  1466. {"\\ifcat",built_in},{"\\ifdim",built_in},{"\\ifeof",built_in},
  1467. {"\\iffalse",built_in},{"\\ifhbox",built_in},
  1468. {"\\ifhmode",built_in},{"\\ifinner",built_in},{"\\ifmmode",built_in},
  1469. {"\\ifnum",built_in},{"\\ifodd",built_in},
  1470. {"\\iftrue",built_in},
  1471. {"\\ifvbox",built_in},{"\\ifvmode",built_in},{"\\ifvoid",built_in},
  1472. {"\\ifx",built_in},
  1473. {"\\ignorespaces",built_in},
  1474. {"\\immediate",built_in},
  1475. {"\\indent",built_in},
  1476. {"\\input",built_in},
  1477. {"\\insert",built_in},{"\\insertpenalties",built_in},
  1478. {"\\interlinepenalty",built_in},
  1479. {"\\jobname",built_in},/* \rm \jobname */
  1480. {"\\kern",built_in}
  1481.  
  1482. ,
  1483.  
  1484. {"\\lastbox",built_in},{"\\lastkern",built_in},
  1485. {"\\lastpenalty",built_in},{"\\lastskip",built_in},
  1486. {"\\lccode",built_in},
  1487. {"\\leaders",built_in},
  1488. {"\\left",built_in},
  1489. {"\\leqno",built_in},
  1490. {"\\leftskip",built_in},
  1491. {"\\let",typedef_like},
  1492. {"\\limits",built_in},
  1493. {"\\linepenalty",built_in},{"\\lineskip",built_in},
  1494. {"\\lineskiplimit",built_in},
  1495. {"\\llap",built_in},
  1496. {"\\long",built_in},
  1497. {"\\looseness",built_in},
  1498. {"\\lower",built_in},{"\\lowercase",built_in}
  1499.  
  1500. ,
  1501.  
  1502. {"\\mag",built_in},
  1503. {"\\mark",built_in},
  1504. {"\\mathaccent",built_in},
  1505. {"\\mathbin",built_in},
  1506. {"\\mathchar",built_in},
  1507. {"\\mathchardef",built_in},
  1508. {"\\mathchoice",built_in},
  1509. {"\\mathclose",built_in},
  1510. {"\\mathcode",built_in},
  1511. {"\\mathinner",built_in},{"\\mathop",built_in},
  1512. {"\\mathop",built_in},{"\\mathopen",built_in},
  1513. {"\\mathord",built_in},
  1514. {"\\mathpunc",built_in},
  1515. {"\\mathrel",built_in},
  1516. {"\\mathsurround",built_in},
  1517. {"\\maxdeadcycles",built_in},
  1518. {"\\maxdepth",built_in},
  1519. {"\\meaning",built_in},
  1520. {"\\medmuskip",built_in},
  1521. {"\\message",built_in},
  1522. {"\\mkern",built_in},
  1523. {"\\month",built_in},/* \rm\the\month */
  1524. {"\\moveleft",built_in},{"\\moveright",built_in},
  1525. {"\\mskip",built_in},
  1526. {"\\multiply",built_in},
  1527. {"\\muskip",built_in},
  1528. {"\\muskipdef",built_in},
  1529. {"\\newlinechar",built_in},
  1530. {"\\noalign",built_in},
  1531. {"\\noexpand",built_in},
  1532. {"\\noindent",built_in},
  1533. {"\\nolimits",built_in},
  1534. {"\\nonscript",built_in},
  1535. {"\\nonstopmode",built_in},
  1536. {"\\nulldelimiterspace",built_in},
  1537. {"\\number",built_in}
  1538.  
  1539. ,
  1540.  
  1541. {"\\omit",built_in},
  1542. {"\\openin",built_in},{"\\openout",built_in},
  1543. {"\\or",built_in},
  1544. {"\\outer",built_in},
  1545. {"\\output",built_in},{"\\outputpenalty",built_in},
  1546. {"\\over",built_in},
  1547. {"\\overfullrule",built_in},
  1548. {"\\overline",built_in},
  1549. {"\\overwithdelims",built_in}
  1550.  
  1551. ,
  1552.  
  1553. {"\\pagedepth",built_in},
  1554. {"\\pagefilllstretch",built_in},{"\\pagefillstretch",built_in},
  1555. {"\\pagefilstretch",built_in},
  1556. {"\\pagegoal",built_in},
  1557. {"\\pageshrink",built_in},{"\\pagestretch",built_in},
  1558. {"\\pagetotal",built_in},
  1559. {"\\par",built_in},
  1560. {"\\parfillskip",built_in},
  1561. {"\\parindent",built_in},
  1562. {"\\parshape",built_in},{"\\parskip",built_in},
  1563. {"\\patterns",built_in},
  1564. {"\\pausing",built_in},
  1565. {"\\penalty",built_in},
  1566. {"\\postdisplaypenalty",built_in},
  1567. {"\\predisplaypenalty",built_in},
  1568. {"\\predisplaysize",built_in},
  1569. {"\\pretolerance",built_in},
  1570. {"\\prevdepth",built_in},
  1571. {"\\prevgraf",built_in},
  1572. {"\\radical",built_in},
  1573. {"\\raise",built_in},
  1574. {"\\read",built_in},
  1575. {"\\relax",built_in},
  1576. {"\\relpenalty",built_in},
  1577. {"\\right",built_in},
  1578. {"\\rightskip",built_in},
  1579. {"\\romannumeral",built_in}/* \romannumeral4 */
  1580.  
  1581. ,
  1582.  
  1583. {"\\scripfont",built_in},{"\\scripscripfont",built_in},
  1584. {"\\scripscriptstyle",built_in},{"\\scriptspace",built_in},
  1585. {"\\scripstyle",built_in},
  1586. {"\\scrollmode",built_in},
  1587. {"\\setbox",built_in},
  1588. {"\\sfcode",built_in},
  1589. {"\\shipout",built_in},
  1590. {"\\show",built_in},{"\\showbox",built_in},
  1591. {"\\showboxbreadth",built_in},{"\\showboxdepth",built_in},
  1592. {"\\showhyphens",built_in},{"\\showlists",built_in},
  1593. {"\\showthe",built_in},
  1594. {"\\skewchar",built_in},
  1595. {"\\skip",built_in},{"\\skipdepth",built_in},
  1596. {"\\spacefactor",built_in},{"\\spaceskip",built_in},
  1597. {"\\span",built_in},
  1598. {"\\special",built_in},
  1599. {"\\splitbotmark",built_in},{"\\splitfirstmark",built_in},
  1600. {"\\splitmaxdepth",built_in},
  1601. {"\\splittopskip",built_in},
  1602. {"\\string",built_in},
  1603. {"\\tabskip",built_in}
  1604.  
  1605. ,
  1606.  
  1607. {"\\textfont",built_in},
  1608. {"\\textstyle",built_in},
  1609. {"\\the",built_in},
  1610. {"\\thickmuskip",built_in},{"\\thinmuskip",built_in},
  1611. {"\\time",built_in},
  1612. {"\\toks",built_in},{"\\toksdef",built_in},
  1613. {"\\tolerance",built_in},
  1614. {"\\topmark",built_in},{"\\topskip",built_in},
  1615. {"\\tracingcommands",built_in},
  1616. {"\\tracinglostchars",built_in},
  1617. {"\\tracingmacros",built_in},
  1618. {"\\tracingonline",built_in},
  1619. {"\\tracingoutput",built_in},
  1620. {"\\tracingpages",built_in},
  1621. {"\\tracingparagraphs",built_in},
  1622. {"\\tracingrestores",built_in},
  1623. {"\\tracingstats",built_in}
  1624.  
  1625. ,
  1626.  
  1627. {"\\ucode",built_in},{"\\uchyph",built_in},
  1628. {"\\underline",built_in},/* $\underline{\hbox{Underlined}}$ */
  1629. {"\\unhbox",built_in},
  1630. {"\\unhcopy",built_in},{"\\unkern",built_in},
  1631. {"\\unpenalty",built_in},{"\\unskip",built_in},
  1632. {"\\unvbox",built_in},{"\\unvcopy",built_in},
  1633. {"\\uppercase",built_in},/* \rm\uppercase{abc} */
  1634. {"\\vadjust",built_in},{"\\valign",built_in},
  1635. {"\\vbadness",built_in},
  1636. {"\\vbox",built_in},{"\\vcenter",built_in},
  1637. {"\\vfil",built_in},{"\\vfill",built_in},
  1638. {"\\vfilneg",built_in},
  1639. {"\\vfuzz",built_in},
  1640. {"\\voffset",built_in},
  1641. {"\\vskip",built_in},
  1642. {"\\vrule",built_in},
  1643. {"\\vsize",built_in},
  1644. {"\\vskip",built_in},
  1645. {"\\vskip",built_in},
  1646. {"\\vss",built_in},
  1647. {"\\vtop",built_in},
  1648. {"\\wd",built_in},
  1649. {"\\widowpenalty",built_in},
  1650. {"\\write",built_in},
  1651. {"\\xdef",typedef_like},
  1652. {"\\xleaders",built_in},
  1653. {"\\xspaceskip",built_in},
  1654. {"\\year",built_in}/* \rm\the\year */
  1655.  
  1656.  
  1657. ,
  1658. {"",0}
  1659. };
  1660.  
  1661.  
  1662.  
  1663. CONST char*TEX_intrinsics[]= {
  1664.  
  1665. "\\aa",/*\rm \aa */
  1666. "\\AA",/*\rm \AA */
  1667. "\\active",
  1668. "\\acute",/* $\acute x$ */
  1669. "\\advancepageno",
  1670. "\\ae",/* \rm \ae */
  1671. "\\AE",/* \rm \AE */
  1672. "\\aleph",/* $\aleph$ */
  1673. "\\allowbreak",
  1674. "\\allowhyphens",
  1675. "\\alpha",/* $\alpha$ */
  1676. "\\amalg",/* $\amalg$ */
  1677. "\\angle",/* $\angle$ */
  1678. "\\approx",/* $\approx$ */
  1679. "\\arccos",/* $\arccos$ */
  1680. "\\arcsin",/* $\arcsin$ */
  1681. "\\arctan",/* $\arctan$ */
  1682. "\\arg",/* $\arg$ */
  1683. "\\arrowvert",/* $\arrowvert$ */
  1684. "\\Arrowvert",/* $\Arrowvert$ */
  1685. "\\ast",/* $\ast$ */
  1686. "\\asymp"/* $\asymp$ */
  1687.  
  1688. ,
  1689.  
  1690. "\\b",/*\rm \b b */
  1691. "\\backslash",/* $\backslash$ */
  1692. "\\bar",/* $\bar x$ */
  1693. "\\beta",/* $\beta$ */
  1694. "\\bf",/* \bf boldface */
  1695. "\\bffam",
  1696. "\\bgroup",
  1697. "\\big",/* $\big[$ */
  1698. "\\Big",/* $\Big[$ */
  1699. "\\bigbreak",
  1700. "\\bigcap",/* $\bigcap$     */
  1701. "\\bigcirc",/* $\bigcirc$ */
  1702. "\\bigcup",/* $\bigcup$ */
  1703. "\\bigg",/* $\bigg[$ */
  1704. "\\Bigg",/* $\Bigg[$ */
  1705. "\\biggl",/* $\biggl[$ */
  1706. "\\Biggl",/* $\Biggl[$ */
  1707. "\\biggm",/* $\biggm\vert$ */
  1708. "\\Biggm",/* $\Biggm\vert$ */
  1709. "\\biggr",/* $\biggr]$ */
  1710. "\\Biggr",/* $\Biggr]$ */
  1711. "\\bigl",/* $\bigl[$ */
  1712. "\\Bigl",/* $\Bigl[$ */
  1713. "\\bigm",/* $\bigm\vert$ */
  1714. "\\Bigm",/* $\Bigm\vert$ */
  1715. "\\bigodot",/* $\bigodot$ */
  1716. "\\bigoplus",/* $\bigoplus$ */
  1717. "\\bigotimes",/* $\bigotimes$ */
  1718. "\\bigr",/* $\bigr]$ */
  1719. "\\Bigr",/* $\Bigr]$ */
  1720. "\\bigskip","\\bigskipamount",
  1721. "\\bigsqcup",/* $\bigsqcup$ */
  1722. "\\bigtriangledown",/* $\bigtriangledown$ */
  1723. "\\bigtriangleup",/* $\bigtriangleup$ */
  1724. "\\biguplus",/* $\biguplus$ */
  1725. "\\bigvee",/* $\bigvee$ */
  1726. "\\bigwedge",/* $\bigwedge$ */
  1727. "\\bmod",
  1728. "\\body",/* $\bmod$ */
  1729. "\\bordermatrix",/* $\bordermatrix{&C&I&C'\cr \
  1730.                 C&1&0&0\cr \
  1731.                 I&b&1-b&0\cr \
  1732.                 C'&0&a&1-a\cr}$ */
  1733. "\\bot",/* $\bot$ */
  1734. "\\bowtie",/* $\bowtie$ */
  1735. "\\brace",/* $n\brace k$ */
  1736. "\\braceld",/* $\braceld$ */
  1737. "\\bracelu",/* $\bracelu$ */
  1738. "\\bracerd",/* $\bracerd$ */
  1739. "\\braceru",/* $\braceru$ */
  1740. "\\bracevert",/* $\bracevert$ */
  1741. "\\brack",/* $n\brack k$ */
  1742. "\\break",
  1743. "\\breve",/* $\breve x$ */
  1744. "\\buildrel",
  1745. "\\bullet",/* $\bullet$ */
  1746. "\\bye"
  1747.  
  1748. ,
  1749.  
  1750. "\\c",/* \rm\c x */
  1751. "\\cal",/* $\cal A$ */
  1752. "\\cap",/* $\cap$ */
  1753. "\\cases",/* $x = \cases{a&test\cr b&no test\cr}$ */
  1754. "\\cdot",/* $a\cdot b$ */
  1755. "\\cdotp",
  1756. "\\cdots",/* $a + \cdots$ */
  1757. "\\centering",
  1758. "\\centerline",
  1759. "\\check",/* $\check x$ */
  1760. "\\chi",/* $\chi$ */
  1761. "\\choose",/* $n\choose k$ */
  1762. "\\circ",/* $\circ$ */
  1763. "\\cleartabs",
  1764. "\\clubsuit",/* $\clubsuit$ */
  1765. "\\colon",/* $\colon$ */
  1766. "\\cong",/* $\cong$ */
  1767. "\\coprod",/* $\coprod$ */
  1768. "\\copyright",/*\rm\copyright */
  1769. "\\cos",/* $\cos$ */
  1770. "\\cosh",/* $\cosh$ */
  1771. "\\cot",/* $\cot$ */
  1772. "\\coth",/* $\coth$ */
  1773. "\\csc",/* $\csc$ */
  1774. "\\cup"/* $\cup$ */
  1775.  
  1776. ,
  1777.  
  1778. "\\d",/* \rm\d x */
  1779. "\\dag",/* $\dag$ */
  1780. "\\dagger",/* $\dagger$ */
  1781. "\\dashv",/* $\dashv$ */
  1782. "\\ddag",/* $\ddag$ */
  1783. "\\ddagger",/* $\ddagger$ */
  1784. "\\ddot",/* $\ddot x$ */
  1785. "\\ddots",/* $\ddots$ */
  1786. "\\deg",/* $\deg$ */
  1787. "\\delta",/* $\delta$ */
  1788. "\\Delta",/* $\Delta$ */
  1789. "\\det",/* $\det$ */
  1790. "\\diamond",/* $\diamond$ */
  1791. "\\diamondsuit",/* $\diamondsuit$ */
  1792. "\\dim",/* $\dim$ */
  1793. "\\displaylines",
  1794. "\\div",/* $\div$ */
  1795. "\\dospecials",
  1796. "\\dosupereject",
  1797. "\\dot",/* $\dot x$ */
  1798. "\\doteq",/* $\doteq$ */
  1799. "\\dotfill",
  1800. "\\dots",/* $\dots$ */
  1801. "\\downarrow",/* $\downarrow$ */
  1802. "\\Downarrow",/* $\Downarrow$ */
  1803. "\\downbracefill"/* \hbox to 100pt{\downbracefill} */
  1804.  
  1805.  
  1806. ,
  1807.  
  1808. "\\egroup",
  1809. "\\eject",
  1810. "\\ell",/* $\ell$ */
  1811. "\\empty",
  1812. "\\emptyset",/* $\emptyset$ */
  1813. "\\endgraf",
  1814. "\\endline",
  1815. "\\enskip","\\enspace",
  1816. "\\epsilon",/* $\epsilon$ */
  1817. "\\eqalign","\\eqalignno",
  1818. "\\equiv",/* $\equiv$ */
  1819. "\\eta",/* $\eta$ */
  1820. "\\exists",/* $\exists$ */
  1821. "\\exp"/* $\exp$ */
  1822.  
  1823. ,
  1824.  
  1825. "\\filbreak",
  1826. "\\fiverm",/* \rm\fiverm Fiverm */
  1827. "\\flat",/* $\flat$ */
  1828. "\\folio",
  1829. "\\footins",
  1830. "\\footline","\\footnote","\\footnoterule",
  1831. "\\forall",/* $\forall$ */
  1832. "\\frenchspacing",/* \rm This is French spacing */
  1833. "\\frown",/* $\frown$     */
  1834. "\\fullhsize","\\fullline",
  1835. "\\gamma",/* $\gamma$ */
  1836. "\\Gamma",/* $\Gamma$ */
  1837. "\\gcd",/* $\gcd$ */
  1838. "\\ge",/* $\ge$ */
  1839. "\\geq",/* $\geq$ */
  1840. "\\getfactor",
  1841. "\\gets",/* $\gets$ */
  1842. "\\gg",/* $\gg$ */
  1843. "\\glue",
  1844. "\\goodbreak",
  1845. "\\grave",/* $\grave x$ */
  1846. "\\hang",
  1847. "\\hat",/* $\hat x$ */
  1848. "\\hbar",/* $\hbar$ */
  1849. "\\headline",
  1850. "\\heartsuit",/* $\heartsuit$ */
  1851. "\\hglue",
  1852. "\\hideskip",
  1853. "\\hidewidth",
  1854. "\\hookleftarrow",/* $\hookleftarrow$ */
  1855. "\\hookrightarrow",/* $\hookrightarrow$ */
  1856. "\\hphantom",
  1857. "\\hrulefill"
  1858.  
  1859. ,
  1860.  
  1861. "\\ialign",
  1862. "\\iff",/* $\iff$ */
  1863. "\\Im",/* $\Im$ */
  1864. "\\imath",
  1865. "\\in",/* $\in$ */
  1866. "\\inf",/* $\inf$ */
  1867. "\\infty",/* $\infty$ */
  1868. "\\int",/* $\int$ */
  1869. "\\interdisplaylinepenalty",
  1870. "\\interfootnotelinepenalty",
  1871. "\\iota",/* $\iota$ */
  1872. "\\it",/* \it Italics */
  1873. "\\item",
  1874. "\\itemitem",
  1875. "\\itfam",
  1876. "\\j",/* $\j$ */
  1877. "\\jmath",/* $\jmath$ */
  1878. "\\joinrel",
  1879. "\\jot",
  1880. "\\kappa",/* $\kappa$ */
  1881. "\\ker"/* $\ker$ */
  1882.  
  1883. ,
  1884.  
  1885. "\\l",/* $\l$ */
  1886. "\\L",/* $\L$ */
  1887. "\\lambda",/* $\lambda$ */
  1888. "\\Lambda",/* $\Lambda$ */
  1889. "\\land",/* $\land$ */
  1890. "\\langle",/* $\langle$ */
  1891. "\\lbrace",/* $\lbrace$ */
  1892. "\\lbrack",/* $\lbrack$ */
  1893. "\\lceil",/* $\lceil$ */
  1894. "\\ldotp",
  1895. "\\ldots",/* $\ldots$ */
  1896. "\\le",/* $\le$ */
  1897. "\\leavevmode",
  1898. "\\leftarrow",/* $\leftarrow$ */
  1899. "\\Leftarrow",/* $\Leftarrow$ */
  1900. "\\leftarrowfill",/* \hbox to 100pt{\leftarrowfill} */
  1901. "\\leftharpoondown",/* $\leftharpoondown$ */
  1902. "\\leftharpoonup",/* $\leftharpoonup$ */
  1903. "\\leftline",
  1904. "\\leftrightarrow",/* $\leftrightarrow$ */
  1905. "\\Leftrightarrow",/* $\Leftrightarrow$ */
  1906. "\\leq",/* $\leq$ */
  1907. "\\leqalignno",
  1908. "\\lfloor",/* $\lfloor$ */
  1909. "\\lg",/* $\lg$ */
  1910. "\\lgroup",
  1911. "\\lhook",/* $\lhook$ */
  1912. "\\lim",/* $\lim$ */
  1913. "\\liminf",/* $\liminf$ */
  1914. "\\limsup",/* $\limsup$ */
  1915. "\\line",
  1916. "\\ll",/* $\ll$ */
  1917. "\\llap",
  1918. "\\lmoustache",/* $\lmoustache$ */
  1919. "\\ln",/* $\ln$ */
  1920. "\\lnot",/* $\lnot$ */
  1921. "\\log",/* $\log$ */
  1922. "\\longindentation",
  1923. "\\longleftarrow",/* $\longleftarrow$ */
  1924. "\\Longleftarrow",/* $\Longleftarrow$ */
  1925. "\\longleftrightarrow",/* $\longleftrightarrow$ */
  1926. "\\Longleftrightarrow",/* $\Longleftrightarrow$ */
  1927. "\\longmapsto",/* $\longmapsto$ */
  1928. "\\longrightarrow",/* $\longrightarrow$ */
  1929. "\\Longrightarrow",/* $\Longrightarrow$ */
  1930. "\\loop",
  1931. "\\lor",/* $\lor$ */
  1932. "\\lq"/* $\lq$ */
  1933.  
  1934. ,
  1935.  
  1936. "\\magnification","\\magstep","\\magstephalf",
  1937. "\\maintoks",
  1938. "\\makefootline","\\makeheadline",
  1939. "\\mapsto",/* $\mapsto$ */
  1940. "\\mapstochar",/* $\mapstochar$ */
  1941. "\\mathhexbox",
  1942. "\\mathpalette",
  1943. "\\mathstrut",
  1944. "\\matrix",/* $\matrix{a&b\cr c&d\cr}$ */
  1945. "\\max",/* $\max$ */
  1946. "\\maxdimen",
  1947. "\\medbreak",
  1948. "\\medskip","\\medskipamount",
  1949. "\\mid",/* $\mid$ */
  1950. "\\midinsert",
  1951. "\\min",/* $\min$ */
  1952. "\\mit",/*\mit abc */
  1953. "\\models",/* $\models$ */
  1954. "\\mp",/* $\mp$ */
  1955. "\\mu",/* $\mu$ */
  1956. "\\multispan",
  1957. "\\nabla",/* $\nabla$ */
  1958. "\\narrower",
  1959. "\\natural",/* $\natural$ */
  1960. "\\ne",/* $\ne$ */
  1961. "\\nearrow",/* $\nearrow$ */
  1962. "\\neg",/* $\neg$ */
  1963. "\\negthinspace",
  1964. "\\neq",/* $\neq$ */
  1965. "\\newbox","\\newcount","\\newdimen","\\newfam",
  1966. "\\newhelp","\\newif","\\newinsert",
  1967. "\\newmuskip",
  1968. "\\newread","\\newskip","\\newtoks","\\newwrite",
  1969. "\\next",
  1970. "\\ni",
  1971. "\\ninepoint",
  1972. "\\ninerm",/*\ninerm Ninerm */
  1973. "\\nobreak",
  1974. "\\nointerlineskip",
  1975. "\\nonfrenchspacing",
  1976. "\\nopagenumbers",
  1977. "\\normalbaselines","\\normalbaselineskip",
  1978. "\\normalbottom","\\normallineskip","\\normallineskiplimit",
  1979. "\\not",/* $\not$ */
  1980. "\\notin",/* $\notin$ */
  1981. "\\nu",/* $\nu$ */
  1982. "\\null",
  1983. "\\nullfont",
  1984. "\\nwarrow"/* $\nwarrow$ */
  1985.  
  1986. ,
  1987.  
  1988. "\\o",/* $\o$ */
  1989. "\\O",/* $\O$ */
  1990. "\\oalign",
  1991. "\\obeylines","\\obeyspaces",
  1992. "\\odot",/* $\odot$ */
  1993. "\\oe",/* \oe */
  1994. "\\OE",/* \OE */
  1995. "\\offinterlineskip",
  1996. "\\oint",/* $\oint$ */
  1997. "\\oldstyle",
  1998. "\\omega",/* $\omega$ */
  1999. "\\Omega",/* $\Omega$ */
  2000. "\\ominus",/* $\ominus$ */
  2001. "\\ooalign",
  2002. "\\openup",
  2003. "\\oplus",/* $\oplus$ */
  2004. "\\oslash",/* $\oslash$ */
  2005. "\\other",
  2006. "\\otimes",/* $\otimes$ */
  2007. "\\overbrace",/* $\overbrace{x+\cdots+x}^{k\rm\;times}$ */
  2008. "\\overleftarrow",/* $\overleftarrow{abc}$ */
  2009. "\\overrightarrow",/* $\overrightarrow{abc}$ */
  2010. "\\owns"/* $\owns$ */
  2011.  
  2012. ,
  2013.  
  2014. "\\P",/* \P */
  2015. "\\pagebody","\\pagecontents",
  2016. "\\pageinsert","\\pageno",
  2017. "\\parallel",/* $\parallel$ */
  2018. "\\partial",/* $\partial$ */
  2019. "\\perp",/* $\perp$ */
  2020. "\\phantom",
  2021. "\\phi",/* $\phi$ */
  2022. "\\Phi",/* $\Phi$ */
  2023. "\\pi",/* $\pi$ */
  2024. "\\Pi",/* $\Pi$ */
  2025. "\\plainoutput",
  2026. "\\pm",/* $\pm$ */
  2027. "\\pmatrix",/* $\pmatrix{a&b\cr c&d\cr}$ */
  2028. "\\pmod",/* $\pmod$ */
  2029. "\\Pr",/* $\Pr$ */
  2030. "\\prec",/* $\prec$ */
  2031. "\\preceq",/* $\preceq$ */
  2032. "\\preloaded",
  2033. "\\prime",
  2034. "\\proclaim",
  2035. "\\prod",/* $\prod$ */
  2036. "\\propto",/* $\propto$ */
  2037. "\\ps",
  2038. "\\psi",/* $\psi$ */
  2039. "\\Psi",/* $\Psi$ */
  2040. "\\qquad",/* $x\qquad y$ */
  2041. "\\quad",/* $x\quad y$ */
  2042. "\\raggedbottom","\\raggedcenter","\\raggedright",
  2043. "\\rangle",/* $\rangle$ */
  2044. "\\rbrace",/* $\rbrace$ */
  2045. "\\rbrack",/* $\rbrack$ */
  2046. "\\rceil",/* $\rceil$ */
  2047. "\\Re",/* $\Re$ */
  2048. "\\relbar",/* $\relbar$ */
  2049. "\\Relbar",/* $\Relbar$ */
  2050. "\\removelastskip",
  2051. "\\repeat",
  2052. "\\rfloor",/* $\rfloor$ */
  2053. "\\rgroup",
  2054. "\\rho",/* $\rho$ */
  2055. "\\rhook",/* $\rhook$ */
  2056. "\\rightarrow",/* $\rightarrow$ */
  2057. "\\Rightarrow",/* $\Rightarrow$ */
  2058. "\\rightarrowfill",/* \hbox to 100pt{\rightarrowfill} */
  2059. "\\rightharpoondown",/* $\rightharpoondown$ */
  2060. "\\rightharpoonup",/* $\rightharpoonup$ */
  2061. "\\rightleftharpoons",/* $\rightleftharpoons$ */
  2062. "\\rightline",
  2063. "\\rlap",
  2064. "\\rm",/* \rm Roman */
  2065. "\\rmoustache",/* $\rmoustache$ */
  2066. "\\root",
  2067. "\\rq"/* $\rq$ */
  2068.  
  2069. ,
  2070.  
  2071. "\\S",/* \S */
  2072. "\\sb",
  2073. "\\sc",/* \SC Small CAPS */
  2074. "\\searrow",/* $\searrow$ */
  2075. "\\sec",/* $\sec$ */
  2076. "\\setminus",/* $\setminus$ */
  2077. "\\settabs",
  2078. "\\setupverbatim",
  2079. "\\sevenrm",/* \sevenrm Sevenrm */
  2080. "\\sharp",/* $\sharp$ */
  2081. "\\sigma",/* $\sigma$ */
  2082. "\\Sigma",/* $\Sigma$ */
  2083. "\\sim",/* $\sim$ */
  2084. "\\simeq",/* $\simeq$ */
  2085. "\\sin",/* $\sin$ */
  2086. "\\sinh",/* $\sinh$ */
  2087. "\\skew",
  2088. "\\sl",/* \sl Slanted */
  2089. "\\slash",/* $\slash$ */
  2090. "\\slfam",
  2091. "\\smallbreak",
  2092. "\\smallint",/* $\smallint$ */
  2093. "\\smallskip","\\smallskipamount","\\smalltype",
  2094. "\\smash",
  2095. "\\smile",/* $\smile$ */
  2096. "\\sp",
  2097. "\\space",
  2098. "\\spadesuit",/* $\spadesuit$ */
  2099. "\\sqcap",/* $\sqcap$ */
  2100. "\\sqcup",/* $\sqcup$ */
  2101. "\\sqrt",/* $\sqrt\pi$ */
  2102. "\\sqsubseteq",/* $\sqsubseteq$ */
  2103. "\\sqsupseteq",/* $\sqsupseteq$ */
  2104. "\\ss",/* \rm\ss */
  2105. "\\star",/* $\star$ */
  2106. "\\strut","\\strutbox",
  2107. "\\subset",/* $\subset$ */
  2108. "\\subseteq",/* $\subseteq$ */
  2109. "\\succ",/* $\succ$ */
  2110. "\\succeq",/* $\succeq$ */
  2111. "\\sum",/* $\sum$ */
  2112. "\\sup",/* $\sup$ */
  2113. "\\supereject",
  2114. "\\supset",/* $\supset$ */
  2115. "\\supseteq",/* $\supseteq$ */
  2116. "\\surd",/* $\surd$ */
  2117. "\\swarrow"/* $\swarrow$ */
  2118.  
  2119. ,
  2120.  
  2121. "\\t",/* \rm \t x */
  2122. "\\tabalign",
  2123. "\\tabs",
  2124. "\\tan",/* $\tan$ */
  2125. "\\tanh",/* $\tanh$ */
  2126. "\\tau",/* $\tau$ */
  2127. "\\tenex",
  2128. "\\tenpoint",
  2129. "\\tenrm",
  2130. "\\tensl",
  2131. "\\tensy",
  2132. "\\TeX",/* \TeX */
  2133. "\\textindent",
  2134. "\\theta",/* $\theta$ */
  2135. "\\Theta",/* $\Theta$ */
  2136. "\\thinspace",
  2137. "\\tilde",/* $\tilde x$ */
  2138. "\\times",/* $\times$ */
  2139. "\\to",/* $\to$ */
  2140. "\\top",/* $\top$ */
  2141. "\\topins","\\topinsert",
  2142. "\\tracingall",
  2143. "\\triangle",/* $\triangle$ */
  2144. "\\triangleleft",/* $\triangleleft$ */
  2145. "\\triangleright",/* $\triangleright$ */
  2146. "\\tt",/* \tt Typewriter */
  2147. "\\ttfam",
  2148. "\\ttglue",
  2149. "\\ttraggedright"
  2150.  
  2151. ,
  2152.  
  2153. "\\u",/* \rm \u x */
  2154. "\\uncatcodespecials",
  2155. "\\undefined",
  2156. "\\underbar",/* \underbar{A} */
  2157. "\\underbrace",/* $\underbrace{x+\cdots+x}^{k\rm\;times}$ */
  2158. "\\up",
  2159. "\\uparrow",/* $\uparrow$ */
  2160. "\\Uparrow",/* $\Uparrow$ */
  2161. "\\upbracefill",/* \hbox to 100pt{\upbracefill} */
  2162. "\\updownarrow",/* $\updownarrow$ */
  2163. "\\Updownarrow",/* $\Updownarrow$ */
  2164. "\\uplus",/* $\uplus$ */
  2165. "\\upsilon",/* $\upsilon$ */
  2166. "\\Upsilon",/* $\Upsilon$ */
  2167. "\\v",/* \rm \v x */
  2168. "\\varepsilon",/* $\varepsilon$ */
  2169. "\\varphi",/* $\varphi$ */
  2170. "\\varpi",/* $\varpi$ */
  2171. "\\varrho",/* $\varrho$ */
  2172. "\\varsigma",/* $\varsigma$ */
  2173. "\\vartheta",/* $\vartheta$ */
  2174. "\\vdash",/* $\vdash$ */
  2175. "\\vdots",/* $\vdots$ */
  2176. "\\vec",/* $\vec x$     */
  2177. "\\vee",/* $\vee$ */
  2178. "\\vert",/* $\vert$ */
  2179. "\\Vert",/* $\Vert$ */
  2180. "\\vfootnote",
  2181. "\\vglue",
  2182. "\\vphantom",
  2183. "\\wedge",/* $\wedge$ */
  2184. "\\widehat",/* $\widehat{\hbox{ab}}$ */
  2185. "\\widetilde",/* $\widetilde{\hbox{cd}}$ */
  2186. "\\wlog",
  2187. "\\wp",/* $\wp$ */
  2188. "\\wr",/* $\wr$ */
  2189. "\\xi",/* $\xi$ */
  2190. "\\Xi",/* $\Xi$ */
  2191. "\\zeta"/* $\zeta$ */
  2192.  
  2193. ,
  2194. ""
  2195. };
  2196.  
  2197.  
  2198.  
  2199. int cmpr_nd FCN((p0,p1))
  2200. NAME_INFO HUGE**p0 C0("")
  2201. NAME_INFO HUGE**p1 C1("")
  2202. {
  2203. switch(web_strcmp((*p0)->byte_start,(*p0+1)->byte_start,
  2204. (*p1)->byte_start,(*p1+1)->byte_start))
  2205. {
  2206. case EQUAL:
  2207. return 0;
  2208.  
  2209. case LESS:
  2210. case PREFIX:
  2211. return-1;
  2212.  
  2213. case GREATER:
  2214. case EXTENSION:
  2215. return 1;
  2216. }
  2217.  
  2218. return 0;
  2219. }
  2220.  
  2221.  
  2222. SRTN see_reserved FCN((prsrvd))
  2223. CONST RSRVD HUGE*prsrvd C1("")
  2224. {
  2225. CONST outer_char HUGE*pa= prsrvd->args;
  2226. unsigned n,k;
  2227. NAME_INFO HUGE**p,**p0,**p1,*nd= name_dir;
  2228. boolean all_languages= NO;
  2229.  
  2230. /* Note that the following stores every reserved word for every language.  This \
  2231. takes a lot of storage. */
  2232. for(k= 0;k<NUM_LANGUAGES;k++)
  2233. ini_reserved(lan_enum(k));
  2234.  
  2235. n= PTR_DIFF(unsigned,name_ptr,name_dir);
  2236. p= p0= p1= GET_MEM("p",n,NAME_INFO HUGE*);
  2237.  
  2238. for(k= 0;k<n;k++)
  2239. *p++= nd++;
  2240.  
  2241. QSORT(p0,n,sizeof(NAME_INFO HUGE*),cmpr_nd);
  2242.  
  2243. if(*pa=='*')
  2244. {
  2245. all_languages= YES;
  2246. pa++;
  2247. }
  2248.  
  2249. printf("Reserved words (%s)%s%s%s:\n",
  2250. all_languages?"all languages":languages[lan_num(language)],
  2251. *pa?" beginning with \"":"",(char*)pa,*pa?"\"":"");
  2252.  
  2253. for(p1= p0;p1<p;p1++)
  2254. {
  2255. ASCII temp[100];
  2256. size_t n= PTR_DIFF(size_t,((*p1)+1)->byte_start,(*p1)->byte_start);
  2257.  
  2258. /* Get the identifier. */
  2259. STRNCPY(temp,(*p1)->byte_start,n);
  2260. temp[n]= '\0';
  2261. to_outer(temp);
  2262.  
  2263. /* Test it and print info if required. */
  2264. if((all_languages||((*p1)->Language&language))&&
  2265. (!*pa||(STRNCMP(pa,temp,STRLEN(pa))==0)))
  2266. id_info(*p1,-1L,(outer_char*)temp,prsrvd);
  2267. }
  2268. }
  2269.  
  2270.  
  2271. #endif /* Part 2 */
  2272.  
  2273.  
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.