PIPS
tp_yacc.c
Go to the documentation of this file.
1 /* A Bison parser, made by GNU Bison 3.8.2. */
2 
3 /* Bison implementation for Yacc-like parsers in C
4 
5  Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
6  Inc.
7 
8  This program is free software: you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation, either version 3 of the License, or
11  (at your option) any later version.
12 
13  This program is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with this program. If not, see <https://www.gnu.org/licenses/>. */
20 
21 /* As a special exception, you may create a larger work that contains
22  part or all of the Bison parser skeleton and distribute that work
23  under terms of your choice, so long as that work isn't itself a
24  parser generator using the skeleton or a modified version thereof
25  as a parser skeleton. Alternatively, if you modify or redistribute
26  the parser skeleton itself, you may (at your option) remove this
27  special exception, which will cause the skeleton and the resulting
28  Bison output files to be licensed under the GNU General Public
29  License without this special exception.
30 
31  This special exception was added by the Free Software Foundation in
32  version 2.2 of Bison. */
33 
34 /* C LALR(1) parser skeleton written by Richard Stallman, by
35  simplifying the original so-called "semantic" parser. */
36 
37 /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
38  especially those whose name start with YY_ or yy_. They are
39  private implementation details that can be changed or removed. */
40 
41 /* All symbols defined below should begin with yy or YY, to avoid
42  infringing on user name space. This should be done even for local
43  variables, as they might otherwise be expanded by user macros.
44  There are some unavoidable exceptions within include files to
45  define necessary library symbols; they are noted "INFRINGES ON
46  USER NAME SPACE" below. */
47 
48 /* Identify Bison output, and Bison version. */
49 #define YYBISON 30802
50 
51 /* Bison version string. */
52 #define YYBISON_VERSION "3.8.2"
53 
54 /* Skeleton name. */
55 #define YYSKELETON_NAME "yacc.c"
56 
57 /* Pure parsers. */
58 #define YYPURE 0
59 
60 /* Push parsers. */
61 #define YYPUSH 0
62 
63 /* Pull parsers. */
64 #define YYPULL 1
65 
66 
67 /* Substitute the variable and function names. */
68 #define yyparse tp_parse
69 #define yylex tp_lex
70 #define yyerror tp_error
71 #define yydebug tp_debug
72 #define yynerrs tp_nerrs
73 #define yylval tp_lval
74 #define yychar tp_char
75 
76 /* First part of user prologue. */
77 #line 73 "tp_yacc.y"
78 
79 #ifdef HAVE_CONFIG_H
80  #include "pips_config.h"
81 #endif
82 #include <stdlib.h>
83 #include <stdio.h>
84 #include <string.h>
85 #include <sys/param.h>
86 #include <unistd.h>
87 
88 #include "linear.h"
89 #include "genC.h"
90 
91 #include "ri.h"
92 #include "database.h"
93 
94 #include "misc.h"
95 
96 #include "ri-util.h" /* ri needed for statement_mapping in pipsdbm... */
97 #include "pipsdbm.h"
98 #include "resources.h"
99 #include "phases.h"
100 #include "properties.h"
101 #include "pipsmake.h"
102 
103 #include "top-level.h"
104 #include "tpips.h"
105 
106 /********************************************************** static variables */
107 
108 extern const char *soft_revisions, *soft_date, *cc_version;
109 
110 extern bool tpips_execution_mode;
111 extern bool consistency_enforced_p;
112 static bool processing_started_p=false;
113 
114 #define YYERROR_VERBOSE 1 /* MUCH better error messages with bison */
115 
116 extern void tpips_set_line_to_parse(string);
117 extern void tpips_lex_print_pos(FILE *);
118 extern int yylex(void);
119 extern void yyerror(const char *);
120 
122 {
123  gen_array_full_free(pr->the_owners), pr->the_owners = NULL;
124  free(pr->the_name), pr->the_name = NULL;
125 }
126 
127 static void set_env_log_and_free(string var, string val)
128 {
129  string ival = getenv(var);
130  if (!ival || !same_string_p(val, ival)) {
131  putenv(strdup(concatenate(var, "=", val, NULL)));
132  }
133  user_log("setenv %s \"%s\"\n", var, val);
134  free(var); free(val);
135 }
136 
137 /* forward.
138  */
139 static bool perform(bool (*)(const char*, const char*), res_or_rule *);
140 
142 {
143  gen_array_t modules = db_get_module_list();
144  res_or_rule r;
145  r.the_owners = modules;
146  r.the_name = strdup(DBR_CALLEES);
147  perform(safe_make, &r);
148  // r contents freed at the end of perform
149 }
150 
151 /* try hard to open a module.
152  */
153 static bool tp_set_current_module(const char* name)
154 {
155  if (lazy_open_module(name))
156  return true;
157 
158  // This is courageous, but makes debugging harder...
160  if (lazy_open_module(name))
161  return true;
162 
163  if (!safe_make(DBR_CODE, name))
164  return false;
165 
166  if (lazy_open_module(name))
167  return true;
168 
169  pips_user_error("Cannot open, module not found: %s", name);
170  return false;
171 }
172 
173 /* display a resource using $PAGER if defined and stdout on a tty.
174  */
175 static bool display_a_resource(const char* rname, const char* mname)
176 {
177  string fname;
178  bool ret;
179 
180  if (!tp_set_current_module(mname))
181  {
182  pips_user_error("could not find module %s to display\n", mname);
183  }
184 
185  fname = build_view_file(rname);
186 
187  if (!fname)
188  {
189  pips_user_error("Cannot build view file %s\n", rname);
190  free(fname);
191  return false;
192  }
193 
194  if (jpips_is_running)
195  {
196  /* Should tell about what it is?
197  * What about special formats, such as graphs and all?
198  */
199  jpips_tag2("show", fname);
200  ret = true;
201  }
202  else
203  {
204  ret = safe_display(fname);
205  }
206 
207  free(fname);
208  return ret;
209 }
210 
211 static bool remove_a_resource(const char* rname, const char* mname)
212 {
213  if (db_resource_p(rname, mname))
214  db_delete_resource(rname, mname);
215  else
216  pips_user_warning("no resource %s[%s] to delete.\n", rname, mname);
217  return true;
218 }
219 
220 /* tell pipsdbm that the resource is up to date.
221  * may be useful if some transformations are applied
222  * which do not change the results of some analyses.
223  * under the responsability of the user, obviously...
224  */
225 static bool touch_a_resource(const char* rname, const char* mname)
226 {
227  if (db_resource_p(rname, mname))
228  db_touch_resource(rname, mname);
229  else
230  pips_user_warning("no resource %s[%s] to delete.\n", rname, mname);
231  return true;
232 }
233 
234 static bool just_show(const char* rname, const char* mname)
235 {
236  string file;
237 
238  if (!db_resource_p(rname, mname)) {
239  pips_user_warning("no resource %s[%s].\n", rname, mname);
240  return false;
241  }
242 
243  if (!displayable_file_p(rname)) {
244  pips_user_warning("resource %s cannot be displayed.\n", rname);
245  return false;
246  }
247 
248  /* now returns the name of the file.
249  */
250  file = db_get_memory_resource(rname, mname, true);
251  fprintf(stdout, "resource %s[%s] is file %s\n", rname, mname, file);
252 
253  return true;
254 }
255 
256 /* perform "what" to all resources in "res". res is freed.
257  * Several rules call it: display, apply...
258  */
259 static bool perform(bool (*what)(const char*, const char*), res_or_rule * res)
260 {
261  bool result = true;
262 
264  {
265  string save_current_module_name;
266 
268  pips_user_error("Open or create a workspace first!");
269 
270  // This may be always trapped earlier in the parser by rule "owner".
271  if (gen_array_nitems(res->the_owners)==0) {
272  pips_user_error("Empty action for %s: no argument!", res->the_name);
273  free_owner_content(res);
274  }
275 
276  // push the current module.
278  save_current_module_name = current? strdup(current): NULL;
279  current = NULL;
280 
281  GEN_ARRAY_FOREACH(string, mod_name, res->the_owners)
282  {
283  if (mod_name != NULL)
284  {
285  if (!what(res->the_name, mod_name)) {
286  result = false;
287  break;
288  }
289  }
290  else
291  pips_user_warning("Select a module first!\n");
292  }
293 
294  // restore the initial current module, if there was one
295  if (save_current_module_name!=NULL)
296  {
299  db_set_current_module_name(save_current_module_name);
300  free(save_current_module_name);
301  }
302  }
303 
304  free_owner_content(res);
305  return result;
306 }
307 
308 static void tp_system(const char* s)
309 {
310  int status;
311  user_log("shell%s%s\n", (s[0]==' '|| s[0]=='\t')? "": " ", s);
312  status = system(s);
313  fflush(stdout);
314 
315  if (status)
316  {
317  pips_user_warning("shell returned status (%d.%d)\n",
318  status/256, status%256);
319 
320  /* generate user error if not interactive,
321  * so as to abort quickly in scripts...
322  */
324  pips_user_error("shell error (%d) in tpips script\n", status);
325  }
326 }
327 
328 static bool tp_close_the_workspace(const char* s)
329 {
330  bool result = true;
331 
332  pips_debug(7, "reduce rule i_close\n");
333 
335  {
337 
338  if (current!=NULL && s!=NULL)
339  {
340  if (same_string_p(s, current))
341  {
342  close_workspace(false);
343  result = true;
344  }
345  else
346  {
347  pips_user_error("must close the current workspace!\n");
348  result = false;
349  }
350  }
351  else {
352  pips_user_error("No workspace to close. Open or create one!\n");
353  result = false;
354  }
355  result = true;
356  }
357 
358  return result;
359 }
360 
361 static void tp_some_info(const char* about)
362 {
363  if (same_string_p(about, "workspace"))
364  {
365  string ws = db_get_current_workspace_name();
366  fprintf(stdout, "%s\n", ws? ws: "");
367  if (jpips_is_running) jpips_tag2("workspace", ws? ws: "<none>");
368  }
369  else if (same_string_p(about, "module"))
370  {
371  string m = db_get_current_module_name();
372  fprintf(stdout, "%s\n", m? m: "");
373  if (jpips_is_running) jpips_tag2("module", m? m: "<none>");
374  }
375  else if (same_string_p(about, "modules") &&
377  {
378  gen_array_t modules = db_get_module_list();
379  int n = gen_array_nitems(modules), i;
380 
381  if (jpips_is_running)
382  {
383  jpips_begin_tag("modules");
384  jpips_add_tag("");
385  }
386 
387  for(i=0; i<n; i++)
388  {
389  string m = gen_array_item(modules, i);
391  else fprintf(stdout, "%s ", m);
392 
393  }
395 
396  gen_array_full_free(modules);
397  }
398  else if (same_string_p(about, "directory"))
399  {
400  char pathname[MAXPATHLEN];
401  fprintf(stdout, "%s\n", (char*) getcwd(pathname, MAXPATHLEN));
402  if (jpips_is_running)
403  jpips_tag2("directory", (char*) getcwd(pathname, MAXPATHLEN));
404  }
405 
406  fprintf(stdout, "\n");
407 }
408 
409 /* Returns a newgen array with the main inside. If no main is found,
410  * try to build all callees to parse all sources and maybe find it.
411  *
412  * FI: since the preprocessor has already analyzed all source code and
413  * detect main functions, what do you expect by parsing its result?
414  */
415 static gen_array_t get_main(void)
416 {
417  gen_array_t result = gen_array_make(0), modules;
418  int number_of_main = 0;
419  int n = 0;
420  string main_name = get_first_main_module();
421 
422  if (!string_undefined_p(main_name))
423  {
424  gen_array_append(result, main_name);
425  return result;
426  }
427 
428  /* else try something else just in case...
429  * well, it looks rather useless, maybe.
430  */
431  while (number_of_main==0 && n<2)
432  {
433  n++;
434  modules = db_get_module_list();
435 
436  if (n==2)
437  {
438  pips_user_warning("no main directly found, parsing...\n");
440  }
441 
442  GEN_ARRAY_FOREACH(string, on, modules)
443  {
445 
446  if (!entity_undefined_p(mod) && entity_main_module_p(mod))
447  {
448  if (number_of_main)
449  pips_user_error("More than one main\n");
450  number_of_main++;
451  gen_array_dupappend(result, on);
452  }
453  }
454  gen_array_full_free(modules);
455  }
456 
457  return result;
458 }
459 
460 static void process_file_list(const gen_array_t a)
461 {
462  int n = gen_array_nitems(a);
463  volatile int i = 0;
464  bool saved_tpips_is_interactive = tpips_is_interactive;
465  tpips_is_interactive = false;
467  {
468  // cleanup
470  tpips_set_line_to_parse(""); // humm...
471  tpips_is_interactive = saved_tpips_is_interactive;
472  RETHROW();
473  }
474  TRY
475  {
476  for(; i<n; i++)
477  {
478  string name = gen_array_item(a, i);
479  FILE * sourced = fopen(name, "r");
480  if (!sourced) {
481  perror("while sourcing");
482  /* just in case, maybe tpips_init is not yet performed. */
483  if (tpips_init_done)
484  /* this performs a throw... */
485  pips_user_error("cannot source file '%s'\n", name);
486  else
487  {
488  fprintf(stderr, "cannot source file '%s'\n", name);
489  break;
490  }
491  }
492  else
493  {
494  tpips_process_a_file(sourced, name, false);
495  fclose(sourced);
496  }
497  }
498  tpips_set_line_to_parse(""); /* humm... */
499  tpips_is_interactive = saved_tpips_is_interactive;
501  }
502 }
503 
504 
505 #line 506 "y.tab.c"
506 
507 # ifndef YY_CAST
508 # ifdef __cplusplus
509 # define YY_CAST(Type, Val) static_cast<Type> (Val)
510 # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
511 # else
512 # define YY_CAST(Type, Val) ((Type) (Val))
513 # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
514 # endif
515 # endif
516 # ifndef YY_NULLPTR
517 # if defined __cplusplus
518 # if 201103L <= __cplusplus
519 # define YY_NULLPTR nullptr
520 # else
521 # define YY_NULLPTR 0
522 # endif
523 # else
524 # define YY_NULLPTR ((void*)0)
525 # endif
526 # endif
527 
528 /* Use api.header.include to #include this header
529  instead of duplicating it here. */
530 #ifndef YY_TP_Y_TAB_H_INCLUDED
531 # define YY_TP_Y_TAB_H_INCLUDED
532 /* Debug traces. */
533 #ifndef YYDEBUG
534 # define YYDEBUG 0
535 #endif
536 #if YYDEBUG
537 extern int tp_debug;
538 #endif
539 
540 /* Token kinds. */
541 #ifndef YYTOKENTYPE
542 # define YYTOKENTYPE
544  {
545  YYEMPTY = -2,
546  YYEOF = 0, /* "end of file" */
547  YYerror = 256, /* error */
548  YYUNDEF = 257, /* "invalid token" */
549  TK_OPEN = 258, /* TK_OPEN */
550  TK_CREATE = 259, /* TK_CREATE */
551  TK_CLOSE = 260, /* TK_CLOSE */
552  TK_CHECKPOINT = 261, /* TK_CHECKPOINT */
553  TK_DELETE = 262, /* TK_DELETE */
554  TK_MODULE = 263, /* TK_MODULE */
555  TK_MAKE = 264, /* TK_MAKE */
556  TK_APPLY = 265, /* TK_APPLY */
557  TK_CAPPLY = 266, /* TK_CAPPLY */
558  TK_DISPLAY = 267, /* TK_DISPLAY */
559  TK_REMOVE = 268, /* TK_REMOVE */
560  TK_ACTIVATE = 269, /* TK_ACTIVATE */
561  TK_SET_PROPERTY = 270, /* TK_SET_PROPERTY */
562  TK_GET_PROPERTY = 271, /* TK_GET_PROPERTY */
563  TK_SET_ENVIRONMENT = 272, /* TK_SET_ENVIRONMENT */
564  TK_GET_ENVIRONMENT = 273, /* TK_GET_ENVIRONMENT */
565  TK_UNSET_ENVIRONMENT = 274, /* TK_UNSET_ENVIRONMENT */
566  TK_CDIR = 275, /* TK_CDIR */
567  TK_INFO = 276, /* TK_INFO */
568  TK_PWD = 277, /* TK_PWD */
569  TK_HELP = 278, /* TK_HELP */
570  TK_SHOW = 279, /* TK_SHOW */
571  TK_SOURCE = 280, /* TK_SOURCE */
572  TK_SHELL = 281, /* TK_SHELL */
573  TK_ECHO = 282, /* TK_ECHO */
574  TK_UNKNOWN = 283, /* TK_UNKNOWN */
575  TK_TIMEOUT = 284, /* TK_TIMEOUT */
576  TK_QUIT = 285, /* TK_QUIT */
577  TK_EXIT = 286, /* TK_EXIT */
578  TK_LINE = 287, /* TK_LINE */
579  TK_CHECKACTIVE = 288, /* TK_CHECKACTIVE */
580  TK_VERSION = 289, /* TK_VERSION */
581  TK_TOUCH = 290, /* TK_TOUCH */
582  TK_OWNER_NAME = 291, /* TK_OWNER_NAME */
583  TK_OWNER_ALL = 292, /* TK_OWNER_ALL */
584  TK_OWNER_ALLFUNC = 293, /* TK_OWNER_ALLFUNC */
585  TK_OWNER_ALLCU = 294, /* TK_OWNER_ALLCU */
586  TK_OWNER_PROGRAM = 295, /* TK_OWNER_PROGRAM */
587  TK_OWNER_MAIN = 296, /* TK_OWNER_MAIN */
588  TK_OWNER_MODULE = 297, /* TK_OWNER_MODULE */
589  TK_OWNER_CALLERS = 298, /* TK_OWNER_CALLERS */
590  TK_OWNER_CALLEES = 299, /* TK_OWNER_CALLEES */
591  TK_OPENPAREN = 300, /* TK_OPENPAREN */
592  TK_COMMA = 301, /* TK_COMMA */
593  TK_CLOSEPAREN = 302, /* TK_CLOSEPAREN */
594  TK_EQUAL = 303, /* TK_EQUAL */
595  TK_NAME = 304, /* TK_NAME */
596  TK_A_STRING = 305, /* TK_A_STRING */
597  TK_ENDOFLINE = 306, /* TK_ENDOFLINE */
598  TK_INT = 307 /* TK_INT */
599  };
600  typedef enum yytokentype yytoken_kind_t;
601 #endif
602 /* Token kinds. */
603 #define YYEMPTY -2
604 #define YYEOF 0
605 #define YYerror 256
606 #define YYUNDEF 257
607 #define TK_OPEN 258
608 #define TK_CREATE 259
609 #define TK_CLOSE 260
610 #define TK_CHECKPOINT 261
611 #define TK_DELETE 262
612 #define TK_MODULE 263
613 #define TK_MAKE 264
614 #define TK_APPLY 265
615 #define TK_CAPPLY 266
616 #define TK_DISPLAY 267
617 #define TK_REMOVE 268
618 #define TK_ACTIVATE 269
619 #define TK_SET_PROPERTY 270
620 #define TK_GET_PROPERTY 271
621 #define TK_SET_ENVIRONMENT 272
622 #define TK_GET_ENVIRONMENT 273
623 #define TK_UNSET_ENVIRONMENT 274
624 #define TK_CDIR 275
625 #define TK_INFO 276
626 #define TK_PWD 277
627 #define TK_HELP 278
628 #define TK_SHOW 279
629 #define TK_SOURCE 280
630 #define TK_SHELL 281
631 #define TK_ECHO 282
632 #define TK_UNKNOWN 283
633 #define TK_TIMEOUT 284
634 #define TK_QUIT 285
635 #define TK_EXIT 286
636 #define TK_LINE 287
637 #define TK_CHECKACTIVE 288
638 #define TK_VERSION 289
639 #define TK_TOUCH 290
640 #define TK_OWNER_NAME 291
641 #define TK_OWNER_ALL 292
642 #define TK_OWNER_ALLFUNC 293
643 #define TK_OWNER_ALLCU 294
644 #define TK_OWNER_PROGRAM 295
645 #define TK_OWNER_MAIN 296
646 #define TK_OWNER_MODULE 297
647 #define TK_OWNER_CALLERS 298
648 #define TK_OWNER_CALLEES 299
649 #define TK_OPENPAREN 300
650 #define TK_COMMA 301
651 #define TK_CLOSEPAREN 302
652 #define TK_EQUAL 303
653 #define TK_NAME 304
654 #define TK_A_STRING 305
655 #define TK_ENDOFLINE 306
656 #define TK_INT 307
657 
658 /* Value type. */
659 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
660 union YYSTYPE
661 {
662 #line 501 "tp_yacc.y"
663 
664  int status;
665  int ival;
666  string name;
669 
670 #line 671 "y.tab.c"
671 
672 };
673 typedef union YYSTYPE YYSTYPE;
674 # define YYSTYPE_IS_TRIVIAL 1
675 # define YYSTYPE_IS_DECLARED 1
676 #endif
677 
678 
679 extern YYSTYPE tp_lval;
680 
681 
682 int tp_parse (void);
683 
684 
685 #endif /* !YY_TP_Y_TAB_H_INCLUDED */
686 /* Symbol kind. */
688 {
690  YYSYMBOL_YYEOF = 0, /* "end of file" */
691  YYSYMBOL_YYerror = 1, /* error */
692  YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
693  YYSYMBOL_TK_OPEN = 3, /* TK_OPEN */
694  YYSYMBOL_TK_CREATE = 4, /* TK_CREATE */
695  YYSYMBOL_TK_CLOSE = 5, /* TK_CLOSE */
696  YYSYMBOL_TK_CHECKPOINT = 6, /* TK_CHECKPOINT */
697  YYSYMBOL_TK_DELETE = 7, /* TK_DELETE */
698  YYSYMBOL_TK_MODULE = 8, /* TK_MODULE */
699  YYSYMBOL_TK_MAKE = 9, /* TK_MAKE */
700  YYSYMBOL_TK_APPLY = 10, /* TK_APPLY */
701  YYSYMBOL_TK_CAPPLY = 11, /* TK_CAPPLY */
702  YYSYMBOL_TK_DISPLAY = 12, /* TK_DISPLAY */
703  YYSYMBOL_TK_REMOVE = 13, /* TK_REMOVE */
704  YYSYMBOL_TK_ACTIVATE = 14, /* TK_ACTIVATE */
705  YYSYMBOL_TK_SET_PROPERTY = 15, /* TK_SET_PROPERTY */
706  YYSYMBOL_TK_GET_PROPERTY = 16, /* TK_GET_PROPERTY */
707  YYSYMBOL_TK_SET_ENVIRONMENT = 17, /* TK_SET_ENVIRONMENT */
708  YYSYMBOL_TK_GET_ENVIRONMENT = 18, /* TK_GET_ENVIRONMENT */
709  YYSYMBOL_TK_UNSET_ENVIRONMENT = 19, /* TK_UNSET_ENVIRONMENT */
710  YYSYMBOL_TK_CDIR = 20, /* TK_CDIR */
711  YYSYMBOL_TK_INFO = 21, /* TK_INFO */
712  YYSYMBOL_TK_PWD = 22, /* TK_PWD */
713  YYSYMBOL_TK_HELP = 23, /* TK_HELP */
714  YYSYMBOL_TK_SHOW = 24, /* TK_SHOW */
715  YYSYMBOL_TK_SOURCE = 25, /* TK_SOURCE */
716  YYSYMBOL_TK_SHELL = 26, /* TK_SHELL */
717  YYSYMBOL_TK_ECHO = 27, /* TK_ECHO */
718  YYSYMBOL_TK_UNKNOWN = 28, /* TK_UNKNOWN */
719  YYSYMBOL_TK_TIMEOUT = 29, /* TK_TIMEOUT */
720  YYSYMBOL_TK_QUIT = 30, /* TK_QUIT */
721  YYSYMBOL_TK_EXIT = 31, /* TK_EXIT */
722  YYSYMBOL_TK_LINE = 32, /* TK_LINE */
723  YYSYMBOL_TK_CHECKACTIVE = 33, /* TK_CHECKACTIVE */
724  YYSYMBOL_TK_VERSION = 34, /* TK_VERSION */
725  YYSYMBOL_TK_TOUCH = 35, /* TK_TOUCH */
726  YYSYMBOL_TK_OWNER_NAME = 36, /* TK_OWNER_NAME */
727  YYSYMBOL_TK_OWNER_ALL = 37, /* TK_OWNER_ALL */
728  YYSYMBOL_TK_OWNER_ALLFUNC = 38, /* TK_OWNER_ALLFUNC */
729  YYSYMBOL_TK_OWNER_ALLCU = 39, /* TK_OWNER_ALLCU */
730  YYSYMBOL_TK_OWNER_PROGRAM = 40, /* TK_OWNER_PROGRAM */
731  YYSYMBOL_TK_OWNER_MAIN = 41, /* TK_OWNER_MAIN */
732  YYSYMBOL_TK_OWNER_MODULE = 42, /* TK_OWNER_MODULE */
733  YYSYMBOL_TK_OWNER_CALLERS = 43, /* TK_OWNER_CALLERS */
734  YYSYMBOL_TK_OWNER_CALLEES = 44, /* TK_OWNER_CALLEES */
735  YYSYMBOL_TK_OPENPAREN = 45, /* TK_OPENPAREN */
736  YYSYMBOL_TK_COMMA = 46, /* TK_COMMA */
737  YYSYMBOL_TK_CLOSEPAREN = 47, /* TK_CLOSEPAREN */
738  YYSYMBOL_TK_EQUAL = 48, /* TK_EQUAL */
739  YYSYMBOL_TK_NAME = 49, /* TK_NAME */
740  YYSYMBOL_TK_A_STRING = 50, /* TK_A_STRING */
741  YYSYMBOL_TK_ENDOFLINE = 51, /* TK_ENDOFLINE */
742  YYSYMBOL_TK_INT = 52, /* TK_INT */
743  YYSYMBOL_YYACCEPT = 53, /* $accept */
744  YYSYMBOL_commands = 54, /* commands */
745  YYSYMBOL_command = 55, /* command */
746  YYSYMBOL_i_quit = 56, /* i_quit */
747  YYSYMBOL_i_exit = 57, /* i_exit */
748  YYSYMBOL_i_version = 58, /* i_version */
749  YYSYMBOL_i_help = 59, /* i_help */
750  YYSYMBOL_i_setprop = 60, /* i_setprop */
751  YYSYMBOL_i_shell = 61, /* i_shell */
752  YYSYMBOL_i_unknown = 62, /* i_unknown */
753  YYSYMBOL_i_echo = 63, /* i_echo */
754  YYSYMBOL_i_info = 64, /* i_info */
755  YYSYMBOL_i_cd = 65, /* i_cd */
756  YYSYMBOL_i_pwd = 66, /* i_pwd */
757  YYSYMBOL_i_getenv = 67, /* i_getenv */
758  YYSYMBOL_i_setenv = 68, /* i_setenv */
759  YYSYMBOL_i_unsetenv = 69, /* i_unsetenv */
760  YYSYMBOL_i_timeout = 70, /* i_timeout */
761  YYSYMBOL_i_checkpoint = 71, /* i_checkpoint */
762  YYSYMBOL_i_open = 72, /* i_open */
763  YYSYMBOL_workspace_name = 73, /* workspace_name */
764  YYSYMBOL_i_create = 74, /* i_create */
765  YYSYMBOL_i_close = 75, /* i_close */
766  YYSYMBOL_i_delete = 76, /* i_delete */
767  YYSYMBOL_i_module = 77, /* i_module */
768  YYSYMBOL_i_make = 78, /* i_make */
769  YYSYMBOL_i_apply = 79, /* i_apply */
770  YYSYMBOL_i_capply = 80, /* i_capply */
771  YYSYMBOL_i_display = 81, /* i_display */
772  YYSYMBOL_i_touch = 82, /* i_touch */
773  YYSYMBOL_i_show = 83, /* i_show */
774  YYSYMBOL_i_rm = 84, /* i_rm */
775  YYSYMBOL_i_activate = 85, /* i_activate */
776  YYSYMBOL_i_checkactive = 86, /* i_checkactive */
777  YYSYMBOL_i_get = 87, /* i_get */
778  YYSYMBOL_i_source = 88, /* i_source */
779  YYSYMBOL_rulename = 89, /* rulename */
780  YYSYMBOL_filename_list = 90, /* filename_list */
781  YYSYMBOL_filename = 91, /* filename */
782  YYSYMBOL_resource_id = 92, /* resource_id */
783  YYSYMBOL_rule_id = 93, /* rule_id */
784  YYSYMBOL_owner = 94, /* owner */
785  YYSYMBOL_list_of_owner_name = 95, /* list_of_owner_name */
786  YYSYMBOL_propname = 96, /* propname */
787  YYSYMBOL_phasename = 97, /* phasename */
788  YYSYMBOL_resourcename = 98 /* resourcename */
789 };
790 typedef enum yysymbol_kind_t yysymbol_kind_t;
791 
792 
793 
794 
795 #ifdef short
796 # undef short
797 #endif
798 
799 /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
800  <limits.h> and (if available) <stdint.h> are included
801  so that the code can choose integer types of a good width. */
802 
803 #ifndef __PTRDIFF_MAX__
804 # include <limits.h> /* INFRINGES ON USER NAME SPACE */
805 # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
806 # include <stdint.h> /* INFRINGES ON USER NAME SPACE */
807 # define YY_STDINT_H
808 # endif
809 #endif
810 
811 /* Narrow types that promote to a signed type and that can represent a
812  signed or unsigned integer of at least N bits. In tables they can
813  save space and decrease cache pressure. Promoting to a signed type
814  helps avoid bugs in integer arithmetic. */
815 
816 #ifdef __INT_LEAST8_MAX__
817 typedef __INT_LEAST8_TYPE__ yytype_int8;
818 #elif defined YY_STDINT_H
819 typedef int_least8_t yytype_int8;
820 #else
821 typedef signed char yytype_int8;
822 #endif
823 
824 #ifdef __INT_LEAST16_MAX__
825 typedef __INT_LEAST16_TYPE__ yytype_int16;
826 #elif defined YY_STDINT_H
828 #else
829 typedef short yytype_int16;
830 #endif
831 
832 /* Work around bug in HP-UX 11.23, which defines these macros
833  incorrectly for preprocessor constants. This workaround can likely
834  be removed in 2023, as HPE has promised support for HP-UX 11.23
835  (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
836  <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
837 #ifdef __hpux
838 # undef UINT_LEAST8_MAX
839 # undef UINT_LEAST16_MAX
840 # define UINT_LEAST8_MAX 255
841 # define UINT_LEAST16_MAX 65535
842 #endif
843 
844 #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
845 typedef __UINT_LEAST8_TYPE__ yytype_uint8;
846 #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
847  && UINT_LEAST8_MAX <= INT_MAX)
849 #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
850 typedef unsigned char yytype_uint8;
851 #else
852 typedef short yytype_uint8;
853 #endif
854 
855 #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
856 typedef __UINT_LEAST16_TYPE__ yytype_uint16;
857 #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
858  && UINT_LEAST16_MAX <= INT_MAX)
860 #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
861 typedef unsigned short yytype_uint16;
862 #else
863 typedef int yytype_uint16;
864 #endif
865 
866 #ifndef YYPTRDIFF_T
867 # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
868 # define YYPTRDIFF_T __PTRDIFF_TYPE__
869 # define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
870 # elif defined PTRDIFF_MAX
871 # ifndef ptrdiff_t
872 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
873 # endif
874 # define YYPTRDIFF_T ptrdiff_t
875 # define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
876 # else
877 # define YYPTRDIFF_T long
878 # define YYPTRDIFF_MAXIMUM LONG_MAX
879 # endif
880 #endif
881 
882 #ifndef YYSIZE_T
883 # ifdef __SIZE_TYPE__
884 # define YYSIZE_T __SIZE_TYPE__
885 # elif defined size_t
886 # define YYSIZE_T size_t
887 # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
888 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
889 # define YYSIZE_T size_t
890 # else
891 # define YYSIZE_T unsigned
892 # endif
893 #endif
894 
895 #define YYSIZE_MAXIMUM \
896  YY_CAST (YYPTRDIFF_T, \
897  (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
898  ? YYPTRDIFF_MAXIMUM \
899  : YY_CAST (YYSIZE_T, -1)))
900 
901 #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
902 
903 
904 /* Stored state numbers (used for stacks). */
906 
907 /* State numbers in computations. */
908 typedef int yy_state_fast_t;
909 
910 #ifndef YY_
911 # if defined YYENABLE_NLS && YYENABLE_NLS
912 # if ENABLE_NLS
913 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
914 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
915 # endif
916 # endif
917 # ifndef YY_
918 # define YY_(Msgid) Msgid
919 # endif
920 #endif
921 
922 
923 #ifndef YY_ATTRIBUTE_PURE
924 # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
925 # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
926 # else
927 # define YY_ATTRIBUTE_PURE
928 # endif
929 #endif
930 
931 #ifndef YY_ATTRIBUTE_UNUSED
932 # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
933 # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
934 # else
935 # define YY_ATTRIBUTE_UNUSED
936 # endif
937 #endif
938 
939 /* Suppress unused-variable warnings by "using" E. */
940 #if ! defined lint || defined __GNUC__
941 # define YY_USE(E) ((void) (E))
942 #else
943 # define YY_USE(E) /* empty */
944 #endif
945 
946 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
947 #if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
948 # if __GNUC__ * 100 + __GNUC_MINOR__ < 407
949 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
950  _Pragma ("GCC diagnostic push") \
951  _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
952 # else
953 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
954  _Pragma ("GCC diagnostic push") \
955  _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
956  _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
957 # endif
958 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
959  _Pragma ("GCC diagnostic pop")
960 #else
961 # define YY_INITIAL_VALUE(Value) Value
962 #endif
963 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
964 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
965 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
966 #endif
967 #ifndef YY_INITIAL_VALUE
968 # define YY_INITIAL_VALUE(Value) /* Nothing. */
969 #endif
970 
971 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
972 # define YY_IGNORE_USELESS_CAST_BEGIN \
973  _Pragma ("GCC diagnostic push") \
974  _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
975 # define YY_IGNORE_USELESS_CAST_END \
976  _Pragma ("GCC diagnostic pop")
977 #endif
978 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
979 # define YY_IGNORE_USELESS_CAST_BEGIN
980 # define YY_IGNORE_USELESS_CAST_END
981 #endif
982 
983 
984 #define YY_ASSERT(E) ((void) (0 && (E)))
985 
986 #if !defined yyoverflow
987 
988 /* The parser invokes alloca or malloc; define the necessary symbols. */
989 
990 # ifdef YYSTACK_USE_ALLOCA
991 # if YYSTACK_USE_ALLOCA
992 # ifdef __GNUC__
993 # define YYSTACK_ALLOC __builtin_alloca
994 # elif defined __BUILTIN_VA_ARG_INCR
995 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
996 # elif defined _AIX
997 # define YYSTACK_ALLOC __alloca
998 # elif defined _MSC_VER
999 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
1000 # define alloca _alloca
1001 # else
1002 # define YYSTACK_ALLOC alloca
1003 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
1004 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1005  /* Use EXIT_SUCCESS as a witness for stdlib.h. */
1006 # ifndef EXIT_SUCCESS
1007 # define EXIT_SUCCESS 0
1008 # endif
1009 # endif
1010 # endif
1011 # endif
1012 # endif
1013 
1014 # ifdef YYSTACK_ALLOC
1015  /* Pacify GCC's 'empty if-body' warning. */
1016 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
1017 # ifndef YYSTACK_ALLOC_MAXIMUM
1018  /* The OS might guarantee only one guard page at the bottom of the stack,
1019  and a page size can be as small as 4096 bytes. So we cannot safely
1020  invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
1021  to allow for a few compiler-allocated temporary stack slots. */
1022 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
1023 # endif
1024 # else
1025 # define YYSTACK_ALLOC YYMALLOC
1026 # define YYSTACK_FREE YYFREE
1027 # ifndef YYSTACK_ALLOC_MAXIMUM
1028 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
1029 # endif
1030 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
1031  && ! ((defined YYMALLOC || defined malloc) \
1032  && (defined YYFREE || defined free)))
1033 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1034 # ifndef EXIT_SUCCESS
1035 # define EXIT_SUCCESS 0
1036 # endif
1037 # endif
1038 # ifndef YYMALLOC
1039 # define YYMALLOC malloc
1040 # if ! defined malloc && ! defined EXIT_SUCCESS
1041 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
1042 # endif
1043 # endif
1044 # ifndef YYFREE
1045 # define YYFREE free
1046 # if ! defined free && ! defined EXIT_SUCCESS
1047 void free (void *); /* INFRINGES ON USER NAME SPACE */
1048 # endif
1049 # endif
1050 # endif
1051 #endif /* !defined yyoverflow */
1052 
1053 #if (! defined yyoverflow \
1054  && (! defined __cplusplus \
1055  || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1056 
1057 /* A type that is properly aligned for any stack member. */
1058 union yyalloc
1059 {
1062 };
1063 
1064 /* The size of the maximum gap between one aligned stack and the next. */
1065 # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
1066 
1067 /* The size of an array large to enough to hold all stacks, each with
1068  N elements. */
1069 # define YYSTACK_BYTES(N) \
1070  ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
1071  + YYSTACK_GAP_MAXIMUM)
1072 
1073 # define YYCOPY_NEEDED 1
1074 
1075 /* Relocate STACK from its old location to the new one. The
1076  local variables YYSIZE and YYSTACKSIZE give the old and new number of
1077  elements in the stack, and YYPTR gives the new location of the
1078  stack. Advance YYPTR to a properly aligned location for the next
1079  stack. */
1080 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
1081  do \
1082  { \
1083  YYPTRDIFF_T yynewbytes; \
1084  YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
1085  Stack = &yyptr->Stack_alloc; \
1086  yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
1087  yyptr += yynewbytes / YYSIZEOF (*yyptr); \
1088  } \
1089  while (0)
1090 
1091 #endif
1092 
1093 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
1094 /* Copy COUNT objects from SRC to DST. The source and destination do
1095  not overlap. */
1096 # ifndef YYCOPY
1097 # if defined __GNUC__ && 1 < __GNUC__
1098 # define YYCOPY(Dst, Src, Count) \
1099  __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
1100 # else
1101 # define YYCOPY(Dst, Src, Count) \
1102  do \
1103  { \
1104  YYPTRDIFF_T yyi; \
1105  for (yyi = 0; yyi < (Count); yyi++) \
1106  (Dst)[yyi] = (Src)[yyi]; \
1107  } \
1108  while (0)
1109 # endif
1110 # endif
1111 #endif /* !YYCOPY_NEEDED */
1112 
1113 /* YYFINAL -- State number of the termination state. */
1114 #define YYFINAL 114
1115 /* YYLAST -- Last index in YYTABLE. */
1116 #define YYLAST 179
1117 
1118 /* YYNTOKENS -- Number of terminals. */
1119 #define YYNTOKENS 53
1120 /* YYNNTS -- Number of nonterminals. */
1121 #define YYNNTS 46
1122 /* YYNRULES -- Number of rules. */
1123 #define YYNRULES 103
1124 /* YYNSTATES -- Number of states. */
1125 #define YYNSTATES 185
1126 
1127 /* YYMAXUTOK -- Last valid token kind. */
1128 #define YYMAXUTOK 307
1129 
1130 
1131 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
1132  as returned by yylex, with out-of-bounds checking. */
1133 #define YYTRANSLATE(YYX) \
1134  (0 <= (YYX) && (YYX) <= YYMAXUTOK \
1135  ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
1136  : YYSYMBOL_YYUNDEF)
1137 
1138 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
1139  as returned by yylex. */
1140 static const yytype_int8 yytranslate[] =
1141 {
1142  0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1143  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1144  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1145  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1146  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1147  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1148  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1149  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1150  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1151  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1152  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1153  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1154  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1155  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1156  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1157  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1158  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1159  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1160  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1161  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1162  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1163  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1164  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1165  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1166  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1167  2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1168  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1169  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1170  25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1171  35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1172  45, 46, 47, 48, 49, 50, 51, 52
1173 };
1174 
1175 #if YYDEBUG
1176 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
1177 static const yytype_int16 yyrline[] =
1178 {
1179  0, 511, 511, 512, 515, 516, 517, 518, 519, 520,
1180  521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
1181  531, 532, 533, 534, 535, 536, 537, 538, 539, 540,
1182  541, 542, 543, 544, 545, 546, 547, 548, 551, 559,
1183  565, 579, 583, 589, 616, 620, 626, 667, 676, 684,
1184  691, 699, 708, 719, 721, 723, 725, 727, 729, 731,
1185  733, 737, 741, 745, 757, 790, 798, 878, 882, 889,
1186  922, 940, 947, 954, 961, 968, 975, 982, 989, 1005,
1187  1019, 1039, 1046, 1049, 1054, 1061, 1064, 1072, 1080, 1091,
1188  1102, 1113, 1122, 1134, 1143, 1162, 1170, 1173, 1199, 1203,
1189  1205, 1209, 1217, 1225
1190 };
1191 #endif
1192 
1193 /** Accessing symbol of state STATE. */
1194 #define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
1195 
1196 #if YYDEBUG || 0
1197 /* The user-facing name of the symbol whose (internal) number is
1198  YYSYMBOL. No bounds checking. */
1199 static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
1200 
1201 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1202  First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1203 static const char *const yytname[] =
1204 {
1205  "\"end of file\"", "error", "\"invalid token\"", "TK_OPEN", "TK_CREATE",
1206  "TK_CLOSE", "TK_CHECKPOINT", "TK_DELETE", "TK_MODULE", "TK_MAKE",
1207  "TK_APPLY", "TK_CAPPLY", "TK_DISPLAY", "TK_REMOVE", "TK_ACTIVATE",
1208  "TK_SET_PROPERTY", "TK_GET_PROPERTY", "TK_SET_ENVIRONMENT",
1209  "TK_GET_ENVIRONMENT", "TK_UNSET_ENVIRONMENT", "TK_CDIR", "TK_INFO",
1210  "TK_PWD", "TK_HELP", "TK_SHOW", "TK_SOURCE", "TK_SHELL", "TK_ECHO",
1211  "TK_UNKNOWN", "TK_TIMEOUT", "TK_QUIT", "TK_EXIT", "TK_LINE",
1212  "TK_CHECKACTIVE", "TK_VERSION", "TK_TOUCH", "TK_OWNER_NAME",
1213  "TK_OWNER_ALL", "TK_OWNER_ALLFUNC", "TK_OWNER_ALLCU", "TK_OWNER_PROGRAM",
1214  "TK_OWNER_MAIN", "TK_OWNER_MODULE", "TK_OWNER_CALLERS",
1215  "TK_OWNER_CALLEES", "TK_OPENPAREN", "TK_COMMA", "TK_CLOSEPAREN",
1216  "TK_EQUAL", "TK_NAME", "TK_A_STRING", "TK_ENDOFLINE", "TK_INT",
1217  "$accept", "commands", "command", "i_quit", "i_exit", "i_version",
1218  "i_help", "i_setprop", "i_shell", "i_unknown", "i_echo", "i_info",
1219  "i_cd", "i_pwd", "i_getenv", "i_setenv", "i_unsetenv", "i_timeout",
1220  "i_checkpoint", "i_open", "workspace_name", "i_create", "i_close",
1221  "i_delete", "i_module", "i_make", "i_apply", "i_capply", "i_display",
1222  "i_touch", "i_show", "i_rm", "i_activate", "i_checkactive", "i_get",
1223  "i_source", "rulename", "filename_list", "filename", "resource_id",
1224  "rule_id", "owner", "list_of_owner_name", "propname", "phasename",
1225  "resourcename", YY_NULLPTR
1226 };
1227 
1228 static const char *
1229 yysymbol_name (yysymbol_kind_t yysymbol)
1230 {
1231  return yytname[yysymbol];
1232 }
1233 #endif
1234 
1235 #define YYPACT_NINF (-102)
1236 
1237 #define yypact_value_is_default(Yyn) \
1238  ((Yyn) == YYPACT_NINF)
1239 
1240 #define YYTABLE_NINF (-1)
1241 
1242 #define yytable_value_is_error(Yyn) \
1243  0
1244 
1245 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1246  STATE-NUM. */
1247 static const yytype_int16 yypact[] =
1248 {
1249  113, -102, -44, -44, -15, -2, -44, -39, 1, 2,
1250  2, 1, 1, 2, 8, 3, 4, 5, 6, 7,
1251  9, 10, -12, 1, 11, -28, -26, 15, 44, 49,
1252  50, 1, 51, 1, -102, 64, -102, -102, -102, -102,
1253  -102, -102, -102, -102, -102, -102, -102, -102, -102, -102,
1254  -102, -102, -102, -102, -102, -102, -102, -102, -102, -102,
1255  -102, -102, -102, -102, -102, -102, -102, -102, -102, -102,
1256  52, 11, 53, -102, -102, 54, 55, -102, 56, 12,
1257  -102, 57, 12, 58, 59, 60, 61, -102, 62, -102,
1258  94, -41, 98, 99, 100, 101, -102, 102, -102, 103,
1259  -102, -8, -102, 104, -102, 105, -102, -102, 106, -102,
1260  -102, 107, -102, 108, -102, -102, -102, -7, -102, -102,
1261  -102, -102, -11, -102, -102, -102, -102, -102, -102, -102,
1262  -102, -102, -37, 109, 110, 111, -4, -102, -102, -102,
1263  -102, -102, -102, -102, -102, -102, -102, -102, -102, -102,
1264  -102, 116, 118, 119, 120, 121, 122, 123, 124, -102,
1265  -29, 125, 126, 127, -3, -102, -102, -102, -102, -102,
1266  -102, -102, -102, -102, -102, -102, -102, 130, -102, -102,
1267  -102, -102, -102, -102, -102
1268 };
1269 
1270 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
1271  Performed when YYTABLE does not specify something else to do. Zero
1272  means the default is an error. */
1273 static const yytype_int8 yydefact[] =
1274 {
1275  0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
1276  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1277  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1278  0, 0, 0, 0, 4, 0, 3, 31, 33, 32,
1279  34, 30, 29, 36, 28, 27, 24, 25, 20, 21,
1280  22, 23, 9, 5, 6, 7, 8, 10, 11, 12,
1281  13, 14, 35, 15, 16, 17, 18, 19, 26, 65,
1282  0, 0, 0, 67, 63, 0, 0, 103, 0, 97,
1283  102, 0, 97, 0, 0, 0, 0, 82, 0, 101,
1284  0, 0, 0, 0, 0, 0, 51, 0, 42, 0,
1285  85, 0, 84, 0, 44, 0, 48, 46, 0, 38,
1286  39, 0, 40, 0, 1, 2, 64, 0, 68, 69,
1287  70, 71, 0, 86, 72, 87, 73, 74, 77, 78,
1288  43, 80, 0, 85, 0, 0, 0, 52, 61, 50,
1289  49, 41, 76, 81, 83, 45, 47, 62, 79, 75,
1290  66, 0, 0, 0, 0, 0, 0, 0, 0, 98,
1291  0, 85, 0, 0, 0, 53, 55, 59, 57, 88,
1292  89, 90, 91, 92, 93, 95, 94, 0, 96, 99,
1293  54, 56, 60, 58, 100
1294 };
1295 
1296 /* YYPGOTO[NTERM-NUM]. */
1297 static const yytype_int16 yypgoto[] =
1298 {
1299  -102, -102, 24, -102, -102, -102, -102, -102, -102, -102,
1300  -102, -102, -102, -102, -102, -102, -102, -102, -102, -102,
1301  16, -102, -102, -102, -102, -102, -102, -102, -102, -102,
1302  -102, -102, -102, -102, -102, -102, -102, -70, -101, -9,
1303  162, 91, -102, -102, 161, 144
1304 };
1305 
1306 /* YYDEFGOTO[NTERM-NUM]. */
1307 static const yytype_uint8 yydefgoto[] =
1308 {
1309  0, 35, 36, 37, 38, 39, 40, 41, 42, 43,
1310  44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1311  70, 54, 55, 56, 57, 58, 59, 60, 61, 62,
1312  63, 64, 65, 66, 67, 68, 86, 101, 102, 78,
1313  81, 123, 160, 90, 82, 79
1314 };
1315 
1316 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
1317  positive, shift that token. If negative, reduce the rule whose
1318  number is the opposite. If YYTABLE_NINF, syntax error. */
1319 static const yytype_uint8 yytable[] =
1320 {
1321  144, 117, 84, 85, 103, 69, 105, 132, 133, 134,
1322  76, 135, 161, 162, 99, 163, 144, 177, 178, 71,
1323  179, 136, 75, 104, 113, 106, 151, 152, 153, 154,
1324  155, 156, 157, 158, 72, 144, 73, 97, 159, 98,
1325  88, 100, 100, 143, 150, 100, 100, 168, 183, 74,
1326  77, 80, 89, 91, 92, 93, 94, 122, 95, 115,
1327  100, 96, 164, 144, 114, 1, 107, 2, 3, 4,
1328  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1329  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1330  25, 26, 27, 28, 29, 30, 108, 31, 32, 33,
1331  109, 110, 112, 116, 118, 119, 120, 121, 124, 126,
1332  127, 128, 129, 130, 1, 34, 2, 3, 4, 5,
1333  6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1334  16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
1335  26, 27, 28, 29, 30, 131, 31, 32, 33, 137,
1336  138, 139, 140, 141, 142, 145, 146, 147, 148, 149,
1337  165, 166, 167, 169, 34, 170, 171, 172, 173, 174,
1338  175, 176, 83, 125, 87, 111, 180, 181, 182, 184
1339 };
1340 
1341 static const yytype_uint8 yycheck[] =
1342 {
1343  101, 71, 11, 12, 32, 49, 32, 48, 49, 50,
1344  49, 52, 49, 50, 23, 52, 117, 46, 47, 3,
1345  49, 91, 6, 51, 33, 51, 37, 38, 39, 40,
1346  41, 42, 43, 44, 49, 136, 51, 49, 49, 51,
1347  32, 49, 49, 51, 51, 49, 49, 51, 51, 51,
1348  49, 49, 49, 49, 49, 49, 49, 45, 49, 35,
1349  49, 51, 132, 164, 0, 1, 51, 3, 4, 5,
1350  6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1351  16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
1352  26, 27, 28, 29, 30, 31, 52, 33, 34, 35,
1353  51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
1354  51, 51, 51, 51, 1, 51, 3, 4, 5, 6,
1355  7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1356  17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1357  27, 28, 29, 30, 31, 51, 33, 34, 35, 51,
1358  51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
1359  51, 51, 51, 47, 51, 47, 47, 47, 47, 47,
1360  47, 47, 10, 82, 13, 31, 51, 51, 51, 49
1361 };
1362 
1363 /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
1364  state STATE-NUM. */
1365 static const yytype_int8 yystos[] =
1366 {
1367  0, 1, 3, 4, 5, 6, 7, 8, 9, 10,
1368  11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1369  21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
1370  31, 33, 34, 35, 51, 54, 55, 56, 57, 58,
1371  59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
1372  69, 70, 71, 72, 74, 75, 76, 77, 78, 79,
1373  80, 81, 82, 83, 84, 85, 86, 87, 88, 49,
1374  73, 73, 49, 51, 51, 73, 49, 49, 92, 98,
1375  49, 93, 97, 93, 92, 92, 89, 97, 32, 49,
1376  96, 49, 49, 49, 49, 49, 51, 49, 51, 92,
1377  49, 90, 91, 32, 51, 32, 51, 51, 52, 51,
1378  51, 98, 51, 92, 0, 55, 51, 90, 51, 51,
1379  51, 51, 45, 94, 51, 94, 51, 51, 51, 51,
1380  51, 51, 48, 49, 50, 52, 90, 51, 51, 51,
1381  51, 51, 51, 51, 91, 51, 51, 51, 51, 51,
1382  51, 37, 38, 39, 40, 41, 42, 43, 44, 49,
1383  95, 49, 50, 52, 90, 51, 51, 51, 51, 47,
1384  47, 47, 47, 47, 47, 47, 47, 46, 47, 49,
1385  51, 51, 51, 51, 49
1386 };
1387 
1388 /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
1389 static const yytype_int8 yyr1[] =
1390 {
1391  0, 53, 54, 54, 55, 55, 55, 55, 55, 55,
1392  55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
1393  55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
1394  55, 55, 55, 55, 55, 55, 55, 55, 56, 57,
1395  58, 59, 59, 60, 61, 61, 62, 63, 63, 64,
1396  65, 66, 67, 68, 68, 68, 68, 68, 68, 68,
1397  68, 69, 70, 71, 72, 73, 74, 75, 75, 76,
1398  77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
1399  87, 88, 89, 90, 90, 91, 92, 93, 94, 94,
1400  94, 94, 94, 94, 94, 94, 94, 94, 95, 95,
1401  95, 96, 97, 98
1402 };
1403 
1404 /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
1405 static const yytype_int8 yyr2[] =
1406 {
1407  0, 2, 2, 1, 1, 1, 1, 1, 1, 1,
1408  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1409  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1410  1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
1411  2, 3, 2, 3, 2, 3, 2, 3, 2, 3,
1412  3, 2, 3, 4, 5, 4, 5, 4, 5, 4,
1413  5, 3, 3, 2, 3, 1, 4, 2, 3, 3,
1414  3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1415  3, 3, 1, 2, 1, 1, 2, 2, 3, 3,
1416  3, 3, 3, 3, 3, 3, 3, 0, 1, 2,
1417  3, 1, 1, 1
1418 };
1419 
1420 
1421 enum { YYENOMEM = -2 };
1422 
1423 #define yyerrok (yyerrstatus = 0)
1424 #define yyclearin (yychar = YYEMPTY)
1425 
1426 #define YYACCEPT goto yyacceptlab
1427 #define YYABORT goto yyabortlab
1428 #define YYERROR goto yyerrorlab
1429 #define YYNOMEM goto yyexhaustedlab
1430 
1431 
1432 #define YYRECOVERING() (!!yyerrstatus)
1433 
1434 #define YYBACKUP(Token, Value) \
1435  do \
1436  if (yychar == YYEMPTY) \
1437  { \
1438  yychar = (Token); \
1439  yylval = (Value); \
1440  YYPOPSTACK (yylen); \
1441  yystate = *yyssp; \
1442  goto yybackup; \
1443  } \
1444  else \
1445  { \
1446  yyerror (YY_("syntax error: cannot back up")); \
1447  YYERROR; \
1448  } \
1449  while (0)
1450 
1451 /* Backward compatibility with an undocumented macro.
1452  Use YYerror or YYUNDEF. */
1453 #define YYERRCODE YYUNDEF
1454 
1455 
1456 /* Enable debugging if requested. */
1457 #if YYDEBUG
1458 
1459 # ifndef YYFPRINTF
1460 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1461 # define YYFPRINTF fprintf
1462 # endif
1463 
1464 # define YYDPRINTF(Args) \
1465 do { \
1466  if (yydebug) \
1467  YYFPRINTF Args; \
1468 } while (0)
1469 
1470 
1471 
1472 
1473 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
1474 do { \
1475  if (yydebug) \
1476  { \
1477  YYFPRINTF (stderr, "%s ", Title); \
1478  yy_symbol_print (stderr, \
1479  Kind, Value); \
1480  YYFPRINTF (stderr, "\n"); \
1481  } \
1482 } while (0)
1483 
1484 
1485 /*-----------------------------------.
1486 | Print this symbol's value on YYO. |
1487 `-----------------------------------*/
1488 
1489 static void
1490 yy_symbol_value_print (FILE *yyo,
1491  yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
1492 {
1493  FILE *yyoutput = yyo;
1494  YY_USE (yyoutput);
1495  if (!yyvaluep)
1496  return;
1498  YY_USE (yykind);
1500 }
1501 
1502 
1503 /*---------------------------.
1504 | Print this symbol on YYO. |
1505 `---------------------------*/
1506 
1507 static void
1508 yy_symbol_print (FILE *yyo,
1509  yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
1510 {
1511  YYFPRINTF (yyo, "%s %s (",
1512  yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
1513 
1514  yy_symbol_value_print (yyo, yykind, yyvaluep);
1515  YYFPRINTF (yyo, ")");
1516 }
1517 
1518 /*------------------------------------------------------------------.
1519 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1520 | TOP (included). |
1521 `------------------------------------------------------------------*/
1522 
1523 static void
1524 yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
1525 {
1526  YYFPRINTF (stderr, "Stack now");
1527  for (; yybottom <= yytop; yybottom++)
1528  {
1529  int yybot = *yybottom;
1530  YYFPRINTF (stderr, " %d", yybot);
1531  }
1532  YYFPRINTF (stderr, "\n");
1533 }
1534 
1535 # define YY_STACK_PRINT(Bottom, Top) \
1536 do { \
1537  if (yydebug) \
1538  yy_stack_print ((Bottom), (Top)); \
1539 } while (0)
1540 
1541 
1542 /*------------------------------------------------.
1543 | Report that the YYRULE is going to be reduced. |
1544 `------------------------------------------------*/
1545 
1546 static void
1547 yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
1548  int yyrule)
1549 {
1550  int yylno = yyrline[yyrule];
1551  int yynrhs = yyr2[yyrule];
1552  int yyi;
1553  YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
1554  yyrule - 1, yylno);
1555  /* The symbols being reduced. */
1556  for (yyi = 0; yyi < yynrhs; yyi++)
1557  {
1558  YYFPRINTF (stderr, " $%d = ", yyi + 1);
1559  yy_symbol_print (stderr,
1560  YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
1561  &yyvsp[(yyi + 1) - (yynrhs)]);
1562  YYFPRINTF (stderr, "\n");
1563  }
1564 }
1565 
1566 # define YY_REDUCE_PRINT(Rule) \
1567 do { \
1568  if (yydebug) \
1569  yy_reduce_print (yyssp, yyvsp, Rule); \
1570 } while (0)
1571 
1572 /* Nonzero means print parse trace. It is left uninitialized so that
1573  multiple parsers can coexist. */
1574 int yydebug;
1575 #else /* !YYDEBUG */
1576 # define YYDPRINTF(Args) ((void) 0)
1577 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
1578 # define YY_STACK_PRINT(Bottom, Top)
1579 # define YY_REDUCE_PRINT(Rule)
1580 #endif /* !YYDEBUG */
1581 
1582 
1583 /* YYINITDEPTH -- initial size of the parser's stacks. */
1584 #ifndef YYINITDEPTH
1585 # define YYINITDEPTH 200
1586 #endif
1587 
1588 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1589  if the built-in stack extension method is used).
1590 
1591  Do not make this value too large; the results are undefined if
1592  YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1593  evaluated with infinite-precision integer arithmetic. */
1594 
1595 #ifndef YYMAXDEPTH
1596 # define YYMAXDEPTH 10000
1597 #endif
1598 
1599 
1600 
1601 
1602 
1603 
1604 /*-----------------------------------------------.
1605 | Release the memory associated to this symbol. |
1606 `-----------------------------------------------*/
1607 
1608 static void
1609 yydestruct (const char *yymsg,
1610  yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
1611 {
1612  YY_USE (yyvaluep);
1613  if (!yymsg)
1614  yymsg = "Deleting";
1615  YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
1616 
1618  YY_USE (yykind);
1620 }
1621 
1622 
1623 /* Lookahead token kind. */
1625 
1626 /* The semantic value of the lookahead symbol. */
1628 /* Number of syntax errors so far. */
1630 
1631 
1632 
1633 
1634 /*----------.
1635 | yyparse. |
1636 `----------*/
1637 
1638 int
1639 yyparse (void)
1640 {
1641  yy_state_fast_t yystate = 0;
1642  /* Number of tokens to shift before error messages enabled. */
1643  int yyerrstatus = 0;
1644 
1645  /* Refer to the stacks through separate pointers, to allow yyoverflow
1646  to reallocate them elsewhere. */
1647 
1648  /* Their size. */
1649  YYPTRDIFF_T yystacksize = YYINITDEPTH;
1650 
1651  /* The state stack: array, bottom, top. */
1652  yy_state_t yyssa[YYINITDEPTH];
1653  yy_state_t *yyss = yyssa;
1654  yy_state_t *yyssp = yyss;
1655 
1656  /* The semantic value stack: array, bottom, top. */
1657  YYSTYPE yyvsa[YYINITDEPTH];
1658  YYSTYPE *yyvs = yyvsa;
1659  YYSTYPE *yyvsp = yyvs;
1660 
1661  int yyn;
1662  /* The return value of yyparse. */
1663  int yyresult;
1664  /* Lookahead symbol kind. */
1666  /* The variables used to return semantic value and location from the
1667  action routines. */
1668  YYSTYPE yyval;
1669 
1670 
1671 
1672 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1673 
1674  /* The number of symbols on the RHS of the reduced rule.
1675  Keep to zero when no symbol should be popped. */
1676  int yylen = 0;
1677 
1678  YYDPRINTF ((stderr, "Starting parse\n"));
1679 
1680  yychar = YYEMPTY; /* Cause a token to be read. */
1681 
1682  goto yysetstate;
1683 
1684 
1685 /*------------------------------------------------------------.
1686 | yynewstate -- push a new state, which is found in yystate. |
1687 `------------------------------------------------------------*/
1688 yynewstate:
1689  /* In all cases, when you get here, the value and location stacks
1690  have just been pushed. So pushing a state here evens the stacks. */
1691  yyssp++;
1692 
1693 
1694 /*--------------------------------------------------------------------.
1695 | yysetstate -- set current state (the top of the stack) to yystate. |
1696 `--------------------------------------------------------------------*/
1697 yysetstate:
1698  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1699  YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
1701  *yyssp = YY_CAST (yy_state_t, yystate);
1703  YY_STACK_PRINT (yyss, yyssp);
1704 
1705  if (yyss + yystacksize - 1 <= yyssp)
1706 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
1707  YYNOMEM;
1708 #else
1709  {
1710  /* Get the current used size of the three stacks, in elements. */
1711  YYPTRDIFF_T yysize = yyssp - yyss + 1;
1712 
1713 # if defined yyoverflow
1714  {
1715  /* Give user a chance to reallocate the stack. Use copies of
1716  these so that the &'s don't force the real ones into
1717  memory. */
1718  yy_state_t *yyss1 = yyss;
1719  YYSTYPE *yyvs1 = yyvs;
1720 
1721  /* Each stack pointer address is followed by the size of the
1722  data in use in that stack, in bytes. This used to be a
1723  conditional around just the two extra args, but that might
1724  be undefined if yyoverflow is a macro. */
1725  yyoverflow (YY_("memory exhausted"),
1726  &yyss1, yysize * YYSIZEOF (*yyssp),
1727  &yyvs1, yysize * YYSIZEOF (*yyvsp),
1728  &yystacksize);
1729  yyss = yyss1;
1730  yyvs = yyvs1;
1731  }
1732 # else /* defined YYSTACK_RELOCATE */
1733  /* Extend the stack our own way. */
1734  if (YYMAXDEPTH <= yystacksize)
1735  YYNOMEM;
1736  yystacksize *= 2;
1737  if (YYMAXDEPTH < yystacksize)
1738  yystacksize = YYMAXDEPTH;
1739 
1740  {
1741  yy_state_t *yyss1 = yyss;
1742  union yyalloc *yyptr =
1743  YY_CAST (union yyalloc *,
1744  YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
1745  if (! yyptr)
1746  YYNOMEM;
1747  YYSTACK_RELOCATE (yyss_alloc, yyss);
1748  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1749 # undef YYSTACK_RELOCATE
1750  if (yyss1 != yyssa)
1751  YYSTACK_FREE (yyss1);
1752  }
1753 # endif
1754 
1755  yyssp = yyss + yysize - 1;
1756  yyvsp = yyvs + yysize - 1;
1757 
1759  YYDPRINTF ((stderr, "Stack size increased to %ld\n",
1760  YY_CAST (long, yystacksize)));
1762 
1763  if (yyss + yystacksize - 1 <= yyssp)
1764  YYABORT;
1765  }
1766 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
1767 
1768 
1769  if (yystate == YYFINAL)
1770  YYACCEPT;
1771 
1772  goto yybackup;
1773 
1774 
1775 /*-----------.
1776 | yybackup. |
1777 `-----------*/
1778 yybackup:
1779  /* Do appropriate processing given the current state. Read a
1780  lookahead token if we need one and don't already have one. */
1781 
1782  /* First try to decide what to do without reference to lookahead token. */
1783  yyn = yypact[yystate];
1784  if (yypact_value_is_default (yyn))
1785  goto yydefault;
1786 
1787  /* Not known => get a lookahead token if don't already have one. */
1788 
1789  /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
1790  if (yychar == YYEMPTY)
1791  {
1792  YYDPRINTF ((stderr, "Reading a token\n"));
1793  yychar = yylex ();
1794  }
1795 
1796  if (yychar <= YYEOF)
1797  {
1798  yychar = YYEOF;
1799  yytoken = YYSYMBOL_YYEOF;
1800  YYDPRINTF ((stderr, "Now at end of input.\n"));
1801  }
1802  else if (yychar == YYerror)
1803  {
1804  /* The scanner already issued an error message, process directly
1805  to error recovery. But do not keep the error token as
1806  lookahead, it is too special and may lead us to an endless
1807  loop in error recovery. */
1808  yychar = YYUNDEF;
1809  yytoken = YYSYMBOL_YYerror;
1810  goto yyerrlab1;
1811  }
1812  else
1813  {
1814  yytoken = YYTRANSLATE (yychar);
1815  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1816  }
1817 
1818  /* If the proper action on seeing token YYTOKEN is to reduce or to
1819  detect an error, take that action. */
1820  yyn += yytoken;
1821  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1822  goto yydefault;
1823  yyn = yytable[yyn];
1824  if (yyn <= 0)
1825  {
1826  if (yytable_value_is_error (yyn))
1827  goto yyerrlab;
1828  yyn = -yyn;
1829  goto yyreduce;
1830  }
1831 
1832  /* Count tokens shifted since error; after three, turn off error
1833  status. */
1834  if (yyerrstatus)
1835  yyerrstatus--;
1836 
1837  /* Shift the lookahead token. */
1838  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1839  yystate = yyn;
1841  *++yyvsp = yylval;
1843 
1844  /* Discard the shifted token. */
1845  yychar = YYEMPTY;
1846  goto yynewstate;
1847 
1848 
1849 /*-----------------------------------------------------------.
1850 | yydefault -- do the default action for the current state. |
1851 `-----------------------------------------------------------*/
1852 yydefault:
1853  yyn = yydefact[yystate];
1854  if (yyn == 0)
1855  goto yyerrlab;
1856  goto yyreduce;
1857 
1858 
1859 /*-----------------------------.
1860 | yyreduce -- do a reduction. |
1861 `-----------------------------*/
1862 yyreduce:
1863  /* yyn is the number of a rule to reduce with. */
1864  yylen = yyr2[yyn];
1865 
1866  /* If YYLEN is nonzero, implement the default value of the action:
1867  '$$ = $1'.
1868 
1869  Otherwise, the following line sets YYVAL to garbage.
1870  This behavior is undocumented and Bison
1871  users should not rely upon it. Assigning to YYVAL
1872  unconditionally makes the parser a bit smaller, and it avoids a
1873  GCC warning that YYVAL may be used uninitialized. */
1874  yyval = yyvsp[1-yylen];
1875 
1876 
1877  YY_REDUCE_PRINT (yyn);
1878  switch (yyn)
1879  {
1880  case 2: /* commands: commands command */
1881 #line 511 "tp_yacc.y"
1882  { (yyval.status) = (yyvsp[-1].status) && (yyvsp[0].status); }
1883 #line 1884 "y.tab.c"
1884  break;
1885 
1886  case 4: /* command: TK_ENDOFLINE */
1887 #line 515 "tp_yacc.y"
1888  { /* may be empty! */ }
1889 #line 1890 "y.tab.c"
1890  break;
1891 
1892  case 5: /* command: i_open */
1893 #line 516 "tp_yacc.y"
1894  { processing_started_p = true; }
1895 #line 1896 "y.tab.c"
1896  break;
1897 
1898  case 6: /* command: i_create */
1899 #line 517 "tp_yacc.y"
1900  { processing_started_p = false; }
1901 #line 1902 "y.tab.c"
1902  break;
1903 
1904  case 7: /* command: i_close */
1905 #line 518 "tp_yacc.y"
1906  { processing_started_p = false; }
1907 #line 1908 "y.tab.c"
1908  break;
1909 
1910  case 8: /* command: i_delete */
1911 #line 519 "tp_yacc.y"
1912  { processing_started_p = false; }
1913 #line 1914 "y.tab.c"
1914  break;
1915 
1916  case 11: /* command: i_make */
1917 #line 522 "tp_yacc.y"
1918  { processing_started_p = true; }
1919 #line 1920 "y.tab.c"
1920  break;
1921 
1922  case 12: /* command: i_apply */
1923 #line 523 "tp_yacc.y"
1924  { processing_started_p = true; }
1925 #line 1926 "y.tab.c"
1926  break;
1927 
1928  case 13: /* command: i_capply */
1929 #line 524 "tp_yacc.y"
1930  { processing_started_p = true; }
1931 #line 1932 "y.tab.c"
1932  break;
1933 
1934  case 14: /* command: i_display */
1935 #line 525 "tp_yacc.y"
1936  { processing_started_p = true; }
1937 #line 1938 "y.tab.c"
1938  break;
1939 
1940  case 37: /* command: error */
1941 #line 548 "tp_yacc.y"
1942  {(yyval.status) = false;}
1943 #line 1944 "y.tab.c"
1944  break;
1945 
1946  case 38: /* i_quit: TK_QUIT TK_ENDOFLINE */
1947 #line 552 "tp_yacc.y"
1948  {
1949  tpips_close();
1950  pips_stop(info_log, 0, "tpips quit");
1951  }
1952 #line 1953 "y.tab.c"
1953  break;
1954 
1955  case 39: /* i_exit: TK_EXIT TK_ENDOFLINE */
1956 #line 560 "tp_yacc.y"
1957  {
1958  exit(0); /* rather rough! */
1959  }
1960 #line 1961 "y.tab.c"
1961  break;
1962 
1963  case 40: /* i_version: TK_VERSION TK_ENDOFLINE */
1964 #line 566 "tp_yacc.y"
1965  {
1966  fprintf(stdout,
1967  // "tpips: (%s)\n"
1968  "ARCH=" STRINGIFY(SOFT_ARCH) "\n"
1969  "REVS=\n"
1970  "%s"
1971  "DATE=%s\n"
1972  "CC_VERSION=%s\n",
1974  fflush(stdout);
1975  }
1976 #line 1977 "y.tab.c"
1977  break;
1978 
1979  case 41: /* i_help: TK_HELP TK_NAME TK_ENDOFLINE */
1980 #line 580 "tp_yacc.y"
1981  {
1982  tpips_help((yyvsp[-1].name)); free((yyvsp[-1].name));
1983  }
1984 #line 1985 "y.tab.c"
1985  break;
1986 
1987  case 42: /* i_help: TK_HELP TK_ENDOFLINE */
1988 #line 584 "tp_yacc.y"
1989  {
1990  tpips_help("");
1991  }
1992 #line 1993 "y.tab.c"
1993  break;
1994 
1995  case 43: /* i_setprop: TK_SET_PROPERTY TK_LINE TK_ENDOFLINE */
1996 #line 590 "tp_yacc.y"
1997  {
1998  consistency_enforced_p = get_bool_property("CONSISTENCY_ENFORCED_P");
2000  user_log("setproperty %s\n", (yyvsp[-1].name));
2001  reset_property_error(); // We start again at tpips
2002  // level and should be able to
2003  // avoid the fatal loop...
2004  parse_properties_string((yyvsp[-1].name), processing_started_p);
2005  if(processing_started_p) {
2006  pips_user_warning("Properties should not be updated during "
2007  "tpips processing."
2008  " Move the setproperty statement at the "
2009  "beginning of your tpips script.\n");
2010  }
2011  }
2012  else {
2013  pips_user_error("Properties should not be updated during tpips "
2014  "processing."
2015  " Move the setproperty statement at the beginning "
2016  "of your tpips script.\n");
2017  }
2018  fflush(stdout);
2019  free((yyvsp[-1].name));
2020  }
2021 #line 2022 "y.tab.c"
2022  break;
2023 
2024  case 44: /* i_shell: TK_SHELL TK_ENDOFLINE */
2025 #line 617 "tp_yacc.y"
2026  {
2027  tp_system("${SHELL:-sh}");
2028  }
2029 #line 2030 "y.tab.c"
2030  break;
2031 
2032  case 45: /* i_shell: TK_SHELL TK_LINE TK_ENDOFLINE */
2033 #line 621 "tp_yacc.y"
2034  {
2035  tp_system((yyvsp[-1].name)); free((yyvsp[-1].name));
2036  }
2037 #line 2038 "y.tab.c"
2038  break;
2039 
2040  case 46: /* i_unknown: TK_UNKNOWN TK_ENDOFLINE */
2041 #line 627 "tp_yacc.y"
2042  {
2044  {
2045  pips_user_warning("implicit shell command assumed!\n");
2046  tp_system((yyvsp[-1].name));
2047  }
2048  else
2049  {
2050  tpips_lex_print_pos(stderr);
2051  if(get_bool_property("ABORT_ON_USER_ERROR") ||
2052  get_bool_property("CLOSE_WORKSPACE_AND_QUIT_ON_ERROR")) {
2053  // FI: the next call is used to check error management
2054  // pips_internal_error("Just a temporary test\n.");
2055  extern string tpips_unknown_string;
2057  "\n\n"
2058  "\tUnknown command \"%s\" at line %d in file \"%s\".\n"
2059  "\tMaybe you intended to execute a direct shell command.\n"
2060  "\tThis convenient feature is desactivated by default.\n"
2061  "\tTo enable it, you can run tpips with the -s option,\n"
2062  "\tor do \"setproperty TPIPS_IS_A_SHELL=TRUE\",\n"
2063  "\tor do \"setenv TPIPS_IS_A_SHELL=TRUE\".\n"
2064  "\tOtherwise use ! or \"shell\" as a command prefix.\n\n", tpips_unknown_string, tpips_current_line_number(), tpips_current_file_name());
2065  }
2066  else {
2067  extern string tpips_unknown_string; // provided by the lexer
2069  "\n\n"
2070  "\tMaybe you intended to execute a direct shell command.\n"
2071  "\tThis convenient feature is desactivated by default.\n"
2072  "\tTo enable it, you can run tpips with the -s option,\n"
2073  "\tor do \"setproperty TPIPS_IS_A_SHELL=TRUE\",\n"
2074  "\tor do \"setenv TPIPS_IS_A_SHELL=TRUE\".\n"
2075  "\tOtherwise use ! or \"shell\" as a command prefix.\n\n");
2076  }
2077  }
2078  free((yyvsp[-1].name));
2079  }
2080 #line 2081 "y.tab.c"
2081  break;
2082 
2083  case 47: /* i_echo: TK_ECHO TK_LINE TK_ENDOFLINE */
2084 #line 668 "tp_yacc.y"
2085  {
2086  string s = (yyvsp[-1].name);
2087  user_log("echo %s\n", (yyvsp[-1].name));
2088  skip_blanks(s);
2089  fprintf(stdout,"%s\n",s);
2090  fflush(stdout);
2091  free((yyvsp[-1].name));
2092  }
2093 #line 2094 "y.tab.c"
2094  break;
2095 
2096  case 48: /* i_echo: TK_ECHO TK_ENDOFLINE */
2097 #line 677 "tp_yacc.y"
2098  {
2099  user_log("echo\n");
2100  fprintf(stdout,"\n");
2101  fflush(stdout);
2102  }
2103 #line 2104 "y.tab.c"
2104  break;
2105 
2106  case 49: /* i_info: TK_INFO TK_NAME TK_ENDOFLINE */
2107 #line 685 "tp_yacc.y"
2108  {
2109  tp_some_info((yyvsp[-1].name));
2110  free((yyvsp[-1].name));
2111  }
2112 #line 2113 "y.tab.c"
2113  break;
2114 
2115  case 50: /* i_cd: TK_CDIR TK_NAME TK_ENDOFLINE */
2116 #line 692 "tp_yacc.y"
2117  {
2118  user_log("cd %s\n", (yyvsp[-1].name));
2119  if (chdir((yyvsp[-1].name))) fprintf(stderr, "error while changing directory\n");
2120  free((yyvsp[-1].name));
2121  }
2122 #line 2123 "y.tab.c"
2123  break;
2124 
2125  case 51: /* i_pwd: TK_PWD TK_ENDOFLINE */
2126 #line 700 "tp_yacc.y"
2127  {
2128  char pathname[MAXPATHLEN];
2129  fprintf(stdout, "current working directory: %s\n",
2130  (char*) getcwd(pathname, MAXPATHLEN));
2131  fflush(stdout);
2132  }
2133 #line 2134 "y.tab.c"
2134  break;
2135 
2136  case 52: /* i_getenv: TK_GET_ENVIRONMENT TK_NAME TK_ENDOFLINE */
2137 #line 709 "tp_yacc.y"
2138  {
2139  string val = getenv((yyvsp[-1].name));
2140  user_log("getenv %s\n", (yyvsp[-1].name));
2141  if (val) fprintf(stdout, "%s=%s\n", (yyvsp[-1].name), val);
2142  else fprintf(stdout, "%s is not defined\n", (yyvsp[-1].name));
2143  free((yyvsp[-1].name));
2144  }
2145 #line 2146 "y.tab.c"
2146  break;
2147 
2148  case 53: /* i_setenv: TK_SET_ENVIRONMENT TK_NAME TK_NAME TK_ENDOFLINE */
2149 #line 720 "tp_yacc.y"
2150  { set_env_log_and_free((yyvsp[-2].name), (yyvsp[-1].name)); }
2151 #line 2152 "y.tab.c"
2152  break;
2153 
2154  case 54: /* i_setenv: TK_SET_ENVIRONMENT TK_NAME TK_EQUAL TK_NAME TK_ENDOFLINE */
2155 #line 722 "tp_yacc.y"
2156  { set_env_log_and_free((yyvsp[-3].name), (yyvsp[-1].name)); }
2157 #line 2158 "y.tab.c"
2158  break;
2159 
2160  case 55: /* i_setenv: TK_SET_ENVIRONMENT TK_NAME TK_A_STRING TK_ENDOFLINE */
2161 #line 724 "tp_yacc.y"
2162  { set_env_log_and_free((yyvsp[-2].name), (yyvsp[-1].name)); }
2163 #line 2164 "y.tab.c"
2164  break;
2165 
2166  case 56: /* i_setenv: TK_SET_ENVIRONMENT TK_NAME TK_EQUAL TK_A_STRING TK_ENDOFLINE */
2167 #line 726 "tp_yacc.y"
2168  { set_env_log_and_free((yyvsp[-3].name), (yyvsp[-1].name)); }
2169 #line 2170 "y.tab.c"
2170  break;
2171 
2172  case 57: /* i_setenv: TK_SET_ENVIRONMENT TK_NAME filename_list TK_ENDOFLINE */
2173 #line 728 "tp_yacc.y"
2174  { set_env_log_and_free((yyvsp[-2].name), strdup(string_array_join((yyvsp[-1].array), " "))); }
2175 #line 2176 "y.tab.c"
2176  break;
2177 
2178  case 58: /* i_setenv: TK_SET_ENVIRONMENT TK_NAME TK_EQUAL filename_list TK_ENDOFLINE */
2179 #line 730 "tp_yacc.y"
2180  { set_env_log_and_free((yyvsp[-3].name), strdup(string_array_join((yyvsp[-1].array), " "))); }
2181 #line 2182 "y.tab.c"
2182  break;
2183 
2184  case 59: /* i_setenv: TK_SET_ENVIRONMENT TK_NAME TK_INT TK_ENDOFLINE */
2185 #line 732 "tp_yacc.y"
2186  { char * v; asprintf(&v, "%d", (yyvsp[-1].ival)); set_env_log_and_free((yyvsp[-2].name), v); }
2187 #line 2188 "y.tab.c"
2188  break;
2189 
2190  case 60: /* i_setenv: TK_SET_ENVIRONMENT TK_NAME TK_EQUAL TK_INT TK_ENDOFLINE */
2191 #line 734 "tp_yacc.y"
2192  { char * v; asprintf(&v, "%d", (yyvsp[-1].ival)); set_env_log_and_free((yyvsp[-3].name), v); }
2193 #line 2194 "y.tab.c"
2194  break;
2195 
2196  case 61: /* i_unsetenv: TK_UNSET_ENVIRONMENT TK_NAME TK_ENDOFLINE */
2197 #line 738 "tp_yacc.y"
2198  { user_log("unsetenv %s\n", (yyvsp[-1].name)); unsetenv((yyvsp[-1].name)); }
2199 #line 2200 "y.tab.c"
2200  break;
2201 
2202  case 62: /* i_timeout: TK_TIMEOUT TK_INT TK_ENDOFLINE */
2203 #line 742 "tp_yacc.y"
2204  { user_log("timeout %d\n", (yyvsp[-1].ival)); set_pips_timeout((yyvsp[-1].ival)); }
2205 #line 2206 "y.tab.c"
2206  break;
2207 
2208  case 63: /* i_checkpoint: TK_CHECKPOINT TK_ENDOFLINE */
2209 #line 746 "tp_yacc.y"
2210  {
2212  {
2215  else
2216  pips_user_error("Cannot checkpoint, no workspace!\n");
2217  }
2218  }
2219 #line 2220 "y.tab.c"
2220  break;
2221 
2222  case 64: /* i_open: TK_OPEN workspace_name TK_ENDOFLINE */
2223 #line 758 "tp_yacc.y"
2224  {
2225  string main_module_name;
2226 
2227  pips_debug(7,"reduce rule i_open\n");
2228 
2229  if (tpips_execution_mode) {
2230  if (db_get_current_workspace_name() != NULL) {
2231  pips_user_warning("Closing workspace %s "
2232  "before opening %s!\n",
2233  db_get_current_workspace_name(), (yyvsp[-1].name));
2234  close_workspace(false);
2235  }
2236  if (!workspace_exists_p((yyvsp[-1].name)))
2237  pips_user_error("No workspace %s to open!\n", (yyvsp[-1].name));
2238 
2239  if (( (yyval.status) = open_workspace ((yyvsp[-1].name))))
2240  {
2241  main_module_name = get_first_main_module();
2242 
2243  if (!string_undefined_p(main_module_name)) {
2244  /* Ok, we got it ! Now we select it: */
2245  user_log("Main module PROGRAM \"%s\" selected.\n",
2246  main_module_name);
2247  lazy_open_module(main_module_name);
2248  free(main_module_name);
2249  }
2250  }
2251  }
2252  free((yyvsp[-1].name));
2253  }
2254 #line 2255 "y.tab.c"
2255  break;
2256 
2257  case 65: /* workspace_name: TK_NAME */
2258 #line 791 "tp_yacc.y"
2259  {
2260  if(workspace_name_p((yyvsp[0].name)))
2261  (yyval.name) = (yyvsp[0].name);
2262  else
2263  pips_user_error("workspace name %s contains invalid char(s)\n", (yyvsp[0].name));
2264  }
2265 #line 2266 "y.tab.c"
2266  break;
2267 
2268  case 66: /* i_create: TK_CREATE workspace_name filename_list TK_ENDOFLINE */
2269 #line 800 "tp_yacc.y"
2270  {
2271  string main_module_name;
2272  pips_debug(7,"reduce rule i_create\n");
2273 
2275  {
2276  if (workspace_exists_p((yyvsp[-2].name)))
2277  pips_user_error("Workspace %s already exists. Delete it!", (yyvsp[-2].name));
2278  else if (db_get_current_workspace_name())
2279  {
2280  pips_user_error("Close current workspace %s before "
2281  "creating another!",
2283  }
2284  else
2285  {
2286  if (db_create_workspace((yyvsp[-2].name)))
2287  {
2288  volatile bool ws_ok;
2289  volatile bool user_exception_raised = false;
2290 
2292  ws_ok = false;
2293  user_exception_raised = true;
2294  }
2295  TRY {
2296  ws_ok = create_workspace((yyvsp[-1].array));
2298  }
2299 
2300  if (!ws_ok)
2301  {
2302  if (get_bool_property("CLOSE_WORKSPACE_AND_QUIT_ON_ERROR"))
2303  {
2304  // this is dangerous, it may or may not work...
2305  // hmmm... might recurse on user errors?
2306  db_close_workspace(false);
2307  pips_user_error("Could not create workspace \"%s\"", (yyvsp[-2].name));
2308  }
2309  else
2310  {
2311  db_close_workspace(false);
2312  // If you need to preserve the workspace
2313  // for debugging purposes, use property ABORT_ON_USER_ERROR
2314  if (!get_bool_property("ABORT_ON_USER_ERROR"))
2315  {
2316  user_log("Deleting workspace...\n");
2317  delete_workspace((yyvsp[-2].name));
2318  }
2319  pips_user_error("Could not create workspace \"%s\"\n", (yyvsp[-2].name));
2320  }
2321  }
2322 
2323  if (user_exception_raised)
2325 
2326  main_module_name = get_first_main_module();
2327 
2328  if (!string_undefined_p(main_module_name))
2329  {
2330  // Ok, we got it ! Now we select it:
2331  user_log("Main module PROGRAM \"%s\" selected.", main_module_name);
2332  lazy_open_module(main_module_name);
2333  free(main_module_name);
2334  }
2335  (yyval.status) = true;
2336  }
2337  else {
2338  pips_user_error("Cannot create directory for workspace, "
2339  "check rights!\n");
2340  }
2341  }
2342  }
2343  free((yyvsp[-2].name));
2344  gen_array_full_free((yyvsp[-1].array));
2345  }
2346 #line 2347 "y.tab.c"
2347  break;
2348 
2349  case 67: /* i_close: TK_CLOSE TK_ENDOFLINE */
2350 #line 879 "tp_yacc.y"
2351  {
2353  }
2354 #line 2355 "y.tab.c"
2355  break;
2356 
2357  case 68: /* i_close: TK_CLOSE TK_NAME TK_ENDOFLINE */
2358 #line 883 "tp_yacc.y"
2359  {
2360  (yyval.status) = tp_close_the_workspace((yyvsp[-1].name));
2361  free((yyvsp[-1].name));
2362  }
2363 #line 2364 "y.tab.c"
2364  break;
2365 
2366  case 69: /* i_delete: TK_DELETE workspace_name TK_ENDOFLINE */
2367 #line 890 "tp_yacc.y"
2368  {
2369  pips_debug(7,"reduce rule i_delete\n");
2370 
2371  if (tpips_execution_mode) {
2372  string wname = db_get_current_workspace_name();
2373  if ((wname != NULL) && same_string_p(wname, (yyvsp[-1].name))) {
2374  pips_user_error("Close before delete: "
2375  "Workspace %s is open\n", wname);
2376  (yyval.status) = false;
2377  } else {
2378  if(workspace_exists_p((yyvsp[-1].name)))
2379  {
2380  if(delete_workspace ((yyvsp[-1].name))) {
2381  /* In case of problem, user_error() has been
2382  called, so it is OK now !!*/
2383  user_log ("Workspace %s deleted.\n", (yyvsp[-1].name));
2384  (yyval.status) = true;
2385  }
2386  else {
2388  "Could not delete workspace \"%s\"\n", (yyvsp[-1].name));
2389  }
2390  }
2391  else {
2392  pips_user_warning("%s: No such workspace\n", (yyvsp[-1].name));
2393  }
2394  }
2395  }
2396  free((yyvsp[-1].name));
2397  }
2398 #line 2399 "y.tab.c"
2399  break;
2400 
2401  case 70: /* i_module: TK_MODULE TK_NAME TK_ENDOFLINE */
2402 #line 923 "tp_yacc.y"
2403  {
2404  pips_debug(7,"reduce rule i_module\n");
2405 
2406  if (tpips_execution_mode) {
2408  (yyval.status) = tp_set_current_module((yyvsp[-1].name) /*strupper($2,$2)*/);
2409  free((yyvsp[-1].name));
2410  } else {
2411  free((yyvsp[-1].name));
2412  pips_user_error("No workspace open. Open or create one!\n");
2413  (yyval.status) = false;
2414  }
2415  }
2416  else free((yyvsp[-1].name));
2417  }
2418 #line 2419 "y.tab.c"
2419  break;
2420 
2421  case 71: /* i_make: TK_MAKE resource_id TK_ENDOFLINE */
2422 #line 941 "tp_yacc.y"
2423  {
2424  pips_debug(7, "reduce rule i_make\n");
2425  (yyval.status) = perform(safe_make, &(yyvsp[-1].rn));
2426  }
2427 #line 2428 "y.tab.c"
2428  break;
2429 
2430  case 72: /* i_apply: TK_APPLY rule_id TK_ENDOFLINE */
2431 #line 948 "tp_yacc.y"
2432  {
2433  pips_debug(7,"reduce rule i_apply\n");
2434  (yyval.status) = perform(safe_apply, &(yyvsp[-1].rn));
2435  }
2436 #line 2437 "y.tab.c"
2437  break;
2438 
2439  case 73: /* i_capply: TK_CAPPLY rule_id TK_ENDOFLINE */
2440 #line 955 "tp_yacc.y"
2441  {
2442  pips_debug(7, "reduce rule i_capply\n");
2443  (yyval.status) = safe_concurrent_apply((yyvsp[-1].rn).the_name, (yyvsp[-1].rn).the_owners);
2444  }
2445 #line 2446 "y.tab.c"
2446  break;
2447 
2448  case 74: /* i_display: TK_DISPLAY resource_id TK_ENDOFLINE */
2449 #line 962 "tp_yacc.y"
2450  {
2451  pips_debug(7,"reduce rule i_display\n");
2452  (yyval.status) = perform(display_a_resource, &(yyvsp[-1].rn));
2453  }
2454 #line 2455 "y.tab.c"
2455  break;
2456 
2457  case 75: /* i_touch: TK_TOUCH resource_id TK_ENDOFLINE */
2458 #line 969 "tp_yacc.y"
2459  {
2460  pips_debug(7, "reduce rule i_touch\n");
2461  (yyval.status) = perform(touch_a_resource, &(yyvsp[-1].rn));
2462  }
2463 #line 2464 "y.tab.c"
2464  break;
2465 
2466  case 76: /* i_show: TK_SHOW resource_id TK_ENDOFLINE */
2467 #line 976 "tp_yacc.y"
2468  {
2469  pips_debug(7, "reduce rule i_show\n");
2470  (yyval.status) = perform(just_show, &(yyvsp[-1].rn));
2471  }
2472 #line 2473 "y.tab.c"
2473  break;
2474 
2475  case 77: /* i_rm: TK_REMOVE resource_id TK_ENDOFLINE */
2476 #line 983 "tp_yacc.y"
2477  {
2478  pips_debug(7,"reduce rule i_rm\n");
2479  (yyval.status) = perform(remove_a_resource, &(yyvsp[-1].rn));
2480  }
2481 #line 2482 "y.tab.c"
2482  break;
2483 
2484  case 78: /* i_activate: TK_ACTIVATE rulename TK_ENDOFLINE */
2485 #line 990 "tp_yacc.y"
2486  {
2487  pips_debug(7,"reduce rule i_activate\n");
2489  {
2491  pips_user_error("Open or create a workspace first!\n");
2492 
2493  user_log("Selecting rule: %s\n", (yyvsp[-1].name));
2494  activate((yyvsp[-1].name));
2495  (yyval.status) = true;
2496  }
2497  free((yyvsp[-1].name));
2498  }
2499 #line 2500 "y.tab.c"
2500  break;
2501 
2502  case 79: /* i_checkactive: TK_CHECKACTIVE resourcename TK_ENDOFLINE */
2503 #line 1006 "tp_yacc.y"
2504  {
2505  string ph = active_phase_for_resource((yyvsp[-1].name));
2506  fprintf(stdout, "resource %s built by phase %s\n", (yyvsp[-1].name), ph);
2507  if (jpips_is_running)
2508  {
2509  jpips_begin_tag("result");
2510  jpips_add_tag(ph);
2511  jpips_end_tag();
2512  }
2513  free((yyvsp[-1].name));
2514  }
2515 #line 2516 "y.tab.c"
2516  break;
2517 
2518  case 80: /* i_get: TK_GET_PROPERTY propname TK_ENDOFLINE */
2519 #line 1020 "tp_yacc.y"
2520  {
2521  pips_debug(7,"reduce rule i_get (%s)\n", (yyvsp[-1].name));
2522 
2523  if (tpips_execution_mode) {
2524  fprint_property(stdout, (yyvsp[-1].name));
2525  if (jpips_is_running)
2526  {
2527  jpips_begin_tag("result");
2528  jpips_add_tag("");
2529  fprint_property_direct(jpips_out_file(), (yyvsp[-1].name));
2530  jpips_end_tag();
2531  }
2532  (yyval.status) = true;
2533  }
2534  free((yyvsp[-1].name));
2535  }
2536 #line 2537 "y.tab.c"
2537  break;
2538 
2539  case 81: /* i_source: TK_SOURCE filename_list TK_ENDOFLINE */
2540 #line 1040 "tp_yacc.y"
2541  {
2542  process_file_list((yyvsp[-1].array));
2543  gen_array_full_free((yyvsp[-1].array));
2544  }
2545 #line 2546 "y.tab.c"
2546  break;
2547 
2548  case 83: /* filename_list: filename_list filename */
2549 #line 1050 "tp_yacc.y"
2550  {
2551  gen_array_append((yyvsp[-1].array), (yyvsp[0].name));
2552  (yyval.array) = (yyvsp[-1].array);
2553  }
2554 #line 2555 "y.tab.c"
2555  break;
2556 
2557  case 84: /* filename_list: filename */
2558 #line 1055 "tp_yacc.y"
2559  {
2560  (yyval.array) = gen_array_make(0);
2561  gen_array_append((yyval.array), (yyvsp[0].name));
2562  }
2563 #line 2564 "y.tab.c"
2564  break;
2565 
2566  case 86: /* resource_id: resourcename owner */
2567 #line 1065 "tp_yacc.y"
2568  {
2569  pips_debug(7,"reduce rule resource_id (%s)\n",(yyvsp[0].name));
2570  (yyval.rn).the_name = (yyvsp[-1].name);
2571  (yyval.rn).the_owners = (yyvsp[0].array);
2572  }
2573 #line 2574 "y.tab.c"
2574  break;
2575 
2576  case 87: /* rule_id: phasename owner */
2577 #line 1073 "tp_yacc.y"
2578  {
2579  pips_debug(7,"reduce rule rule_id (%s)\n",(yyvsp[-1].name));
2580  (yyval.rn).the_name = (yyvsp[-1].name);
2581  (yyval.rn).the_owners = (yyvsp[0].array);
2582  }
2583 #line 2584 "y.tab.c"
2584  break;
2585 
2586  case 88: /* owner: TK_OPENPAREN TK_OWNER_ALL TK_CLOSEPAREN */
2587 #line 1081 "tp_yacc.y"
2588  {
2589  pips_debug(7,"reduce rule owner (ALL)\n");
2591  {
2593  pips_user_error("No current workspace! create or open one!\n");
2594  else
2595  (yyval.array) = db_get_module_list();
2596  }
2597  }
2598 #line 2599 "y.tab.c"
2599  break;
2600 
2601  case 89: /* owner: TK_OPENPAREN TK_OWNER_ALLFUNC TK_CLOSEPAREN */
2602 #line 1092 "tp_yacc.y"
2603  {
2604  pips_debug(7,"reduce rule owner (ALLFUNC)\n");
2606  {
2608  pips_user_error("No current workspace! create or open one!\n");
2609  else
2610  (yyval.array) = db_get_function_list();
2611  }
2612  }
2613 #line 2614 "y.tab.c"
2614  break;
2615 
2616  case 90: /* owner: TK_OPENPAREN TK_OWNER_ALLCU TK_CLOSEPAREN */
2617 #line 1103 "tp_yacc.y"
2618  {
2619  pips_debug(7,"reduce rule owner (ALLCU)\n");
2621  {
2623  pips_user_error("No current workspace! create or open one!\n");
2624  else
2625  (yyval.array) = db_get_compilation_unit_list();
2626  }
2627  }
2628 #line 2629 "y.tab.c"
2629  break;
2630 
2631  case 91: /* owner: TK_OPENPAREN TK_OWNER_PROGRAM TK_CLOSEPAREN */
2632 #line 1114 "tp_yacc.y"
2633  {
2634  pips_debug(7,"reduce rule owner (PROGRAM)\n");
2636  {
2637  (yyval.array) = gen_array_make(0);
2638  gen_array_dupappend((yyval.array), "");
2639  }
2640  }
2641 #line 2642 "y.tab.c"
2642  break;
2643 
2644  case 92: /* owner: TK_OPENPAREN TK_OWNER_MAIN TK_CLOSEPAREN */
2645 #line 1123 "tp_yacc.y"
2646  {
2647  pips_debug(7,"reduce rule owner (MAIN)\n");
2648 
2649  if (tpips_execution_mode) {
2651  pips_user_error("No current workspace! create or open one!\n");
2652  else {
2653  (yyval.array) = get_main();
2654  }
2655  }
2656  }
2657 #line 2658 "y.tab.c"
2658  break;
2659 
2660  case 93: /* owner: TK_OPENPAREN TK_OWNER_MODULE TK_CLOSEPAREN */
2661 #line 1135 "tp_yacc.y"
2662  {
2663  pips_debug(7,"reduce rule owner (MODULE)\n");
2664  if (tpips_execution_mode) {
2665  string n = db_get_current_module_name();
2666  (yyval.array) = gen_array_make(0);
2667  if (n) gen_array_dupappend((yyval.array), n);
2668  }
2669  }
2670 #line 2671 "y.tab.c"
2671  break;
2672 
2673  case 94: /* owner: TK_OPENPAREN TK_OWNER_CALLEES TK_CLOSEPAREN */
2674 #line 1144 "tp_yacc.y"
2675  {
2676  pips_debug(7,"reduce rule owner (CALLEES)\n");
2677 
2679  {
2681 
2682  if (!safe_make(DBR_CALLEES, db_get_current_module_name()))
2683  pips_internal_error("Cannot make callees for %s\n",
2685 
2687  db_get_memory_resource(DBR_CALLEES,
2689 
2691  }
2692  }
2693 #line 2694 "y.tab.c"
2694  break;
2695 
2696  case 95: /* owner: TK_OPENPAREN TK_OWNER_CALLERS TK_CLOSEPAREN */
2697 #line 1163 "tp_yacc.y"
2698  {
2699  pips_debug(7,"reduce rule owner (CALLERS)\n");
2701  {
2703  }
2704  }
2705 #line 2706 "y.tab.c"
2706  break;
2707 
2708  case 96: /* owner: TK_OPENPAREN list_of_owner_name TK_CLOSEPAREN */
2709 #line 1171 "tp_yacc.y"
2710  { (yyval.array) = (yyvsp[-1].array); }
2711 #line 2712 "y.tab.c"
2712  break;
2713 
2714  case 97: /* owner: %empty */
2715 #line 1173 "tp_yacc.y"
2716  {
2717  pips_debug(7,"reduce rule owner (none)\n");
2719  {
2720  string n = db_get_current_module_name();
2721  (yyval.array) = gen_array_make(0);
2722  if (n)
2723  gen_array_dupappend((yyval.array), n);
2724  else {
2725  string wsn = db_get_current_workspace_name();
2726  // pips_internal_error("No current module name\n");
2727  if (wsn==NULL)
2729  "No current workspace. Open or create one first!");
2730  else
2732  "No current module has been defined, explicitly or implictly.\n"
2733  "Please specify a module name as argument or check that"
2734  " the current workspace \"%s\" contains one main module"
2735  " or no more than one module.\n",
2736  wsn);
2737  }
2738  }
2739  }
2740 #line 2741 "y.tab.c"
2741  break;
2742 
2743  case 98: /* list_of_owner_name: TK_NAME */
2744 #line 1200 "tp_yacc.y"
2745  {
2746  (yyval.array) = gen_array_make(0); gen_array_append((yyval.array), (yyvsp[0].name));
2747  }
2748 #line 2749 "y.tab.c"
2749  break;
2750 
2751  case 99: /* list_of_owner_name: list_of_owner_name TK_NAME */
2752 #line 1204 "tp_yacc.y"
2753  { gen_array_append((yyvsp[-1].array), (yyvsp[0].name) /* strupper($2,$2) */); (yyval.array) = (yyvsp[-1].array); }
2754 #line 2755 "y.tab.c"
2755  break;
2756 
2757  case 100: /* list_of_owner_name: list_of_owner_name TK_COMMA TK_NAME */
2758 #line 1206 "tp_yacc.y"
2759  { gen_array_append((yyvsp[-2].array), (yyvsp[0].name) /* strupper($3,$3) */); (yyval.array) = (yyvsp[-2].array); }
2760 #line 2761 "y.tab.c"
2761  break;
2762 
2763  case 101: /* propname: TK_NAME */
2764 #line 1210 "tp_yacc.y"
2765  {
2766  if (!property_name_p((yyvsp[0].name)))
2767  yyerror("Expecting a property name.\n");
2768  (yyval.name) = (yyvsp[0].name);
2769  }
2770 #line 2771 "y.tab.c"
2771  break;
2772 
2773  case 102: /* phasename: TK_NAME */
2774 #line 1218 "tp_yacc.y"
2775  {
2776  if (!phase_name_p((yyvsp[0].name)))
2777  yyerror("Expecting a phase name.\n");
2778  (yyval.name) = (yyvsp[0].name);
2779  }
2780 #line 2781 "y.tab.c"
2781  break;
2782 
2783  case 103: /* resourcename: TK_NAME */
2784 #line 1226 "tp_yacc.y"
2785  {
2786  if (!resource_name_p((yyvsp[0].name)))
2787  yyerror("expecting a resource name\n");
2788  (yyval.name) = (yyvsp[0].name);
2789  }
2790 #line 2791 "y.tab.c"
2791  break;
2792 
2793 
2794 #line 2795 "y.tab.c"
2795 
2796  default: break;
2797  }
2798  /* User semantic actions sometimes alter yychar, and that requires
2799  that yytoken be updated with the new translation. We take the
2800  approach of translating immediately before every use of yytoken.
2801  One alternative is translating here after every semantic action,
2802  but that translation would be missed if the semantic action invokes
2803  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
2804  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
2805  incorrect destructor might then be invoked immediately. In the
2806  case of YYERROR or YYBACKUP, subsequent parser actions might lead
2807  to an incorrect destructor call or verbose syntax error message
2808  before the lookahead is translated. */
2809  YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
2810 
2811  YYPOPSTACK (yylen);
2812  yylen = 0;
2813 
2814  *++yyvsp = yyval;
2815 
2816  /* Now 'shift' the result of the reduction. Determine what state
2817  that goes to, based on the state we popped back to and the rule
2818  number reduced by. */
2819  {
2820  const int yylhs = yyr1[yyn] - YYNTOKENS;
2821  const int yyi = yypgoto[yylhs] + *yyssp;
2822  yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
2823  ? yytable[yyi]
2824  : yydefgoto[yylhs]);
2825  }
2826 
2827  goto yynewstate;
2828 
2829 
2830 /*--------------------------------------.
2831 | yyerrlab -- here on detecting error. |
2832 `--------------------------------------*/
2833 yyerrlab:
2834  /* Make sure we have latest lookahead translation. See comments at
2835  user semantic actions for why this is necessary. */
2836  yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
2837  /* If not already recovering from an error, report this error. */
2838  if (!yyerrstatus)
2839  {
2840  ++yynerrs;
2841  yyerror (YY_("syntax error"));
2842  }
2843 
2844  if (yyerrstatus == 3)
2845  {
2846  /* If just tried and failed to reuse lookahead token after an
2847  error, discard it. */
2848 
2849  if (yychar <= YYEOF)
2850  {
2851  /* Return failure if at end of input. */
2852  if (yychar == YYEOF)
2853  YYABORT;
2854  }
2855  else
2856  {
2857  yydestruct ("Error: discarding",
2858  yytoken, &yylval);
2859  yychar = YYEMPTY;
2860  }
2861  }
2862 
2863  /* Else will try to reuse lookahead token after shifting the error
2864  token. */
2865  goto yyerrlab1;
2866 
2867 
2868 /*---------------------------------------------------.
2869 | yyerrorlab -- error raised explicitly by YYERROR. |
2870 `---------------------------------------------------*/
2871 yyerrorlab:
2872  /* Pacify compilers when the user code never invokes YYERROR and the
2873  label yyerrorlab therefore never appears in user code. */
2874  if (0)
2875  YYERROR;
2876  ++yynerrs;
2877 
2878  /* Do not reclaim the symbols of the rule whose action triggered
2879  this YYERROR. */
2880  YYPOPSTACK (yylen);
2881  yylen = 0;
2882  YY_STACK_PRINT (yyss, yyssp);
2883  yystate = *yyssp;
2884  goto yyerrlab1;
2885 
2886 
2887 /*-------------------------------------------------------------.
2888 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2889 `-------------------------------------------------------------*/
2890 yyerrlab1:
2891  yyerrstatus = 3; /* Each real token shifted decrements this. */
2892 
2893  /* Pop stack until we find a state that shifts the error token. */
2894  for (;;)
2895  {
2896  yyn = yypact[yystate];
2897  if (!yypact_value_is_default (yyn))
2898  {
2899  yyn += YYSYMBOL_YYerror;
2900  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
2901  {
2902  yyn = yytable[yyn];
2903  if (0 < yyn)
2904  break;
2905  }
2906  }
2907 
2908  /* Pop the current state because it cannot handle the error token. */
2909  if (yyssp == yyss)
2910  YYABORT;
2911 
2912 
2913  yydestruct ("Error: popping",
2914  YY_ACCESSING_SYMBOL (yystate), yyvsp);
2915  YYPOPSTACK (1);
2916  yystate = *yyssp;
2917  YY_STACK_PRINT (yyss, yyssp);
2918  }
2919 
2921  *++yyvsp = yylval;
2923 
2924 
2925  /* Shift the error token. */
2926  YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
2927 
2928  yystate = yyn;
2929  goto yynewstate;
2930 
2931 
2932 /*-------------------------------------.
2933 | yyacceptlab -- YYACCEPT comes here. |
2934 `-------------------------------------*/
2935 yyacceptlab:
2936  yyresult = 0;
2937  goto yyreturnlab;
2938 
2939 
2940 /*-----------------------------------.
2941 | yyabortlab -- YYABORT comes here. |
2942 `-----------------------------------*/
2943 yyabortlab:
2944  yyresult = 1;
2945  goto yyreturnlab;
2946 
2947 
2948 /*-----------------------------------------------------------.
2949 | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
2950 `-----------------------------------------------------------*/
2951 yyexhaustedlab:
2952  yyerror (YY_("memory exhausted"));
2953  yyresult = 2;
2954  goto yyreturnlab;
2955 
2956 
2957 /*----------------------------------------------------------.
2958 | yyreturnlab -- parsing is finished, clean up and return. |
2959 `----------------------------------------------------------*/
2960 yyreturnlab:
2961  if (yychar != YYEMPTY)
2962  {
2963  /* Make sure we have latest lookahead translation. See comments at
2964  user semantic actions for why this is necessary. */
2965  yytoken = YYTRANSLATE (yychar);
2966  yydestruct ("Cleanup: discarding lookahead",
2967  yytoken, &yylval);
2968  }
2969  /* Do not reclaim the symbols of the rule whose action triggered
2970  this YYABORT or YYACCEPT. */
2971  YYPOPSTACK (yylen);
2972  YY_STACK_PRINT (yyss, yyssp);
2973  while (yyssp != yyss)
2974  {
2975  yydestruct ("Cleanup: popping",
2976  YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
2977  YYPOPSTACK (1);
2978  }
2979 #ifndef yyoverflow
2980  if (yyss != yyssa)
2981  YYSTACK_FREE (yyss);
2982 #endif
2983 
2984  return yyresult;
2985 }
2986 
2987 #line 1233 "tp_yacc.y"
2988 
void user_log(const char *format,...)
Definition: message.c:234
void db_reset_current_module_name(void)
Definition: database.c:1064
bool db_resource_p(const char *rname, const char *oname)
true if exists and in loaded or stored state.
Definition: database.c:524
string db_get_current_module_name(void)
Also used to check whether set...
Definition: database.c:1059
bool db_touch_resource(const char *rname, const char *oname)
touch logical time for resource[owner], possibly behind the back of pipsdbm.
Definition: database.c:538
void db_delete_resource(const char *rname, const char *oname)
Delete a resource.
Definition: database.c:353
bool db_set_current_module_name(const char *name)
Definition: database.c:1045
const char * activate(const char *phase)
Definition: activate.c:214
string active_phase_for_resource(string res)
return the phase which would be used to build a given resource.
Definition: activate.c:119
#define CATCH(what)
@ user_exception_error
#define THROW(what)
#define UNCATCH(what)
#define RETHROW()
#define TRY
size_t gen_array_nitems(const gen_array_t a)
Definition: array.c:131
void gen_array_full_free(gen_array_t a)
Definition: array.c:77
gen_array_t gen_array_make(size_t size)
declarations...
Definition: array.c:40
string string_array_join(gen_array_t array, string separator)
Join a string array with a string separator.
Definition: array.c:198
gen_array_t gen_array_from_list(list ls)
Definition: array.c:170
void * gen_array_item(const gen_array_t a, size_t i)
Definition: array.c:143
void gen_array_append(gen_array_t a, void *what)
Definition: array.c:105
void gen_array_dupappend(gen_array_t a, void *what)
Definition: array.c:117
static const char * yysymbol_name(yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED
The user-facing name of the symbol whose (internal) number is YYSYMBOL.
Definition: cyacc.tab.c:1383
static void yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep)
-----------------------—.
Definition: cyacc.tab.c:2447
static const yytype_int16 yyrline[]
YYRLINE[YYN] – Source line where rule number YYN was defined.
Definition: cyacc.tab.c:1279
static void yy_symbol_value_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep)
-------------------------------—.
Definition: cyacc.tab.c:2429
static void yy_reduce_print(yy_state_t *yyssp, YYSTYPE *yyvsp, int yyrule)
--------------------------------------------—.
Definition: cyacc.tab.c:2486
static const char *const yytname[]
YYTNAME[SYMBOL-NUM] – String name of the symbol SYMBOL-NUM.
Definition: cyacc.tab.c:1327
static void yy_stack_print(yy_state_t *yybottom, yy_state_t *yytop)
--------------------------------------------------------------—.
Definition: cyacc.tab.c:2463
#define YYFPRINTF
Enable debugging if requested.
Definition: cyacc.tab.c:2400
struct _newgen_struct_status_ * status
Definition: database.h:31
bool delete_workspace(const char *wname)
Definition: dbm.c:368
bool create_workspace(gen_array_t files)
FI: should be called "initialize_workspace()"; a previous call to db_create_workspace() is useful to ...
Definition: dbm.c:180
bool close_workspace(bool is_quit)
Definition: dbm.c:346
bool lazy_open_module(const char *name)
Do not open a module already opened :
Definition: dbm.c:289
bool open_workspace(const char *name)
should be: success (cf wpips.h)
Definition: dbm.c:309
#define ret(why, what)
true if not a remapping for old.
Definition: dynamic.c:986
int safe_display(char *fname)
Display a file through $PIPS_MORE (or $PAGER) if stdout is a TTY, on stdout otherwise.
Definition: file.c:722
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
yytokentype
Definition: genread.h:52
yysymbol_kind_t
!YY_GENREAD_Y_TAB_H_INCLUDED
Definition: genread_yacc.c:294
short yytype_int16
Definition: genread_yacc.c:378
unsigned char yytype_uint8
Work around bug in HP-UX 11.23, which defines these macros incorrectly for preprocessor constants.
Definition: genread_yacc.c:399
int yy_state_fast_t
State numbers in computations.
Definition: genread_yacc.c:457
signed char yytype_int8
On compilers that do not define PTRDIFF_MAX etc., make sure <limits.h> and (if available) <stdint....
Definition: genread_yacc.c:370
yytype_int8 yy_state_t
Stored state numbers (used for stacks).
Definition: genread_yacc.c:454
string db_get_memory_resource(const char *rname, const char *oname, bool pure)
Return the pointer to the resource, whatever it is.
Definition: database.c:755
gen_array_t db_get_compilation_unit_list(void)
Get an array of all the compilation units of a workspace.
Definition: database.c:1287
gen_array_t db_get_module_list(void)
Get an array of all the modules (functions, procedures and compilation units) of a workspace.
Definition: database.c:1266
gen_array_t db_get_function_list(void)
Get an array of all the functions and procedures (not compilation units) of a workspace.
Definition: database.c:1277
bool displayable_file_p(const char *name)
rather approximated.
Definition: lowlevel.c:361
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
Definition: misc-local.h:145
#define pips_user_warning
Definition: misc-local.h:146
#define STRINGIFY(symbol)
If not using this 2-stage macro evaluation, the generated string is not the value of the macro but th...
Definition: misc-local.h:50
#define asprintf
Definition: misc-local.h:225
@ info_log
Definition: misc-local.h:33
#define pips_internal_error
Definition: misc-local.h:149
#define pips_stop
Definition: misc-local.h:151
#define exit(code)
Definition: misc-local.h:54
#define MAXPATHLEN
MAXPATHLEN is defined in <sys/param.h> for SunOS...
Definition: misc-local.h:203
#define pips_user_error
Definition: misc-local.h:147
#define GEN_ARRAY_FOREACH(type, s, array)
Definition: newgen_array.h:50
string concatenate(const char *,...)
Return the concatenation of the given strings.
Definition: string.c:183
#define same_string_p(s1, s2)
#define string_undefined_p(s)
Definition: newgen_types.h:41
void checkpoint_workspace(void)
checkpoint the current workspace, i.e.
Definition: openclose.c:129
bool workspace_exists_p(const char *)
Definition: workspace.c:266
bool db_close_workspace(bool)
Definition: workspace.c:367
bool db_create_workspace(const char *)
Definition: workspace.c:282
string db_get_current_workspace_name(void)
the function is used to check that there is some current workspace...
Definition: workspace.c:82
bool workspace_name_p(const char *)
workspace.c
Definition: workspace.c:46
gen_array_t get_callers(string module)
Get all the callers of the specified module.
Definition: pipsmake.c:1799
string get_first_main_module(void)
Should be able to handle Fortran applications, C applications and mixed Fortran/C applications.
Definition: pipsmake.c:1525
bool safe_make(const char *res_n, const char *module_n)
Definition: pipsmake.c:1717
bool safe_concurrent_apply(const char *phase_n, gen_array_t modules)
Definition: pipsmake.c:1729
bool safe_apply(const char *phase_n, const char *module_n)
Definition: pipsmake.c:1723
void set_pips_timeout(unsigned int)
set pips timeout on delay setting to 0 removes the current timeout.
Definition: signal.c:70
string build_view_file(const char *)
view.c
Definition: view.c:97
static list called_modules
list of called subroutines or functions
Definition: procedure.c:57
void reset_property_error(void)
void parse_properties_string(char *s, bool processing_p)
properties.c
Definition: properties.c:823
void fprint_property_direct(FILE *, const char *)
void fprint_property(FILE *, const char *)
entity local_name_to_top_level_entity(const char *n)
This function try to find a top-level entity from a local name.
Definition: entity.c:1450
bool entity_main_module_p(entity e)
Definition: entity.c:700
struct _newgen_struct_callees_ * callees
Definition: ri.h:55
#define callees_callees(x)
Definition: ri.h:675
#define entity_undefined_p(x)
Definition: ri.h:2762
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
char * strdup()
static entity array
#define uint_least8_t
Definition: stdint.in.h:229
#define int_least16_t
Definition: stdint.in.h:230
#define int_least8_t
7.18.1.2.
Definition: stdint.in.h:228
#define uint_least16_t
Definition: stdint.in.h:231
static size_t current
Definition: string.c:115
Storage for arguments of tpips commands.
Definition: tpips-local.h:28
gen_array_t the_owners
Definition: tpips-local.h:29
string the_name
MOD_A, MOD_B, ALL after expansion, default value can be PROGRAM or current_module.
Definition: tpips-local.h:31
string tpips_unknown_string
Definition: tp_lex.c:948
#define TK_CLOSE
Definition: tp_yacc.c:609
static gen_array_t get_main(void)
Returns a newgen array with the main inside.
Definition: tp_yacc.c:415
static bool touch_a_resource(const char *rname, const char *mname)
tell pipsdbm that the resource is up to date.
Definition: tp_yacc.c:225
#define TK_PWD
Definition: tp_yacc.c:626
#define TK_SOURCE
Definition: tp_yacc.c:629
#define yyparse
------—.
Definition: tp_yacc.c:68
static bool display_a_resource(const char *rname, const char *mname)
display a resource using $PAGER if defined and stdout on a tty.
Definition: tp_yacc.c:175
#define TK_TOUCH
Definition: tp_yacc.c:639
#define TK_APPLY
Definition: tp_yacc.c:614
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Definition: tp_yacc.c:964
#define YYMAXDEPTH
YYMAXDEPTH – maximum size the stacks can grow to (effective only if the built-in stack extension meth...
Definition: tp_yacc.c:1596
#define YYSTACK_FREE
Definition: tp_yacc.c:1026
const char * soft_date
Definition: tp_yacc.c:108
static const yytype_int8 yytranslate[]
YYTRANSLATE[TOKEN-NUM] – Symbol number corresponding to TOKEN-NUM as returned by yylex.
Definition: tp_yacc.c:1140
#define TK_DELETE
Definition: tp_yacc.c:611
yysymbol_kind_t
!YY_TP_Y_TAB_H_INCLUDED
Definition: tp_yacc.c:688
@ YYSYMBOL_filename_list
rulename
Definition: tp_yacc.c:780
@ YYSYMBOL_TK_SHOW
TK_HELP
Definition: tp_yacc.c:714
@ YYSYMBOL_TK_NAME
TK_EQUAL
Definition: tp_yacc.c:739
@ YYSYMBOL_TK_ENDOFLINE
TK_A_STRING
Definition: tp_yacc.c:741
@ YYSYMBOL_YYUNDEF
error
Definition: tp_yacc.c:692
@ YYSYMBOL_TK_DISPLAY
TK_CAPPLY
Definition: tp_yacc.c:702
@ YYSYMBOL_TK_EQUAL
TK_CLOSEPAREN
Definition: tp_yacc.c:738
@ YYSYMBOL_i_exit
i_quit
Definition: tp_yacc.c:747
@ YYSYMBOL_TK_UNSET_ENVIRONMENT
TK_GET_ENVIRONMENT
Definition: tp_yacc.c:709
@ YYSYMBOL_i_unsetenv
i_setenv
Definition: tp_yacc.c:759
@ YYSYMBOL_TK_CLOSE
TK_CREATE
Definition: tp_yacc.c:695
@ YYSYMBOL_i_capply
i_apply
Definition: tp_yacc.c:770
@ YYSYMBOL_TK_EXIT
TK_QUIT
Definition: tp_yacc.c:721
@ YYSYMBOL_resource_id
filename
Definition: tp_yacc.c:782
@ YYSYMBOL_rulename
i_source
Definition: tp_yacc.c:779
@ YYSYMBOL_TK_INT
TK_ENDOFLINE
Definition: tp_yacc.c:742
@ YYSYMBOL_phasename
propname
Definition: tp_yacc.c:787
@ YYSYMBOL_TK_QUIT
TK_TIMEOUT
Definition: tp_yacc.c:720
@ YYSYMBOL_TK_MAKE
TK_MODULE
Definition: tp_yacc.c:699
@ YYSYMBOL_TK_INFO
TK_CDIR
Definition: tp_yacc.c:711
@ YYSYMBOL_YYerror
"end of file"
Definition: tp_yacc.c:691
@ YYSYMBOL_TK_OWNER_PROGRAM
TK_OWNER_ALLCU
Definition: tp_yacc.c:730
@ YYSYMBOL_TK_UNKNOWN
TK_ECHO
Definition: tp_yacc.c:718
@ YYSYMBOL_TK_REMOVE
TK_DISPLAY
Definition: tp_yacc.c:703
@ YYSYMBOL_i_setprop
i_help
Definition: tp_yacc.c:750
@ YYSYMBOL_i_unknown
i_shell
Definition: tp_yacc.c:752
@ YYSYMBOL_TK_APPLY
TK_MAKE
Definition: tp_yacc.c:700
@ YYSYMBOL_TK_CHECKACTIVE
TK_LINE
Definition: tp_yacc.c:723
@ YYSYMBOL_workspace_name
i_open
Definition: tp_yacc.c:763
@ YYSYMBOL_commands
$accept
Definition: tp_yacc.c:744
@ YYSYMBOL_i_create
workspace_name
Definition: tp_yacc.c:764
@ YYSYMBOL_i_pwd
i_cd
Definition: tp_yacc.c:756
@ YYSYMBOL_i_cd
i_info
Definition: tp_yacc.c:755
@ YYSYMBOL_TK_OWNER_NAME
TK_TOUCH
Definition: tp_yacc.c:726
@ YYSYMBOL_list_of_owner_name
owner
Definition: tp_yacc.c:785
@ YYSYMBOL_i_open
i_checkpoint
Definition: tp_yacc.c:762
@ YYSYMBOL_TK_TOUCH
TK_VERSION
Definition: tp_yacc.c:725
@ YYSYMBOL_i_make
i_module
Definition: tp_yacc.c:768
@ YYSYMBOL_TK_SOURCE
TK_SHOW
Definition: tp_yacc.c:715
@ YYSYMBOL_TK_OWNER_CALLEES
TK_OWNER_CALLERS
Definition: tp_yacc.c:734
@ YYSYMBOL_i_getenv
i_pwd
Definition: tp_yacc.c:757
@ YYSYMBOL_resourcename
phasename
Definition: tp_yacc.c:788
@ YYSYMBOL_TK_SET_ENVIRONMENT
TK_GET_PROPERTY
Definition: tp_yacc.c:707
@ YYSYMBOL_i_echo
i_unknown
Definition: tp_yacc.c:753
@ YYSYMBOL_TK_PWD
TK_INFO
Definition: tp_yacc.c:712
@ YYSYMBOL_i_shell
i_setprop
Definition: tp_yacc.c:751
@ YYSYMBOL_TK_OWNER_CALLERS
TK_OWNER_MODULE
Definition: tp_yacc.c:733
@ YYSYMBOL_i_delete
i_close
Definition: tp_yacc.c:766
@ YYSYMBOL_TK_CHECKPOINT
TK_CLOSE
Definition: tp_yacc.c:696
@ YYSYMBOL_i_quit
command
Definition: tp_yacc.c:746
@ YYSYMBOL_TK_OWNER_MAIN
TK_OWNER_PROGRAM
Definition: tp_yacc.c:731
@ YYSYMBOL_TK_OWNER_ALLFUNC
TK_OWNER_ALL
Definition: tp_yacc.c:728
@ YYSYMBOL_TK_A_STRING
TK_NAME
Definition: tp_yacc.c:740
@ YYSYMBOL_TK_GET_PROPERTY
TK_SET_PROPERTY
Definition: tp_yacc.c:706
@ YYSYMBOL_TK_GET_ENVIRONMENT
TK_SET_ENVIRONMENT
Definition: tp_yacc.c:708
@ YYSYMBOL_i_show
i_touch
Definition: tp_yacc.c:773
@ YYSYMBOL_TK_ACTIVATE
TK_REMOVE
Definition: tp_yacc.c:704
@ YYSYMBOL_YYACCEPT
TK_INT
Definition: tp_yacc.c:743
@ YYSYMBOL_i_checkactive
i_activate
Definition: tp_yacc.c:776
@ YYSYMBOL_TK_OPENPAREN
TK_OWNER_CALLEES
Definition: tp_yacc.c:735
@ YYSYMBOL_TK_VERSION
TK_CHECKACTIVE
Definition: tp_yacc.c:724
@ YYSYMBOL_TK_CAPPLY
TK_APPLY
Definition: tp_yacc.c:701
@ YYSYMBOL_TK_ECHO
TK_SHELL
Definition: tp_yacc.c:717
@ YYSYMBOL_i_touch
i_display
Definition: tp_yacc.c:772
@ YYSYMBOL_TK_OWNER_ALLCU
TK_OWNER_ALLFUNC
Definition: tp_yacc.c:729
@ YYSYMBOL_owner
rule_id
Definition: tp_yacc.c:784
@ YYSYMBOL_TK_CDIR
TK_UNSET_ENVIRONMENT
Definition: tp_yacc.c:710
@ YYSYMBOL_TK_MODULE
TK_DELETE
Definition: tp_yacc.c:698
@ YYSYMBOL_i_version
i_exit
Definition: tp_yacc.c:748
@ YYSYMBOL_YYEOF
Definition: tp_yacc.c:690
@ YYSYMBOL_TK_HELP
TK_PWD
Definition: tp_yacc.c:713
@ YYSYMBOL_propname
list_of_owner_name
Definition: tp_yacc.c:786
@ YYSYMBOL_i_get
i_checkactive
Definition: tp_yacc.c:777
@ YYSYMBOL_TK_SET_PROPERTY
TK_ACTIVATE
Definition: tp_yacc.c:705
@ YYSYMBOL_TK_SHELL
TK_SOURCE
Definition: tp_yacc.c:716
@ YYSYMBOL_TK_COMMA
TK_OPENPAREN
Definition: tp_yacc.c:736
@ YYSYMBOL_TK_OWNER_MODULE
TK_OWNER_MAIN
Definition: tp_yacc.c:732
@ YYSYMBOL_i_apply
i_make
Definition: tp_yacc.c:769
@ YYSYMBOL_filename
filename_list
Definition: tp_yacc.c:781
@ YYSYMBOL_i_help
i_version
Definition: tp_yacc.c:749
@ YYSYMBOL_i_module
i_delete
Definition: tp_yacc.c:767
@ YYSYMBOL_i_setenv
i_getenv
Definition: tp_yacc.c:758
@ YYSYMBOL_i_display
i_capply
Definition: tp_yacc.c:771
@ YYSYMBOL_i_source
i_get
Definition: tp_yacc.c:778
@ YYSYMBOL_rule_id
resource_id
Definition: tp_yacc.c:783
@ YYSYMBOL_YYEMPTY
Definition: tp_yacc.c:689
@ YYSYMBOL_i_activate
i_rm
Definition: tp_yacc.c:775
@ YYSYMBOL_i_rm
i_show
Definition: tp_yacc.c:774
@ YYSYMBOL_i_timeout
i_unsetenv
Definition: tp_yacc.c:760
@ YYSYMBOL_TK_CLOSEPAREN
TK_COMMA
Definition: tp_yacc.c:737
@ YYSYMBOL_i_info
i_echo
Definition: tp_yacc.c:754
@ YYSYMBOL_TK_CREATE
TK_OPEN
Definition: tp_yacc.c:694
@ YYSYMBOL_TK_OWNER_ALL
TK_OWNER_NAME
Definition: tp_yacc.c:727
@ YYSYMBOL_TK_DELETE
TK_CHECKPOINT
Definition: tp_yacc.c:697
@ YYSYMBOL_TK_TIMEOUT
TK_UNKNOWN
Definition: tp_yacc.c:719
@ YYSYMBOL_command
commands
Definition: tp_yacc.c:745
@ YYSYMBOL_i_checkpoint
i_timeout
Definition: tp_yacc.c:761
@ YYSYMBOL_TK_OPEN
"invalid token"
Definition: tp_yacc.c:693
@ YYSYMBOL_i_close
i_create
Definition: tp_yacc.c:765
@ YYSYMBOL_TK_LINE
TK_EXIT
Definition: tp_yacc.c:722
#define YY_ASSERT(E)
Definition: tp_yacc.c:984
#define YY_(Msgid)
Definition: tp_yacc.c:918
#define YYNOMEM
Definition: tp_yacc.c:1429
#define TK_EQUAL
Definition: tp_yacc.c:652
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
Definition: tp_yacc.c:965
static const yytype_int8 yydefact[]
YYDEFACT[STATE-NUM] – Default reduction number in state STATE-NUM.
Definition: tp_yacc.c:1273
#define YYNSTATES
YYNSTATES – Number of states.
Definition: tp_yacc.c:1125
#define TK_OWNER_MAIN
Definition: tp_yacc.c:645
#define TK_SET_ENVIRONMENT
Definition: tp_yacc.c:621
#define TK_A_STRING
Definition: tp_yacc.c:654
#define YY_IGNORE_USELESS_CAST_END
Definition: tp_yacc.c:980
short yytype_int16
Definition: tp_yacc.c:829
#define TK_SHOW
Definition: tp_yacc.c:628
static void set_env_log_and_free(string var, string val)
Definition: tp_yacc.c:127
#define yychar
Definition: tp_yacc.c:74
static void tp_system(const char *s)
Definition: tp_yacc.c:308
#define TK_OWNER_NAME
Definition: tp_yacc.c:640
#define TK_REMOVE
Definition: tp_yacc.c:617
#define YYEOF
Definition: tp_yacc.c:604
bool consistency_enforced_p
Pipsmake does not enforce consistency when properties are changed.
Definition: tpips.c:968
#define YYABORT
Definition: tp_yacc.c:1427
#define YYSTACK_BYTES(N)
The size of an array large to enough to hold all stacks, each with N elements.
Definition: tp_yacc.c:1069
#define TK_HELP
Definition: tp_yacc.c:627
static void process_file_list(const gen_array_t a)
Definition: tp_yacc.c:460
#define TK_CLOSEPAREN
Definition: tp_yacc.c:651
yytype_uint8 yy_state_t
Stored state numbers (used for stacks).
Definition: tp_yacc.c:905
#define TK_CHECKPOINT
Definition: tp_yacc.c:610
#define YY_REDUCE_PRINT(Rule)
Definition: tp_yacc.c:1579
#define YY_CAST(Type, Val)
Definition: tp_yacc.c:512
static void yydestruct(const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
-------------------------------------------—.
Definition: tp_yacc.c:1609
#define TK_CAPPLY
Definition: tp_yacc.c:615
#define TK_CREATE
Definition: tp_yacc.c:608
#define TK_OWNER_ALL
Definition: tp_yacc.c:641
static const yytype_int16 yypact[]
YYPACT[STATE-NUM] – Index in YYTABLE of the portion describing STATE-NUM.
Definition: tp_yacc.c:1247
#define TK_UNSET_ENVIRONMENT
Definition: tp_yacc.c:623
#define TK_QUIT
Definition: tp_yacc.c:634
#define yylex
Definition: tp_yacc.c:69
YYSTYPE tp_lval
static const yytype_uint8 yydefgoto[]
YYDEFGOTO[NTERM-NUM].
Definition: tp_yacc.c:1307
#define YYerror
Definition: tp_yacc.c:605
#define YY_NULLPTR
Definition: tp_yacc.c:524
#define TK_EXIT
Definition: tp_yacc.c:635
#define YYUNDEF
Definition: tp_yacc.c:606
#define TK_SHELL
Definition: tp_yacc.c:630
#define TK_OPENPAREN
Definition: tp_yacc.c:649
void * malloc(YYSIZE_T)
#define TK_ACTIVATE
Definition: tp_yacc.c:618
#define YYFINAL
!YYCOPY_NEEDED
Definition: tp_yacc.c:1114
#define YY_ACCESSING_SYMBOL(State)
Accessing symbol of state STATE.
Definition: tp_yacc.c:1194
#define TK_CDIR
Definition: tp_yacc.c:624
#define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
Definition: tp_yacc.c:1577
#define TK_INT
Definition: tp_yacc.c:656
static const yytype_int16 yypgoto[]
YYPGOTO[NTERM-NUM].
Definition: tp_yacc.c:1297
void tpips_lex_print_pos(FILE *)
Definition: tp_lex.c:968
#define TK_ENDOFLINE
Definition: tp_yacc.c:655
static void free_owner_content(res_or_rule *pr)
Definition: tp_yacc.c:121
#define yylval
Definition: tp_yacc.c:73
#define YYNTOKENS
YYNTOKENS – Number of terminals.
Definition: tp_yacc.c:1119
#define TK_OWNER_ALLFUNC
Definition: tp_yacc.c:642
unsigned char yytype_uint8
Work around bug in HP-UX 11.23, which defines these macros incorrectly for preprocessor constants.
Definition: tp_yacc.c:850
#define TK_OWNER_ALLCU
Definition: tp_yacc.c:643
#define YY_STACK_PRINT(Bottom, Top)
Definition: tp_yacc.c:1578
static void try_to_parse_everything_just_in_case(void)
Definition: tp_yacc.c:141
#define TK_MODULE
Definition: tp_yacc.c:612
#define YYSIZE_T
Definition: tp_yacc.c:891
static bool perform(bool(*)(const char *, const char *), res_or_rule *)
forward.
Definition: tp_yacc.c:259
#define TK_OWNER_CALLEES
Definition: tp_yacc.c:648
#define yydebug
Definition: tp_yacc.c:71
#define YY_IGNORE_USELESS_CAST_BEGIN
Definition: tp_yacc.c:979
#define TK_UNKNOWN
Definition: tp_yacc.c:632
#define TK_COMMA
Definition: tp_yacc.c:650
#define TK_NAME
Definition: tp_yacc.c:653
static bool just_show(const char *rname, const char *mname)
Definition: tp_yacc.c:234
static const yytype_int8 yyr2[]
YYR2[RULE-NUM] – Number of symbols on the right-hand side of rule RULE-NUM.
Definition: tp_yacc.c:1405
const char * cc_version
Definition: tp_yacc.c:108
#define TK_GET_PROPERTY
Definition: tp_yacc.c:620
#define YYPTRDIFF_T
Definition: tp_yacc.c:877
#define yynerrs
Definition: tp_yacc.c:72
#define TK_VERSION
Definition: tp_yacc.c:638
#define TK_OWNER_MODULE
Definition: tp_yacc.c:646
#define TK_OPEN
Definition: tp_yacc.c:607
#define YYACCEPT
Definition: tp_yacc.c:1426
#define yytable_value_is_error(Yyn)
Definition: tp_yacc.c:1242
#define YYTRANSLATE(YYX)
YYTRANSLATE(TOKEN-NUM) – Symbol number corresponding to TOKEN-NUM as returned by yylex,...
Definition: tp_yacc.c:1133
static const yytype_int8 yystos[]
YYSTOS[STATE-NUM] – The symbol kind of the accessing symbol of state STATE-NUM.
Definition: tp_yacc.c:1365
const char * soft_revisions
First part of user prologue.
Definition: revisions.c:33
#define YY_ATTRIBUTE_UNUSED
Definition: tp_yacc.c:935
@ YYENOMEM
Definition: tp_yacc.c:1421
static bool tp_close_the_workspace(const char *s)
Definition: tp_yacc.c:328
static const yytype_int8 yyr1[]
YYR1[RULE-NUM] – Symbol kind of the left-hand side of rule RULE-NUM.
Definition: tp_yacc.c:1389
#define TK_OWNER_CALLERS
Definition: tp_yacc.c:647
#define TK_DISPLAY
Definition: tp_yacc.c:616
enum yytokentype yytoken_kind_t
Definition: tp_yacc.c:600
#define TK_OWNER_PROGRAM
Definition: tp_yacc.c:644
#define YYPOPSTACK(N)
int yy_state_fast_t
State numbers in computations.
Definition: tp_yacc.c:908
unsigned short yytype_uint16
Definition: tp_yacc.c:861
#define TK_SET_PROPERTY
Definition: tp_yacc.c:619
static bool remove_a_resource(const char *rname, const char *mname)
Definition: tp_yacc.c:211
static bool processing_started_p
Definition: tp_yacc.c:112
#define TK_CHECKACTIVE
Definition: tp_yacc.c:637
static bool tp_set_current_module(const char *name)
try hard to open a module.
Definition: tp_yacc.c:153
#define YYEMPTY
Token kinds.
Definition: tp_yacc.c:603
#define YYLAST
YYLAST – Last index in YYTABLE.
Definition: tp_yacc.c:1116
#define TK_GET_ENVIRONMENT
Definition: tp_yacc.c:622
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
Relocate STACK from its old location to the new one.
Definition: tp_yacc.c:1080
#define TK_TIMEOUT
Definition: tp_yacc.c:633
#define yypact_value_is_default(Yyn)
Definition: tp_yacc.c:1237
#define TK_INFO
Definition: tp_yacc.c:625
#define TK_ECHO
Definition: tp_yacc.c:631
bool tpips_execution_mode
cproto-generated files
Definition: tpips.h:89
#define YYINITDEPTH
!YYDEBUG
Definition: tp_yacc.c:1585
static const yytype_uint8 yytable[]
YYTABLE[YYPACT[STATE-NUM]] – What to do in state STATE-NUM.
Definition: tp_yacc.c:1319
#define TK_LINE
Definition: tp_yacc.c:636
signed char yytype_int8
On compilers that do not define PTRDIFF_MAX etc., make sure <limits.h> and (if available) <stdint....
Definition: tp_yacc.c:821
int tp_parse(void)
void free(void *)
#define YYERROR
Definition: tp_yacc.c:1428
#define YYSIZEOF(X)
Definition: tp_yacc.c:901
#define YYSTACK_ALLOC
The parser invokes alloca or malloc; define the necessary symbols.
Definition: tp_yacc.c:1025
#define YYDPRINTF(Args)
Enable debugging if requested.
Definition: tp_yacc.c:1576
#define TK_MAKE
Definition: tp_yacc.c:613
static const yytype_uint8 yycheck[]
Definition: tp_yacc.c:1341
#define YY_USE(E)
Suppress unused-variable warnings by "using" E.
Definition: tp_yacc.c:941
#define yyerror
Definition: tp_yacc.c:70
static void tp_some_info(const char *about)
Definition: tp_yacc.c:361
void tpips_set_line_to_parse(string)
Definition: tp_lex.c:953
bool tpips_init_done
variable globale, utilisee par le parser helas
Definition: tpips.h:111
bool jpips_is_running
Definition: tpips.h:97
bool tpips_is_interactive
Definition: tpips.h:90
#define skip_blanks(str)
Definition: tpips-local.h:71
void tpips_close(void)
Definition: tpips.c:868
void tpips_process_a_file(FILE *file, string name, bool use_rl)
processing command line per line.
Definition: tpips.c:1062
void tpips_help(string line)
Definition: tpips.c:688
bool tpips_behaves_like_a_shell(void)
Definition: tpips.c:143
void jpips_end_tag(void)
Definition: tpips.c:197
void jpips_add_tag(string s)
Definition: tpips.c:192
void jpips_tag2(string s1, string s2)
Definition: tpips.c:209
void jpips_begin_tag(string s)
Definition: tpips.c:187
int tpips_current_line_number()
Definition: tpips.c:81
string tpips_current_file_name()
Definition: tpips.c:76
FILE * jpips_out_file(void)
Definition: tpips.c:182
bool property_name_p(string)
bool phase_name_p(string)
bool resource_name_p(string)
Value type.
Definition: genread.h:115
char * name
Definition: genspec.h:116
gen_array_t array
Definition: tp_yacc.c:668
int status
Definition: tp_yacc.c:664
res_or_rule rn
Definition: tp_yacc.c:667
int ival
Definition: tp_yacc.c:665
INFRINGES ON USER NAME SPACE.
Definition: genread_yacc.c:608
YYSTYPE yyvs_alloc
Definition: genread_yacc.c:610
yy_state_t yyss_alloc
Definition: genread_yacc.c:609