Dynamic Grammars in Java