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

SQL syntax error in the Readme.md example? #1

Open
eyalroz opened this issue May 15, 2018 · 1 comment
Open

SQL syntax error in the Readme.md example? #1

eyalroz opened this issue May 15, 2018 · 1 comment

Comments

@eyalroz
Copy link

eyalroz commented May 15, 2018

In Readme.md, it says:

auto const identifier_def = (
     (lexeme[alpha >> *ialnum] - reserved_word) >> attr(ast::quot::NONE)
  |  lit("\"") >> lexeme[+ialnum] >> lit("\"")  >> attr(ast::quot::DOUBLE)
  /* ... */
);

but between double-quotes, you should be able to use non-alpha-numeric characters, I think. Also, even without double-quotes - I'm pretty sure the SQL standard allows for, say, underscores in identifiers, at least after the first character. Am I wrong?

PS - I've been wanting to write an SQL parser in Spirit X3 ever since I saw the talk about it by that Ciere fellow... this is awesome! If you're interested in expanding this together to support a wider fragment of SQL, write me...

@cviebig
Copy link
Owner

cviebig commented May 17, 2018

Hey,

it could be indeed that this is more restrictive than actually necessary. I followed the SQLite grammar description but having a quick glance right now could not find their definition of identifiers such as table names or schema names. I'm glad you like it! Indeed I'm very happy to further expand it to improve it's completeness and performance though I cannot give any promises on the amount of contributions I can make.

How would you relax the definition of the identifiers? The German Wikipedia is referencing a draft revision of the standard from 2008 but I'm unable to check it out out right now.

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