interpreter.h 22 KB

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