Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.7.0
-
None
Description
On the basis that a little support is better than none, allow codegen-c to generate C code for a limited subset of dfdl:assert expressions. The use case is to allow generated code to validate or reject messages using dfdl:assert expressions as well as ranges and enumerations. The dfdl:assert support is limited to replacing "../foo/x" and "." with the appropriate pointers and replacing DFDL named operators ("eq") with C-compatible operators ("==") using find and replace operators. In the long term, a better approach would be to add methods to the compiled expression classes to generate C code directly from the compiled expressions with fuller understanding of what the parts of the expressions represent.