@z --- reserved.web ---

FWEB version 1.40 (October 30, 1993)

Based on version 0.5 of S. Levy's CWEB [copyright (C) 1987 Princeton University]

@x-----------------------------------------------------------------------------

\Title{RESERVED}

@c
@* INTRODUCTION. Reserved words are defined in this separate
file, as they are used for both \FWEAVE\ and \FTANGLE.  

@m _RESERVED_ // Identifies this module to the \.{*.hweb} header files.

@A
@<Possibly split into parts@>@;

@<Include files@>@;
@<Typedef declarations@>@;
@<Prototypes@>@;
@<Global variables@>@;

$ASSERT(!(defined _FTANGLE_ || defined _FWEAVE_))@;

/* For pc's, the file is split into two compilable parts using the
compiler-line macro |part|, which must equal either~1 or~2. */
#if(part != 2)
	@<Part 1@>@;
#endif /* Part 1 */

#if(part != 1)
	@<Part 2@>@;
#endif /* Part 2 */

@I typedefs.hweb
@I xrefs.hweb
@i ccodes.hweb

@ The function prototypes must appear before the global variables.
@<Proto...@>=

#include "c_type.h" /* Function prototypes for \.{common} (includes
				reserved words). */

@ We have to get the reserved words into the hash table, and the simplest
way to do this is to insert them every time \FWEAVE\ is run.  That is
done via the following lists and the function |save_words|. Note that
(unlike Levy's original design) preprocessor commands are stored with the
`\.{\#}' token, because the preprocessor vocabulary is separate from the
language proper.  
@^reserved words@>

Here we have a function which stores an array of reserved words.

@<Part 1@>=@[

SRTN save_words FCN((language0,words))
	LANGUAGE language0 C0("The words are to be attached to this language.")@;
	CONST RESERVED_WORD HUGE *words C1("Array of words to be stored.")@;
{
CONST RESERVED_WORD HUGE *r;
LANGUAGE outer_language;

outer_language = language;
language = language0;
word_type = RESERVED_WD; // Set global flag for |id_lookup|.

for(r=words; r->type != 0; ++r)
	id_lookup(x_to_ASCII(OC(r->reserved_word)),NULL,
	   (eight_bits)CHOICE(r->type==(eight_bits)expr, normal, r->type)); 
		// Enter as reserved word.

language = outer_language;
}

@ Here we store the reserved words, intrinsic names or keywords.

@d SAVE_ID(word_type0,language0,words)
	save_id(word_type0,language0,(CONST outer_char HUGE **)(words))

@<Part 1@>=@[

SRTN save_id FCN((word_type0,language0,words))
	WORD_TYPE word_type0 C0("|INTRINSIC_FCN| or |KEYWORD|")@;
	LANGUAGE language0 C0("They're for this language.")@;
	CONST outer_char HUGE **words C1("Intrinsic names to be stored.")@;
{
CONST outer_char HUGE **i;
LANGUAGE outer_language;

outer_language = language;
language = language0;
word_type = word_type0;

for(i=words; **i; i++)
	id_lookup(x_to_ASCII(*i),
		NULL,normal); /* Mark as intrinsic.
				It's an ordinary identifier; will be
				entered in index. */ 

language = outer_language;
}

@ This routine puts a special token into the lookup table and initializes
the length of the keyword. 
@<Part 1@>=@[

SRTN ini_special_tokens FCN((language0,tokens))
	LANGUAGE language0 C0("")@;
	SPEC HUGE *tokens C1("Array of tokens to be initialized.")@;
{
SPEC HUGE *s;
int n;
name_pointer np;

/* Fill in id token for keyword. */
for(s=tokens; (n=STRLEN(s->name)) != 0; s++)
	{
	ASCII HUGE *p = x_to_ASCII(OC(s->name));

	s->len = n;
	*s->pid = ID_NUM_ptr(np,p,p+n);
	np->expandable |= language0;
	if(!np->x_translate) np->x_translate = 
		(X_FCN (HUGE_FCN_PTR * HUGE *)(VOID))get_mem0(OC("x array"),
			(unsigned long)(NUM_LANGUAGES),
			sizeof(X_FCN (HUGE_FCN_PTR *)(VOID)));
	np->x_translate[lan_num(language0)] = s->expand;
	}
}

@
@<Part 1@>=@[

SRTN ini_out_tokens FCN((tokens))
	SPEC HUGE *tokens C1("")@;
{
SPEC HUGE *s;

/* Fill in id token for keyword. */
for(s=tokens; (s->len=STRLEN(s->name)) != 0; s++)
	{
	ASCII HUGE *p;
	char HUGE *name, HUGE *p0, HUGE *p1;

/* We need a new memory area both in order to convert to |ASCII| and
possibly to convert to lower case. */
	name = (char HUGE *)(mod_text + 1);

/* When the \.{-U} option is used, the output tokens must be converted to
lower case. */
	if(lowercase_tokens)
		for(p1=name, p0=(char HUGE *)s->name; *p0; )
			*p1++ = (ASCII)tolower(*p0++);
	else
		STRCPY(name, s->name);

	p = to_ASCII(OC(name));

	*s->pid = ID_NUM(p,p + s->len);
	}

}

@* TABLES of RESERVED WORDS.  Here are the reserved words for each language.

@*1 General identifiers.
Some tokens are sufficiently special that they must be put into the table
no matter what the language.

@<Part 1@>=@[

static SPEC general_tokens[] = {
	{"defined",0,NULL,&id_defined}, // For the expression evaluator.
	{"",0,NULL,NULL}
	};

@*1 Built-in macros.
@<Part 1@>=@[

static RESERVED_WORD old_WEB_words[] = {
	{"_A",built_in},
	{"_ABS",built_in},
	{"_ASSERT",built_in},
	{"_COMMENT",built_in},
	{"_DATE",built_in},
	{"_DAY",built_in},
	{"_DECR",built_in},
	{"_DEFINE",built_in},
	{"_DEFINED",built_in},
	{"_DO",built_in},
	{"_DUMPDEF",built_in},
	{"_ERROR",built_in},
	{"_EVAL",built_in},
	{"_GETENV",built_in},
	{"_HOME",built_in},
	{"_IF",built_in},
	{"_IFCASE",built_in},
	{"_IFDEF",built_in},
	{"_IFELSE",built_in},
	{"_IFNDEF",built_in},
	{"_INCR",built_in},
	{"_INPUT_LINE",built_in},
	{"_L",built_in},
	{"_LANGUAGE",built_in},
	{"_LANGUAGE_NUM",built_in},
	{"_LEN",built_in},
	{"_M",built_in},
	{"_MAX",built_in},
	{"_MIN",built_in},
	{"_MODULES",built_in},
	{"_MODULE_NAME",built_in},
	{"_NARGS",built_in},
	{"_OUTPUT_LINE",built_in},
	{"_P",built_in},
	{"_POW",built_in},
	{"_ROUTINE",built_in},
	{"_SECTION_NUM",built_in},
	{"_SECTIONS",built_in},
	{"_STRING",built_in},
	{"_TIME",built_in},
	{"_TRANSLIT",built_in},
	{"_U",built_in},
	{"_UNDEF",built_in},
	{"_UNQUOTE",built_in},
	{"_VERBATIM",built_in},
	{"_VERSION",built_in},
	{"",0}
	};

static RESERVED_WORD WEB_words[] = {
	{"$A",built_in},
	{"$ABS",built_in},
	{"$ASSERT",built_in},
	{"$_BINOP_",BINOP},
	{"$_COMMA_",COMMA},
	{"$COMMENT",built_in},
	{"$DATE",built_in},
	{"$DAY",built_in},
	{"$DECR",built_in},
	{"$DEFINE",built_in},
	{"$DEFINED",built_in},
	{"defined",EXPR_},
	{"$DO",built_in},
	{"$DUMPDEF",built_in},
	{"$ERROR",built_in},
	{"$EVAL",built_in},
	{"$_EXPR",_EXPR},
	{"$_EXPR_",_EXPR_},
	{"$EXPR_",EXPR_},
	{"$GETENV",built_in},
	{"$HOME",built_in},
	{"$IF",built_in},
	{"$IFCASE",built_in},
	{"$IFDEF",built_in},
	{"$IFELSE",built_in},
	{"$IFNDEF",built_in},
	{"$INCR",built_in},
	{"$INPUT_LINE",built_in},
	{"$L",built_in},
	{"$LANGUAGE",built_in},
	{"$LANGUAGE_NUM",built_in},
	{"$LEN",built_in},
	{"$M",built_in},
	{"$MAX",built_in},
	{"$MIN",built_in},
	{"$MODULES",built_in},
	{"$MODULE_NAME",built_in},
	{"$NARGS",built_in},
	{"$OUTPUT_LINE",built_in},
	{"$P",built_in},
	{"$POW",built_in},
	{"$ROUTINE",built_in},
	{"$SECTION_NUM",built_in},
	{"$SECTIONS",built_in},
	{"$STRING",built_in},
	{"$TIME",built_in},
	{"$TRANSLIT",built_in},
	{"$UNOP_",UNOP},
	{"$U",built_in},
	{"$UNDEF",built_in},
	{"$UNQUOTE",built_in},
	{"$VERBATIM",built_in},
	{"$VERSION",built_in},
	{"",0}
	};

@
@<Part 1@>=@[

SRTN save_WEB FCN((language0))
	LANGUAGE language0 C1("")@;
{
save_words(language0, old_WEB_words);
save_words(language0, WEB_words);
}

@*1 M4 identifiers.
 We don't store reserved words for \.{m4} unless the user has set
the appropriate flag from the command line, namely~\.{-c++} or~\.{-m4}.

@<Part 1@>=@[

static RESERVED_WORD M4_words[] = {
	{"changequote",built_in},
	{"define",built_in},		
	{"divert",built_in},		
	{"divnum",built_in},
	{"dnl",built_in},	
	{"dumpdef",built_in},
	{"errprint",built_in},
	{"eval",built_in},	
	{"ifdef",built_in},		
	{"ifelse",built_in},
	{"include",built_in},
	{"incr",built_in},	
	{"index",built_in},
	{"len",built_in},	
	{"maketemp",built_in},	
	{"sinclude",built_in},
	{"substr",built_in}, 	
	{"syscmd",built_in},
	{"translit",built_in}, 	
	{"undefine",built_in},		
	{"undivert",built_in},
	{"",0}
	};


@*1 |C| identifiers.

@*2 |C| reserved words.
@<Part 1@>=@[

static RESERVED_WORD C_words[] = {
	{"auto",int_like}, 
	{"break",case_like},
	{"case",case_like}, 
	{"char",int_like},
	{"clock_t",int_like},	// ANSI.
	{"complex",int_like},	// EXTENSION.
	{"const",modifier},	// ANSI.
	{"continue",case_like}, 
	{"default",case_like},
	{"#define",define_like}, // (Preprocessor).
	{"div_t",int_like},	// ANSI.
	{"do",do_like},
	{"double",int_like},
	{"#elif",else_like},	// ANSI (Preprocessor).
	{"else",else_like},
	{"#else",else_like},	// (Preprocessor).
	{"enum",struct_like},
	{"#endif",if_like}, 	// (Preprocessor).
	{"#error",if_like},	// ANSI (Preprocessor).
@%	{"EXTERN",int_like},	// EXTENSION.
	{"extern",extern_like}, 
	{"FILE",int_like},
	{"float",int_like}, 
	{"fortran",int_like},	// EXTENSION.
	{"fpos_t",int_like},	// ANSI.
	{"for",for_like}, {"FOR",for_like}, // JAK.
	{"goto",case_like}, 
	{"huge",huge_like},	// EXTENSION for personal computers.
	{"if",if_like},
	{"#if",if_like},	// (Preprocessor).
	{"#ifdef",if_like}, 	// (Preprocessor).
	{"#ifndef",if_like},	// (Preprocessor).
	{"#include",if_like},	// (Preprocesor).
	{"int",int_like}, 
	{"ldiv_t",int_like},	// ANSI.
	{"long",int_like},
	{"#line",if_like}, 	// (Preprocessor).
	{"noalias",int_like},	// ANSI.
	{"#pragma",if_like},	// ANSI (Preprocessor).
	{"ptrdiff_t",int_like},	// ANSI.
@%	{"REAL",int_like},	// EXTENSION.
	{"register",int_like}, 
@%	{"RETURN",case_like},
	{"return",case_like},
	{"short",int_like}, 
	{"sig_atomic_t",int_like}, // ANSI.
	{"signed",int_like},	// ANSI.
	{"size_t",int_like},	// ANSI.
	{"sizeof",sizeof_like},
@%	{"STATIC",int_like},
	{"static",int_like}, 
	{"struct",struct_like},
	{"switch",for_like}, 
	{"time_t",int_like},	// ANSI.
	{"typedef",typedef_like},
	{"union",struct_like}, 
	{"#undef",if_like},	// (Preprocessor).
@%	{"UNSIGNED",int_like},	// EXTENSION.
	{"unsigned",int_like}, 
	{"va_list",int_like}, 	// ANSI.
	{"volatile",modifier},	// ANSI.
	{"void",int_like}, 	// ANSI.
	{"wchar_t",int_like}, // ANSI.
	{"while",for_like},
	{"",0}
	};

@*2 |C| Intrinsic functions.
@<Part 1@>=@[

CONST char *C_intrinsics[] = {
	"abort","atexit","exit","getenv","system",
	"abs","div","labs","ldiv",
	"acos","asin","atan","atan2","cos","sin","tan",
	"asctime","ctime","gmtime","localtime","strftime","clock","difftime",
		"mktime","time",
	"assert",
	"atof","atoi","atol","strtod","strtol","strtoul",
	"bsearch","qsort",
	"calloc","free","malloc","realloc",
	"ceil","fabs","floor","fmod",
	"fclose","fflush","fopen","freopen","setbuf","setvbuf",
	"clearerr","feof","ferror","perror",
	"cosh","sinh","tanh",
	"exp","frexp","ldexp","log","log10","modf",
	"fgetc","fgets","fprintf","fputc","fputs","fread","fscanf",
		"fwrite","getc","getchar","gets","printf","putc","putchar",
		"puts","scanf","sprintf","sscanf","ungetc",
		"vfprintf","vprintf","vsprintf",
	"fgetpos","fseek","fsetpos","ftell","rewind",
	"printf","sprintf",
	"isalnum","isalpha","iscntrl","isdigit","isgraph","islower",
		"isprint","ispunct","isspace","isupper","isxdigit", 
	"localeconv","setlocale",
	"longjmp","setjmp",
	"mblen","mbstowcs","mbtowc","wcstombs","wctomb",
	"memcmp","strcmp","strcoll","strncmp","strxfrm","strcat","strncat",
		"memcpy","memmove","strcpy","strncpy",
		"memset","strerror","strlen",
		"memchr","strchr","strcspn","strpbrk","strrchr",
		"strspn","strstr","strtok",
	"offsetof",
	"pow","sqrt",
	"raise",
	"rand","srand",
	"remove","rename","tmpfile","tmpnam",
	"strcpy","strcmp","strncpy","strlen",
	"tolower","toupper",
	"ungetc",
	"va_arg","va_end","va_start",
	"write",
	""
	};

@*1 |C++|.

@*2 |C++| reserved words.
@<Part 1@>=@[

static RESERVED_WORD Cpp_words[] = {
	{"catch",int_like},	// \Cpp--2.0: No syntax yet.
	{"class",class_like},
	{"delete",new_like},
	{"friend",int_like},
	{"inline",int_like},
	{"new",new_like},
	{"operator",op_like},
	{"private",case_like},
	{"protected",case_like},
	{"public",case_like},
	{"template",int_like},	 // \Cpp--2.0: No syntax yet.
	{"this",expr},
	{"virtual",int_like},
	{"",0}
	};

@*1 |FORTRAN| identifers.

@*2 |FORTRAN| Reserved words.
@<Part 1@>=@[

static RESERVED_WORD F77_words[] = {
	{"accept",read_like},
	{"assign",assign_like},
	{"backspace",read_like},
	{"block",program_like},
	{"blockdata",program_like},
	{"call",case_like},
	{"character",int_like},
	{"close",read_like},
	{"common",common_like},
	{"complex",int_like},
	{"continue",case_like}, 
	{"data",no_order},
	{"$decl_hd",decl_hd},
	{"dimension",int_like},
	{"do",Rdo_like}, {"DO",for_like},
	{"double",int_like},
	{"doubleprecision",int_like},
	{"else",else_like},
	{"elseif",else_like},
	{"end",end_like},
	{"enddo",endif_like},
	{"endif",endif_like}, 
	{"endfile",read_like},
	{"endfunction",end_like},
	{"endprogram",end_like},
	{"endsubroutine",end_like},
	{"entry",entry_like},
	{"equivalence",int_like},
	{"external",int_like},
	{"format",read_like},
	{"function",program_like},
	{"go",go_like}, // Can be combined with \&{to}.
	{"goto",case_like},
	{"if",if_like},
	{"implicit",implicit_like},
	{"integer",int_like}, 
	{"inquire",read_like},
	{"intrinsic",int_like},
	{"logical",int_like},
	{"open",read_like},
	{"parameter",int_like},
	{"pause",case_like},
	{"precision",int_like},
	{"print",read_like},
	{"program",program_like},
	{"read",read_like},
	{"REAL",int_like},	// EXTENSION.
	{"real",int_like},
	{"return",case_like},
	{"rewind",read_like},
	{"save",common_like},
	{"subroutine",program_like},
	{"stop",case_like},
	{"then",built_in},
	{"to",built_in},
	{"TYPE",read_like},	/* Conflicts with \FORTRAN-88's |@r type|
statement. */
	{"write",read_like},
	{"",0}
	};

@*2  VAX extensions for \FORTRAN\ reserved words.
@<Part 1@>=

#ifdef VAXC
@[static RESERVED_WORD VAX_words[] = {
	{"decode",read_like},
	{"delete",read_like},
	{"dictionary",int_like},
	{"encode",read_like},
	{"endmap",end_like},
	{"endstructure",end_like},
	{"endunion",end_like},
	{"find",read_like},
	{"INCLUDE",no_order},
	{"map",struct_like},
	{"namelist",common_like},
	{"options",int_like},
	{"record",common_like},
	{"rewrite",read_like},
	{"union",struct_like},
	{"unlock",read_like},
	{"virtual",int_like},
	{"volatile",common_like},
	{"",0}
	};
#endif // |VAXC|

@*2 |FORTRAN| intrinsic functions.
@<Part 1@>=@[

CONST char *F77_intrinsics[] = {
	"abs","dabs","cabs",
	"acos","dacos",
	"aimag",
	"aint","dint",
	"amax0",
	"amin0",
	"anint","dnint",
	"areal",
	"asin","dasin",
	"atan","datan",
	"atan2","datan2","atan2d",
	"char",
	"cmplx",
	"conjg",
	"cos","dcos","ccos",
	"cosh","dcosh",
	"dble",
	"dfloat",
	"dim","ddim",
	"dprod",
	"exp","dexp","cexp",
	"float",
	"iabs", 
	"iand","ior","ieor","not",
	"ichar",
	"idim",
	"idint","iqint",
	"idnint","iqnint",
	"ifix",
	"int",
	"isign",
	"jnint",
	"llt","lle","lgt","lge",
	"log","alog","dlog","clog",
	"log10","alog10","dlog10",
	"max","amax1","dmax1",
	"max0",
	"max1",
	"min","amin1","dmin1",
	"min0",
	"min1",
	"mod","amod","dmod",
	"Real",
	"sngl",
	"sign","dsign",
	"sin","dsin","csin",
	"sinh","dsinh",
	"sqrt","dsqrt","csqrt",
	"tan","dtan",
	"tanh","dtanh",
	"%val","%loc","%descr",
	""
	};

@ More intrinsic functions for the VAX.

@<Part 1@>=

#ifdef VAXC
@[CONST char *VAX_intrinsics[] = {
	"qsqrt","cdsqrt",
	"qlog","cdlog","qlog10",
	"qexp","cdexp",
	"qsin","cdsin",
	"sind","dsind","qsind",
	"qcos","cdcod",
	"cods","dcods","qcods",
	"qtan",
	"tand","dtand","qtand",
	"qasin",
	"asind","dasind","qasind",
	"qacos",
	"acosd","dacosd","qacosd",
	"qatan",
	"atand","datand","qatand",
	"qatan2",
	"atan2d","datan2d","qatan2d",
	"qsinh","qcosh","qtanh",
	"iiabs","jiabs","qabs","cdabs",
	"iint","jint","iidint","jidint","iiqint","jiqint","qint",
	"nint","inint","iidnnt","jidnnt","iiqnnt","jiqnnt","qnint",
	"zext","izext","jzext",
	"floati","floatj","snglq","dbleq",
	"qext","qextd",
	"iifix","jifix",
	"floati","floatj",
	"dfloti","dflotj",
	"qfloat",
	"dcmplx",
	"dreal","dimag","dconjg",
	"imax0","jmax0","qmax1","aimax0","ajmax0",
	"imin0","jmin0","qmin1","aimin0","ajmin0",
	"iidim","jidim","qdim",
	"imod","jmod","qmod",
	"iisign","jisign","qsign",
	"iiand","jiand",
	"iior","jior",
	"iieor","jieor",
	"inot","jnot",
	"ishft","iishft","jishft",
	"ibits","iibits","jibits",
	"ibset","iibset","jibset",
	"btest","bitest","bjtest",
	"ibclr","iibclr","jibclr",
	"ishftc","iishftc","jishftc",
	""
	};
#endif // |VAXC|

@*2 |FORTRAN| keywords.
@<Part 1@>=@[

CONST char *F77_keywords[] = {
	"ACCESS",
	"ASSOCIATEVARIABLE",
	"BLANK",
	"BLOCKSIZE",
	"BUFFERCOUNT",
	"CARRIAGECONTROL",
	"DEFAULTFILE",
	"DIRECT",
	"DISP",
	"END",
	"ERR",
	"EXIST",
	"FILE",
	"FMT",
	"FORM",
	"FORMATTED",
	"IOSTAT",
	"NAME",
	"NAMED",
	"NEXTREC",
	"NUMBER",
	"OPENED",
	"RECL",
	"SEQUENTIAL",
	"STATUS",
	"UNFORMATTED",
	"UNIT",
	""
	};

@ VAX extensions for \Fortran\ keywords.
@<Part 1@>=

#ifdef VAXC
@[CONST char *VAX_keywords[] = {
	"DISPOSE",
	"EXTENDSIZE",
	"INITIALSIZE",
	"KEY",
	"KEYED",
	"MAXREC",
	"NML",
	"NOSPANBLOCKS",
	"ORGANIZATION",
	"READONLY",
	"REC",
	"RECORDSIZE","RECORDTYPE","RECORDSIZE",
	"SHARED",
	"TYPE",
	"USEROPEN",
	""
	};
#endif // |VAXC|

@*1 |FORTRAN_90| identifiers.

@*2 |FORTRAN_90| reserved words.
@<Part 1@>=@[

static RESERVED_WORD F90_words[] = {
	{"allocate",read_like},
	{"allocatable",int_like},
	{"assignment",op_like},
	{"contains",entry_like},
	{"cycle",case_like},
	{"deallocate",read_like},
	{"elsewhere",else_like},
	{"endinterface",end_like},
	{"endmodule",end_like},
	{"endselect",end_like},
	{"endtype",end_like},
	{"endwhere",end_like},
	{"exit",case_like},
	{"include",no_order},
	{"intent",int_like},
	{"interface",struct_like},
	{"module",program_like},
	{"only",built_in},
	{"optional",int_like},
	{"nullify",read_like},
	{"operator",op_like},
	{"pointer",int_like},
	{"private",private_like},
	{"procedure",proc_like},
	{"public",private_like},
	{"recursive",int_like},
	{"result",_EXPR},
	{"save",int_like},
	{"select",if_like},
	{"sequence",private_like},
	{"target",int_like},
	{"type",struct_like},
	{"use",no_order},
	{"where",if_like},
	{"while",for_like},
	{"",0}
	};

@*2 |FORTRAN_90| intrinsic functions.
@<Part 1@>=@[

CONST char *F90_intrinsics[] = {
	"achar",
	"adjustl","adjustr",
	"all","any",
	"associated",
	"bit_size",
	"btest",
	"ceiling",
	"count",
	"cshift",
	"date_and_time",
	"floor",
	"digits",
	"dotproduct",
	"eoshift",
	"epsilon",
	"exponent","fraction",
	"huge",
	"iachar",
	"ibclr","ibits","ibset","ishft","ishftc",
	"kind",
	"len_trim",
	"LOGICAL",
	"matmul",
	"maxexponent","minexponent",
	"maxloc","minloc",
	"maxval","minval",
	"merge",
	"modulo",
	"mvbits",
	"nearest",
	"pack",
	"PRECISION",
	"present",
	"product",
	"radix",
	"random","randomseed",
	"range",
	"REPEAT",
	"reshape",
	"rrspacing",
	"scale",
	"scan",
	"selected_int_kind","selected_real_kind",
	"setexponent",
	"spacing",
	"spread",
	"sum",
	"system_clock",
	"tiny",
	"transfer",
	"transpose",
	"trim",
	"ubound",
	"unpack",
	"verify",
	""
	};

@*2 |FORTRAN_90| keywords.
@<Part 1@>=@[

CONST char *F90_keywords[] = {
	"ACTION",
	"ADVANCE",
	"DELIM",
	"EOR",
	"IN","INOUT","OUT",
	"KIND",
	"LEN",
	"NULLS",
	"ONLY",
	"PAD",
	"POSITION",
	"READ","READWRITE",
	"SIZE",
	"STAT",
	"WRITE",
	""
	};

@*1 |RATFOR| identifiers.

@*2 |RATFOR| reserved words.
@<Part 1@>=@[

static RESERVED_WORD RATFOR_words[] = {
	{"break",case_like},
	{"case",CASE_like},
	{"default",case_like},
	{"for",for_like}, {"FOR",for_like},
	{"next",case_like},
	{"repeat",do_like},
	{"switch",for_like},
	{"until",until_like},
	{"while",for_like},
	{"",0}
	};

@*1 |TEX| identifiers.

@*2 |TEX| reserved words.
@<Part 1@>=

extern RESERVED_WORD TEX_words[];

@
@<Part 2@>=@[

RESERVED_WORD TEX_words[] = {
	@<\TeX\ words \.{\\a}\dots@>,
	@<\TeX\ words \.{\\b}\dots@>,
	@<\TeX\ words \.{\\c}\dots@>,
	@<\TeX\ words \.{\\d}\dots@>,
	@<\TeX\ words \.{\\e}\dots@>,
	@<\TeX\ words \.{\\f,g,h}\dots@>,
	@<\TeX\ words \.{\\i,j,k}\dots@>,
	@<\TeX\ words \.{\\l}\dots@>,
	@<\TeX\ words \.{\\m,n}\dots@>,
	@<\TeX\ words \.{\\o}\dots@>,
	@<\TeX\ words \.{\\p,q,r}\dots@>,
	@<\TeX\ words \.{\\s}\dots@>,
	@<\TeX\ words \.{\\t}\dots@>,
	@<\TeX\ words \.{\\u,v,w,x,y,z}\dots@>,
	{"",0}
	};
	
@
@<\TeX\ words \.{\\a}\dots@>=
	{"\\above",built_in},
	{"\\abovedisplayshortskip",built_in},
	{"\\abovedisplayskip",built_in},
	{"\\abovewithdelims",built_in},
	{"\\accent",built_in},
	{"\\adjdemerits",built_in},
	{"\\advance",built_in},
	{"\\afterassignment",built_in},
	{"\\aftergroup",built_in},
	{"\\atop",built_in},
	{"\\atopwithdelims",built_in}@;

@
@<\TeX\ words \.{\\b}\dots@>=
	{"\\baselineskip",built_in},
	{"\\batchmode",built_in},
	{"\\begingroup",built_in},
	{"\\belowdisplayshortskip",built_in},
	{"\\belowdisplayskip",built_in},
	{"\\binoppenalty",built_in},
	{"\\botmark",built_in},
	{"\\box",built_in},{"\\bowmaxdepth",built_in},
	{"\\brokenpenalty",built_in}@;

@
@<\TeX\ words \.{\\c}\dots@>=
	{"\\catcode",built_in},
	{"\\char",built_in},{"\\chardef",typedef_like},
	{"\\cleaders",built_in},
	{"\\closein",built_in},{"\\closeout",built_in},
	{"\\clubpenalty",built_in},
	{"\\copy",built_in},
	{"\\count",built_in},{"\\countdef",typedef_like},
	{"\\cr",built_in},{"\\crcr",built_in},
	{"\\csname",built_in}@;

@
@<\TeX\ words \.{\\d}\dots@>=
	{"\\day",built_in},	 // \rm\the\day
	{"\\deadcycles",built_in},
	{"\\def",typedef_like},
	{"\\defaulthyphenchar",built_in},{"\\defaultskewchar",built_in},
	{"\\delcode",built_in},
	{"\\delimiter",built_in},{"\\delimiterfactor",built_in},
	{"\\deflimitershortfall",built_in},
	{"\\dimen",built_in},{"\\dimendef",typedef_like},
	{"\\discretionary",built_in},
	{"\\displayindent",built_in},
	{"\\displaylimits",built_in},
	{"\\displaystyle",built_in},
	{"\\displaywidowpenalty",built_in},
	{"\\displaywidth",built_in},
	{"\\divide",built_in},
	{"\\doublehyphendemerits",built_in},
	{"\\dp",built_in},
	{"\\dump",built_in}@;

@
@<\TeX\ words \.{\\e}\dots@>=
	{"\\edef",typedef_like},
	{"\\eject",built_in},
	{"\\else",built_in},
	{"\\end",built_in},{"\\endcsname",built_in},
	{"\\endcsname",built_in},
	{"\\endgroup",built_in},
	{"\\endinput",built_in},
	{"\\endlinechar",built_in},
	{"\\eqno",built_in},
	{"\\errhelp",built_in},{"\\errmessage",built_in},
	{"\\errorstopmode",built_in},
	{"\\escapechar",built_in},
	{"\\everycr",built_in},{"\\everydisplay",built_in},
	{"\\everyhbox",built_in},{"\\everyjob",built_in},
	{"\\everymath",built_in},{"\\everypar",built_in},
	{"\\everyvbox",built_in},
	{"\\exhyphenpenalty",built_in},
	{"\\expandafter",built_in}@;

@
@<\TeX\ words \.{\\f,g,h}\dots@>=
	{"\\fam",built_in},
	{"\\fi",built_in},
	{"\\finalhyphendemerits",built_in},
	{"\\firstmark",built_in},
	{"\\floatingpenalty",built_in},
	{"\\font",built_in},{"\\fontdimen",built_in},
	{"\\fontname",built_in},
	{"\\futurelet",typedef_like},
	{"\\gdef",typedef_like},
	{"\\global",built_in},{"\\globaldefs",built_in},
	{"\\halign",built_in},
	{"\\hangafter",built_in},{"\\hangindent",built_in},
	{"\\hbadness",built_in},
	{"\\hbox",built_in},
	{"\\hfil",built_in},{"\\hfill",built_in},
	{"\\hfilneg",built_in},
	{"\\hfuzz",built_in},
	{"\\hoffset",built_in},
	{"\\hrule",built_in},
	{"\\hskip",built_in},
	{"\\hss",built_in},
	{"\\ht",built_in},
	{"\\hyphenation",built_in},
	{"\\hyphenchar",built_in},{"\\hyphenpenalty",built_in}@;

@
@<\TeX\ words \.{\\i,j,k}\dots@>=
	{"\\if",built_in},{"\\ifcase",built_in},
	{"\\ifcat",built_in},{"\\ifdim",built_in},{"\\ifeof",built_in},
	{"\\iffalse",built_in},{"\\ifhbox",built_in},
	{"\\ifhmode",built_in},{"\\ifinner",built_in},{"\\ifmmode",built_in},
	{"\\ifnum",built_in},{"\\ifodd",built_in},
	{"\\iftrue",built_in},
	{"\\ifvbox",built_in},{"\\ifvmode",built_in},{"\\ifvoid",built_in},
	{"\\ifx",built_in},
	{"\\ignorespaces",built_in},
	{"\\immediate",built_in},
	{"\\indent",built_in},
	{"\\input",built_in},
	{"\\insert",built_in},{"\\insertpenalties",built_in},
	{"\\interlinepenalty",built_in},
	{"\\jobname",built_in}, // \rm \jobname
	{"\\kern",built_in}@;

@
@<\TeX\ words \.{\\l}\dots@>=
	{"\\lastbox",built_in},{"\\lastkern",built_in},
	{"\\lastpenalty",built_in},{"\\lastskip",built_in},
	{"\\lccode",built_in},
	{"\\leaders",built_in},
	{"\\left",built_in},
	{"\\leqno",built_in},
	{"\\leftskip",built_in},
	{"\\let",typedef_like},
	{"\\limits",built_in},
	{"\\linepenalty",built_in},{"\\lineskip",built_in},
	{"\\lineskiplimit",built_in},
	{"\\llap",built_in},
	{"\\long",built_in},
	{"\\looseness",built_in},
	{"\\lower",built_in},{"\\lowercase",built_in}@;

@
@<\TeX\ words \.{\\m,n}\dots@>=
	{"\\mag",built_in},
	{"\\mark",built_in},
	{"\\mathaccent",built_in},
	{"\\mathbin",built_in},
	{"\\mathchar",built_in},
	{"\\mathchardef",built_in},
	{"\\mathchoice",built_in},
	{"\\mathclose",built_in},
	{"\\mathcode",built_in},
	{"\\mathinner",built_in},{"\\mathop",built_in},
	{"\\mathop",built_in},{"\\mathopen",built_in},
	{"\\mathord",built_in},
	{"\\mathpunc",built_in},
	{"\\mathrel",built_in},
	{"\\mathsurround",built_in},
	{"\\maxdeadcycles",built_in},
	{"\\maxdepth",built_in},
	{"\\meaning",built_in},
	{"\\medmuskip",built_in},
	{"\\message",built_in},
	{"\\mkern",built_in},
	{"\\month",built_in}, // \rm\the\month
	{"\\moveleft",built_in},{"\\moveright",built_in},
	{"\\mskip",built_in},
	{"\\multiply",built_in},
	{"\\muskip",built_in},
	{"\\muskipdef",built_in},
	{"\\newlinechar",built_in},
	{"\\noalign",built_in},
	{"\\noexpand",built_in},
	{"\\noindent",built_in},
	{"\\nolimits",built_in},
	{"\\nonscript",built_in},
	{"\\nonstopmode",built_in},
	{"\\nulldelimiterspace",built_in},
	{"\\number",built_in}@;

@
@<\TeX\ words \.{\\o}\dots@>=
	{"\\omit",built_in},
	{"\\openin",built_in},{"\\openout",built_in},
	{"\\or",built_in},
	{"\\outer",built_in},
	{"\\output",built_in},{"\\outputpenalty",built_in},
	{"\\over",built_in},
	{"\\overfullrule",built_in},
	{"\\overline",built_in},
	{"\\overwithdelims",built_in}@;

@
@<\TeX\ words \.{\\p,q,r}\dots@>=
	{"\\pagedepth",built_in},
	{"\\pagefilllstretch",built_in},{"\\pagefillstretch",built_in},
	{"\\pagefilstretch",built_in},
	{"\\pagegoal",built_in},
	{"\\pageshrink",built_in},{"\\pagestretch",built_in},
	{"\\pagetotal",built_in},
	{"\\par",built_in},
	{"\\parfillskip",built_in},
	{"\\parindent",built_in},
	{"\\parshape",built_in},{"\\parskip",built_in},
	{"\\patterns",built_in},
	{"\\pausing",built_in},
	{"\\penalty",built_in},
	{"\\postdisplaypenalty",built_in},
	{"\\predisplaypenalty",built_in},
	{"\\predisplaysize",built_in},
	{"\\pretolerance",built_in},
	{"\\prevdepth",built_in},
	{"\\prevgraf",built_in},
	{"\\radical",built_in},
	{"\\raise",built_in},
	{"\\read",built_in},
	{"\\relax",built_in},
	{"\\relpenalty",built_in},
	{"\\right",built_in},
	{"\\rightskip",built_in},
	{"\\romannumeral",built_in}@; // \romannumeral4

@
@<\TeX\ words \.{\\s}\dots@>=
	{"\\scripfont",built_in},{"\\scripscripfont",built_in},
	{"\\scripscriptstyle",built_in},{"\\scriptspace",built_in},
	{"\\scripstyle",built_in},
	{"\\scrollmode",built_in},
	{"\\setbox",built_in},
	{"\\sfcode",built_in},
	{"\\shipout",built_in},
	{"\\show",built_in},{"\\showbox",built_in},
	{"\\showboxbreadth",built_in},{"\\showboxdepth",built_in},
	{"\\showhyphens",built_in},{"\\showlists",built_in},
	{"\\showthe",built_in},
	{"\\skewchar",built_in},
	{"\\skip",built_in},{"\\skipdepth",built_in},
	{"\\spacefactor",built_in},{"\\spaceskip",built_in},
	{"\\span",built_in},
	{"\\special",built_in},
	{"\\splitbotmark",built_in},{"\\splitfirstmark",built_in},
	{"\\splitmaxdepth",built_in},
	{"\\splittopskip",built_in},
	{"\\string",built_in},
	{"\\tabskip",built_in}@;

@
@<\TeX\ words \.{\\t}\dots@>=
	{"\\textfont",built_in},
	{"\\textstyle",built_in},
	{"\\the",built_in},
	{"\\thickmuskip",built_in},{"\\thinmuskip",built_in},
	{"\\time",built_in},
	{"\\toks",built_in},{"\\toksdef",built_in},
	{"\\tolerance",built_in},
	{"\\topmark",built_in},{"\\topskip",built_in},
	{"\\tracingcommands",built_in},
	{"\\tracinglostchars",built_in},
	{"\\tracingmacros",built_in},
	{"\\tracingonline",built_in},
	{"\\tracingoutput",built_in},
	{"\\tracingpages",built_in},
	{"\\tracingparagraphs",built_in},
	{"\\tracingrestores",built_in},
	{"\\tracingstats",built_in}@;

@
@<\TeX\ words \.{\\u,v,w,x,y,z}\dots@>=
	{"\\ucode",built_in},{"\\uchyph",built_in},
	{"\\underline",built_in}, // $\underline{\hbox{Underlined}}$
	{"\\unhbox",built_in},
	{"\\unhcopy",built_in},{"\\unkern",built_in},
	{"\\unpenalty",built_in},{"\\unskip",built_in},
	{"\\unvbox",built_in},{"\\unvcopy",built_in},
	{"\\uppercase",built_in}, // \rm\uppercase{abc}
	{"\\vadjust",built_in},{"\\valign",built_in},
	{"\\vbadness",built_in},
	{"\\vbox",built_in},{"\\vcenter",built_in},
	{"\\vfil",built_in},{"\\vfill",built_in},
	{"\\vfilneg",built_in},
	{"\\vfuzz",built_in},
	{"\\voffset",built_in},
	{"\\vskip",built_in},
	{"\\vrule",built_in},
	{"\\vsize",built_in},
	{"\\vskip",built_in},
	{"\\vskip",built_in},
	{"\\vss",built_in},
	{"\\vtop",built_in},
	{"\\wd",built_in},
	{"\\widowpenalty",built_in},
	{"\\write",built_in},
	{"\\xdef",typedef_like},
	{"\\xleaders",built_in},
	{"\\xspaceskip",built_in},
	{"\\year",built_in}@; // \rm\the\year


@*2 |TEX| intrinsic functions.
@<Part 1@>=

extern CONST char *TEX_intrinsics[];

@
@<Part 2@>=@[

CONST char *TEX_intrinsics[] = {
	@<\TeX\ intrinsics \.{\\a}\dots@>,
	@<\TeX\ intrinsics \.{\\b}\dots@>,
	@<\TeX\ intrinsics \.{\\c}\dots@>,
	@<\TeX\ intrinsics \.{\\d}\dots@>,
	@<\TeX\ intrinsics \.{\\e}\dots@>,
	@<\TeX\ intrinsics \.{\\f,g,h}\dots@>,
	@<\TeX\ intrinsics \.{\\i,j,k}\dots@>,
	@<\TeX\ intrinsics \.{\\l}\dots@>,
	@<\TeX\ intrinsics \.{\\m,n}\dots@>,
	@<\TeX\ intrinsics \.{\\o}\dots@>,
	@<\TeX\ intrinsics \.{\\p,q,r}\dots@>,
	@<\TeX\ intrinsics \.{\\s}\dots@>,
	@<\TeX\ intrinsics \.{\\t}\dots@>,
	@<\TeX\ intrinsics \.{\\u,v,w,x,y,z}\dots@>,
	""
	};


@
@<\TeX\ intrinsics \.{\\a}\dots@>=
	"\\aa",		//\rm \aa
	"\\AA",		//\rm \AA
	"\\active",	
	"\\acute",	// $\acute x$
	"\\advancepageno",@/
	"\\ae",		// \rm \ae
	"\\AE",		// \rm \AE
	"\\aleph",	// $\aleph$
	"\\allowbreak",@/
	"\\allowhyphens",@/
	"\\alpha",	// $\alpha$
	"\\amalg",	// $\amalg$
	"\\angle",	// $\angle$
	"\\approx",	// $\approx$
	"\\arccos",	// $\arccos$
	"\\arcsin",	// $\arcsin$
	"\\arctan",	// $\arctan$
	"\\arg",	// $\arg$
	"\\arrowvert",	// $\arrowvert$
	"\\Arrowvert",	// $\Arrowvert$
	"\\ast",	// $\ast$
	"\\asymp"@;	// $\asymp$

@
@<\TeX\ intrinsics \.{\\b}\dots@>=
	"\\b",		//\rm \b b
	"\\backslash",	// $\backslash$
	"\\bar",	// $\bar x$
	"\\beta",	// $\beta$
	"\\bf",		// \bf boldface
	"\\bffam",@/
	"\\bgroup",@/
	"\\big",	// $\big[$
	"\\Big",	// $\Big[$
	"\\bigbreak",@/
	"\\bigcap",	// $\bigcap$	
	"\\bigcirc",	// $\bigcirc$
	"\\bigcup",	// $\bigcup$
	"\\bigg",	// $\bigg[$
	"\\Bigg",	// $\Bigg[$
	"\\biggl",	// $\biggl[$
	"\\Biggl",	// $\Biggl[$
	"\\biggm",	// $\biggm\vert$
	"\\Biggm",	// $\Biggm\vert$
	"\\biggr",	// $\biggr]$
	"\\Biggr",	// $\Biggr]$
	"\\bigl",	// $\bigl[$
	"\\Bigl",	// $\Bigl[$
	"\\bigm",	// $\bigm\vert$
	"\\Bigm",	// $\Bigm\vert$
	"\\bigodot",	// $\bigodot$
	"\\bigoplus",	// $\bigoplus$
	"\\bigotimes",	// $\bigotimes$
	"\\bigr",	// $\bigr]$
	"\\Bigr",	// $\Bigr]$
	"\\bigskip","\\bigskipamount",
	"\\bigsqcup",	// $\bigsqcup$
	"\\bigtriangledown",	// $\bigtriangledown$
	"\\bigtriangleup",	// $\bigtriangleup$
	"\\biguplus",	// $\biguplus$
	"\\bigvee",	// $\bigvee$
	"\\bigwedge",	// $\bigwedge$
	"\\bmod",@/
	"\\body",	// $\bmod$
	"\\bordermatrix",/* $\bordermatrix{&C&I&C'\cr
				C&1&0&0\cr
				I&b&1-b&0\cr
				C'&0&a&1-a\cr}$ */
	"\\bot",	// $\bot$
	"\\bowtie",	// $\bowtie$
	"\\brace",	// $n\brace k$
	"\\braceld",	// $\braceld$
	"\\bracelu",	// $\bracelu$
	"\\bracerd",	// $\bracerd$
	"\\braceru",	// $\braceru$
	"\\bracevert",	// $\bracevert$
	"\\brack",	// $n\brack k$
	"\\break",@/
	"\\breve",	// $\breve x$
	"\\buildrel",@/
	"\\bullet",	// $\bullet$
	"\\bye"@;

@
@<\TeX\ intrinsics \.{\\c}\dots@>=
	"\\c",		// \rm\c x
	"\\cal",	// $\cal A$
	"\\cap",	// $\cap$
	"\\cases",	// $x = \cases{a&test\cr b&no test\cr}$
	"\\cdot",	// $a\cdot b$
	"\\cdotp",@/
	"\\cdots",	// $a + \cdots$
	"\\centering",@/
	"\\centerline",@/
	"\\check",	// $\check x$
	"\\chi",	// $\chi$
	"\\choose",	// $n\choose k$
	"\\circ",	// $\circ$
	"\\cleartabs",@/
	"\\clubsuit",	// $\clubsuit$
	"\\colon",	// $\colon$
	"\\cong",	// $\cong$
	"\\coprod",	// $\coprod$
	"\\copyright",	//\rm\copyright
	"\\cos",	// $\cos$
	"\\cosh",	// $\cosh$
	"\\cot",	// $\cot$
	"\\coth",	// $\coth$
	"\\csc",	// $\csc$
	"\\cup"@;	// $\cup$

@
@<\TeX\ intrinsics \.{\\d}\dots@>=
	"\\d",		// \rm\d x
	"\\dag",	// $\dag$
	"\\dagger",	// $\dagger$
	"\\dashv",	// $\dashv$
	"\\ddag",	// $\ddag$
	"\\ddagger",	// $\ddagger$
	"\\ddot",	// $\ddot x$
	"\\ddots",	// $\ddots$
	"\\deg",	// $\deg$
	"\\delta",	// $\delta$
	"\\Delta",	// $\Delta$
	"\\det",	// $\det$
	"\\diamond",	// $\diamond$
	"\\diamondsuit", // $\diamondsuit$
	"\\dim",	// $\dim$
	"\\displaylines",@/
	"\\div",	// $\div$
	"\\dospecials",@/
	"\\dosupereject",@/
	"\\dot",	// $\dot x$
	"\\doteq",	// $\doteq$
	"\\dotfill",@/
	"\\dots",	// $\dots$
	"\\downarrow",	// $\downarrow$
	"\\Downarrow",	// $\Downarrow$
	"\\downbracefill" // \hbox to 100pt{\downbracefill}
	@;

@
@<\TeX\ intrinsics \.{\\e}\dots@>=
	"\\egroup",@/
	"\\eject",@/
	"\\ell",	// $\ell$
	"\\empty",@/
	"\\emptyset",	// $\emptyset$
	"\\endgraf",@/
	"\\endline",@/
	"\\enskip","\\enspace",
	"\\epsilon",	// $\epsilon$
	"\\eqalign","\\eqalignno",
	"\\equiv",	// $\equiv$
	"\\eta",	// $\eta$
	"\\exists",	// $\exists$
	"\\exp"@;	// $\exp$

@
@<\TeX\ intrinsics \.{\\f,g,h}\dots@>=
	"\\filbreak",@/
	"\\fiverm",	// \rm\fiverm Fiverm
	"\\flat",	// $\flat$
	"\\folio",@/
	"\\footins",@/
	"\\footline","\\footnote","\\footnoterule",
	"\\forall",	// $\forall$
	"\\frenchspacing",// \rm This is French spacing
	"\\frown",	// $\frown$	
	"\\fullhsize","\\fullline",
	"\\gamma",	// $\gamma$
	"\\Gamma",	// $\Gamma$
	"\\gcd",	// $\gcd$
	"\\ge",		// $\ge$
	"\\geq",	// $\geq$
	"\\getfactor",@/
	"\\gets",	// $\gets$
	"\\gg",	// $\gg$
	"\\glue",@/
	"\\goodbreak",@/
	"\\grave",	// $\grave x$
	"\\hang",@/
	"\\hat",	// $\hat x$
	"\\hbar",	// $\hbar$
	"\\headline",@/
	"\\heartsuit",	// $\heartsuit$
	"\\hglue",@/
	"\\hideskip",@/
	"\\hidewidth",@/
	"\\hookleftarrow",	// $\hookleftarrow$
	"\\hookrightarrow",	// $\hookrightarrow$
	"\\hphantom",@/
	"\\hrulefill"@;

@
@<\TeX\ intrinsics \.{\\i,j,k}\dots@>=
	"\\ialign",@/
	"\\iff",	// $\iff$
	"\\Im",		// $\Im$
	"\\imath",@/
	"\\in",		// $\in$
	"\\inf",	// $\inf$
	"\\infty",	// $\infty$
	"\\int",	// $\int$
	"\\interdisplaylinepenalty",@/
	"\\interfootnotelinepenalty",@/
	"\\iota",	// $\iota$
	"\\it",		// \it Italics
	"\\item",@/
	"\\itemitem",
	"\\itfam",@/
	"\\j",	// $\j$
	"\\jmath",	// $\jmath$
	"\\joinrel",@/
	"\\jot",@/
	"\\kappa",	// $\kappa$
	"\\ker"@;	// $\ker$

@
@<\TeX\ intrinsics \.{\\l}\dots@>=
	"\\l",		// $\l$
	"\\L",		// $\L$
	"\\lambda",	// $\lambda$
	"\\Lambda",	// $\Lambda$
	"\\land",	// $\land$
	"\\langle",	// $\langle$
	"\\lbrace",	// $\lbrace$
	"\\lbrack",	// $\lbrack$
	"\\lceil",	// $\lceil$
	"\\ldotp",@/
	"\\ldots",	// $\ldots$
	"\\le",	// $\le$
	"\\leavevmode",@/
	"\\leftarrow",	// $\leftarrow$
	"\\Leftarrow",	// $\Leftarrow$
	"\\leftarrowfill", // \hbox to 100pt{\leftarrowfill}
	"\\leftharpoondown",	// $\leftharpoondown$
	"\\leftharpoonup",	// $\leftharpoonup$
	"\\leftline",@/
	"\\leftrightarrow",	// $\leftrightarrow$
	"\\Leftrightarrow",	// $\Leftrightarrow$
	"\\leq",	// $\leq$
	"\\leqalignno",@/
	"\\lfloor",	// $\lfloor$
	"\\lg",	// $\lg$
	"\\lgroup",@/
	"\\lhook",	// $\lhook$
	"\\lim",	// $\lim$
	"\\liminf",	// $\liminf$
	"\\limsup",	// $\limsup$
	"\\line",@/
	"\\ll",	// $\ll$
	"\\llap",@/
	"\\lmoustache",	// $\lmoustache$
	"\\ln",	// $\ln$
	"\\lnot",	// $\lnot$
	"\\log",	// $\log$
	"\\longindentation",@/
	"\\longleftarrow",	// $\longleftarrow$
	"\\Longleftarrow",	// $\Longleftarrow$
	"\\longleftrightarrow",	// $\longleftrightarrow$
	"\\Longleftrightarrow",	// $\Longleftrightarrow$
	"\\longmapsto",	// $\longmapsto$
	"\\longrightarrow",	// $\longrightarrow$
	"\\Longrightarrow",	// $\Longrightarrow$
	"\\loop",@/
	"\\lor",	// $\lor$
	"\\lq"@;	// $\lq$

@
@<\TeX\ intrinsics \.{\\m,n}\dots@>=
	"\\magnification","\\magstep","\\magstephalf",
	"\\maintoks",@/
	"\\makefootline","\\makeheadline",@/
	"\\mapsto",	// $\mapsto$
	"\\mapstochar",	// $\mapstochar$
	"\\mathhexbox",@/
	"\\mathpalette",@/
	"\\mathstrut",@/
	"\\matrix",	// $\matrix{a&b\cr c&d\cr}$
	"\\max",	// $\max$
	"\\maxdimen",@/
	"\\medbreak",@/
	"\\medskip","\\medskipamount",@/
	"\\mid",	// $\mid$
	"\\midinsert",@/
	"\\min",	// $\min$
	"\\mit",	//\mit abc
	"\\models",	// $\models$
	"\\mp",	// $\mp$
	"\\mu",	// $\mu$
	"\\multispan",@/
	"\\nabla",	// $\nabla$
	"\\narrower",@/
	"\\natural",	// $\natural$
	"\\ne",	// $\ne$
	"\\nearrow",	// $\nearrow$
	"\\neg",	// $\neg$
	"\\negthinspace",@/
	"\\neq",	// $\neq$
	"\\newbox","\\newcount","\\newdimen","\\newfam",
	"\\newhelp","\\newif","\\newinsert",
	"\\newmuskip",@/
	"\\newread","\\newskip","\\newtoks","\\newwrite",
	"\\next",@/
	"\\ni",@/
	"\\ninepoint",@/
	"\\ninerm",	//\ninerm Ninerm
	"\\nobreak",@/
	"\\nointerlineskip",@/
	"\\nonfrenchspacing",@/
	"\\nopagenumbers",@/
	"\\normalbaselines","\\normalbaselineskip",
	"\\normalbottom","\\normallineskip","\\normallineskiplimit",@/
	"\\not",	// $\not$
	"\\notin",	// $\notin$
	"\\nu",	// $\nu$
	"\\null",@/
	"\\nullfont",@/
	"\\nwarrow"@;	// $\nwarrow$

@
@<\TeX\ intrinsics \.{\\o}\dots@>=
	"\\o",	// $\o$
	"\\O",	// $\O$
	"\\oalign",@/
	"\\obeylines","\\obeyspaces",@/
	"\\odot",	// $\odot$
	"\\oe",	// \oe
	"\\OE",	// \OE
	"\\offinterlineskip",@/
	"\\oint",	// $\oint$
	"\\oldstyle",@/
	"\\omega",	// $\omega$
	"\\Omega",	// $\Omega$
	"\\ominus",	// $\ominus$
	"\\ooalign",@/
	"\\openup",@/
	"\\oplus",	// $\oplus$
	"\\oslash",	// $\oslash$
	"\\other",@/
	"\\otimes",	// $\otimes$
	"\\overbrace", 	// $\overbrace{x+\cdots+x}^{k\rm\;times}$
	"\\overleftarrow", // $\overleftarrow{abc}$
	"\\overrightarrow", // $\overrightarrow{abc}$
	"\\owns"@;	// $\owns$

@
@<\TeX\ intrinsics \.{\\p,q,r}\dots@>=
	"\\P",	// \P
	"\\pagebody","\\pagecontents",
	"\\pageinsert","\\pageno",
	"\\parallel",	// $\parallel$
	"\\partial",	// $\partial$
	"\\perp",	// $\perp$
	"\\phantom",@/
	"\\phi",	// $\phi$
	"\\Phi",	// $\Phi$
	"\\pi",	// $\pi$
	"\\Pi",	// $\Pi$
	"\\plainoutput",
	"\\pm",	// $\pm$
	"\\pmatrix",	// $\pmatrix{a&b\cr c&d\cr}$
	"\\pmod",	// $\pmod$
	"\\Pr",	// $\Pr$
	"\\prec",	// $\prec$
	"\\preceq",	// $\preceq$
	"\\preloaded",@/
	"\\prime",@/
	"\\proclaim",@/
	"\\prod",	// $\prod$
	"\\propto",	// $\propto$
	"\\ps",@/
	"\\psi",	// $\psi$
	"\\Psi",	// $\Psi$
	"\\qquad",	// $x\qquad y$
	"\\quad",	// $x\quad y$
	"\\raggedbottom","\\raggedcenter","\\raggedright",@/
	"\\rangle",	// $\rangle$
	"\\rbrace",	// $\rbrace$
	"\\rbrack",	// $\rbrack$
	"\\rceil",	// $\rceil$
	"\\Re",	// $\Re$
	"\\relbar",	// $\relbar$
	"\\Relbar",	// $\Relbar$
	"\\removelastskip",@/
	"\\repeat",@/
	"\\rfloor",	// $\rfloor$
	"\\rgroup",@/
	"\\rho",	// $\rho$
	"\\rhook",	// $\rhook$
	"\\rightarrow",	// $\rightarrow$
	"\\Rightarrow",	// $\Rightarrow$
	"\\rightarrowfill", // \hbox to 100pt{\rightarrowfill}
	"\\rightharpoondown",	// $\rightharpoondown$
	"\\rightharpoonup",	// $\rightharpoonup$
	"\\rightleftharpoons",	// $\rightleftharpoons$
	"\\rightline",@/
	"\\rlap",@/
	"\\rm",		// \rm Roman
	"\\rmoustache",	// $\rmoustache$
	"\\root",@/
	"\\rq"@;	// $\rq$

@
@<\TeX\ intrinsics \.{\\s}\dots@>=
	"\\S",	// \S
	"\\sb",@/
	"\\sc",  // \SC Small CAPS
	"\\searrow",	// $\searrow$
	"\\sec",	// $\sec$
	"\\setminus",	// $\setminus$
	"\\settabs",@/
	"\\setupverbatim",@/
	"\\sevenrm",	// \sevenrm Sevenrm
	"\\sharp",	// $\sharp$
	"\\sigma",	// $\sigma$
	"\\Sigma",	// $\Sigma$
	"\\sim",	// $\sim$
	"\\simeq",	// $\simeq$
	"\\sin",	// $\sin$
	"\\sinh",	// $\sinh$
	"\\skew",@/
	"\\sl",		// \sl Slanted
	"\\slash",	// $\slash$
	"\\slfam",@/
	"\\smallbreak",@/
	"\\smallint",	// $\smallint$
	"\\smallskip","\\smallskipamount","\\smalltype",
	"\\smash",@/
	"\\smile",	// $\smile$
	"\\sp",@/
	"\\space",@/
	"\\spadesuit",	// $\spadesuit$
	"\\sqcap",	// $\sqcap$
	"\\sqcup",	// $\sqcup$
	"\\sqrt",	// $\sqrt\pi$
	"\\sqsubseteq",	// $\sqsubseteq$
	"\\sqsupseteq",	// $\sqsupseteq$
	"\\ss",		// \rm\ss
	"\\star",	// $\star$
	"\\strut","\\strutbox",@/
	"\\subset",	// $\subset$
	"\\subseteq",	// $\subseteq$
	"\\succ",	// $\succ$
	"\\succeq",	// $\succeq$
	"\\sum",	// $\sum$
	"\\sup",	// $\sup$
	"\\supereject",@/
	"\\supset",	// $\supset$
	"\\supseteq",	// $\supseteq$
	"\\surd",	// $\surd$
	"\\swarrow"@;	// $\swarrow$

@
@<\TeX\ intrinsics 	\.{\\t}\dots@>=
	"\\t",		// \rm \t x
	"\\tabalign",@/
	"\\tabs",@/
	"\\tan",	// $\tan$
	"\\tanh",	// $\tanh$
	"\\tau",	// $\tau$
	"\\tenex",@/
	"\\tenpoint",@/
	"\\tenrm",@/
	"\\tensl",@/
	"\\tensy",@/
	"\\TeX",	// \TeX
	"\\textindent",@/
	"\\theta",	// $\theta$
	"\\Theta",	// $\Theta$
	"\\thinspace",@/
	"\\tilde",	// $\tilde x$
	"\\times",	// $\times$
	"\\to",	// $\to$
	"\\top",	// $\top$
	"\\topins","\\topinsert",
	"\\tracingall",@/
	"\\triangle",	// $\triangle$
	"\\triangleleft",	// $\triangleleft$
	"\\triangleright",	// $\triangleright$
	"\\tt",		// \tt Typewriter
	"\\ttfam",@/
	"\\ttglue",@/
	"\\ttraggedright"@;

@
@<\TeX\ intrinsics \.{\\u,v,w,x,y,z}\dots@>=
	"\\u",		// \rm \u x
	"\\uncatcodespecials",@/
	"\\undefined",@/
	"\\underbar",	// \underbar{A}
	"\\underbrace",	// $\underbrace{x+\cdots+x}^{k\rm\;times}$
	"\\up",@/
	"\\uparrow",	// $\uparrow$
	"\\Uparrow",	// $\Uparrow$
	"\\upbracefill", // \hbox to 100pt{\upbracefill}
	"\\updownarrow",	// $\updownarrow$
	"\\Updownarrow",	// $\Updownarrow$
	"\\uplus",	// $\uplus$
	"\\upsilon",	// $\upsilon$
	"\\Upsilon",	// $\Upsilon$
	"\\v",		// \rm \v x
	"\\varepsilon",	// $\varepsilon$
	"\\varphi",	// $\varphi$
	"\\varpi",	// $\varpi$
	"\\varrho",	// $\varrho$
	"\\varsigma",	// $\varsigma$
	"\\vartheta",	// $\vartheta$
	"\\vdash",	// $\vdash$
	"\\vdots",	// $\vdots$
	"\\vec",	// $\vec x$	
	"\\vee",	// $\vee$
	"\\vert",	// $\vert$
	"\\Vert",	// $\Vert$
	"\\vfootnote",@/
	"\\vglue",@/
	"\\vphantom",@/
	"\\wedge",	// $\wedge$
	"\\widehat",	// $\widehat{\hbox{ab}}$
	"\\widetilde",	// $\widetilde{\hbox{cd}}$
	"\\wlog",@/
	"\\wp",	// $\wp$
	"\\wr",	// $\wr$
	"\\xi",	// $\xi$
	"\\Xi",	// $\Xi$
	"\\zeta"@;	// $\zeta$

@* STORING the RESERVED WORDS. To save time and memory, we store
identifiers only once, the first time the language is used.

@d ALREADY_RESERVED(L) if(is_reservd.L) break; else is_reservd.L = YES@;

@<Part 1@>=

typedef struct
	{
	boolean C,RATFOR,FORTRAN,TEX,LITERAL, C_PLUS_PLUS,RATFOR_90,FORTRAN_90;
	} IS_RESERVED;

IS_RESERVED is_reservd = {NO,NO,NO,NO,NO, NO,NO,NO};

SRTN ini_reserved FCN((l))
	LANGUAGE l C1("")@;
{
switch(l)
	{
   case NO_LANGUAGE:
	CONFUSION("ini_reserved","Language should already be defined here");

   case C:
	@<Reserve identifiers for |C|@>;
	break;

   case C_PLUS_PLUS:
	@<Reserve identifiers for |C_PLUS_PLUS|@>;
	break;

   case FORTRAN:
	@<Reserve identifiers for |FORTRAN|@>;
	break;

   case FORTRAN_90:
	@<Reserve identifiers for |FORTRAN_90|@>;
	break;

   case RATFOR:
	if(!Rat_is_loaded) break;
	@<Reserve identifiers for |RATFOR|@>;
	break;

   case RATFOR_90:
	if(!Rat_is_loaded) break;
	@<Reserve identifiers for |RATFOR_90|@>;
	break;

   case TEX:
	@<Reserve identifiers for |TEX|@>;
	break;

   case LITERAL:
	@<Reserve identifiers for |LITERAL|@>;
	break;

   case NUWEB_OFF:
   case NUWEB_ON:
	CONFUSION("ini_reserved","Invalid language");
	}  

ini_out_tokens(general_tokens); // For things such as |id_defined|.
}

@
@<Reserve identifiers for |C|@>=

ALREADY_RESERVED(C);

save_words(C,C_words);
save_WEB(C);
SAVE_ID(INTRINSIC_FCN,C,C_intrinsics);

ini_tokens(C)@;

@
@<Reserve identifiers for |C_PLUS...@>=

ALREADY_RESERVED(C_PLUS_PLUS);

save_words(C_PLUS_PLUS,C_words);
save_words(C_PLUS_PLUS,Cpp_words); // Extra.
save_WEB(C_PLUS_PLUS);
SAVE_ID(INTRINSIC_FCN,C_PLUS_PLUS,C_intrinsics);

ini_tokens(C_PLUS_PLUS)@;

@
@<Reserve identifiers for |FORTRAN|@>=

ALREADY_RESERVED(FORTRAN);

save_words(FORTRAN,F77_words);
save_WEB(FORTRAN);

if(m4) save_words(FORTRAN,M4_words);

SAVE_ID(INTRINSIC_FCN,FORTRAN,F77_intrinsics);
SAVE_ID(KEYWORD,FORTRAN,F77_keywords);

#ifdef VAXC
	save_words(FORTRAN,VAX_words);
	SAVE_ID(INTRINSIC_FCN,FORTRAN,VAX_intrinsics);
	SAVE_ID(KEYWORD,FORTRAN,VAX_keywords);
#endif // |VAXC|

ini_tokens(FORTRAN)@;

@
@<Reserve identifiers for |FORTRAN_90|@>=

ALREADY_RESERVED(FORTRAN_90);

save_words(FORTRAN_90,F77_words);
save_words(FORTRAN_90,F90_words); // Extra.
save_WEB(FORTRAN_90);

if(m4) save_words(FORTRAN_90,M4_words);

SAVE_ID(INTRINSIC_FCN,FORTRAN_90,F77_intrinsics);
SAVE_ID(INTRINSIC_FCN,FORTRAN_90,F90_intrinsics); // Extra.
SAVE_ID(KEYWORD,FORTRAN_90,F77_keywords);
SAVE_ID(KEYWORD,FORTRAN_90,F90_keywords);

#ifdef VAXC
	save_words(FORTRAN_90,VAX_words);
	SAVE_ID(INTRINSIC_FCN,FORTRAN_90,VAX_intrinsics);
	SAVE_ID(KEYWORD,FORTRAN_90,VAX_keywords);
#endif // |VAXC|

ini_tokens(FORTRAN_90)@;

@
@<Reserve identifiers for |RATFOR|@>=

ALREADY_RESERVED(RATFOR);

save_words(RATFOR,F77_words);
save_words(RATFOR,RATFOR_words); // Extra.
save_WEB(RATFOR);

if(m4) save_words(RATFOR,M4_words);

SAVE_ID(INTRINSIC_FCN,RATFOR,F77_intrinsics);
SAVE_ID(KEYWORD,RATFOR,F77_keywords);

#ifdef VAXC
	save_words(RATFOR,VAX_words);
	SAVE_ID(INTRINSIC_FCN,RATFOR,VAX_intrinsics);
	SAVE_ID(KEYWORD,RATFOR,VAX_keywords);
#endif // |VAXC|

ini_RAT_tokens(RATFOR)@;

@
@<Reserve identifiers for |RATFOR_90|@>=

ALREADY_RESERVED(RATFOR_90);

save_words(RATFOR_90,F77_words);
save_words(RATFOR_90,F90_words);
save_words(RATFOR_90,RATFOR_words); // Extra.
save_WEB(RATFOR_90);

if(m4) save_words(RATFOR_90,M4_words);

SAVE_ID(INTRINSIC_FCN,RATFOR_90,F77_intrinsics);
SAVE_ID(INTRINSIC_FCN,RATFOR_90,F90_intrinsics);
SAVE_ID(KEYWORD,RATFOR_90,F77_keywords);
SAVE_ID(KEYWORD,RATFOR_90,F90_keywords);

#ifdef VAXC
	save_words(RATFOR_90,VAX_words);
	SAVE_ID(INTRINSIC_FCN,RATFOR_90,VAX_intrinsics);
	SAVE_ID(KEYWORD,RATFOR_90,VAX_keywords);
#endif // |VAXC|

ini_RAT_tokens(RATFOR_90)@;

@
@<Reserve identifiers for |TEX|@>=

ALREADY_RESERVED(TEX);

save_words(TEX,TEX_words);
save_WEB(TEX);

SAVE_ID(INTRINSIC_FCN,TEX,TEX_intrinsics);

ini_tokens(TEX)@;

@
@<Reserve identifiers for |LITERAL|@>=

ALREADY_RESERVED(LITERAL);


@
@<Part 2@>=@[
int cmpr_nd FCN((p0,p1))
	NAME_INFO HUGE **p0 C0("")@;
	NAME_INFO HUGE **p1 C1("")@;
{
switch(web_strcmp((*p0)->byte_start,(*p0+1)->byte_start,
	(*p1)->byte_start,(*p1+1)->byte_start))
	{
   case EQUAL:
	return 0;

   case LESS:
   case PREFIX:
	return -1;

   case GREATER:
   case EXTENSION:
	return 1;
	}

return 0;
}

@ The following routine is called from \.{common.web} in response to the
\.{-D}~option to display the status of reserved words.

@<Part 2@>=@[
SRTN see_reserved FCN((pa))
	CONST outer_char HUGE *pa C1("")@;
{
unsigned n,k;
NAME_INFO HUGE **p,**p0,**p1,*nd = name_dir;
boolean all_languages = NO;

/* Note that the following stores every reserved word for every language.  This
takes a lot of storage. */
for(k=0; k<NUM_LANGUAGES; k++)
	ini_reserved(lan_enum(k));

n = name_ptr - name_dir;
p = p0 = p1 = GET_MEM("p",n,NAME_INFO HUGE *);

for(k=0; k<n; k++)
	*p++ = nd++;

QSORT(p0,n,sizeof(NAME_INFO HUGE *),cmpr_nd);

if(*pa=='*')
	{
	all_languages = YES;
	pa++;
	}

printf("Reserved words (%s)%s%s%s:\n",
	all_languages ? "all languages" : languages[lan_num(language)],
	*pa ? " beginning with \"" : "",pa,*pa ? "\"" : "");

for(p1=p0; p1<p; p1++)
	{
	ASCII temp[100];
	size_t n = ((*p1)+1)->byte_start - (*p1)->byte_start;

/* Get the identifier. */
	STRNCPY(temp,(*p1)->byte_start,n); 
	temp[n] = '\0';
	to_outer(temp);

/* Test it and print info if required. */
	if((all_languages || ((*p1)->Language & language)) &&
		 (!*pa || (STRNCMP(pa,temp,STRLEN(pa))==0)))
	   id_info(*p1,-1L,(outer_char *)temp);
	}
}

@* INDEX.
