Closed rempAut closed 1 year ago
Thank you. I have not yet tested it but please update upstream. I deleted .gitignore since generated files have to be commited to github in order for action that builds extensions automatically works. Also syntax JSON file was lost, I have restored it.
Had no intetions to merge yet, still want to finish the ST statements part at least.
Had no intetions to merge yet, still want to finish the ST statements part at least.
No worries. Continue to develop and submit new PRs along the way for review. This is feature branch anyway. Just upstream from this branch to you to have updates I am working on this branch.
Example
Integer_type_name returns number:
Unsigned_integer_type_name | Signed_integer_type_name;
Signed_integer_type_name returns number:
'SINT'|'INT'|'DINT'|'LINT';
I think return number should not be there. It is TS type and in fact it is not it is string. It is number for ST but not for the parser it will attempt to convert output to number but that is string.
Signed_Integer returns number:
('+'|'-')? Integer;
This is the same as
Unsigned_Integer returns number:
Integer;
Because it allows only Integer to be there without sign as (+|-) have ? modifier with is optional. I think there should be no ? it means that sign is there.
There is a lot of mistakes.
Signed_Integer returns number:
('+'|'-')? Integer;
You are correct, the integers could produce the same - its just there because I copied the rules 1:1 from the ST grammar rules.
I'll fix it eventually, yesterday I sort of "finished" the structured text part of the grammar. Now I need to review the generated AST.
WIP langium rules