Re:What the heck is a parser-combinator?
by flor1s on Wednesday June 21, 2017 @01:08AM
(#14600811)
A few years ago I worked on a similar kind of project as part of my bachelors. We were converting SQL for Oracle to SQL for Microsoft SQL Server. One problem is dealing with features which language A supports and language B doesn't. Another problem is that it is a huge amount of work to match all syntax elements as well as all library usages. In fact, I guess it's not a good thing to say on HackerNews, but isn't it better to just buy a tool which does it for you? It seems like they are available for the author's use case: http://www.ispirer.com/application-conversion/jcl-to-powersh...
[ Parent
| on HN ]
Re:What the heck is a parser-combinator?
by majewsky on Wednesday June 21, 2017 @04:48AM
(#14602035)
> We were converting SQL for Oracle to SQL for Microsoft SQL Server.
I had a similar problem a few months ago with a Golang application that uses Postgres in production, but SQLite for unit tests. Since Go's SQL support has pluggable driver backends, I made a generic proxy driver [1] that can rewrite the incoming query, and used that in my application to rewrite from Postgres to SQLite syntax [2].
[1] https://godoc.org/github.com/majewsky/sqlproxy
[2] https://github.com/sapcc/limes/blob/205f9980a41d75fc0315e0ac...
Re:What the heck is a parser-combinator?
by SteveBash on Thursday June 22, 2017 @10:51PM
(#14616841)
Why just not use a local postgres instead of sqlite, your case seems like overengineering to me.
>One problem is dealing with features which language A supports and language B doesn't.
That's not a problem with parsers or parser-combinators though. That's a problem with converting from one DB to another.
> That's a problem with converting from one DB to another.
The article is about converting JCL to PowerShell, so I'd say it's related.