Encouraged by this, and the fact I have billions of string to parse, I tried to modify my code to accept StringTokenizer instead of String[]
The only t
If your input is structured, you can have a look at the JavaCC compiler. It generates a java class reading your input. It would look like this:
TOKEN { , } input: (cat() | dog())* cat: { animals.add(new Animal("Cat")); } dog: { animals.add(new Animal("Dog")); }