[Clp] Grammar underlying CoinModelUseful2.cpp
David Einstein
deinst at gmail.com
Wed Apr 30 13:18:08 EDT 2014
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/clp/attachments/20140430/1d4e8be0/attachment.html>
More information about the Clp
mailing list