crprashant commented on issue #2416:
URL: https://github.com/apache/age/issues/2416#issuecomment-4665607092

   Yes, it's solvable -- the ~156 conflicts are a symptom of these keywords 
doing double duty in expression position, not a hard wall:
   
   - operator keywords 
(`AND`/`OR`/`NOT`/`XOR`/`IS`/`IN`/`CONTAINS`/`STARTS`/`ENDS`, 
`CASE`/`WHEN`/`THEN`/`ELSE`) collide with their operator roles;
   - `COUNT`/`EXISTS`/`COALESCE` collide with their dedicated `keyword(...)` 
expression syntax;
   - clause keywords (`WITH`/`RETURN`/`ORDER`/`LIMIT`/...) collide with clause 
boundaries after an expression.
   
   The clean fix is the PostgreSQL approach: split keywords into 
reserved/unreserved categories and factor the expression + identifier grammar 
so non-reserved words reduce to an identifier without conflict (option 1 in the 
issue description). A GLR parser would also work but is a bigger architectural 
change, and context-sensitive lexing (re-tagging a bound alias as `IDENTIFIER`) 
was previously rejected for AGE.
   
   So it's doable, just not a small patch -- the `count`/`exists`/`coalesce` 
family is the thorniest, since they own expression syntax. Keeping this open as 
a tracked enhancement seems right.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to