Alternative plugin to Javascript for Java to provide a way for user to specify a mask
<p>I'm looking for a scripting language that can be run on a Java VM that would work as a simple scripting language that a user can use for specifying how there filenames are constructed from music metadata. Please see earlier related post of mine <a href="http://stackoverflow.com/questions/6285045/putting-a-simple-expression-language-into-java">Putting a simple expression language into java</a> where Javascript was recommended, I use this and it works:</p>

<p>i.e I if I have a file containing the following metadata:</p>

<pre><code>albumartist=U2
album=Boy
trackno=02
title=Twilight
</code></pre>

<p>and apply this javascript mask:</p>

<pre><code>(albumartist.length&gt;0  ? albumartist +'-' :(artist.length&gt;0 ? artist + '-' : ' ')) + (album.length&gt;0 ? album + '-' :'') + (trackno.length&gt;0 ? trackno + '-' :'')  + title
</code></pre>

<p>it will output</p>

<p>U2-Boy-02-Twilight</p>

<p>which is great.</p>

<p>But the trouble is the Javascript syntax is <strong>too hard</strong> for the average user.</p>

<p>Can anyone recommend an alternative scripting language I can plugin that gives me simailar functionality but a simpler syntax. For example it would be nice if I could use this kind of syntax instead</p>

<pre><code>if(albumartist,albumartist-)else if(artist,artist-)(album,album-)(trackno,trackno)title
</code></pre>

<p>and get the same result</p>
