[skin-designer] Boolean expressions parsing

Antoine Cellerier dionoea at videolan.org
Wed Sep 12 23:38:07 CEST 2007


On Mon, Sep 10, 2007, Daniel Dreibrodt wrote:
> Could somebody convert the code used in skins2 to evaluate the boolean 
> expressions to java?
> Should go into trunk/src/vlcskineditor/GlobalVariables.java into the 
> function parseBoolean(String b) and should use the boolean variables set 
> in the GlobalVariables class (equalizer_isEnabled etc.) to evaluate the 
> given expression.
> 
> I have no experience with writing parsers for expressions :/
> Help is very much appreciated.

The C++ parsing code doesn't look complex:
https://trac.videolan.org/vlc/browser/trunk/modules/gui/skins2/parser/expr_evaluator.cpp

This is then used by:
https://trac.videolan.org/vlc/browser/trunk/modules/gui/skins2/parser/interpreter.cpp

I'm sure that you could pretty much cut and paste the parser in java.
You'll then need to simulate interpreter.cpp in the skin designer.

-- 
Antoine Cellerier
dionoea



More information about the skin-designer mailing list