[Clp] Grammar underlying CoinModelUseful2.cpp

John Forrest john.forrest at fastercoin.com
Fri May 2 07:09:34 EDT 2014


David,

I have searched around and am unable to find original files.  I can only 
see "=" as well as +-etc - and I can not see how to use "=".

It looks perfectly safe to add floor (and ceil) - I will add to trunk as 
I am unloath to go around monkeying with yacc output.

John


On 30/04/14 18:18, David Einstein wrote:
> Is the precise grammar for the expressions for CoinModel (the one 
> shown at the end of examples/addBits.cpp) documented somewhere.  It 
> appears that there is slightly more than +-*/^(), but reverse 
> engineering the pda is not something I would be likely to enjoy.  If 
> there is no doc, are the original yacc and lex files available?
>
> On a related note, would adding a new primitive function, say floor to 
> the parser, be as simple as adding
>
> inline double floor_wrapper (double x) { return floor(x) ; }
>
> around line 770 of CoinModelUseful2 then adding
>
> {"floor", floor_wrapper},
>
> to the arith_fncts array?
>
> It appears to work, but I am loath to go around monkeying with yacc 
> output.
>
>
> _______________________________________________
> Clp mailing list
> Clp at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/clp

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/clp/attachments/20140502/a9d25f99/attachment.html>


More information about the Clp mailing list