interpreter.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683
  1. #include "../mem/mem.h"
  2. #ifndef _INTERPRETER_H
  3. #define _INTERPRETER_H
  4. #define MAX_SIZE (1024)
  5. #define false 0
  6. #define true 1
  7. #define bool int
  8. #define read_statement_list(the_statement,the_var) read_statement(the_statement,the_var,NULL)
  9. #define run_func(base_the_var,the_var,name) run_func_core(base_the_var,the_var,name,false)
  10. // the type of data(GWARF_value)
  11. typedef enum{
  12. NUMBER_value = 1, // [只允许系统使用] [1]
  13. INT_value, // INT 类型[只允许系统使用] [2]
  14. BOOL_value, // bool : true or false [只允许系统使用] [3]
  15. STRING_value, // char * [只允许系统使用] [4]
  16. NULL_value, // 无值类型 [5]
  17. FUNC_value, // 函数 [6]
  18. CLASS_value, // 对象 [7]
  19. OBJECT_value, // 实例 [8]
  20. LIST_value, // 列表类型 [只允许系统使用] [9]
  21. DICT_value, // 字典类型 [只允许系统使用] [10]
  22. } GWARF_value_type;
  23. // all value is GWARF_value
  24. typedef struct GWARF_value{
  25. GWARF_value_type type;
  26. union
  27. {
  28. double double_value; // NUMBER
  29. int int_value;
  30. bool bool_value;
  31. char *string; // STRING
  32. struct func *func_value;
  33. struct class_object *class_value;
  34. struct the_object *object_value;
  35. struct the_list *list_value;
  36. struct the_dict *dict_value;
  37. } value;
  38. } GWARF_value;
  39. // ------------------------- parameter for def
  40. typedef struct parameter{
  41. struct
  42. {
  43. struct statement *var; // the_var
  44. struct statement *value; // var value
  45. } u;
  46. enum {
  47. only_value,
  48. name_value, // 形参/实参
  49. put_args,
  50. put_kwargs,
  51. } type;
  52. struct parameter *next; // for list
  53. } parameter;
  54. // ------------------------- var
  55. typedef struct var{
  56. char *name; // var name
  57. GWARF_value value;
  58. struct var *next; // for list
  59. } var;
  60. // ------------------------- hash_var
  61. typedef struct hash_var{
  62. struct var **hash; // 这是一个指针数组
  63. } hash_var;
  64. // ------------------------- statement
  65. typedef struct statement{
  66. enum statement_type{
  67. start=1, // for base statement
  68. operation, // such as + - * /
  69. base_var, // return var value by name
  70. base_value, // return an GWARF_value
  71. base_list, // return an GWARF_value->LIST_value
  72. base_dict, // return an GWARF_value->DICT_value
  73. while_cycle, // while
  74. for_cycle,
  75. if_branch, // if
  76. break_cycle, // break
  77. broken, // break_cycle and other {}
  78. continue_cycle,
  79. continued,
  80. restart,
  81. restarted,
  82. rego,
  83. rewent,
  84. set_default,
  85. set_global,
  86. set_nonlocal,
  87. code_block,
  88. def, // func
  89. lambda_func, // lambda x:x**2
  90. call, // func()
  91. point, // a.b 注:返回变量同时返回the_var链表[func 用于回调]
  92. down, // a[b] 注:返回变量同时返回the_var链表[func 用于回调]
  93. slice,
  94. return_code, // [26]
  95. set_class, // class aaa; b = aaa() is ```call```
  96. try_code, // try to do something except to do something
  97. raise_e, // raise exception
  98. throw_e, // throw the object class func or NULL
  99. import_class, // import file
  100. include_import, // include file
  101. for_in_cycle, // for i in a
  102. assert_e,
  103. chose_exp,
  104. pack_eq,
  105. } type; // the statement type
  106. union
  107. {
  108. struct{
  109. enum{
  110. ADD_func = 1, // +
  111. SUB_func, // -
  112. DIV_func, // /
  113. MUL_func, // *
  114. ASSIGnMENT_func, // =
  115. EQUAL_func, // ==
  116. MORE_func, // >
  117. LESS_func, // <
  118. MOREEQ_func, // >=
  119. LESSEQ_func, // <=
  120. NOTEQ_func, // <>
  121. POW_func, // <>
  122. LOG_func, // <>
  123. SQRT_func, // <>
  124. NEGATIVE_func, // -a
  125. AND_func, // -a
  126. OR_func, // -a
  127. NOT_func, // -a
  128. MOD_func, // %
  129. INTDIV_func, // //
  130. AADD_func, // +=
  131. ASUB_func, // -=
  132. ADIV_func, // /=
  133. AMUL_func, // *=
  134. AMOD_func, // %=
  135. AINTDIV_func, // //=
  136. FADD_func, // a++
  137. LADD_func, // ++a
  138. FSUB_func, // a--
  139. LSUB_func, // --a
  140. APOW_func, // ^=
  141. BITAND_func,
  142. BITOR_func,
  143. BITNOTOR_func,
  144. BITRIGHT_func,
  145. BITLEFT_func,
  146. BITNOT_func,
  147. } type;
  148. struct statement *right_exp; // the right exp
  149. struct statement *left_exp; // the left exp
  150. } operation;
  151. struct{
  152. struct statement *condition; // xxx if yyy else zzz -> xxx
  153. struct statement *true_do; // xxx if yyy else zzz -> yyy
  154. struct statement *false_do; // xxx if yyy else zzz -> zzz
  155. } chose_exp;
  156. struct{
  157. struct statement *condition; // when to while
  158. struct statement *done; // while to do
  159. bool first_do; // do_while = true, while = false
  160. } while_cycle;
  161. struct{
  162. struct statement *first; // the first to do
  163. struct statement *condition; // when to while
  164. struct statement *after; // what to do after the done
  165. struct statement *done; // while to do
  166. } for_cycle;
  167. struct{
  168. struct if_list *done; // if_list
  169. } if_branch;
  170. struct{
  171. char *var_name; // return var
  172. struct statement *from; // from where [double->int]
  173. } base_var;
  174. struct{
  175. struct statement *base_var; // a.b --> a
  176. struct statement *child_var; // a.b --> b
  177. } point;
  178. struct{
  179. struct statement *base_var; // a[b] --> a
  180. struct statement *child_var; // a[b] --> b
  181. } down;
  182. struct{
  183. GWARF_value value; // return value
  184. } base_value;
  185. struct{
  186. parameter *value; // [1,2,3,4] -> to_list
  187. } base_list;
  188. struct{
  189. parameter *right; // 实参
  190. parameter *left; // 形参
  191. } pack_eq;
  192. struct{
  193. parameter *value; // [1,2,3,4] -> to_list
  194. } base_dict;
  195. struct{
  196. struct statement *base_var; // a[1:2:3] -> a
  197. parameter *value; // a[1:2:3] -> 1 2 3
  198. } slice;
  199. struct{
  200. struct statement *times; // 层数
  201. } break_cycle;
  202. struct{
  203. struct statement *times; // 层数
  204. } broken;
  205. struct{
  206. struct statement *times; // 层数
  207. } continue_cycle;
  208. struct{
  209. struct statement *times; // 层数
  210. } continued;
  211. struct{
  212. struct statement *times; // 层数
  213. } restart;
  214. struct{
  215. struct statement *times; // 层数
  216. } restarted;
  217. struct{
  218. } rego;
  219. struct{
  220. } rewent;
  221. struct{
  222. char *name;
  223. struct statement *times; // 层数
  224. } set_default;
  225. struct{
  226. char *name;
  227. } set_global;
  228. struct{
  229. char *name;
  230. } set_nonlocal;
  231. struct{
  232. struct statement *done; // block to do
  233. } code_block;
  234. struct{
  235. parameter *parameter_list; // def parameter
  236. struct statement *done; // def to do
  237. struct statement *var; // from where
  238. } def;
  239. struct{
  240. parameter *parameter_list; // lambda parameter
  241. struct statement *done; // lambda to do
  242. } lambda_func;
  243. struct{
  244. parameter *parameter_list; // def parameter
  245. struct statement *func; // get func value
  246. } call;
  247. struct{
  248. struct statement *times; // 层数
  249. struct statement *value; // return value
  250. } return_code;
  251. struct{
  252. struct statement *done; // class to do
  253. parameter *father_list; // 继承
  254. struct statement *var; // from where [double->int]
  255. } set_class;
  256. struct
  257. {
  258. struct statement *try;
  259. struct statement *except;
  260. struct statement *var; // as var
  261. } try_code;
  262. struct
  263. {
  264. struct statement *done; // done to get exception object
  265. struct statement *info; // the info
  266. } raise_e;
  267. struct
  268. {
  269. struct statement *done; // done to get exception object
  270. } throw_e;
  271. struct
  272. {
  273. struct statement *file; // get address for file
  274. struct statement *var; // as name
  275. } import_class;
  276. struct
  277. {
  278. struct statement *file; // get address for file
  279. } include_import;
  280. struct
  281. {
  282. struct statement *var; // for i in a -> i
  283. struct statement *iter; // for i in a -> a
  284. struct statement *done; // for while to do
  285. } for_in_cycle;
  286. struct
  287. {
  288. struct statement *condition; // for i in a -> i
  289. struct statement *info; // for while to do
  290. } assert_e;
  291. } code;
  292. struct statement *next;
  293. } statement;
  294. // ------------------------- result value
  295. typedef struct GWARF_result{
  296. GWARF_value value;
  297. GWARF_value *father; // a.b --> a
  298. enum{
  299. return_def=1,
  300. statement_end,
  301. cycle_break,
  302. code_broken,
  303. cycle_continue,
  304. code_continued,
  305. cycle_restart,
  306. code_restarted,
  307. code_rego,
  308. code_rewent,
  309. error,
  310. } u; // the result type[from where]
  311. int return_times; // return用
  312. char *error_info; // 输出的错误信息
  313. } GWARF_result;
  314. // ------------------------- default_var [记录默认变量[层]] 用于default语句
  315. typedef struct default_var{
  316. char *name;
  317. int from;
  318. struct default_var *next;
  319. } default_var;
  320. // ------------------------- var base list [记录每一层变量base的链表]
  321. typedef struct var_list{
  322. struct hash_var *hash_var_base;
  323. struct default_var *default_list;
  324. struct var_list *next;
  325. } var_list;
  326. // ------------------------- inter paser [记录每一层变量code的链表]
  327. typedef struct statement_list{
  328. statement *statement_base;
  329. struct statement_list *next;
  330. } statement_list;
  331. // ------------------------- if list [记录着if...elif...else]
  332. typedef struct if_list{
  333. struct statement *condition; // when to while
  334. struct statement *done; // while to do
  335. struct if_list *next;
  336. } if_list;
  337. // ------------------------- inter
  338. typedef struct{
  339. hash_var *global_var; // global var链表
  340. statement *global_code; // global code链表
  341. } inter;
  342. //------- class/object/func
  343. typedef enum{
  344. customize = 1, // func by user
  345. official, // func by gwarf
  346. } func_type;
  347. typedef enum{
  348. printf_func = 1, // print_func
  349. __init__func = 2,
  350. __value__func = 3,
  351. __add__func = 4,
  352. __sub__func = 5,
  353. __mul__func = 6,
  354. __div__func = 7,
  355. __eq__func = 8,
  356. __more__func = 9,
  357. __less__func = 10,
  358. __eqmore__func = 11,
  359. __eqless__func = 12,
  360. __noteq__func = 13,
  361. __pow__func = 14,
  362. __log__func = 15,
  363. __sqrt__func = 16,
  364. __negative__func = 17,
  365. __powr__func = 18,
  366. __logr__func = 19,
  367. __sqrtr__func = 20,
  368. __subr__func = 21,
  369. __divr__func = 22,
  370. __len__func = 23,
  371. __down__func = 24,
  372. __set__func = 25,
  373. __slice__func = 26,
  374. __iter__func = 27,
  375. __next__func = 28,
  376. __idiv__func = 29,
  377. __idivr__func = 30,
  378. __mod__func = 31,
  379. __modr__func = 32,
  380. __bitand__func = 33,
  381. __bitor__func = 34,
  382. __bitnotor__func = 35,
  383. __bitleft__func = 36,
  384. __bitleftr__func = 37,
  385. __bitright__func = 38,
  386. __bitrightr__func = 39,
  387. __bitnot__func = 40,
  388. __assignment__func = 41,
  389. } official_func_type;
  390. typedef struct func{
  391. func_type type;
  392. official_func_type official_func;
  393. struct GWARF_result (*paser)(struct func *, struct parameter *, struct var_list *the_var, GWARF_result, var_list *);
  394. struct parameter *parameter_list; // def parameter
  395. struct statement *done; // def to do
  396. struct var_list *the_var; // func会记录the_var,因为不同地方调用var如果var链不统一那就会很乱
  397. bool is_class;
  398. bool is_lambda;
  399. } func;
  400. typedef struct class_object{
  401. struct var_list *out_var; // 外部the_var list
  402. struct var_list *the_var; // 记录class_object的 -- 相当与cls
  403. } class_object;
  404. typedef struct the_object{
  405. struct var_list *cls; // 记录class_object的 -- 相当与cls
  406. struct var_list *the_var; // 记录class_object的实例 -- 相当与self
  407. } the_object;
  408. typedef struct the_list // 列表类型
  409. {
  410. GWARF_value *list_value; // 列表类型
  411. int index; // the max index
  412. } the_list;
  413. typedef struct the_dict // 列表类型
  414. {
  415. struct hash_var *dict_value; // 列表类型
  416. int index; // the max index
  417. struct dict_key *name_list; // 值插入的顺序
  418. } the_dict;
  419. typedef struct dict_key // dict的key类型
  420. {
  421. char *key;
  422. struct dict_key *next;
  423. } dict_key;
  424. // 函数声明
  425. GWARF_result operation_func(statement *, var_list *, var_list *);
  426. GWARF_result while_func(statement *, var_list *);
  427. GWARF_result if_func(if_list *, var_list *);
  428. GWARF_result for_func(statement *, var_list *);
  429. GWARF_result call_back(statement *, var_list *);
  430. GWARF_result login_var(var_list *, var_list *, parameter *, parameter *);
  431. GWARF_result call_back_core(GWARF_result, var_list *, parameter *);
  432. GWARF_result block_func(statement *, var_list *);
  433. GWARF_result try_func(statement *, var_list *);
  434. GWARF_result raise_func(statement *, var_list *, bool);
  435. GWARF_result import_func(statement *, var_list *);
  436. GWARF_result include_func(statement *, var_list *);
  437. GWARF_result forin_func(statement *, var_list *);
  438. GWARF_result assert_func(statement *, var_list *);
  439. GWARF_result add_func(GWARF_result, GWARF_result, var_list *);
  440. GWARF_result sub_func(GWARF_result, GWARF_result, var_list *);
  441. GWARF_result mul_func(GWARF_result, GWARF_result, var_list *);
  442. GWARF_result div_func(GWARF_result, GWARF_result, var_list *);
  443. GWARF_result pow_func(GWARF_result, GWARF_result, var_list *);
  444. GWARF_result log_func(GWARF_result, GWARF_result, var_list *);
  445. GWARF_result sqrt_func(GWARF_result, GWARF_result, var_list *);
  446. GWARF_result assignment_func(char *, GWARF_result, var_list *, int);
  447. GWARF_result equal_func(GWARF_result, GWARF_result, var_list *, int);
  448. GWARF_result negative_func(GWARF_result, var_list *);
  449. GWARF_result assignment_statement(statement *, var_list *, var_list *, GWARF_result);
  450. GWARF_result not_func(GWARF_result, var_list *);
  451. GWARF_result or_func(statement *, statement *, var_list *);
  452. GWARF_result and_func(statement *, statement *, var_list *);
  453. GWARF_result int_div_func(GWARF_result, GWARF_result, var_list *);
  454. GWARF_result mod_func(GWARF_result, GWARF_result, var_list *);
  455. GWARF_result bit_not_func(GWARF_result, var_list *);
  456. GWARF_result bit_right_func(GWARF_result, GWARF_result, var_list *);
  457. GWARF_result bit_left_func(GWARF_result, GWARF_result, var_list *);
  458. GWARF_result bit_notor_func(GWARF_result, GWARF_result, var_list *);
  459. GWARF_result bit_or_func(GWARF_result, GWARF_result, var_list *);
  460. GWARF_result bit_and_func(GWARF_result, GWARF_result, var_list *);
  461. double sqrt_(double, double);
  462. double log_(double, double);
  463. GWARF_value to_int(GWARF_value, var_list *the_var);
  464. GWARF_value to_double(GWARF_value value, var_list *the_var);
  465. GWARF_value to_str(GWARF_value value, var_list *the_var);
  466. GWARF_value to_str_dict(GWARF_value value, var_list *the_var);
  467. GWARF_value to_bool_(GWARF_value value, var_list *the_var);
  468. GWARF_value to_list(GWARF_value value, var_list *the_var);
  469. GWARF_value to_dict(GWARF_value value, var_list *the_var);
  470. GWARF_value parameter_to_list(parameter *tmp_s, var_list *the_var);
  471. GWARF_value parameter_to_dict(parameter *tmp_s, var_list *the_var);
  472. bool start_with(char *, char *);
  473. char *del_start(char *, char *);
  474. GWARF_value key_to_str(char *);
  475. bool to_bool(GWARF_value);
  476. GWARF_result get__value__(GWARF_value *, var_list *);
  477. GWARF_result get__bool__(GWARF_value *, var_list *);
  478. GWARF_result get__iter__(GWARF_value *, var_list *);
  479. GWARF_result get__next__(GWARF_value *, var_list *);
  480. GWARF_result get__assignment__(GWARF_value *, var_list *);
  481. GWARF_result run_func_core(GWARF_value *, var_list *, char *, bool);
  482. int len_only_double(double num);
  483. int len_double(double num);
  484. int len_int(int num);
  485. int len_intx(unsigned int num);
  486. GWARF_value to_object(GWARF_value, var_list *);
  487. GWARF_result get_object(parameter *, char *, var_list *);
  488. class_object *make_object(var_list *the_var, var_list *father_var_list);
  489. void login_official_func(int type, int is_class, var_list *the_var, char *name, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *));
  490. void login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *));
  491. // 内置函数
  492. GWARF_result official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *);
  493. // object内置类
  494. class_object *object_login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *));
  495. GWARF_result object_official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *out_var);
  496. // gobject内置类
  497. class_object *gobject_login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *), var_list *father_var_list);
  498. GWARF_result gobject_official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *out_var);
  499. // int内置类
  500. class_object *int_login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *), var_list *father_var_list);
  501. GWARF_result int_official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *);
  502. // double内置类
  503. class_object *double_login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *), var_list *father_var_list);
  504. GWARF_result double_official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *);
  505. // str内置类
  506. class_object *str_login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *), var_list *father_var_list);
  507. GWARF_result str_official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *out_var);
  508. // bool内置类
  509. class_object *bool_login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *), var_list *father_var_list);
  510. GWARF_result bool_official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *out_var);
  511. // list内置类
  512. class_object *list_login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *), var_list *father_var_list);
  513. GWARF_result list_official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *out_var);
  514. // dict内置类
  515. class_object *dict_login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *), var_list *father_var_list);
  516. GWARF_result dict_official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *out_var);
  517. // 错误内置类
  518. class_object *BaseException_login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *), var_list *father_var_list);
  519. GWARF_result BaseException_official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *out_var);
  520. class_object *Exception_login_official(var_list *the_var, var_list *father_var_list);
  521. class_object *NameException_login_official(var_list *the_var, var_list *father_var_list);
  522. class_object *IterException_login_official(var_list *the_var, var_list *father_var_list);
  523. class_object *AssertException_login_official(var_list *the_var, var_list *father_var_list);
  524. class_object *AssignmentException_login_official(var_list *the_var, var_list *father_var_list);
  525. // 生成错误
  526. GWARF_result to_error(char *error_info, char *error_type, var_list *the_var);
  527. bool is_space(GWARF_result *);
  528. bool is_error(GWARF_result *tmp);
  529. if_list *make_base_if();
  530. if_list *make_if(statement *, statement *);
  531. if_list *append_elif(if_list *, if_list *);
  532. statement *make_statement();
  533. statement *append_statement(statement *, statement*);
  534. statement_list *make_statement_list();
  535. statement_list *make_statement_base(statement *);
  536. statement_list *append_statement_list(statement *, statement_list *);
  537. statement *find_statement_list(int, statement_list *);
  538. statement_list *free_statement_list(statement_list *);
  539. var *make_var();
  540. void append_var(char *name, GWARF_value, var *);
  541. void free_var(var *);
  542. var *get_var(char *, var *);
  543. void del_var(char *, var *);
  544. default_var *make_default_var();
  545. default_var *make_default_var_base();
  546. void append_default_var_base(char * ,int , default_var *);
  547. int get_default(char *, default_var *);
  548. var_list *make_var_list();
  549. var_list *make_var_base(hash_var *);
  550. var_list *append_var_list(hash_var *, var_list *);
  551. var_list *append_by_var_list(var_list *, var_list *);
  552. var_list *free_var_list(var_list *);
  553. int get_var_list_len(var_list *);
  554. var *find_var(var_list *,int , char *);
  555. void add_var(var_list *,int , char *, GWARF_value);
  556. void del_var_var_list(var_list *,int, char *);
  557. var_list *copy_var_list(var_list *);
  558. hash_var *make_hash_var();
  559. unsigned int time33(char *);
  560. int login_node(char *, GWARF_value, hash_var *);
  561. var *find_node(char *, hash_var *);
  562. void del_var_node(char *, hash_var *);
  563. parameter *make_parameter_name(statement *);
  564. parameter *append_parameter_name(statement *, parameter *);
  565. parameter *make_parameter_value(statement *);
  566. parameter *append_parameter_value(statement *, parameter *);
  567. parameter *add_parameter_value(statement *, parameter *);
  568. parameter *pack_value_parameter(GWARF_value);
  569. statement *pack_call_name(char *, statement *);
  570. GWARF_result traverse(statement *, var_list *, bool);
  571. GWARF_result traverse_global(statement *, var_list *);
  572. inter *get_inter();
  573. void login(var_list *the_var);
  574. inter *global_inter;
  575. statement_list *statement_base;
  576. int yyerror(char const *);
  577. FILE *yyin;
  578. char *yytext;
  579. #endif