# HG changeset patch # User mario # Date 1170422492 -3600 # Node ID 8ce37f36d7449ff8c29d7c08e97630efd5cca282 # Parent 66f4f7f85d0ae6e6e97e7561e62c5f3b40cbe958 Add support for correct syntax of direct variables. diff -r 66f4f7f85d0a -r 8ce37f36d744 stage1_2/iec.flex --- a/stage1_2/iec.flex Thu Feb 01 19:02:24 2007 +0100 +++ b/stage1_2/iec.flex Fri Feb 02 14:21:32 2007 +0100 @@ -582,11 +582,11 @@ /* B.1.4.1 Directly Represented Variables */ /********************************************/ /* The correct definition, if the standard were to be followed... */ -/* -location_prefix [IQM] -size_prefix [XBWDL] -direct_variable %{location_prefix}({size_prefix}?){integer}((.{integer})*) -*/ + +location_prefix [IQM] +size_prefix [XBWDL] +direct_variable_standard %{location_prefix}({size_prefix}?){integer}((.{integer})*) + /* For the MatPLC, we will accept % * as a direct variable, this being mapped onto the MatPLC point @@ -605,10 +605,12 @@ * VAR * AT %I3 : BYTE := 255; * END_VAR - * in which case we are currently using "I3" as the variable - * name. For the other names, this would create havoc!!! - */ -direct_variable %{identifier} + * in which case we are currently using "%I3" as the variable + * name. + */ +direct_variable_matplc %{identifier} + +direct_variable {direct_variable_standard}|{direct_variable_matplc} /******************************************/ /* B 1.4.3 - Declaration & Initialisation */