tests/syntax/identifier/identifier_as_variable1.test
author mjsousa
Sun, 15 Mar 2015 20:49:55 +0000
changeset 998 694127983aa4
parent 267 0a1204bcc9af
permissions -rwxr-xr-x
Initialise arrays to their correct default values - Fix bug introduced in commit 477393b00f95 (2014-11-16)
108
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
     1
(* Test whether the keyword XXXX may be used as an identifier for:
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
     2
 * variable name/identifier
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
     3
 *
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
     4
 * The XXXX names in the following code are merely a placeholder.
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
     5
 * They will be replaced by several identifiers before actual testing
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
     6
 * of the compiler.
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
     7
 *)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
     8
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
     9
(* The identifiers that will replace the XXXX
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    10
 * must be placed on a line starting with #
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    11
 * All identifiers preceded by # are ignored!
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    12
 * The identifier list must be placed inside an IEC 61131-3 comment.
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    13
 *)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    14
(*
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    15
#IL_operators ANDN CAL CALC CALCN CD CLK CU IN JMP JMPC JMPCN LD LDN ORN PT PV R R1 RET RETC RETCN S S1 ST STN XORN
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    16
#SFC_qualifiers D DS L N P #R #S SD SL
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    17
     NOTE: R and S are identical to IL operators!!
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    18
#Task_initialisers PRIORITY SINGLE INTERVAL
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    19
*)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    20
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    21
(* NOTE: The identifier as a variable test has some special cases.
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    22
 *       Namely, when using IL operators as variable names.
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    23
 *       Even though the syntax of the IL language would not result
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    24
 *       in ambiguities in the above case, our parser does not currently
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    25
 *       allow the use of variables (with names identical to IL
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    26
 *       operators) within IL code.
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    27
 *
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    28
 *       The following test code must therefore consider two possibilities:
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    29
 *        - if the identifier under test is an IL operator
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    30
 *        - if the identifier under test is not an IL operator
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    31
 * 
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    32
 *       The test code in this file should be valid for all identifiers.
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    33
 *       Test code that is only valid for identifiers not identical to IL operators 
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    34
 *        is placed in another test file (identifier_as_variable2.test).
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    35
 *)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    36
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    37
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    38
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    39
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    40
(* A helper FUNCTION BLOCK declaration *)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    41
function_block foo_fb
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    42
 var_input
267
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
    43
  a_1, b_1: real;
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
    44
 end_var
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
    45
 var_output
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
    46
  c_1, d_1: real;
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
    47
 end_var
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
    48
  c_1 := 10.0 + b_1;
108
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    49
end_function_block
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    50
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    51
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    52
(* A helper FUNCTION declaration *)
267
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
    53
function foo_f1 : real
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
    54
 var_input
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
    55
  a_1, b_1: real;
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
    56
 end_var
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
    57
 var_output
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
    58
  c_1, d_1: real;
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
    59
 end_var
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
    60
  c_1 := 10.0 + b_1;
108
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    61
end_function
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    62
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    63
(* Another helper FUNCTION declaration *)
267
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
    64
function foo_f2 :real 
108
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    65
 var_input
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    66
  a_1, b_1: foo_fb;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    67
 end_var
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    68
 var_output
267
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
    69
  c_1, d_1: real;
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
    70
 end_var
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
    71
  c_1 := 10.0;
108
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    72
end_function
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    73
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    74
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    75
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    76
(*********************************************************************)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    77
(* Testing use of XXXX in several locations of variable declarations *)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    78
(*********************************************************************)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    79
267
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
    80
function bar01 : real
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
    81
 var_input
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
    82
  XXXX, a_1, b_1: real;
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
    83
 end_var
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
    84
 a_1 := 1.0;
108
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    85
end_function
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    86
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    87
function_block bar02
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    88
 var_input
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    89
   a_1, XXXX, b_1: int;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    90
 end_var
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    91
 a_1 := 1;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    92
end_function_block
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    93
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    94
function_block bar03
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    95
 var_input
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    96
   a_1, b_1, XXXX: int;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    97
 end_var
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    98
 a_1 := 1;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    99
end_function_block
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   100
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   101
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   102
function_block bar04
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   103
 var_output
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   104
  XXXX, a_1, b_1: int;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   105
 end_var
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   106
 a_1 := 1;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   107
end_function_block
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   108
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   109
function_block bar05
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   110
 var_output
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   111
   a_1, XXXX, b_1: int;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   112
 end_var
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   113
 a_1 := 1;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   114
end_function_block
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   115
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   116
function_block bar06
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   117
 var_output
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   118
   a_1, b_1, XXXX: int;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   119
 end_var
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   120
 a_1 := 1;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   121
end_function_block
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   122
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   123
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   124
function_block bar07
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   125
 var_in_out
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   126
  XXXX, a_1, b_1: int;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   127
 end_var
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   128
 a_1 := 1;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   129
end_function_block
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   130
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   131
function_block bar08
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   132
 var_in_out
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   133
   a_1, XXXX, b_1: int;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   134
 end_var
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   135
 a_1 := 1;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   136
