the second patch is applied in cset [fordiac-ide:36df40] unfortunately it does not solve the recognition of adapters in st. for Timer.DT:=T#5s; it still shows "missmatched input 'DT' expecting RULE_ID" and for ctrl space it throws an exception:
Error in polymorphic dispatcher : String index out of range: -1
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(Unknown Source)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The name of the variable you're using 'DT' is a keyword (and thus not a valid identifier). That is why the parser cannot handle it correctly. It actually uses the proposal, but then cannot match it for that rule, that's why you get an exception.
It seems many blocks use keywords as variable names contrary to the standard.
I believe we really need to implement proper checking for this in NameRepository.checkReservedKeyWords().
Of course, we still need to think about fixing existing blocks that have this problem.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem now is that DT is a variable name used by IEC 61499 standard. So we have a clash of IEC 61131-3 and IEC 61499 here. In the discussion of a similar [issues:#945] we decided to drop the support for the short names of data types for type declarations and allow them only for literals. I think we need to go here the same direction.
Another patch to fix an error with dangling references towards adapter types.
thank you for these patches the fist one is added in cset[fordiac-ide:8f8465] and fixes the timing literals
Related
Commit: [8f8465]
Last edit: Monika Wenger 2015-11-18
the second patch is applied in cset [fordiac-ide:36df40] unfortunately it does not solve the recognition of adapters in st. for Timer.DT:=T#5s; it still shows "missmatched input 'DT' expecting RULE_ID" and for ctrl space it throws an exception:
Error in polymorphic dispatcher : String index out of range: -1
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(Unknown Source)
The name of the variable you're using 'DT' is a keyword (and thus not a valid identifier). That is why the parser cannot handle it correctly. It actually uses the proposal, but then cannot match it for that rule, that's why you get an exception.
It seems many blocks use keywords as variable names contrary to the standard.
I believe we really need to implement proper checking for this in
NameRepository.checkReservedKeyWords().Of course, we still need to think about fixing existing blocks that have this problem.
The problem now is that DT is a variable name used by IEC 61499 standard. So we have a clash of IEC 61131-3 and IEC 61499 here. In the discussion of a similar [issues:#945] we decided to drop the support for the short names of data types for type declarations and allow them only for literals. I think we need to go here the same direction.
Related
Issues:
#945thanx for the comments, I will then close this issue and open a new one to remove short forms from the data types
Last edit: Monika Wenger 2015-11-19