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".
Announcement
Collapse
No announcement yet.
9222 Importance "Grammar elements" not refreshed
Collapse
X
-
> 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.
Comment
-
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).Erik Scooter Software
Comment
-
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?
Comment
-
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.Erik Scooter Software
Comment
-
> Are you suggesting that an element's importance is
> somehow related to its position in the grammar list?
Yes.
> If so, please describe your situation better
Code:Grammar elements [ ] New Element (3)=Text matching myvariable = .* [X] New Element (4)=Text matching myvariable = 1
PS I wonder why this forum software inserted a blank line before and after the end of /CODE.
Comment
-
Chris,
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.Chris K Scooter Software
Comment
-
Chris,
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.Last edited by Chris; 24-Oct-2008, 09:55 AM.Chris K Scooter Software
Comment
-
> 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.
Comment
Comment