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

Comment regarding comment ambiguity #186

Closed
pnathan opened this issue Apr 10, 2013 · 6 comments
Closed

Comment regarding comment ambiguity #186

pnathan opened this issue Apr 10, 2013 · 6 comments

Comments

@pnathan
Copy link

pnathan commented Apr 10, 2013

Suppose:

[describe.number.#]
blathering = "here"   

But, consider these definitions - the comment one first:

They go from the symbol to the end of the line.

vs.

Name your key groups whatever crap you please, just don't use a dot. Dot is reserved. OBEY.

and:

Keys start with the first non-whitespace character and end with the last non-whitespace character before the equals sign.

This results in two correct parses: describe.number. or describe.number.#.

While ambiguity is good in poetry, it drives parsers mad.

@88Alex
Copy link

88Alex commented Apr 12, 2013

The example you gave is syntactically incorrect, as there is no ] tag, but I think that the correct parse would be describe.number.

@pnathan
Copy link
Author

pnathan commented Apr 16, 2013

Alex, I don't understand what you mean. There is a ] character.
The spec indicates that I can either strip out # and everything following, or everything between [] is a valid keygroup.

@88Alex
Copy link

88Alex commented Apr 16, 2013

Well, there is a ] character, but it's commented out.

If this answers your question, I believe # characters aren't allowed in keygroup names. If they were, it would lead to so much confusion.

@pnathan
Copy link
Author

pnathan commented Apr 16, 2013

The spec is ambiguous. As I point out in the filing of the issue, it can be read to both allow or disallow comment characters in the keygroup.

Name your key groups whatever crap you please, just don't use a dot. Dot is reserved. OBEY.

@88Alex
Copy link

88Alex commented Jun 27, 2013

The specification should be updated to this:
"All characters are allowed in key-group names, except for these: = [ ] # ."

@BurntSushi
Copy link
Member

I've interpreted the spec to allow # in both table names and key names.

I think @pnathan is right here. This is an ambiguity. If we fix the wording in the spec, then it needs to be for both table names and key names. Or we could allow # in table names and key names. Either way, a clarification seems good.

BurntSushi added a commit that referenced this issue Jun 26, 2014
Fix #186 by disallowing # in keys.
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

3 participants