00001 /* pomdp_hash.h 00002 00003 ***** 00004 Copyright 1994-1997, Brown University 00005 Copyright 1998, 1999, Anthony R. Cassandra 00006 00007 All Rights Reserved 00008 00009 Permission to use, copy, modify, and distribute this software and its 00010 documentation for any purpose other than its incorporation into a 00011 commercial product is hereby granted without fee, provided that the 00012 above copyright notice appear in all copies and that both that 00013 copyright notice and this permission notice appear in supporting 00014 documentation. 00015 00016 ANTHONY CASSANDRA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 00017 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ANY 00018 PARTICULAR PURPOSE. IN NO EVENT SHALL ANTHONY CASSANDRA BE LIABLE FOR 00019 ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 00020 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 00021 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 00022 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 00023 ***** 00024 */ 00025 00026 #ifndef PARSE_HASH_H 00027 00028 #define PARSE_HASH_H 00029 00030 #define HASH_TABLE_SIZE 255 00031 00032 typedef enum { nt_state, nt_action, 00033 nt_observation, nt_unknown } Mnemonic_Type; 00034 00035 typedef struct Node_Struct *Node; 00036 struct Node_Struct { 00037 Mnemonic_Type type; 00038 int number; 00039 char *str; 00040 Node next; 00041 }; 00042 00043 #ifdef __cplusplus 00044 extern "C" { 00045 #endif 00046 00047 extern void H_create(); 00048 extern void H_destroy(); 00049 extern int H_enter( char *str, Mnemonic_Type type ); 00050 extern int H_lookup( char *str, Mnemonic_Type type ); 00051 00052 #ifdef __cplusplus 00053 } /* extern "C" */ 00054 #endif 00055 00056 #endif