This is the next entry in the series on program transformation systems. This article describes Spoon, a system for Java source code. It has been in development since 2005 and is actively being developed to this day.
Author Archives: kaby76
Speeding up this website
A few months ago, I started to migrate some of my websites to DigitalOcean because the cost of a virtual server is $5/mo. So, I moved CodingGorilla.com to the new host. (Note, a long story, but the name came from an old boss, who saw I have the patience of a saint and attention to …
Series on program transformation systems: C-Breeze (2004)
This is the next entry in the series on program transformation systems. This article describes C-Breeze, a compiler system for C source code.
Rewriting the pattern matching engine — part 1
For the last two weeks, I’ve trying to write Piggy patterns to construct a symbol table from a Java AST. Patch after patch, I’d change the pattern matching code to “fix” something that wasn’t working. Unfortunately, I finally wrote a pattern that broke the camel’s back, “< classBodyDeclaration < modifier >* < memberDeclaration < methodDeclaration …
Continue reading “Rewriting the pattern matching engine — part 1”
Series on program transformation systems: Coccinelle (2006)
Due to my work on Piggy, I’m starting to do a thorough review of the literature on program transformation systems, how Piggy relates to prior research, and what improvements I can make to Piggy. Note, a good list to start from is in Wikipedia: ASF+SDF, CIL (for C), Coccinelle (for C), DMS, Fermat, Spoon (for …
Continue reading “Series on program transformation systems: Coccinelle (2006)”
What the hell is that?
No ifs, ands, or buts, news about Net Standard may be old and stale, but one thing still applies: As Steve Martin would say, “What the hell is that?” Believe it or not, I started writing this entry years ago, a few months after Net Standard first came out. I had hoped that if I just …
A quick note on Piggy patterns and comparison with XPath
XPath (1, 2, 3) is a language for finding nodes in an XML tree, and has a long history in AST search. Maletic et al. (4) is probably the first paper on XPath used on ASTs, using Antlr. It was further researched and is now part of the OSS world (5). In 2014, Parr added to Antlr releases …
Continue reading “A quick note on Piggy patterns and comparison with XPath”
Piggy as a build tool
One further refinement to Piggy is required before I make a release of the tool: a wrapper to get the tool under MSBuild. Like the Antlr4BuildTasks wrapper I forked from Antlr4cs, I want Piggy to work seamlessly during the build of a C# project that uses a native library. My plan is for C# projects to …
Calling Roslyn from Net Framework and Net Core
It never ceases to amaze me how people can write a huge API and never bother to document how to use it. But, it’s been that way for as long as I can remember, going back 35 years. In my latest adventures, I’ve been trying to compile, link, and run C# code dynamically using Roslyn for Piggy, …
Continue reading “Calling Roslyn from Net Framework and Net Core”
MSBuild rules for Antlr4 grammars using Antlr4BuildTasks
In order to better support Piggy, which uses Antlr4, I’ve added a NuGet package called Antlr4BuildTasks. This package is a pared-down derivative of the excellent work of Sam Hartwell Antlr4cs code generator package, and includes just the rules and code needed to do builds in MSBuild, Dotnet, or Visual Studio 2017 IDE–just no Antlr4 tool itself. …
Continue reading “MSBuild rules for Antlr4 grammars using Antlr4BuildTasks”