tests/syntax/identifier/identifier_as_configuration.test
changeset 108 f9e001952488
equal deleted inserted replaced
107:ff5c92df0c78 108:f9e001952488
       
     1 (* Test whether the keyword XXXX may be used as an identifier for:
       
     2  * CONFIGURATION identifier
       
     3  *
       
     4  * The XXXX names in the following code are merely a placeholder.
       
     5  * They will be replaced by several identifiers before actual testing
       
     6  * of the compiler.
       
     7  *)
       
     8 
       
     9 (* The identifiers that will replace the XXXX
       
    10  * must be placed on a line starting with #
       
    11  * All identifiers preceded by # are ignored!
       
    12  * The identifier list must be placed inside an IEC 61131-3 comment.
       
    13  *)
       
    14 (*
       
    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
       
    16 #SFC_qualifiers D DS L N P #R #S SD SL
       
    17      NOTE: R and S are identical to IL operators!!
       
    18 #Task_initialisers PRIORITY SINGLE INTERVAL
       
    19 *)
       
    20 
       
    21 
       
    22 
       
    23 (* a helper program *)
       
    24 PROGRAM bar000
       
    25 VAR_INPUT
       
    26   a_1 : BOOL;
       
    27 END_VAR
       
    28 VAR_OUTPUT
       
    29   b_1 : BOOL;
       
    30 END_VAR
       
    31   a_1 := TRUE;
       
    32 END_PROGRAM
       
    33 
       
    34 
       
    35  (* using in program parameter *)
       
    36 CONFIGURATION XXXX
       
    37  TASK fast(PRIORITY := 4);
       
    38  PROGRAM foo WITH fast:
       
    39        bar000(a_1 := TRUE);
       
    40 END_CONFIGURATION
       
    41 
       
    42 
       
    43 
       
    44 (* Checking whether the use of XXXX will confuse any other
       
    45  * normal and correct IL or ST code.
       
    46  *)
       
    47 {#include "basic_code.test" }
       
    48