-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add a notation for static and runtime semantics attached to grammar productions. #311
Comments
Operations done at runtime should probably always be prefixed by either |
I would like a new syntactic convention here. But what about using method invocation syntax, namely: PropertyName.Evaluation(), exprValueRef.GetValue(), etc? |
I think when @bterlson explained this to me last it was important that they are really abstract methods, yeah. If that could be made more explicit, I'd be quite happy. |
Bear in mind that the 'target' of such an invocation can't always be referenced simply by a nonterminal. E.g., consider:
Would that become
or
or (say)
(Also, the exprValueRef.GetValue() example is odd, because GetValue(V) is defined as an 'ordinary' abstract operation, not a syntax-discriminated operation.) |
It concerns the phrases of the form "the result of evaluating production with argument arg", and "the result of performing Foo of production with argument arg", and variations thereof.
Possible notation (to be bikesheded):
etc.
That will allow to replace the majority of remaining ReturnIfAbrupt steps in the spec with the
?
notation.Issue of my proposal: we lose the editorial distinction between the uses of runtime semantics (marked with the action verbs "performing" and "evaluating") and the use of static semantics.
Examples from section 12.2.6.9:
Replace:
with:
Replace:
with:
Replace:
with:
The text was updated successfully, but these errors were encountered: