As part of a group project I'm writing a compiler for a simplified language. As one of the optional features I thought I'd add a peephole optimizer to go over the codegen's output intel assembly code and optimize it.
Our compiler is done in java and it seems like it's going to be a lot of work to create this peephole optimizer using the java I've learned so far. Is there some sort of tool I should be using to make this possible, as pattern matching strings doesn't sound like a good approach in java.
thanks