-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spurious SAM parser warning: Unannotated phrase found: #205
Comments
What is happening here is that SAM makes a distinction between annotations and attributes. Annotations are for semantic markup that describes the what the content means. Annotations are for management doman markup that describes how it is to be processed. Attributes are denoted with symbol prefixes. Annotations are not. So the warnings are correct, there are no annotations on those phrases, just attributes. This is certainly one of the less obvious parts of the SAM language design. It is a reflection of the fact that SAM was designed to support semantic markup with lightweight syntax, so the semantic approach is favored over the use of management domain attributes at every turn. (Same argument as in the case of attributes on records.) Could this be better flagged to the user? Certainly. Is it an appropriate thing to warn the user about at all? Yes. Because of annotation lookup, it is important to raise a warning for unannotated phrases. Is the distinction between annotations and attributes important? Yes, if for no other reason than annotation lookup (which is a big timesaver) appropriately works for annotations and not for attributes. Should phrases with attributes but no annotations raise this warning. Yes, because there is the possibility that the user was relying on annotation lookup and no matching annotations were found. Could it be worded better (or a different wording be chosen in these cases)? Maybe. |
What would be a good way to indicate that this is what I mean, and I don't want this particular warning? (sort of like a cast in C/C++?) |
There isn't one, as far as I recall. I don't think the question has been raised before. I suppose a directive at the top of the file could be used to turn it off globally.
Sent from TypeApp
…On Feb 10, 2020, 2:46 PM, at 2:46 PM, Florin Iucha ***@***.***> wrote:
What would be a good way to indicate that this is what I mean, and I
don't want this particular warning? (sort of like a cast in C/C++?)
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#205 (comment)
|
|
Considering this input:
Produces this:
The warning seems spurious since the phrases are clearly annotated - the conditions are present in the output.
The text was updated successfully, but these errors were encountered: