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

production 'A : A @ B' not handled correctly #12

Closed
jmdyck opened this issue Sep 20, 2015 · 7 comments
Closed

production 'A : A @ B' not handled correctly #12

jmdyck opened this issue Sep 20, 2015 · 7 comments
Assignees
Milestone

Comments

@jmdyck
Copy link

jmdyck commented Sep 20, 2015

Section 12.11.3 of the ES6 spec begins (in ecmarkup):

<p>The production <emu-grammar>A : A @ B</emu-grammar>, where @ is ...

grammarkdown does not handle this production correctly, translating it to:

    A:A

    B:[empty]
@rbuckton
Copy link
Owner

rbuckton commented Oct 1, 2015

@bterlson Is there a specific emu tag I should associate with the @ placeholder in the production above, or just emit it verbatim/treat it as a terminal.

@rbuckton rbuckton self-assigned this Oct 1, 2015
@rbuckton rbuckton added this to the 0.1.4 milestone Oct 1, 2015
@bterlson
Copy link
Contributor

bterlson commented Oct 1, 2015

I think it's a non-terminal, actually - just one that isn't formally defined as part of the grammar and used as a convenience when referring to all the terminals it expands to...

@rbuckton
Copy link
Owner

rbuckton commented Oct 1, 2015

So we even need a change here? We should instead write it as:

A : A `@` B

@bterlson
Copy link
Contributor

bterlson commented Oct 1, 2015

I think @ is conceptually a non-terminal that expands to the various binary op terminals, so I think backticks are inappropriate?

@rbuckton
Copy link
Owner

rbuckton commented Oct 1, 2015

So assuming I just add @ as a "placeholder" symbol, would I still emit @ as <emu-t>@</emu-t>?

@bterlson
Copy link
Contributor

bterlson commented Oct 1, 2015

<emu-nt>@</emu-nt> I think, or maybe <emu-nt placeholder>@</emu-nt> if we want to consider @ a special form. I would be happy with either.

@rbuckton
Copy link
Owner

rbuckton commented Oct 2, 2015

Fixed in c299b3d.

@rbuckton rbuckton closed this as completed Oct 2, 2015
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

3 participants