end_function_block
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   137
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   138
function_block bar09
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   139
 var_in_out
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   140
   a_1, b_1, XXXX: int;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   141
 end_var
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   142
 a_1 := 1;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   143
end_function_block
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   144
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   145
function_block bar10
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   146
 var_external
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   147
   XXXX: int;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   148
   a_1 : int;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   149
 end_var
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   150
 a_1 := 1;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   151
end_function_block
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   152
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   153
function_block bar11
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   154
 var_external
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   155
   a_1 : int;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   156
   XXXX : int;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   157
 end_var
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   158
 a_1 := 1;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   159
end_function_block
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   160
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   161
function_block bar12
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   162
 var
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   163
  XXXX, a_1, b_1: int;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   164
 end_var
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   165
 a_1 := 1;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   166
end_function_block
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   167
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   168
function_block bar13
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   169
 var
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   170
   a_1, XXXX, b_1: int;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   171
 end_var
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   172
 a_1 := 1;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   173
end_function_block
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   174
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   175
function_block bar14
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   176
 var
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   177
   a_1, b_1, XXXX: int;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   178
 end_var
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   179
 a_1 := 1;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   180
end_function_block
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   181
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   182
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   183
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   184
(************************************************)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   185
(* Using XXXX as a standard variable name in ST *)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   186
(************************************************)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   187
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   188
function_block bar90
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   189
 var
267
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
   190
  e_1, f_1 : real;
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
   191
  XXXX : real;
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
   192
  fb : foo_fb;
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
   193
 end_var
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
   194
  e_1 := bar01 (XXXX := 10.0);
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
   195
  e_1 := bar01 (a_1 := XXXX);
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
   196
  e_1 := bar01 (XXXX := XXXX);
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
   197
  fb(XXXX, 20.0);
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
   198
  fb (10.0, XXXX, e_1, f_1);
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
   199
  fb (a_1 := XXXX, b_1:=XXXX, c_1=>XXXX, d_1=>f_1);
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
   200
  fb(a_1 := 10.0, b_1:=20.0, c_1=>e_1, d_1=>XXXX);
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
   201
  fb (c_1=>XXXX, a_1:=20.0, d_1=>f_1);
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
   202
  XXXX := fb.c_1;
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
   203
  fb.a_1 := XXXX + XXXX * 2.0 * (XXXX) / foo_f1(XXXX, 10.0, XXXX, e_1) / XXXX ** XXXX;
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
   204
  IF (XXXX >= 10.0) THEN XXXX := 10.0; END_IF;
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
   205
end_function_block
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
   206
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
   207
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
   208
function_block bar90a
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
   209
 var
108
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   210
  e_1, f_1 : int;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   211
  XXXX : int;
267
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
   212
 end_var
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
   213
  XXXX := XXXX MOD XXXX;
108
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   214
  CASE (XXXX + 10) OF
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   215
    10: XXXX := 10; 
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   216
    10..20:XXXX := 20;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   217
    ELSE XXXX := 20;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   218
  END_CASE;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   219
  FOR XXXX := 10 TO 20 BY 2 DO
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   220
    XXXX := XXXX + 1;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   221
  END_FOR;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   222
  FOR e_1 := XXXX TO 20 DO
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   223
    XXXX := XXXX + 1;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   224
  END_FOR;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   225
  FOR e_1 := 10 TO XXXX BY 2 DO
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   226
    XXXX := XXXX + 1;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   227
  END_FOR;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   228
  FOR e_1 := 10 TO XXXX DO
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   229
    XXXX := XXXX + 1;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   230
  END_FOR;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   231
  FOR e_1 := 10 TO 20 BY XXXX DO
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   232
    XXXX := XXXX + 1;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   233
  END_FOR;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   234
  WHILE (XXXX >= 10) DO 
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   235
    XXXX := 10; 
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   236
  END_WHILE;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   237
  REPEAT XXXX := 10; UNTIL (XXXX >= 10) END_REPEAT;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   238
end_function_block
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   239
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   240
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   241
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   242
(* Using XXXX as a function block instance/variable name in ST *)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   243
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   244
function_block bar91
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   245
 var
267
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
   246
  e_1, f_1 : real;
108
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   247
  XXXX : foo_fb;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   248
 end_var
267
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
   249
  XXXX(e_1, 20.0);
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
   250
  XXXX (10.0, e_1, e_1, f_1);
108
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   251
  XXXX (a_1 := e_1, b_1:=e_1 , c_1=>e_1, d_1=>f_1);
267
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
   252
  XXXX(a_1 := 10.0, b_1:=20.0, c_1=>e_1, d_1=>e_1);
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
   253
  XXXX (c_1=>e_1, a_1:=20.0, d_1=>f_1);
108
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   254
  e_1 := XXXX.c_1;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   255
  XXXX.a_1 := e_1;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   256
  e_1 := foo_f2(XXXX, XXXX, e_1, f_1);
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   257
  e_1 := foo_f2 (XXXX, XXXX);
