mario@108: (* Test whether the keyword XXXX may be used as an identifier for: mario@108: * Program identifier mario@108: * mario@108: * The XXXX names in the following code are merely a placeholder. mario@108: * They will be replaced by several identifiers before actual testing mario@108: * of the compiler. mario@108: *) mario@108: mario@108: (* The identifiers that will replace the XXXX mario@108: * must be placed on a line starting with # mario@108: * All identifiers preceded by # are ignored! mario@108: * The identifier list must be placed inside an IEC 61131-3 comment. mario@108: *) mario@108: (* This file is specific for identifiers identical to IL operators. mario@108: * See the note following the identifier list mario@108: *) mario@108: (* mario@108: #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 mario@108: #SFC_qualifiers D DS L N P #R #S SD SL mario@108: NOTE: R and S are identical to IL operators!! mario@108: #Task_initialisers PRIORITY SINGLE INTERVAL mario@108: *) mario@108: mario@108: (* NOTE: The identifier as a variable test has some special cases. mario@108: * Namely, when using IL operators as variable names. mario@108: * Even though the syntax of the IL language would not result mario@108: * in ambiguities in the above case, our parser does not currently mario@108: * allow the use of variables (with names identical to IL mario@108: * operators) within IL code. mario@108: * mario@108: * The following test code must therefore consider two possibilities: mario@108: * - if the identifier under test is an IL operator mario@108: * - if the identifier under test is not an IL operator mario@108: *) mario@108: mario@108: mario@108: mario@108: mario@108: mario@108: mario@108: PROGRAM XXXX mario@108: VAR_INPUT mario@108: a_1 : BOOL; mario@108: END_VAR mario@108: LD a_1 mario@108: END_PROGRAM mario@108: mario@108: mario@108: mario@108: mario@108: mario@108: CONFIGURATION config1 mario@108: TASK fast(PRIORITY := 4); mario@108: PROGRAM P1 WITH fast: mario@108: XXXX(a_1 := TRUE); mario@108: END_CONFIGURATION mario@108: mario@108: mario@108: mario@108: mario@108: (* Checking whether the use of XXXX will confuse any other mario@108: * normal and correct IL or ST code. mario@108: *) mario@108: {#include "basic_code.test" } mario@108: mario@108: