Skip to content

Explicitly define operand in syntax #395

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

Merged
merged 2 commits into from
Jun 19, 2023
Merged

Conversation

eemeli
Copy link
Collaborator

@eemeli eemeli commented Jun 17, 2023

While working on the data model and formatting, I found it a bit challenging to not have the operand of an expression defined in the syntax, even though it needs to be referred to all over the place.

So let's add that, and move the function sigil description to the right section of the spec.

@eemeli eemeli added the syntax Issues related with syntax or ABNF label Jun 17, 2023
@eemeli
Copy link
Collaborator Author

eemeli commented Jun 17, 2023

To bikeshed on the name a bit, one possible alternative to operand could be value; that would be a bit less arcane, and would make it easier to use it also in option:

expression = "{" [s] ((value [s annotation]) / annotation) [s] "}"
value = literal / variable
annotation = (function *(s option)) / reserved
option = name [s] "=" [s] value

@macchiati
Copy link
Member

Not a blocker, but the value of 'operand' is that it reduces confusion with 'value' used as a normal English word.

@macchiati
Copy link
Member

In your very next PR, you have in the text "...determines the value of a part of the message..."

Copy link
Collaborator

@stasm stasm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also change line 19, which currently reads:

option = name [s] "=" [s] (literal / variable)

Copy link
Member

@aphillips aphillips left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but one comment.

@eemeli
Copy link
Collaborator Author

eemeli commented Jun 19, 2023

You can also change line 19, which currently reads:

option = name [s] "=" [s] (literal / variable)

Noticing that is what prompted me to consider value, actually, as "operand" doesn't really work conceptually as the value of an option. :/

@aphillips aphillips merged commit 2375e3a into unicode-org:main Jun 19, 2023
@eemeli eemeli deleted the operand branch June 19, 2023 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
syntax Issues related with syntax or ABNF
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants