%{	/* -*- C -*- */

/******************************************************************************
  Copyright (c) 1992, 1995, 1996 Xerox Corporation.  All rights reserved.
  Portions of this code were written by Stephen White, aka ghond.
  Use and copying of this software and preparation of derivative works based
  upon this software are permitted.  Any distribution of this software or
  derivative works must comply with all applicable United States export
  control laws.  This software is made available AS IS, and Xerox Corporation
  makes no warranty about the software, its performance or its conformity to
  any specification.  Any person obtaining a copy of this software is requested
  to send their name and post office or electronic mail address to:
    Pavel Curtis
    Xerox PARC
    3333 Coyote Hill Rd.
    Palo Alto, CA 94304
    Pavel@Xerox.Com
 *****************************************************************************/

#include "my-string.h"

#include "config.h"
#include "keywords.h"
#include "tokens.h"
#include "utils.h"

/**/

%}
struct keyword {};		/* bogus decl not copied into the output */
%%
if,		DBV_Prehistory, tIF
else,		DBV_Prehistory, tELSE
elseif,		DBV_Prehistory, tELSEIF
endif,		DBV_Prehistory, tENDIF
for,		DBV_Prehistory, tFOR
in,		DBV_Prehistory, tIN
endfor,		DBV_Prehistory, tENDFOR
fork,		DBV_Prehistory, tFORK
endfork,	DBV_Prehistory, tENDFORK
return,		DBV_Prehistory, tRETURN
while,		DBV_Prehistory, tWHILE
endwhile,	DBV_Prehistory, tENDWHILE
try,		DBV_Exceptions, tTRY
except,		DBV_Exceptions, tEXCEPT
finally,	DBV_Exceptions, tFINALLY
endtry,		DBV_Exceptions, tENDTRY
ANY,		DBV_Exceptions, tANY
break,		DBV_BreakCont, tBREAK
continue,	DBV_BreakCont, tCONTINUE
E_NONE,		DBV_Prehistory, tERROR,	E_NONE
E_TYPE,		DBV_Prehistory, tERROR,	E_TYPE
E_DIV,		DBV_Prehistory, tERROR,	E_DIV
E_PERM,		DBV_Prehistory, tERROR,	E_PERM
E_PROPNF,	DBV_Prehistory, tERROR,	E_PROPNF
E_VERBNF,	DBV_Prehistory, tERROR,	E_VERBNF
E_VARNF,	DBV_Prehistory, tERROR,	E_VARNF
E_INVIND,	DBV_Prehistory, tERROR,	E_INVIND
E_RECMOVE,	DBV_Prehistory, tERROR,	E_RECMOVE
E_MAXREC,	DBV_Prehistory, tERROR,	E_MAXREC
E_RANGE,	DBV_Prehistory, tERROR,	E_RANGE
E_ARGS,		DBV_Prehistory, tERROR,	E_ARGS
E_NACC,		DBV_Prehistory, tERROR,	E_NACC
E_INVARG,	DBV_Prehistory, tERROR,	E_INVARG
E_QUOTA,	DBV_Prehistory, tERROR,	E_QUOTA
E_FLOAT,	DBV_Float,	tERROR,	E_FLOAT
yield,		DBV_Hash, tYIELD
%%

const struct keyword *
find_keyword(const char *word)
{
    return in_word_set(word, strlen(word));
}

char rcsid_keywords[] = "$Id: keywords.gperf,v 1.4 2009/03/08 12:41:31 blacklite Exp $";

/* $Log: keywords.gperf,v $
/* Revision 1.4  2009/03/08 12:41:31  blacklite
/* Added HASH data type, yield keyword, MEMORY_TRACE, vfscanf(),
/* extra myrealloc() and memcpy() tricks for lists, Valgrind
/* support for str_intern.c, etc. See ChangeLog.txt.
/*
/* Revision 1.3  2007/09/12 07:33:29  spunky
/* This is a working version of the current HellMOO server
/*
/* Revision 1.1.1.1  1997/03/03 03:45:02  nop
/* LambdaMOO 1.8.0p5
/*
 * Revision 2.2  1996/02/08  06:33:21  pavel
 * Added `break', `continue', and E_FLOAT.  Updated copyright notice for 1996.
 * Release 1.8.0beta1.
 *
 * Revision 2.1  1995/12/11  08:15:42  pavel
 * Added #include "tokens.h" removed from keywords.h.  Release 1.8.0alpha2.
 *
 * Revision 2.0  1995/11/30  05:02:56  pavel
 * New baseline version, corresponding to release 1.8.0alpha1.
 *
 * Revision 1.1  1995/11/30  05:01:47  pavel
 * Initial revision
 */
