View Full Version : 9222 Importance "Grammar elements" not refreshed
22-Oct-2008, 08:40 PM
Changes under Importance "Edit Grammar..." to the order of elements is not reflected upon OK in the order of those same elements already present under Importance "Grammar elements".
22-Oct-2008, 10:11 PM
I noticed this as well. Even if you close the Session Settings then reopen it, the order of the grammar elements on the Importance tab do not change. Perhaps they were never intended to be reordered???
23-Oct-2008, 04:25 AM
> Even if you close the Session Settings then reopen it ...
And even if you duplicate the grammar under another name!
> Perhaps they were never intended to be reordered???
How so??? It results in failure of the comparison to accurately express a grammar the elements of which have been reordered on the Grammar tab.
23-Oct-2008, 05:20 AM
I wasn't saying that it shouldn't be reordered. I was just suggesting that perhaps it wasn't thought of by the programmers. I agree that it would be nice to see the grammar elements ordered the same way in both places.
23-Oct-2008, 08:13 AM
Sorry guys, the order in the importance list can't practically be changed to match the order in the grammar list. The major reason is that you can have multiple grammar items that use the same element name and thus only show as one entry in the importance list. Another reason is that the importance list includes elements used by either side which could have different grammars and thus be in a different order. We wouldn't want separate importance lists for each side because that would be awkward and confusing (Comment on left is important but Comment on right is unimportant just doesn't make sense).
23-Oct-2008, 05:10 PM
OK... but when I have a grammar in which multiple items do /not/ have the same element name, and are such that ordering is significant, by concealing the true order, the Importance tab leaves me with insufficient info to choose the important/un checkbox states. (Not to mention: misleads).
Or am I supposed to click Edit Grammar to peek the true order?
23-Oct-2008, 05:18 PM
The order in the grammar list only matters if 2 grammar items match the same text. For this reason, "Keywords" need to be defined before "Identifiers". Are you suggesting that an element's importance is somehow related to its position in the grammar list? If so, please describe your situation better because it doesn't make any sense to me.
23-Oct-2008, 06:22 PM
> Are you suggesting that an element's importance is
> somehow related to its position in the grammar list?
> If so, please describe your situation better
[ ] New Element (3)=Text matching myvariable = .*
[X] New Element (4)=Text matching myvariable = 1with order according with the (UI-unnamed) Grammar list.
PS I wonder why this forum software inserted a blank line before and after the end of /CODE.
24-Oct-2008, 08:35 AM
If you aren't naming the grammar elements, it might help to give them a specific name instead of letting them be auto named. Instead of the auto name "New Element (3)", use something descriptive like "comment", "date", etc.
24-Oct-2008, 08:42 AM
It might help me? Actually not - I'd prefer no name at all.
Or it might help BC's ordering issue? How so?
24-Oct-2008, 08:50 AM
A descriptive name will make it clearer which expression is which when checking or unchecking them in the Importance tab of session settings.
As an example, if you enter a grammar item that matches // to end of line for comments, it makes sense to name it "Comment" rather than the auto name "New Element (3)".
Once you've defined the grammar, it is clearer to say "Comments" are important or unimportant in the session settings rather than saying "New Element (3)s" are important or unimportant.
If you don't want to use a descriptive name, you can also copy the expression from the grammar as the grammar name to make it clearer in session settings.
24-Oct-2008, 09:12 AM
> A descriptive name will make it clearer which expression is which when
> checking or unchecking them in the Importance tab of session settings.
Thanks, but that is already sufficiently clear.
I might though add line numbers (!) to reveal the hidden order.
> As an example, if you enter a grammar item that matches // to
> end of line for comments, it makes sense to name it "Comment"
Agreed, but ISTM this multi-match issue is confined to ad-hoc elements such as my example rather than planned grammars.
vBulletin® v3.7.1, Copyright ©2000-2013, Jelsoft Enterprises Ltd.