Hi, I'm writing an audio player using java, and I want a title formatter similar to foobar2000. Examples are:
$if($strcmp(%album artist%,%artist%),%artist%,$if2(%album%,Unknown))
or
[%album%][ '('CD $ifgreater(%totaldiscs%,1,%discnumber%,)')']
first example returns a string, and if it is same for sequential tracks in a playlist, they are grouped, second example formats album name and adds a cd number if it exists. Full reference is here
I do not need everything but at least some of the functionality.
How difficult is it to write a parser for such a language. Are there any compiler compilers for java?
Would it be easier to use java's javascript engine? How fast will it be (processing several thousand tracks)?