>If parentheses were allowed, a syntax parser and _expression_ solver is
>needed

There is in fact a suitable, freely licenced, general purpose _expression_ parse called JEP (Java _expression_ Parser). I am planning to incorporate this at some stage into the final 'programmable VASSAL' component, a sort of combined _expression_ parser, case statement and keycommand generator.

JEP works well, though requires a bit of work setting up an _expression_ cache to ensure it doesn't bog down the system when used in multiple counters.

It also parses and evaluates logical expressions, so can be used to evaluate 'Matching Property' strings. In fact, I tested this and it worked well.

The big drawback though is that the current form of the 'Matching property' expressions are not properly formed expressions and cannot be evaluated by JEP. The current 'Matching property' expressions do not require strings to be quoted. The result is that incorporating JEP for property expressions would mean that all existing 'Matching Property' expressions would need to be modified.



>*********** REPLY SEPARATOR ***********
>
>On 25/04/2006 at 4:44 AM Gorodoff wrote:
>Ouf! Thanks to all for the numerous answers to my question
>
>Ok, I was tricky:
>
>!( this && that) = !this || !that
>
>could have been a turn around of unallowed mixed && and || if
>parenthesis were available :
>
>[this && that || another] not allowed
>[this && !( !that && !another)] allowed
>
>Stupid idea anyway:
>
>If parentheses were allowed, a syntax parser and _expression_ solver is
>needed
>[this && (that || another)], [(this && that) || another]
>would be solved in two punctual different stages
>so mixing && and || would not matter
>
>It would probably solve single and double arguments operators too
>So resolving [this && that || another] would just be a matter of
>precedence and the ! operator would probably be available
>
>
>
>
>
>
>
>YAHOO! GROUPS LINKS
>
> Visit your group "vassalengine" on the web.

> To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]

> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
____________________________________________________________
Brent Easton                      
Analyst/Programmer                              
University of Western Sydney                                  
Email: [EMAIL PROTECTED]



YAHOO! GROUPS LINKS




Reply via email to