Opened 4 years ago

Last modified 4 years ago

#4855 new task

Add checking that variable names has the right syntax in FMIL/xml parsing

Reported by: vjohnsson Owned by: Iakov Nakhimovski
Priority: minor Milestone: Future
Component: FMILibrary Version: trunk
Keywords: #4857 Cc:

Description (last modified by vjohnsson)

This is part of #4857.

Currently no error is reported when a variable does not follow the syntax defined under Variable Naming Conventions in the FMI description. Add this to the log

Change History (10)

comment:1 Changed 4 years ago by vjohnsson

r8574: Added a grammar for the variable name syntax and the generated source files. The grammar can be compiled using Bison and Flex. An fmi_import_context_t can be configured to include this syntax check which is logged as errors.

comment:2 Changed 4 years ago by vjohnsson

r8576: updated the tests for checking variable names to fail if configuration default is not set to zero

comment:3 Changed 4 years ago by vjohnsson

r8577, r8578: Added lost variable name syntax test cases modelDescription.xml

comment:4 Changed 4 years ago by vjohnsson

Remaining Work

  • syntax for flat variable naming convention is still not checked
  • in FMI 1.0 a q-char can be any member of the source character set except single-quote "’", and backslash "\". This means that the grammar has to change depending on what encoding is used for the modelDescription.xml
  • Error messages should be clearer and show where the error is in the variable name

comment:5 Changed 4 years ago by vjohnsson

Priority: majorminor

comment:6 Changed 4 years ago by vjohnsson

Description: modified (diff)

comment:7 Changed 4 years ago by vjohnsson

Keywords: #4857 added

comment:8 Changed 4 years ago by vjohnsson

r8579: Added variable name syntax tests for flat hierarchy.

comment:9 Changed 4 years ago by vjohnsson

r8588: Modified the generated sources to be compatible without warnings on both windows and linux and removed line information when building the generated sources.

comment:10 Changed 4 years ago by vjohnsson

r8603: ctest_fmi1_check_variable_naming_conventions_test and ctest_fmi2_check_variable_naming_conventions_test failing on linux because of case misspelling fixed

Note: See TracTickets for help on using tickets.