package dk.itu.kasper.Macros; import java.io.*; class MacroDefsTest { public static void main(String... args) throws IOException{ MacroProcessor mp = new MacroProcessor( text ); mp.setExpander( new MacroDefs() ); mp.process(); } private static String text="This is the first line\n"+ "#def[pip][Simple text expansion]" + "#def[pap][A parameter #1 expansion]"+ "\nAnd some more text\n" + "So how is this #pip, will that work?\n" + "And how about #pap[aaa][bbb][ccc] can that be expanded as well"; }