PIPS
expression.c
Go to the documentation of this file.
1 /*
2 
3  $Id: expression.c 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 #ifdef HAVE_CONFIG_H
25  #include "pips_config.h"
26 #endif
27 
28 #ifndef lint
29 char vcid_syntax_expression[] = "$Id: expression.c 23065 2016-03-02 09:05:50Z coelho $";
30 #endif /* lint */
31 
32 #include <stdio.h>
33 #include <ctype.h>
34 
35 #include "genC.h"
36 #include "linear.h"
37 #include "ri.h"
38 #include "ri-util.h"
39 #include "parser_private.h"
40 
41 #include "misc.h"
42 #include "properties.h"
43 
44 #include "syntax.h"
45 
46 /* this function creates a PARAMETER, ie a symbolic constant.
47 
48  e is an entity.
49 
50  x is an expression that represents the value of e. */
51 
53 {
54  type tp;
55 
56  tp = (entity_type(e) != type_undefined) ? entity_type(e) : ImplicitType(e);
60  }
61  else {
63  user_warning("MakeParameter", "Variable %s redefined as parameter\n",
65  ParserError("MakeParameter", "A variable cannot be redefined as a parameter\n");
66  }
67  else {
68  user_warning("MakeParameter", "Symbol %s redefined as parameter\n",
70  ParserError("MakeParameter", "A symbol cannot be redefined as a parameter\n");
71  }
72  }
75  symbolic s = value_symbolic(v);
78  entity_initial(e) = v;
79  else if(constant_float_p(c) && float_type_p(tp))
80  entity_initial(e) = v;
81  else if(constant_float_p(c) && scalar_integer_type_p(tp)) {
82  /* Take the integer part of the floating point constant */
83  double fval = constant_float(c);
84  long long int ival = (long long int) fval;
86  constant_int(c) = ival;
87  entity_initial(e) = v;
88  }
89  else
90  entity_initial(e) = v;
91  }
92  else {
93  user_warning("MakeParameter", "Initial value for variable %s redefined\n",
95  FatalError("MakeParameter", "An initial value cannot be redefined by parameter\n");
96  }
97 
98  return(e);
99 }
100 
101 
102 /* expressions from input output lists might contain implied do loops.
103 with our internal representation, implied do loops are stored as calls
104 to a special intrinsic function whose name is IMPLIED_DO_NAME and whose
105 first argument is the range of the loop.
106 
107 v is a reference to the do variable.
108 
109 r is the range of the loop.
110 
111 l is the list of expressions which are to be read or written according
112 to this implied do loop. */
113 
114 expression
116 syntax v;
117 range r;
118 cons *l;
119 {
120  call c;
121  expression er;
122 
123  if (!syntax_reference_p(v))
124  FatalError("MakeImpliedDo", "function call as DO variable\n");
125 
126  if (reference_indices(syntax_reference(v)) != NULL)
127  FatalError("MakeImpliedDo", "variable reference as DO variable\n");
128 
129  /* the range is enclosed in an expression */
132 
134  CONS(EXPRESSION, er, l));
135 
139 }
140 
141 
142 // declaration for make_arg_from_stmt/loop_to_implieddo recursion
144 
145 /* this used to be a nested function,
146  * but compilation on macos dislikes nested functions ...
147  */
150  expression expr;
151  if ( instruction_expression_p(i) ) {
152  expr = instruction_expression(i);
153  } else if ( instruction_loop_p(i) ) {
154  expr = loop_to_implieddo( instruction_loop(i) );
155  } else {
156  pips_internal_error("We can't handle anything other than expression"
157  "and loop for loop-to-implieddo conversion.\n");
158  expr = expression_undefined;
159  }
160  args = CONS(EXPRESSION,expr, args );
161  return args;
162 }
163 
164 /*
165  * @brief Convert a loop to an IMPLIED-DO
166  */
169  range r = loop_range(l);
170 
171 
172  /* Fix last parameter */
173  statement body = loop_body(l);
174  instruction ibody = statement_instruction(body);
175  list args = NIL;
176  if(instruction_sequence_p(ibody)) {
177  sequence seq = instruction_sequence(ibody);
179  args = make_arg_from_stmt(stmt, args);
180  }
181  args = gen_nreverse(args);
182  } else {
183  args = make_arg_from_stmt(body, args);
184  }
185  return MakeImpliedDo(index, r, args);
186 }
187 
188 
189 
190 /* MakeAtom:
191  * this function creates a syntax, ie. a reference, a call or a range.
192  *
193  * there are a few good cases: e is a variable and its dimensionality is
194  * equal to the number of expressions in indices, e is a function, e is a
195  * constant or a symbolic constant.
196  *
197  * there are a few bad cases: e is a zero dimension variable and indices is
198  * not equal to NIL (see comments of MakeExternalFunction), e is not known
199  * and the list indices is not empty (it is a call to a user function), e
200  * is not known and the list indices is empty (it is an implicit
201  * declaration).
202  *
203  * in this function, we first try to transform bad cases into good ones,
204  * and then to create a syntax.
205  *
206  * e is a variable or a function.
207  *
208  * indices is a list of expressions (arguments or indices).
209  *
210  * fc and lc are substring bound expressions.
211  *
212  * HasParenthesis is a bool that tells if the reference to e was done
213  * with () or not. this is mandatory to make the difference between a call
214  * to a function and a reference to a function.
215  *
216  * - MakeAtom in expression.c fixed to generate the proper message
217  * when the substring operator is used (Francois Irigoin, 6 June 1995).
218  * See lcart2.f in Validation.
219  */
220 
221 syntax
222 MakeAtom(e, indices, fc, lc, HasParenthesis)
223 entity e;
224 cons * indices;
225 expression fc, lc;
226 int HasParenthesis;
227 {
229  type te;
230 
231  te = entity_type(e);
232 
233  /* checking errors ... */
234  if (te != type_undefined) {
235  if (type_statement_p(te)) {
236  FatalError("MakeAtom", "label dans une expression\n");
237  }
238  else if (type_area_p(te)) {
239  FatalError("MakeAtom", "area dans une expression\n");
240  }
241  else if (type_void_p(te)) {
242  FatalError("MakeAtom", "void dans une expression\n");
243  }
244  else if (type_unknown_p(te)) {
245  FatalError("MakeAtom", "unknown dans une expression\n");
246  }
247  else if (type_functional_p(te)) {
248  if(!HasParenthesis) {
249  /* It can be a PARAMETER or a functional variable or... */
250  value iv = entity_initial(e);
251  if(!value_undefined_p(iv) && value_code_p(iv)) {
252  user_warning("MakeAtom", "reference to functional entity %s\n",
253  entity_name(e));
254  /* Not enough information to decide to stop or not. */
255  /* ParserError("MakeAtom",
256  "unsupported use of a functional entity\n"); */
257  }
258  }
259  }
260  }
261 
262  /* fixing bad cases */
263  if (te == type_undefined) {
264  /* FI: to handle parameterless function calls like t= second() - 11 March 1993 */
265  /* if (indices == NULL) { */
266  if (indices == NULL && !HasParenthesis) {
268  debug(2, "MakeAtom", "implicit declaration of scalar variable: %s\n",
269  entity_name(e));
272  }
273  else if(storage_formal_p(entity_storage(e))) {
274  pips_debug(2, "reference to a functional parameter: %s\n",
275  entity_name(e));
276  /* It has already been declared and should not be
277  redeclared because it may be an entry formal parameter
278  which is not declared in the current module. If e
279  represents an entry formal parameter (although its
280  top-level name is the current module), it does not
281  belong to the declarations of the current
282  module. Hence, it is hard to assert something here.
283 
284  However, e has to be typed and valued. */
285  if(type_undefined_p(entity_type(e))) {
286  entity_type(e) = ImplicitType(e);
287  }
290  }
291  }
292  else {
293  debug(2, "MakeAtom", "implicit type declaration of scalar variable: %s\n",
294  entity_name(e));
297  }
298  }
299  else {
300  type tr = ImplicitType(e);
301 
302  debug(2, "MakeAtom", "new user function: %s\n",
303  entity_name(e));
304  /* e = MakeExternalFunction(e, type_undefined); */
305  e = MakeExternalFunction(e, tr);
306 
307  /* use expression list to compute argument types */
309  }
310  }
311  else if (type_variable_p(te)) {
312  /* FI: same as in previous paragraph */
313  /* if (variable_dimensions(type_variable(te))==NULL && indices!=NULL) { */
314  /* if (variable_dimensions(type_variable(te))==NULL
315  && (indices!=NULL || HasParenthesis)) { */
316  if (variable_dimensions(type_variable(te))==NULL
317  && (indices!=NULL || HasParenthesis)) {
319  /*
320  if( !basic_string_p(variable_basic(type_variable(te)))
321  || (fc==expression_undefined && lc==expression_undefined)) */ {
323 
324  /* use expression list to compute argument types */
326 
327  /* FI: probleme here for character returning function! You have to know if
328  * you are dealing with a substring operator or a function call.
329  *
330  * Fortunately, according to SUN f77 compiler, you are not allowed to
331  * take the substring of a function call!
332  */
333  }
334  }
335  }
336  else if (type_functional_p(te) && HasParenthesis) {
337  /* In fact, only check compatability... if requested! */
339  }
340 
341  /* here, bad cases have been transformed into good ones. */
342  te = entity_type(e);
343 
344  if (type_variable_p(te)) {
345  if((gen_length(indices)==0) ||
346  (gen_length(indices)==
348  if (lc == expression_undefined && fc == expression_undefined) {
350  make_reference(e, indices));
351  }
352  else {
353  /* substring */
354  expression ref =
356  make_reference(e, indices)),
360  list lexpr = NIL;
363 
364  if(!basic_string_p(bt)) {
365  /* pips_assert("Substring can only be applied to a string",
366  basic_string_p(bt)); */
367  if(!get_bool_property("PARSER_ACCEPT_ARRAY_RANGE_EXTENSION"))
368  ParserError("MakeAtom",
369  "Substring operations can only be applied to "
370  "strings in Fortran 77\n");
371  else {
372  /* Probably an extension we would have liked to have
373  for the DREAM-UP project. */
374  pips_internal_error("Not implemented yet");
375  }
376  }
377 
378  if(fc == expression_undefined)
379  fce = int_to_expression(1);
380  else
381  fce = fc;
382 
383  if(lc == expression_undefined) {
384  /* The upper bound may be unknown for formal
385  parameters and for allocatable arrays and cannot be
386  retrieved from the type declaration */
387  value ub = basic_string(bt);
388 
389  if(value_unknown_p(ub)) {
391  }
392  else {
394  }
395  }
396  else
397  lce = lc;
398 
399  lexpr = CONS(EXPRESSION, ref,
400  CONS(EXPRESSION, fce,
401  CONS(EXPRESSION, lce, NIL)));
402  s = make_syntax(is_syntax_call, make_call(substr, lexpr));
403  /* ParserError("MakeAtom", "Substrings are not implemented\n"); */
404  }
405  }
406  else {
407  user_warning("MakeAtom",
408  "Too many or too few subscript expressions"
409  " for reference to %s\n",
410  entity_local_name(e));
411  ParserError("MakeAtom", "Illegal array reference\n");
412  }
413 
414  }
415  else if (type_functional_p(te)) {
417  /* e is either called or passed as argument to a function.
418  It cannot be a PARAMETER or its value would be known. */
419  if (indices == NIL && HasParenthesis == false) {
421  }
422  else {
425  }
426  }
427  else {
428  if (value_code_p(entity_initial(e))) {
430  }
431 
432  /* e is either called or passed as argument to a function, or
433  it is a PARAMETER, in which case, it must really be
434  called. */
435  if (indices == NIL && !HasParenthesis
438  }
439  else {
441  }
442  }
443  }
444  else {
445  ParserError("MakeAtom", "unexpected type\n");
446  }
447 
448  return(s);
449 }
450 
451 
452 
453 /* This function takes a list of io elements (i, j, t(i,j)), and returns
454 the same list, with a cons cell pointing to a character constant
455 expression 'IOLIST=' before each element of the original list.
456 
457 (i , j , t(i,j)) becomes ('IOLIST=' , i , 'IOLIST=' , j , 'IOLIST=' , t(i,j))
458 
459 This IO list is later concatenated to the IO control list to form the
460 argument of an IO function. The tagging is necessary because of this
461 concatenation.
462 
463 The IOLIST call used to be shared within one IO list. Since sharing is
464 avoided in the PIPS internal representation, they are now duplicated.
465 */
466 
467 cons *
469 cons *l;
470 {
471  cons *pc; /* to walk thru l */
472  cons *lr = NIL; /* result list */
473 
474  pc = l;
475  while (pc != NULL) {
477  cons *p = CONS(EXPRESSION, e, NIL);
478 
479  CDR(p) = pc;
480  pc = CDR(pc);
481  CDR(CDR(p)) = NIL;
482 
483  lr = gen_nconc(p, lr);
484  }
485 
486  return(lr);
487 }
488 
489 /* Make sure that no call to implied do is in l */
490 
491 list
493 {
494  MAP(EXPRESSION, e, {
496  ParserError("FortranExpressionList", "Unexpected implied DO\n");
497  }, l);
498  return l;
499 }
500 
503  entity op,
504  expression e1,
505  expression e2)
506 {
508 
510  ParserError("MakeFortranBinaryCall", "Unexpected implied DO\n");
511  }
512 
513  e = MakeBinaryCall(op, e1, e2);
514 
515  return e;
516 }
517 
520  entity op,
521  expression e1)
522 {
524 
525  if(expression_implied_do_p(e1)) {
526  ParserError("MakeFortranUnaryCall", "Unexpected implied DO\n");
527  }
528 
529  e = MakeUnaryCall(op, e1);
530 
531  return e;
532 }
533 
534 /* If a left hand side is a call, it should be a substring operator or a macro.
535  If it is a call to an intrinsic with no arguments,
536  the intrinsic is in fact masqued by a local variable.
537 
538  If s is not OK, it is freed and a new_s is allocated.
539  */
540 
541 syntax
543 {
544  syntax new_s = syntax_undefined;
545 
546  if(syntax_reference_p(s)) {
548  type vt = entity_type(v);
549 
550  if(type_variable_p(vt))
551  new_s = s;
552  else
553  pips_user_error("Illegal assignment to variable %s with type %s\n",
555  }
556  else {
557  call c = syntax_call(s);
558  entity f = call_function(c);
559 
560  if(intrinsic_entity_p(f)) {
561  if(strcmp(entity_local_name(f), SUBSTRING_FUNCTION_NAME)==0) {
562  /* OK for substrings: They are processed later by MakeAssignInst() */
563  pips_debug(7, "Substring assignment detected\n");
564  new_s = s;
565  }
566  else if(ENDP(call_arguments(c))) {
567  /* Oupss... This must be a local variable */
569 
570  user_warning("CheckLeftHandSide",
571  "Name conflict between local variable %s and intrinsics %s\n",
573 
574  free_syntax(s);
577  }
578  else {
579  /* A call to an intrinsic cannot be a lhs: statement function?
580  Let's hope it works... */
581  user_warning("CheckLeftHandSide",
582  "Name conflict between statement function %s and intrinsics %s\n",
584  new_s = s;
585  }
586  }
587  else {
588  /* Must be a macro... */
589  pips_debug(2, "Statement function definition %s\n", entity_name(f));
590  new_s = s;
591  }
592  }
593 
594  return new_s;
595 }
596 
598  tag bt,
599  size_t size)
600 {
601  return make_C_or_Fortran_constant_entity(name, bt, size, true, ParserError);
602 }
functional make_functional(list a1, type a2)
Definition: ri.c:1109
call make_call(entity a1, list a2)
Definition: ri.c:269
value make_value_unknown(void)
Definition: ri.c:2847
expression make_expression(syntax a1, normalized a2)
Definition: ri.c:886
storage make_storage_rom(void)
Definition: ri.c:2285
reference make_reference(entity a1, list a2)
Definition: ri.c:2083
void free_syntax(syntax p)
Definition: ri.c:2445
syntax make_syntax(enum syntax_utype tag, void *val)
Definition: ri.c:2491
type make_type(enum type_utype tag, void *val)
Definition: ri.c:2706
syntax make_syntax_reference(reference _field_)
Definition: ri.c:2494
static reference ref
Current stmt (an integer)
Definition: adg_read_paf.c:163
void const char const char const int
expression MakeCharacterConstantExpression(string s)
END_EOLE.
Definition: constant.c:573
entity make_C_or_Fortran_constant_entity(const char *name, tag bt, size_t size, bool is_fortran, bool(*error_manager)(const char *, const char *))
This function creates a constant.
Definition: constant.c:148
value MakeValueSymbolic(expression e)
this function creates a value for a symbolic constant.
Definition: constant.c:581
void DeclareVariable(entity e, type t, list d, storage s, value v)
void DeclareVariable(e, t, d, s, v): update entity e description as declaration statements are encoun...
Definition: declaration.c:670
type ImplicitType(entity e)
This function computes the Fortran implicit type of entity e.
Definition: declaration.c:1311
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
const char * get_current_module_name(void)
Get the name of the current module.
Definition: static.c:121
#define ENDP(l)
Test if a list is empty.
Definition: newgen_list.h:66
list gen_nreverse(list cp)
reverse a list in place
Definition: list.c:304
#define NIL
The empty list (nil in Lisp)
Definition: newgen_list.h:47
size_t gen_length(const list l)
Definition: list.c:150
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
Definition: newgen_list.h:150
list gen_nconc(list cp1, list cp2)
physically concatenates CP1 and CP2 but do not duplicates the elements
Definition: list.c:344
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
Definition: newgen_list.h:179
#define CDR(pcons)
Get the list less its first element.
Definition: newgen_list.h:111
#define MAP(_map_CASTER, _map_item, _map_code, _map_list)
Apply/map an instruction block on all the elements of a list (old fashioned)
Definition: newgen_list.h:226
static list indices
Definition: icm.c:204
#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_internal_error
Definition: misc-local.h:149
#define user_warning(fn,...)
Definition: misc-local.h:262
#define pips_user_error
Definition: misc-local.h:147
void debug(const int the_expected_debug_level, const char *calling_function_name, const char *a_message_format,...)
ARARGS0.
Definition: debug.c:189
int tag
TAG.
Definition: newgen_types.h:92
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
Definition: offsets.c:15
entity MakeExternalFunction(entity e, type r)
Definition: procedure.c:2372
void update_called_modules(entity e)
Definition: procedure.c:308
void reify_ghost_variable_entity(entity e)
It is possible to change one's mind and effectively use an entity which was previously assumed useles...
Definition: procedure.c:284
#define UNBOUNDED_DIMENSION_NAME
Definition: ri-util-local.h:74
#define SUBSTRING_FUNCTION_NAME
#define IMPLIED_DO_NAME
Definition: ri-util-local.h:75
#define IO_LIST_STRING_NAME
Definition: ri-util-local.h:82
const char * entity_local_name(entity e)
entity_local_name modified so that it does not core when used in vect_fprint, since someone thought t...
Definition: entity.c:453
entity FindOrCreateEntity(const char *package, const char *local_name)
Problem: A functional global entity may be referenced without parenthesis or CALL keyword in a functi...
Definition: entity.c:1586
bool intrinsic_entity_p(entity e)
Definition: entity.c:1272
entity CreateIntrinsic(string name)
this function does not create an intrinsic function because they must all be created beforehand by th...
Definition: entity.c:1311
entity entity_intrinsic(const char *name)
FI: I do not understand this function name (see next one!).
Definition: entity.c:1292
expression MakeBinaryCall(entity f, expression eg, expression ed)
Creates a call expression to a function with 2 arguments.
Definition: expression.c:354
expression int_to_expression(_int i)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
Definition: expression.c:1188
expression MakeNullaryCall(entity f)
Creates a call expression to a function with zero arguments.
Definition: expression.c:331
expression MakeUnaryCall(entity f, expression a)
Creates a call expression to a function with one argument.
Definition: expression.c:342
bool expression_implied_do_p(e)
Definition: expression.c:817
int basic_type_size(basic)
See also SizeOfElements()
Definition: type.c:1074
bool scalar_integer_type_p(type)
Definition: type.c:3276
bool float_type_p(type)
Definition: type.c:3263
string type_to_string(const type)
type.c
Definition: type.c:51
#define type_functional_p(x)
Definition: ri.h:2950
#define value_undefined_p(x)
Definition: ri.h:3017
#define value_undefined
Definition: ri.h:3016
#define loop_body(x)
Definition: ri.h:1644
#define value_code_p(x)
Definition: ri.h:3065
#define normalized_undefined
Definition: ri.h:1745
#define syntax_reference_p(x)
Definition: ri.h:2728
#define instruction_sequence_p(x)
Definition: ri.h:1512
#define storage_formal_p(x)
Definition: ri.h:2522
#define syntax_reference(x)
Definition: ri.h:2730
#define type_unknown_p(x)
Definition: ri.h:2956
#define constant_tag(x)
Definition: ri.h:847
#define instruction_loop_p(x)
Definition: ri.h:1518
#define call_function(x)
Definition: ri.h:709
#define reference_variable(x)
Definition: ri.h:2326
#define constant_float_p(x)
Definition: ri.h:851
#define symbolic_constant(x)
Definition: ri.h:2599
#define constant_int(x)
Definition: ri.h:850
#define instruction_loop(x)
Definition: ri.h:1520
#define value_unknown_p(x)
Definition: ri.h:3077
@ is_constant_int
Definition: ri.h:817
#define type_variable(x)
Definition: ri.h:2949
#define entity_storage(x)
Definition: ri.h:2794
#define type_statement_p(x)
Definition: ri.h:2941
@ is_syntax_range
Definition: ri.h:2692
@ is_syntax_call
Definition: ri.h:2693
@ is_syntax_reference
Definition: ri.h:2691
#define storage_ram_p(x)
Definition: ri.h:2519
#define value_symbolic(x)
Definition: ri.h:3070
#define EXPRESSION(x)
EXPRESSION.
Definition: ri.h:1217
#define type_undefined_p(x)
Definition: ri.h:2884
#define constant_int_p(x)
Definition: ri.h:848
#define expression_undefined
Definition: ri.h:1223
#define value_symbolic_p(x)
Definition: ri.h:3068
#define type_void_p(x)
Definition: ri.h:2959
#define entity_name(x)
Definition: ri.h:2790
#define sequence_statements(x)
Definition: ri.h:2360
#define reference_indices(x)
Definition: ri.h:2328
#define instruction_sequence(x)
Definition: ri.h:1514
#define syntax_call(x)
Definition: ri.h:2736
#define instruction_expression(x)
Definition: ri.h:1541
#define variable_dimensions(x)
Definition: ri.h:3122
#define statement_instruction(x)
Definition: ri.h:2458
#define syntax_undefined
Definition: ri.h:2676
#define type_undefined
Definition: ri.h:2883
#define loop_range(x)
Definition: ri.h:1642
#define type_area_p(x)
Definition: ri.h:2944
#define constant_float(x)
Definition: ri.h:853
#define call_arguments(x)
Definition: ri.h:711
@ is_type_functional
Definition: ri.h:2901
#define basic_string_p(x)
Definition: ri.h:629
#define entity_type(x)
Definition: ri.h:2792
#define type_variable_p(x)
Definition: ri.h:2947
#define storage_undefined_p(x)
Definition: ri.h:2477
#define loop_index(x)
Definition: ri.h:1640
#define variable_basic(x)
Definition: ri.h:3120
#define instruction_expression_p(x)
Definition: ri.h:1539
#define basic_string(x)
Definition: ri.h:631
#define storage_undefined
Definition: ri.h:2476
#define entity_initial(x)
Definition: ri.h:2796
static char * x
Definition: split_file.c:159
The structure used to build lists in NewGen.
Definition: newgen_list.h:41
Definition: statement.c:54
#define FatalError(f, m)
Definition: syntax-local.h:56
syntax MakeAtom(entity e, cons *indices, expression fc, expression lc, int HasParenthesis)
MakeAtom: this function creates a syntax, ie.
Definition: expression.c:222
entity make_Fortran_constant_entity(string name, tag bt, size_t size)
Definition: expression.c:597
expression MakeImpliedDo(syntax v, range r, cons *l)
expressions from input output lists might contain implied do loops.
Definition: expression.c:115
cons * MakeIoList(cons *l)
This function takes a list of io elements (i, j, t(i,j)), and returns the same list,...
Definition: expression.c:468
syntax CheckLeftHandSide(syntax s)
If a left hand side is a call, it should be a substring operator or a macro.
Definition: expression.c:542
list FortranExpressionList(list l)
Make sure that no call to implied do is in l.
Definition: expression.c:492
char vcid_syntax_expression[]
expression.c
Definition: expression.c:29
entity MakeParameter(entity e, expression x)
lint
Definition: expression.c:52
expression loop_to_implieddo(loop)
Definition: expression.c:167
expression MakeFortranUnaryCall(entity op, expression e1)
Definition: expression.c:519
static list make_arg_from_stmt(statement stmt, list args)
this used to be a nested function, but compilation on macos dislikes nested functions ....
Definition: expression.c:148
expression MakeFortranBinaryCall(entity op, expression e1, expression e2)
Definition: expression.c:502
bool ParserError(const char *f, const char *m)
Definition: parser.c:116
void update_functional_type_with_actual_arguments(entity e, list l)
Definition: statement.c:971