Commit Graph

56 Commits

Author SHA1 Message Date
Jonathan Turner
294d22ac5b Remove unnecessary type comparison in equation 2009-07-03 14:52:05 +00:00
Jonathan Turner
34983dbed2 Added take_while and drop_while 2009-07-03 14:08:58 +00:00
Jonathan Turner
f35c2908d7 Change old reduce to foldl. Add clojure reduce. Add sum, product. Add take, drop, filter 2009-07-03 13:09:39 +00:00
Jonathan Turner
9c7f63e8b2 Fixed prefix operator precedence bug. Added collate(?), zip_with, and zip 2009-07-03 12:13:29 +00:00
Jonathan Turner
78be32927c Fixed repl scope leak after an exception 2009-07-03 03:13:05 +00:00
Jonathan Turner
db9442d5a8 More prelim testing to isolate repl issue 2009-07-02 22:54:50 +00:00
Jonathan Turner
af4b1a2bfb Tracking down the 'to_string in repl clobbers vars' issue, not done yet 2009-07-02 21:23:49 +00:00
Jason Turner
47052f710c Fix some semantics of operator= to reduce dispatch, etc.
Also, add more bootstrapping support for some of the built in types.
2009-07-02 19:59:40 +00:00
Jonathan Turner
a70af22eaf Add initial pair printing 2009-07-02 19:26:25 +00:00
Jonathan Turner
441112648e General cleanup to chaiscript prelude 2009-07-02 18:09:02 +00:00
Jonathan Turner
6ddef8f918 Changed to using to_string as dispatch instead of print and puts 2009-07-02 17:45:58 +00:00
Jonathan Turner
60b814f687 Added print and puts for ranged values 2009-07-02 17:39:53 +00:00
Jonathan Turner
6d4f2146b8 Added function guards 2009-07-02 17:22:12 +00:00
Jonathan Turner
f6342ef2a8 Remove stale && and || registration 2009-07-01 20:02:01 +00:00
Jonathan Turner
8e732f3087 Allow more general function dispatch 2009-07-01 19:47:12 +00:00
Jonathan Turner
57c75dae31 Add && and || operator short-circuiting 2009-07-01 17:57:14 +00:00
Jonathan Turner
feb4cc0d14 Fix eval() function 2009-07-01 17:45:48 +00:00
Jonathan Turner
042df442a1 Fixes to for loops. Added elseif and else 2009-07-01 17:13:52 +00:00
Jonathan Turner
27f6ec7b70 Change equation to clone rhs. Add := ref equation. Failed clones will ref copy 2009-07-01 16:48:27 +00:00
Jonathan Turner
5f96b39c08 Allow bash script header 2009-07-01 13:41:15 +00:00
Jonathan Turner
3214f427ff Added for loop 2009-07-01 13:33:29 +00:00
Jonathan Turner
bb174b37a6 Added inline map creation 2009-07-01 13:19:26 +00:00
Jonathan Turner
2cba593c53 Add prefix ++ and -- 2009-06-30 19:34:16 +00:00
Jonathan Turner
e6a0dc9af6 Fix with function definitions of zero params 2009-06-30 19:11:12 +00:00
Jonathan Turner
1bc71d21bd Move parser-specific stuff into its own class 2009-06-30 18:54:33 +00:00
Jonathan Turner
ee44ae0ca0 Initial reworking of chaiscript parser to use the new chaioop parser 2009-06-30 18:17:15 +00:00
Jonathan Turner
ae3ce3fcb2 Fix arity when registering lambdas and functions 2009-06-25 23:14:46 +00:00
Jonathan Turner
96f3033a42 Moved to using a prelude header 2009-06-25 14:16:32 +00:00
Jonathan Turner
18985b6a97 Added puts and join 2009-06-25 02:45:28 +00:00
Jason Turner
eb5dbe4975 Add more specific exception types to the dynamic system and handle them properly 2009-06-25 00:03:23 +00:00
Jonathan Turner
d8b5847ff6 Fix for Issue 38: array push_back 2009-06-24 16:19:25 +00:00
Jonathan Turner
3ed5fe0c97 Added ws skipping. Non ws skipping versions of base parsers. Added comment skipping 2009-06-24 13:53:05 +00:00
Jason Turner
d02620bb1b Cleanup Cast_Helper and add new boxed_cast<>() function. 2009-06-23 02:47:47 +00:00
Jonathan Turner
68da0eb404 Added map and reduce functions 2009-06-22 11:51:56 +00:00
Jason Turner
80ed8eb505 Make EvalError a subclass of runtime_error and provide the std::exception with a robust description for easier debugging of callback/scripted function calls 2009-06-21 20:07:11 +00:00
Jason Turner
786d194689 Handle the ReturnVal exception at the eval_function level so that functions passed back to C++ land have their return values handled properly 2009-06-21 19:45:36 +00:00
Jason Turner
dc11237af9 Add build_functor algorithm for constructing a boost function_object from a script snippet 2009-06-21 18:09:00 +00:00
Jason Turner
d4ec79607f Clean up syntax for build_function_caller to allow for further use of it better 2009-06-21 17:20:26 +00:00
Jonathan Turner
75431a052b Added short form lambda: (x) : { x + 10 }. Fixed eval sample 2009-06-21 00:35:45 +00:00
Jason Turner
9f13858482 further the sensors example to load and parse files 2009-06-20 23:24:06 +00:00
Jason Turner
1919d88f4f Prelim sensor callback implementation, should probably be moved out of the chaiscript dir at some point 2009-06-20 19:04:39 +00:00
Jonathan Turner
855e5acd2b Fixed strings with escaped characters. Added for_each to prelude 2009-06-20 18:43:25 +00:00
Jonathan Turner
682c572eea Allow function and method calls as lhs of equations 2009-06-20 16:12:10 +00:00
Jason Turner
3d23bb68f6 Add support for std::pair 2009-06-20 16:02:22 +00:00
Jonathan Turner
975d8c9618 Added attribute sugar for object attributes 2009-06-20 15:43:31 +00:00
Jonathan Turner
e3db4d3595 Added inline map init using ecmascript syntax 2009-06-20 14:46:05 +00:00
Jason Turner
9a8af16ffb add capability for passing functions back to C++ from script land, plus an example usage. 2009-06-18 18:36:43 +00:00
Jason Turner
146bdf8ea1 Initial support for maps 2009-06-17 00:47:46 +00:00
Jason Turner
ae67be1ecd Add chaiscript namespace 2009-06-14 02:18:13 +00:00
Jason Turner
785263628b Add namespace dispatchkit 2009-06-13 22:42:13 +00:00