PIPS
tpips-local.h
Go to the documentation of this file.
1 /*
2 
3  $Id: tpips-local.h 23065 2016-03-02 09:05:50Z coelho $
4 
5  Copyright 1989-2016 MINES ParisTech
6 
7  This file is part of PIPS.
8 
9  PIPS is free software: you can redistribute it and/or modify it
10  under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  any later version.
13 
14  PIPS is distributed in the hope that it will be useful, but WITHOUT ANY
15  WARRANTY; without even the implied warranty of MERCHANTABILITY or
16  FITNESS FOR A PARTICULAR PURPOSE.
17 
18  See the GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with PIPS. If not, see <http://www.gnu.org/licenses/>.
22 
23 */
24 /* Storage for arguments of tpips commands. E.g.
25  display PRINTED_FILE[MOD_A, MOD_B]
26  display PRINTED_FILE
27 */
28 typedef struct {
29  gen_array_t the_owners; /* MOD_A, MOD_B, %ALL after expansion, default
30  value can be PROGRAM or current_module */
31  string the_name; /* e.g. PRINTED_FILE */
32 } res_or_rule;
33 
34 extern int tp_lex();
35 extern int tp_parse();
36 extern void tp_error();
37 extern void tp_init_lex();
38 extern void tp_begin_key();
39 extern void tp_begin_fname();
40 
41 extern FILE * tp_in;
42 #ifdef FLEX_SCANNER
43 extern void tp_restart(FILE *);
44 #endif
45 
46 #define TPIPS_PRIMARY_PROMPT "tpips> " /* prompt for readline */
47 #define TPIPS_REQUEST_PROMPT "tpips-request> "
48 #define TPIPS_SECONDARY_PROMPT "> "
49 #define TPIPS_CONTINUATION_CHAR '\\'
50 
51 #define TPIPS_HISTENV "TPIPS_HISTORY" /* history file env variable */
52 #define TPIPS_HISTORY_LENGTH 100 /* max length of history file */
53 #define TPIPS_COMMENT_PREFIX '#' /* comment prefix */
54 #define TPIPS_HISTORY ".tpips.history" /* default history file */
55 
56 #define SHELL_ESCAPE "shell" /* ! used for history reference */
57 #define CHANGE_DIR "cd"
58 #define TPIPS_SOURCE "source"
59 
60 #define SET_ENV "setenv"
61 #define GET_ENV "getenv"
62 
63 #define SET_PROP "setproperty"
64 #define GET_PROP "getproperty"
65 
66 #define QUIT "quit"
67 #define HELP "help"
68 /* macro ECHO is reserved by flex */
69 #define ECHO_N "echo"
70 
71 #define skip_blanks(str) \
72  while (*str && (*str==' ' || *str=='\t' || *str=='\n')) str++
73 
74 // redundant declarations to help bootstrap?
75 extern bool tpips_execution_mode;
76 extern bool tpips_is_interactive;
77 extern bool jpips_is_running;
78 extern bool tpips_init_done;
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
void tp_init_lex()
int tp_lex()
bool tpips_init_done
variable globale, utilisee par le parser helas
Definition: tpips.h:111
bool jpips_is_running
Definition: tpips.h:97
FILE * tp_in
Definition: tpips.h:128
void tp_begin_fname()
int tp_parse()
void tp_begin_key()
bool tpips_is_interactive
Definition: tpips.h:90
void tp_error()
bool tpips_execution_mode
Sometimes, already included by unistd.h.
Definition: tpips.c:64
void tp_restart(FILE *)