267
0a1204bcc9af starting to add proper header file with declaration of standard functions
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
   258
  e_1 := foo_f2 (c_1 => e_1, b_1 := XXXX, d_1 := 10.0, a_1 := XXXX);
108
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   259
  e_1 := foo_f2 (b_1 := XXXX);
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   260
end_function_block
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   261
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   262
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   263
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   264
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   265
(************************************************)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   266
(* Using XXXX as a standard variable name in IL *)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   267
(************************************************)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   268
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   269
(* NOTE: Currently not supported for identifiers identical to IL operators.
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   270
 *       We therefore have two versions of this file, one with the following code
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   271
 *       commented out (used to test the identifiers that clash with IL operators)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   272
 *       and a second with the following code included (used to test identifiers
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   273
 *       that do not clash with IL operators, such as PRIORITY, SINGLE, etc...)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   274
 *)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   275
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   276
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   277
(*
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   278
function_block bar93
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   279
 var
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   280
  e_1, f_1 : int;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   281
 end_var
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   282
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   283
 (* Calling function with input parameter named XXXX **
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   284
 bar01 (
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   285
  XXXX := 10
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   286
 )
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   287
end_function_block
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   288
*)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   289
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   290
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   291
(*
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   292
function_block bar99
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   293
(...)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   294
end_function_block
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   295
*)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   296
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   297
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   298
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   299
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   300
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   301
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   302
(*************************************************************************************)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   303
(* Using XXXX as a function block instance/variable/program name in a configuration. *)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   304
(*************************************************************************************)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   305
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   306
(* a helper program *)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   307
PROGRAM bar000
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   308
VAR_INPUT
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   309
  a_1, XXXX : BOOL;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   310
END_VAR
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   311
VAR_OUTPUT
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   312
  b_1 : BOOL;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   313
END_VAR
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   314
  a_1 := TRUE;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   315
END_PROGRAM
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   316
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   317
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   318
 (* using in program parameter *)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   319
CONFIGURATION config01
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   320
 TASK fast(PRIORITY := 4);
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   321
 PROGRAM foo WITH fast:
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   322
       bar000(a_1 := TRUE, XXXX := FALSE);
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   323
END_CONFIGURATION
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   324
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   325
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   326
 (* using as a program name *)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   327
CONFIGURATION config02
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   328
 TASK fast(PRIORITY := 4);
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   329
 PROGRAM XXXX WITH fast:
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   330
       bar000(a_1 := TRUE, XXXX := FALSE);
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   331
END_CONFIGURATION
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   332
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   333
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   334
 (* using as a resource name *)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   335
CONFIGURATION config03
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   336
 RESOURCE XXXX on processor_type_1
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   337
   TASK fast(PRIORITY := 4);
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   338
   PROGRAM foo WITH fast:
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   339
           bar000(a_1 := TRUE, XXXX := FALSE);
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   340
 END_RESOURCE
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   341
END_CONFIGURATION
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   342
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   343
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   344
 (* using as a task name *)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   345
CONFIGURATION config11
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   346
 TASK XXXX(PRIORITY := 4);
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   347
 PROGRAM foo WITH XXXX:
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   348
       bar000(a_1 := TRUE, XXXX := FALSE);
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   349
END_CONFIGURATION
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   350
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   351
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   352
CONFIGURATION config12
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   353
 TASK XXXX(SINGLE := 3, PRIORITY := 4);
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   354
 PROGRAM P1 WITH XXXX:
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   355
       bar000(a_1 := TRUE, XXXX := FALSE);
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   356
END_CONFIGURATION
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   357
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   358
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   359
CONFIGURATION config13
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   360
 TASK XXXX(INTERVAL := T#1s, PRIORITY := 4);
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   361
 PROGRAM P1 WITH XXXX:
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   362
       bar000(a_1 := TRUE, XXXX := FALSE);
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   363
END_CONFIGURATION
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   364
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   365
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   366
CONFIGURATION config14
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   367
 TASK XXXX(SINGLE := 3, INTERVAL := T#1s, PRIORITY := 4);
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   368
 PROGRAM P1 WITH XXXX:
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   369
       bar000(a_1 := TRUE, XXXX := FALSE);
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   370
END_CONFIGURATION
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   371
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   372
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   373
 (* using as a variable name *)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   374
CONFIGURATION config21
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   375
 VAR_GLOBAL
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   376
  XXXX : bool;
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   377
 END_VAR
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   378
 TASK fast(PRIORITY := 4);
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   379
 PROGRAM foo WITH fast:
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   380
       bar000(a_1 := XXXX, b_1 => XXXX, XXXX := XXXX);
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   381
END_CONFIGURATION
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   382
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   383
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   384
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   385
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   386
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   387
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   388
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   389
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   390
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   391
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   392
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   393
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   394
(* Checking whether the use of XXXX will confuse any other
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   395
 * normal and correct IL or ST code.
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   396
 *)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   397
{#include "basic_code.test" }
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
   398