ITADN

Looking for code samples cited in this article: Language Translation Using ANTLR and StringTemplate

#312Closedraffian 创建于 2023-09-12
R
raffiancommented
@parrt Please don't laugh, I know it's an old article. https://theantlrguy.atlassian.net/wiki/spaces/ST/pages/1409118/Language+Translation+Using+ANTLR+and+StringTemplate The article cites `cminus.tar.gz` for the sample source code but there's no link for that artifact, no attachments on that page either. Searched the internet and found only this but there's no such directory in StringTemplate v3.2.1 source tar. https://www.antlr3.org/pipermail/antlr-interest/2011-January/040561.html I'm writing a transpiler for ProC to Java translation. I managed to customize the ANTLR C grammar just enough to handle embedded SQL blocks for parsing `.pc` files, and now I want to experiment with source generation, so when I found the article I was like, wow, this is right up my alley. I don't know if the sample source is even compatible with present day versions of ANTLR/StringTemplate 4.x so perhaps I'm wasting my time trying to acquire that code, but my intuition tells me the principals are still the same. Is there an updated set of sample code for the cminus transpiler cited in the article?
关闭于 2023-09-13 4 条评论