PDA

View Full Version : Case sensivity in grammar items


Adrian--1
03-Mar-2009, 04:31 AM
The "Grammar Item" window has a tick box for "Match character case" and another tick box for "This element is case sensitive". Both are mentioned on the help page on "Editing a Grammar Item". What is the difference between the functions of these two boxes?

Adrian
BC3 3.0.15 build 9758.

Michael Bulgrien
03-Mar-2009, 06:34 AM
I might be wrong... but my understanding is that:

[ ] Match character case

defines whether the grammar itself is case sensitive. If the checkbox is checked and the case in the text file is different than the defined grammar, then the text will not be considered as a match to the grammar (affects syntax high-lighting, etc)

[ ] This element is case sensitive

defines whether or not a change in case will be treated as an important difference. If the checkbox is not checked, difference in case will be treated as unimportant in a text compare.

In some cases, the difference here can be subtle. In general, if the grammar really is case sensitive, then you should check both options. If the grammar is not case sensitive, then you can choose whether or not to check the second checkbox to make case differences important or unimportant.

Michael Bulgrien
03-Mar-2009, 06:38 AM
Perhaps renaming the second option to:

[ ] Treat case differences as important

would clear up some of the confusion???