Difference between revisions of "LRM msg Support"
(→valid msg syntax) |
(→.msg uses the msg parser type) |
||
Line 29: | Line 29: | ||
=== .msg uses the ''msg'' parser type=== |
=== .msg uses the ''msg'' parser type=== |
||
− | When defining a project |
+ | When defining a project containing LRM Standard .msg resource files,, there is no need to define a ''<parser-type>'' as the ''msg'' parser will always be used. |
+ | |||
=== unique file extension needs to define ''msg'' parser type === |
=== unique file extension needs to define ''msg'' parser type === |
||
If a unique file extension is a valid .msg file, then the ''<parser-type>'' should be ''msg'' in the project definition file. |
If a unique file extension is a valid .msg file, then the ''<parser-type>'' should be ''msg'' in the project definition file. |
Revision as of 15:49, 1 September 2017
Contents
Example of .msg files as well as file extensions using the msg parser type
$ A Globalyzer generated message file $set MainSet $ SOURCE_FILE C:/Path/to/my/source/StringBug.hpp STRI_BADLINE_6 "Bad line" STRI_INVALID_7 "Invalid Rectangle" STRI_INVALID_8 "Invalid Color" STRI_INVALID_9 "Invalid Point" STRI_INVALID_10 "Invalid DWORD" STRI_UNRECOG_11 "Unrecognized type" STRI_SLINEDS_12 "%s (line #%d) : %s" STRI_RUNTIME_13 "Runtime Variable Error" STRI_KEYNOTF_14 "Key not found" $ SOURCE_FILE C:/Path/to/my/source/keypressEvents.cxx KEYP_PRESSED_1 "Pressed " KEYP_UP_2 "Up" KEYP_THEUPAR_3 "The up arrow was pressed." KEYP_SHOULDD_4 "Should detect because ignore second issue" KEYP_THEAKEY_5 "The a key was pressed."
msg parser type
valid msg syntax
Files that use the msg parser are expected to have valid msg syntax
.msg uses the msg parser type
When defining a project containing LRM Standard .msg resource files,, there is no need to define a <parser-type> as the msg parser will always be used.
unique file extension needs to define msg parser type
If a unique file extension is a valid .msg file, then the <parser-type> should be msg in the project definition file.
Example Project Definition File
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <lrmconf> <model-version>2.0.11</model-version> <project-name>DemoMsg</project-name> <project-desc>This is a sample LRM Project definition file, configured for Msg resource files</project-desc> <group-name>acme</group-name> <top-level-dir>C:\acme\source</top-level-dir> <detect-errors> <missed-trans-error>0</missed-trans-error> <parameter-mismatch-error>1</parameter-mismatch-error> </detect-errors> <track-back-locale>br</track-back-locale> <pseudo-locale>eo</pseudo-locale> <target-locales> <locale>es_MX</locale> <locale>fr_CA</locale> <locale>fr_FR</locale> </target-locales> <default-locale>en_US</default-locale> <resource-extensions> <resource-extension> <!-- parser-type not needed since .msg is a standard LRM extension that maps to the msg parser type --> <extension>msg</extension> <file-name-pattern>*_l_c_v</file-name-pattern> <use-pattern-on-dflt-locale>0</use-pattern-on-dflt-locale> <file-location-pattern></file-location-pattern> <use-location-pattern-on-dflt-locale>0</use-location-pattern-on-dflt-locale> <base-file-encoding>UTF-8</base-file-encoding> <localized-file-encoding>UTF-8</localized-file-encoding> <parameter-regex-pattern><![CDATA[%\\d+%|%[ds]]]></parameter-regex-pattern> </resource-extension> <resource-extension> <!-- parser-type is required because .myext is not a standard LRM extension --> <extension>myext</extension> <parser-type>msg</parser-type> <file-name-pattern>*_l_c_v</file-name-pattern> <use-pattern-on-dflt-locale>0</use-pattern-on-dflt-locale> <file-location-pattern></file-location-pattern> <use-location-pattern-on-dflt-locale>0</use-location-pattern-on-dflt-locale> <base-file-encoding>UTF-8</base-file-encoding> <localized-file-encoding>UTF-8</localized-file-encoding> <parameter-regex-pattern><![CDATA[%\\d+%|%[ds]]]></parameter-regex-pattern> </resource-extension> </resource-extensions> <dirset> <includes> <include-dir-file>**/src/**</include-dir-file> </includes> <excludes> <exclude-dir-file>**/src/bin/**</exclude-dir-file> </excludes> </dirset> </lrmconf>