3 ms·
I think the article focuses on SQL parsing that builds an AST that's usable in the programming language of your choice to analyze/transform the AST. so you'd ha
by valenterry 4y ago
I think the article focuses on SQL parsing that builds an AST that's usable in the programming language of your choice to analyze/transform the AST. so you'd have to write a mapping at least. Otherwise I agree.
- thejosh 4y agoYep, it depends on what you want to do. Validating the SQL is correct is handy -- of course, but sometimes you need the AST.
- sanxiyn 4y agopg_query does return the AST.
- valenterry 4y agoHow do I pass my programming language as parameter to it?
- emaginniss 4y agoWhy would you need to pass in your language? The AST is data. You can then take that AST, which is already validated and disambiguated and act upon it in any way that you'd like.
- valenterry 4y agoBecause I want to analyze and transform the AST with the tools and libraries that my programming language offers. To be more precise, I want the data to be datatypes of my programming language and not JSON or some custom structure that I have to first parse myself.
- deleted 4y ago[deleted]