Jason Turner
0d238b1617
Documentation updates and namespace reorg for docs.
2011-04-02 20:52:49 -06:00
Jason Turner
d22a77503c
Fix build errors and warnings for VS2010
2011-04-02 11:21:11 -06:00
Jason Turner
8dec35ba19
Merge branch '2011-03-15-DocumentationUpdates'
...
Conflicts:
include/chaiscript/language/chaiscript_engine.hpp
2011-03-29 20:24:17 -06:00
Jason Turner
8ecd3a084b
Add simple efficencies for static ids
2011-03-28 19:50:41 -06:00
Jason Turner
79e8af4f6e
Enhance eval error stack reporting
...
Use OOP to avoid code duplication for eval error tracking. This results
in much more robust stack error reporting and 400 LOC less.
2011-03-27 21:03:24 -06:00
Jason Turner
de5822873b
Use RAII for scope management
...
Possibly fixes a few bugs where scope pops where missed.
2011-03-27 10:03:37 -06:00
Jason Turner
d6b8e32373
Allow for parse time evaluation of const values.
...
The goal is to allow for more evaluation at parse time, in general, to
increase eval time performance.
- Make AST_Node non-constructable except by derived classes.
- Make data in AST_Node const (as much as possible).
- Replace reflection "text = " with replace_child() (where the
replacement must be with a new parse tree).
- Evaluate floats, strings, ints, chars at parse time to avoid repeat
evaluations (~10% speed up in loops in -O3)
2011-03-27 08:17:04 -06:00
Jason Turner
bbe89e61bc
elimination of unused / outdated code and documentation cleanups.
2011-03-26 22:42:11 -06:00
Jason Turner
92c836c58a
Simplify mutex code by providing stubs that are do nothing during
...
CHAISCRIPT_NO_THREADS builds.
2011-03-25 22:49:17 -06:00
Jason Turner
58e5df0a9a
Even more reorganization of namespaces to help with documentation and
...
clarity.
2011-03-25 15:42:18 -06:00
Jason Turner
854737ea25
Fix compile time error for non-posix, non-win32 platforms.
2011-03-25 10:43:17 -06:00
Jason Turner
cd8bead54a
Further namespace reorganization and cleanup to limit to the user the
...
most important aspect of the API and make documenation easier.
2011-03-24 09:23:05 -06:00
Jason Turner
637164e457
Move around some namespaces for documentation purposes.
...
Fix problems with building on clang 2.8.
Remove unneeded function for get_engine() and fix functor<> calls that take a Boxed_Value
2011-03-15 17:35:14 -06:00
Jason Turner
9dd9ffec46
Update copyright information for 2011
2011-03-15 09:42:33 -06:00
Jason Turner
e3feb05e05
Merge branch 'master' of https://github.com/ChaiScript/ChaiScript
2011-03-14 09:12:01 -06:00
Jason Turner
4e06478fb8
Amp up the warnings used in g++ and fix associated errors
2011-03-12 11:27:53 -07:00
Jason Turner
f6b6936348
Normalize on include guard style, removing __ reserved words
2011-03-08 14:06:09 -07:00
Jason Turner
0b97fcb4df
Add better namespaces to make documentation easier to handle
2011-03-05 22:50:38 -07:00
Jason Turner
5cc4a758ab
Make scoping more explicit during initialization of alphabet
2011-02-21 19:25:22 -07:00
Jason Turner
7c2550ba74
Modify alphabet to m_alphabet to match rest of coding style
2011-02-21 19:17:36 -07:00
clanmills
65d054b36e
Three lots of changes:
...
1) Changes post code review by Jason
2) Fixing bug in end of line processing on Windows with cr-lf
3) Adding command-line options to chai
2011-02-16 08:21:19 -08:00
clanmills
894063261e
Changes to parser.
2011-02-14 10:33:40 -08:00
Jason Turner
80f576a2f3
Reflection and introspection updates for task #85
2010-12-29 17:58:56 +00:00
Jason Turner
65edf30ef0
Fix regression in parsing of empty file. Visible in windows debug mode, but probably affects all platforms.
2010-11-15 22:45:57 +00:00
Jason Turner
3aee589274
Remove unused variable
2010-11-15 00:01:33 +00:00
Jason Turner
5f661fad20
Get rid of a C++ conversion and make it a static_cast
2010-11-12 23:19:30 +00:00
Jason Turner
e75a354a04
Apply some module and parameter variable naming standards. Remove ChaiScript template where it was no longer necessary.
2010-11-06 05:20:41 +00:00
Jason Turner
36173d277d
Closing issue #99 : shared const char * memory issues. Also, clean up some file loading overhead (did not seem to have an performance impact).
2010-11-05 22:01:39 +00:00
Jason Turner
e1e48d732f
Wrap up of clean up of warnings in 64bit visual studio
2010-11-05 04:05:02 +00:00
Jason Turner
6e18aa3dcd
Further VS 64bit warning fixes.
2010-11-05 02:43:52 +00:00
Jason Turner
67bad374a9
Get mutlifile compilation working again and add a test for it
2010-10-22 21:30:58 +00:00
Jonathan Turner
5a92146d28
Fix to disallow mixing inline map and array elements
2010-10-02 23:39:17 +00:00
Jason Turner
3ab91356e5
Make inline maps const. Add test for malformed inline map that causes crash
2010-10-02 22:50:09 +00:00
Jason Turner
fa2a7045a7
Make inplace vector construction result in const temp return. Also clean up construction of vectors in code
2010-10-02 22:19:51 +00:00
Jason Turner
d8c979b204
Fix for unexpected new base class to std::pair in VS2010. All tests now pass in VS2010
2010-10-02 20:38:46 +00:00
Jason Turner
74e719c053
Add object dependency tracking to make sure that during nested function calls all returned values are not prematurely destructed.
...
All tests pass on vc2008 now.
2010-10-02 13:26:06 +00:00
Jason Turner
7b77af3736
Remove commented out code and make variable declarations/scopes consistent with the rest of the C++ codebase
2010-09-30 19:16:03 +00:00
Jason Turner
8b35434e6f
rip out a couple hundred lines of code with inheritance
2010-09-30 18:17:32 +00:00
Jason Turner
670eb0692b
Visual studio warning reduction and compile fixes for vs2010. Warning suppression on vs2005. Fixes to get cmake working with boost autolinking. Update to support boost 1.44
2010-09-30 14:33:12 +00:00
Jason Turner
a39d70dbca
Rip out caching in dispatch kit to get a more clean view of the performance world
2010-09-19 23:24:52 +00:00
Jonathan Turner
cfa42158af
Clean up reflection a bit, and how we do pretty printing of ast nodes. Registered new internal_to_string in reflection module so that we
...
can have automatic pretty printing of ast nodes during repl eval.
2010-08-30 13:37:50 +00:00
Jonathan Turner
054179ead3
Commenting out of previous node value caching scheme. This allows us to profile later, without having these smaller optimizations
...
clutter up the flow. This also allows us to pass the reflection test.
2010-08-29 21:33:11 +00:00
Jonathan Turner
8a6a46d0d3
Fix to the method/array dispatch issue
2010-08-29 19:49:57 +00:00
Jason Turner
31feab6053
Fix to parsing of single-line comments where the comment at the end of a line was merging statements separated by a single line comment
2010-08-28 22:14:09 +00:00
Jason Turner
7ef12f634d
Register AST_Node and Parser, overloaded eval for AST_Node and some const correctness fixes
2010-08-28 21:48:30 +00:00
Jonathan Turner
c6452c4bd6
Rename of Token to AST_Node to be more correct
2010-08-28 18:38:01 +00:00
Jason Turner
329244759f
Fix warnings discovered on macos
2010-08-28 17:58:02 +00:00
Jonathan Turner
c5f20ea158
A little cleanup of logical and/or since those are now separate evals.
2010-08-19 14:42:18 +00:00
Jonathan Turner
58c62f6333
More refactoring of parser to use the token children types directly instead of using a giant switch statement during build_match.
2010-08-15 02:04:35 +00:00
Jonathan Turner
7f037b26d4
Updated email addresses in copyright information.
2010-08-10 05:24:07 +00:00
Jonathan Turner
b1e357423f
Move structure to being inheritance-based in preparation for reflection infrastructure. This technique relies on the vtable's dynamic dispatch for correct evaluation, and removes the giant switch eval style of previous revisions.
2010-08-08 17:18:32 +00:00
Jonathan Turner
d838f7a6d4
Renaming of helper function char_between. Adding help to check for hitting the end of input.
2010-08-07 02:18:51 +00:00
Jonathan Turner
556e7ad916
Cleaned up the formatting a bit. Switched parser over to using charBetween, which significantly improves
...
readability of the early parsing rules.
2010-08-06 11:17:53 +00:00
Jason Turner
b971ee44ad
Make warnings stricter on windows and clean up all legit warnings in our code.
2010-07-30 18:06:17 +00:00
Jason Turner
799b3ef388
Update copyright for 2010
2010-05-15 22:48:54 +00:00
Jason Turner
7ac9ea7249
Add the ability to specify "load_module" and "use" search paths. The capability is primitive and it is currently used by chaiscript_eval to set a single path from environment variables
2010-03-18 22:53:52 +00:00
Jason Turner
faaa964565
No longer allow a local variable to be used as a function during dot notation sugar lookup. It's far less confusing this way
2010-01-27 03:54:42 +00:00
Jason Turner
3a4421a57c
Fix empty array unit test by reimplementing the node->children.size() test erroneously removed in r466
2010-01-07 01:47:04 +00:00
Jonathan Turner
e5a29ede5f
Added 0b1010 binary format. Fixed hex and octal to allow negative ints
2009-12-11 14:46:12 +00:00
Jason Turner
0c0df2c982
VS 2008 related corrections.
2009-12-08 15:57:31 +00:00
Jason Turner
4457df9ff5
Fix NO_THREADS related issues
2009-12-06 05:12:02 +00:00
Jason Turner
e601de9d18
Reduce use of Param_List_Builder by providing call_function implementations for 0,1,2 arity
2009-12-06 01:31:58 +00:00
Jason Turner
645cdddd70
Small but measurable eval performance increase (in optimized builds) by managing the number of Boxed_Values copies and assignments
2009-12-05 18:54:55 +00:00
Jonathan Turner
ac8462fb67
Fix up some broken sample files
2009-12-02 14:29:42 +00:00
Jason Turner
e2a2c14c0d
Eliminate use of size_t in stl related wrappings
2009-12-01 02:56:02 +00:00
Jonathan Turner
c418644a5b
Fix for single-line comments stopping at semicolon.
2009-11-27 22:52:55 +00:00
Jason Turner
fbf8f53e04
Add Type_Info type and add *_type objects at time of type registration.
2009-11-21 22:47:44 +00:00
Jason Turner
1c6b2725b3
Provide some hints for dispatches with lhs (first param) that is const
2009-11-21 06:02:17 +00:00
Jason Turner
95c124ca35
Support better tracking of loaded modules for saving and setting of state
2009-11-21 05:28:00 +00:00
Jason Turner
1bd73884b2
Add documentation to the set_state get_state functions
2009-11-18 05:05:40 +00:00
Jason Turner
d3e4af433e
Add support for saving/restoring of chaiscript engine state.
2009-11-18 04:43:08 +00:00
Jason Turner
cca477dae6
Only share const globals between threads. Require all globals to be const.
2009-11-11 05:47:54 +00:00
Jonathan Turner
e14931f389
Move completely over to new operators
2009-11-10 14:07:51 +00:00
Jonathan Turner
1bc968e788
Add initial unaries
2009-11-08 16:27:39 +00:00
Jason Turner
fe5a935abd
add is_undef functionality to boxed_value
2009-11-08 15:16:15 +00:00
Jonathan Turner
d946cb7e9d
Small fix to the casting of values in boolean logical statements
2009-11-07 14:50:41 +00:00
Jonathan Turner
18bfead387
Move to a better operator parser, add support for most of the C++ binary operators
2009-11-07 14:43:12 +00:00
Jason Turner
d2d752ecd4
Fix registration of module loading functions
2009-10-19 14:00:48 +00:00
Jason Turner
b1d12fdc91
Further updates to the new bound function support, plus general cleanup of how it is used
2009-10-15 15:27:16 +00:00
Jonathan Turner
9827345213
Fix Id Literals so that they are keyed off an Id search. This allows us to add operator overloading on the parse side.
2009-10-14 13:51:35 +00:00
Jason Turner
480761c1f7
Add bound_fun helper and put it to use cleaning up the engine bootstrapping
2009-10-14 02:34:09 +00:00
Jonathan Turner
12e909d9aa
Add bit shifting operators
2009-10-13 03:35:01 +00:00
Jason Turner
b1e892487f
Enhance "is_type" to be more accurate and to work with Dynamic_Object types
2009-10-13 03:31:56 +00:00
Jason Turner
720eabcb16
Impliment range find functions and add unit test for contains and find.
2009-10-13 02:05:18 +00:00
Jason Turner
1fde71f3f4
Add type generic comparison operations "eq", "gt", and "lt" and port the "contains" operation to use it
2009-10-13 00:18:59 +00:00
Jonathan Turner
90f8b77171
Added .contains() to ranges
2009-10-11 20:02:21 +00:00
Jonathan Turner
315d7521a7
Clean up warnings. Add simple blocks.
2009-10-08 03:01:19 +00:00
Jonathan Turner
ff177b5eaf
Add octal support
2009-10-06 21:17:23 +00:00
Jonathan Turner
46fd7e9a58
Add hex value parsing support
2009-10-06 16:04:05 +00:00
Jason Turner
edd274ccce
Fix some more obscure warnings
2009-10-06 02:26:47 +00:00
Jonathan Turner
a5b2ec3006
Start code cleanups by moving chaiscript common structures into their own file.
2009-09-23 05:00:14 +00:00
Jason Turner
3bdd79a3fd
Correct Windows unicode build issues.
2009-09-22 23:03:16 +00:00
Jason Turner
b04e01cda7
Ensure that __EVAL__ is in the list of loaded files and be smarter about accessing it
2009-09-22 21:06:02 +00:00
Jason Turner
bad5384c96
Fix multi-file compilation issues
2009-09-22 20:59:10 +00:00
Jason Turner
443902f787
Reduce overhead necessary for internal_eval. Desirable due to the use of "eval" during cloning operations
2009-09-22 01:58:16 +00:00
Jason Turner
9762e15460
Fix some range/retro issues and update the visual studio files
2009-09-22 01:23:02 +00:00
Jonathan Turner
03746e7606
Add keywords for NaN and Infinity
2009-09-21 16:50:30 +00:00
Jason Turner
50eace16da
Allow "Module" to contain chaiscript snippets to be executed when a module is initialized. Update dynamic_object to use the new feature to clean up some of the _prelude.hpp
2009-09-21 03:07:01 +00:00
Jason Turner
8241e46680
Further refine how clone calls are dynamically generated, to avoid accidentally matching when we should not
2009-09-20 21:49:53 +00:00
Jason Turner
160f64e9c2
Enabled short hand for adding new methods to existing C++ types
2009-09-20 21:32:39 +00:00