-
Notifications
You must be signed in to change notification settings - Fork 3
C like interpreter language utilizing a simple virtual machine
License
orgi/C-machine
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
======================================================================== C machine Project ======================================================================== (0) License ----------- Derived from boost spirit this project is licensed under the terms of the boost software license v1.0 as well: --------------------------------------------------------------------------- Boost Software License - Version 1.0 - August 17th, 2003 Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. (1) Overview ------------ C machine is a C interpreter language based on boost spirit's mini-C sample. Vision is to make the interpreter fully C99 compliant. (2) Current features: --------------------- * the int data type * basic set of operators * functions * conditionals (if) * loop (while) * internal functions for script debugging (3) Implementation status: -------------------------- Based on a version of spirit C-sample delivered with boost < v 1.46 the files were split into separated headers per class. However - due to some issue in earlier spirit versions - the current unittest won't run using anything older than boost v1.47 In addition boost unittests have been introduced -- to verify the different sub-parsers: * program * statement * expression -- to verify the state machine: * vmachine (4) HowTo build: ---------------- Sources should compile on latest gcc (4.x) as well as within MS Visual Studio compiler (VC2010+). There's some eclipse project configured for msys gcc - currently only the test-debug configuration is valid. >>> Dependencies: <<< You'll need boost library (currently tested with boost 1.49) headers & a matching boost unit testing library e.g. "boost_unit_test_framework-mgw46-mt-sd-1_49". >>> Create two enironment variables: <<< BOOST_INCLUDE should point where the boost sources got extracted - the 'boost' directory has to be a subdirectory. BOOST_LIB has to point to the library installation path - so that the libs are found in: $BOOST_LIB/lib (5) Next steps: --------------- DONE) Add parser tests for function calls DONE) Add tests for the virtual machine used to execute the script 3a) Add vmachine support for following data types (C99-based): [u]int_8, [u]int_16, [u]int_32 3b) Add parser support for following data types (C99-based): [u]int_8, [u]int_16, [u]int_32 4a) Add vmachine support for arrays 4b) Add parser support for arrays 5a) Add vmachine support for missing operators when comparing against C99 standard (e.g. '++') 5b) Add parser support for missing operators when comparing against C99 standard (e.g. '++') /////////////////////////////////////////////////////////////////////////////
About
C like interpreter language utilizing a simple virtual machine
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published