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

[spec] grammar blocks use unspecified notation #3990

Open
dlangBugzillaToGithub opened this issue Nov 25, 2021 · 0 comments
Open

[spec] grammar blocks use unspecified notation #3990

dlangBugzillaToGithub opened this issue Nov 25, 2021 · 0 comments

Comments

@dlangBugzillaToGithub
Copy link

Dennis (@dkorpel) reported this on 2021-11-25T12:22:33Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=22543

Description

Newsgroup discussion:
https://forum.dlang.org/post/gwcvsqctgsuetdyfenyz@forum.dlang.org

Blocks like:
```
SpecialTokenSequence:
    # line IntegerLiteral Filespecopt EndOfLine
    # line __LINE__ Filespecopt EndOfLine
```

```
ByteOrderMark:
    \uFEFF

Shebang:
    #! Charactersopt EndOfShebang

EndOfShebang:
    \u000A
    EndOfFile
```

Have a certain meaning:
- an identifier with a colon denotes a rule
- the following lines denote alternatives
- spaces between elements of a rule denote either immediate concatenation (lexical grammar), or optional separation by Comments and WhiteSpace (parsing grammar)
- the 'opt' suffix means 'optional'
- text in boldface denotes a string / character literal (lexical grammar) or single token (parsing grammar)

But none of this is specified.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant