Skip to content
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

Contradictory description in the doc of Shubbery Notation #244

Closed
s-cerevisiae opened this issue Aug 29, 2022 · 3 comments
Closed

Contradictory description in the doc of Shubbery Notation #244

s-cerevisiae opened this issue Aug 29, 2022 · 3 comments

Comments

@s-cerevisiae
Copy link

In the prototype documentation of the Shubbery Notation, Section 2.3 says that

Subsequent groups in a sequence must start with the same indentation as the first group.

group 1
group 2
// error, because the group is indented incorrectly:
  group 3

I took the word error as it would be illegal to indent like that.

But in the immediately following section (Section 2.4), it says

The following two groups are the same:

f(1) + 2
  + 3 + 4
  - 5 - 6

f(1) + 2 + 3 + 4 - 5 - 6

Which, in my opinion, means that this is legal, and will only make the lines a whole group.

I'm not a native speaker, so I'd like to know if it's only me or the wording is being a bit misleading.

@s-cerevisiae
Copy link
Author

Closing this because I found it is unhelpful and probably bikeshedding, which is not needed during this early stage of the project.

@sorawee
Copy link
Contributor

sorawee commented Sep 3, 2022

I don't think there's anything incorrect.

1 + 2
  + 1 + 2

// parsed as '(top (group 1 (op +) 2 (op +) 1 (op +) 2))

has only one group. The operator at the beginning of the second line indicates a continuation of the group.

In contrast, this has two different groups:

1 + 2
1 + 2

// parsed as '(top (group 1 (op +) 2) (group 1 (op +) 2))

And indeed, if we indent correctly, it errors:

1 + 2
  1 + 2

// wrong indentation (or missing `:` on previous line)

@s-cerevisiae
Copy link
Author

And indeed, if we indent correctly, it errors:

1 + 2
  1 + 2

// wrong indentation (or missing `:` on previous line)

Oh I see. My mind must have been absent when filing the issue....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants