-
|
We have a custom sql dsl that supports subset of sql as outlined in playground. As you can see, the One peculiar thing with this dsl is we could have table name conflicts with keywords. For ex., Any idea what I'm doing wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Hey @brsanthu, you're basically hitting an issue in our parser implementation. Mainly, a Also note that SQL forbids keywords as identifiers, you should use string escaping instead (also implemented in langium-sql). |
Beta Was this translation helpful? Give feedback.
Hey @brsanthu,
you're basically hitting an issue in our parser implementation. Mainly, a
WhereExprcan be followed by any other amount ofWhereExpr. Sinceorderis handled as aName, it will think that there's a newWhereExprstarting. While there's a fix that includes rewriting the grammar to lift different rules to the same level, note that this isn't valid SQL syntax, as multipleWhereExprshould be separated byANDorOR. You should adjust your grammar. See also langium-sql for a mostly complete implementation of DQL. That should fix the issue by itself.Also note that SQL forbids keywords as identifiers, you should use string escaping instead (also implemented in langium-sql).