⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 symboltab.h

📁 基于单片机的 snmp协议解析的一些原代码 给有用的 同行
💻 H
字号:
//  Copyright (c) 1996  Federal Highway Administration
//
//  This software has been developed for the Federal Highway Administration
//  by Viggen Corporation under contract with Oak Ridge National Lab.
//
//  Permission to use, copy, and distribute this software for any purpose
//  without fee is hereby granted, provided that the above copyright notice
//  appears in all copies and that both the copyright and this permission notice
//  appear in the supporting documentation.
//
//  Permission to modify this software is granted provided that the above
//  copyright and this permission notice appears in the modified software.
//
//  This software is provided "as is" with no warranty expressed or implied.
//
//  For additional information, please go to the Web site www.ntcip.org.
//
/*******************************************************************************
 *
 * Copyright (c) 1997 Viggen Corporation
 *
 * Permission to use, copy, and distribute this software for any purpose
 * without fee is hereby granted, provided that this copyright notice
 * appears in all copies and this permission notice appears in the
 * supporting documentation.
 *
 * Permission to modify this software is granted provided that the above
 * copyright and this permission notice appears in the modified software.
 *
 ******************************************************************************/


 /*********************************************
 *
 * symboltab.h
 *
 * 9/29/97		Glenn Pruitt
 *********************************************/


struct SYTAB
{
  int	   index;
  char   identifier[64];
  int    type;
  long   intval;
  float  floatval;
  int	   labelval;
  char   *stringval;
  bool	invar;
  struct SYTAB *next;
};
/* For string values, the labelval field will contain
	the length of the string.
*/
#define SY_LABEL_TYPE   1
#define SY_INT_TYPE     2
#define SY_FLOAT_TYPE   3
#define SY_STRING_TYPE  4
#define SY_BOOLEAN_TYPE 5
#define SY_SYMBOL_TYPE  6


//Symbol Table Function Prototypes
int add_identifier_to_st(struct SYTAB **the_table, char *id_name,
								 int id_type, int length);
void delete_symbol_table(struct SYTAB **the_table);
void set_value_in_st(struct SYTAB *the_table, int token_index, long ival,
							float fval, char *sval, int lval);
int get_symbol_type(struct SYTAB *the_table, int token_index);
long get_symbol_int_value(struct SYTAB *the_table, int token_index);
float get_symbol_float_value(struct SYTAB *the_table, int token_index);
char *get_symbol_string_value(struct SYTAB *the_table, int token_index);
int get_symbol_string_size(struct SYTAB *the_table, int token_index);
int get_symbol_offset_value(struct SYTAB *the_table, int token_index);
int symbol_table_lookup(struct SYTAB *the_table, char *identifier);
char *get_identifier(struct SYTAB *the_table, int index, char *identifier);
int count_symbols(struct SYTAB *the_table);
void realloc_string_size(struct SYTAB *the_table, int index, int size);
void set_invar(struct SYTAB *the_table, int index);
int get_invar(struct SYTAB *the_table, int index);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -