Source code manipulation (...)
summary
Shows concrete source-code changes: remove console.log/System.out.println calls, refactor snake_case to camelCase across variables/functions, and convert string concatenations into Java 13 text blocks. Uses an antler grammar to generate lexer/parser, walks the AST with enter/exit listeners, and emits replacements — often just three lines of code to perform a transformation. Demonstrates working JavaScript examples (fast with AST tooling) and a Java pipeline that runs on actual files; Java needs more grammar and state but the conversions succeed.
AI-written summary · about
chapters (12)
- 0:00Introduction to source code manipulation
- 1:34Removing console.log in JavaScript
- 5:55Refactoring variable names to camelCase
- 9:06Abstract syntax tree explained
- 12:44Challenges in Java source manipulation
- 17:35Lexer and parser with ANTLR
- 21:53Snake case to camelCase in Java
- 24:35Converting strings to text blocks
- 27:29Code transformation use cases
- 33:12Automating test case reporting
- 35:42ANTLR vs BNF for performance
- 36:48Resources and closing
related talks
44mJavaScript AST programming: Introduction and beyond
47mComputer, refactor my code!
35mJava Source to Byte Code Transformation - The Hidden Story!
29mMy Little Parser: Tooling is Magic
45mMaking Java more dynamic
44mLet's talk about transpilers
53mWell there's your problem! Your engine's missing! A look under Java's hood
55mLiving in the Matrix with Bytecode Manipulation
