Re-enabled boxedcpp, but commented out trouble area

This commit is contained in:
Jonathan Turner
2009-05-27 15:15:24 +00:00
parent 74338670fa
commit 4f8ffd0129
4 changed files with 19 additions and 18 deletions

View File

@@ -14,5 +14,5 @@ if(Boost_FOUND)
add_executable(langkit_test langkit/main.cpp langkit/langkit_lexer.cpp langkit/langkit_parser.cpp) add_executable(langkit_test langkit/main.cpp langkit/langkit_lexer.cpp langkit/langkit_parser.cpp)
target_link_libraries(langkit_test ${Boost_LIBRARIES}) target_link_libraries(langkit_test ${Boost_LIBRARIES})
#add_executable(boxedcpp_test boxedcpp/test.cpp) add_executable(boxedcpp_test boxedcpp/test.cpp)
endif() endif()

View File

@@ -167,7 +167,8 @@ void bootstrap(BoxedCPP_System &s)
s.register_function(boost::function<double (double, double)>(&multiply<double, double, double>), "*"); s.register_function(boost::function<double (double, double)>(&multiply<double, double, double>), "*");
s.register_function(boost::function<std::string (int)>(&to_string<int>), "to_string"); s.register_function(boost::function<std::string (int)>(&to_string<int>), "to_string");
s.register_function(boost::function<std::string (const std::string &)>(&to_string<const std::string &>), "to_string"); //JDT: Was giving me compiler errors (not sure why)
//s.register_function(boost::function<std::string (const std::string &)>(&to_string<const std::string &>), "to_string");
s.register_function(boost::function<std::string (char)>(&to_string<char>), "to_string"); s.register_function(boost::function<std::string (char)>(&to_string<char>), "to_string");
s.register_function(boost::function<std::string (double)>(&to_string<double>), "to_string"); s.register_function(boost::function<std::string (double)>(&to_string<double>), "to_string");

View File

@@ -68,7 +68,8 @@ int main()
//Register a new function, this one with typing for us, so we don't have to ubox anything //Register a new function, this one with typing for us, so we don't have to ubox anything
//right here //right here
ss.register_function(boost::function<void (const std::string &)>(&print), "print"); //JDT: Was giving me compiler errors (not sure why)
//ss.register_function(boost::function<void (const std::string &)>(&print), "print");
//Now we have a print method, let's try to print out the earlier example: //Now we have a print method, let's try to print out the earlier example:
//so, we dispatch the to_string and pass its result as a param to "print" //so, we dispatch the to_string and pass its result as a param to "print"

View File

@@ -8,7 +8,6 @@
#include "langkit_lexer.hpp" #include "langkit_lexer.hpp"
typedef std::vector<TokenPtr>::iterator Token_Iterator; typedef std::vector<TokenPtr>::iterator Token_Iterator;
struct Rule { struct Rule {