[Avida-SVN] r2458 - in development: Avida.xcodeproj source/script source/targets/avida-s

brysonda at myxo.css.msu.edu brysonda at myxo.css.msu.edu
Sun Mar 16 21:08:02 PDT 2008


Author: brysonda
Date: 2008-03-17 00:08:02 -0400 (Mon, 17 Mar 2008)
New Revision: 2458

Added:
   development/source/script/ASCoreLib.cc
   development/source/script/ASCoreLib.h
   development/source/script/cASFunction.h
Modified:
   development/Avida.xcodeproj/project.pbxproj
   development/source/script/AvidaScript.h
   development/source/script/cASLibrary.cc
   development/source/script/cASLibrary.h
   development/source/script/cParser.cc
   development/source/targets/avida-s/main.cc
Log:
AS:
Groundwork for AS exposed C++ functions.

Modified: development/Avida.xcodeproj/project.pbxproj
===================================================================
--- development/Avida.xcodeproj/project.pbxproj	2008-03-14 17:16:18 UTC (rev 2457)
+++ development/Avida.xcodeproj/project.pbxproj	2008-03-17 04:08:02 UTC (rev 2458)
@@ -191,6 +191,7 @@
 		7073972E0D725B9F003855D3 /* cSemanticASTVisitor.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7073972C0D725B9D003855D3 /* cSemanticASTVisitor.cc */; };
 		7076FEB00D347FD000556CAF /* cAnalyzeTreeStats_CumulativeStemminess.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7076FEAE0D347FD000556CAF /* cAnalyzeTreeStats_CumulativeStemminess.cc */; };
 		7076FEB10D347FD000556CAF /* cAnalyzeTreeStats_Gamma.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7076FEAF0D347FD000556CAF /* cAnalyzeTreeStats_Gamma.cc */; };
+		70A33CF60D8DCBB4008EF976 /* ASCoreLib.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70A33CF50D8DCBB4008EF976 /* ASCoreLib.cc */; };
 		70A778390D69D5CA00735F1E /* cDemeProbSchedule.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70A778370D69D5C200735F1E /* cDemeProbSchedule.cc */; };
 		70AA941A09D486CA006A24C8 /* system-alloc.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70DCF50209CFB0B400924128 /* system-alloc.cc */; };
 		70AA941B09D486CB006A24C8 /* tcmalloc-logging.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70DCF57F09CFBD3D00924128 /* tcmalloc-logging.cc */; };
@@ -583,6 +584,9 @@
 		709D924A0A5D94FD00D6A163 /* cMutationalNeighborhoodResults.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cMutationalNeighborhoodResults.h; sourceTree = "<group>"; };
 		709D924B0A5D950D00D6A163 /* cMutationalNeighborhood.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cMutationalNeighborhood.cc; sourceTree = "<group>"; };
 		70A33CC00D878407008EF976 /* as_overview.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html.documentation; path = as_overview.html; sourceTree = "<group>"; };
+		70A33CE80D8DBD1E008EF976 /* cASFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cASFunction.h; sourceTree = "<group>"; };
+		70A33CF40D8DCBB4008EF976 /* ASCoreLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASCoreLib.h; sourceTree = "<group>"; };
+		70A33CF50D8DCBB4008EF976 /* ASCoreLib.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASCoreLib.cc; sourceTree = "<group>"; };
 		70A778370D69D5C200735F1E /* cDemeProbSchedule.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cDemeProbSchedule.cc; sourceTree = "<group>"; };
 		70A778380D69D5C200735F1E /* cDemeProbSchedule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cDemeProbSchedule.h; sourceTree = "<group>"; };
 		70AA941909D486AE006A24C8 /* libtcmalloc.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libtcmalloc.a; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -1233,6 +1237,9 @@
 				7050E6770D74C36F008B3CA0 /* AvidaScript.cc */,
 				7050E7D50D7DC96E008B3CA0 /* cDirectInterpretASTVisitor.h */,
 				7050E7D60D7DC96E008B3CA0 /* cDirectInterpretASTVisitor.cc */,
+				70A33CE80D8DBD1E008EF976 /* cASFunction.h */,
+				70A33CF40D8DCBB4008EF976 /* ASCoreLib.h */,
+				70A33CF50D8DCBB4008EF976 /* ASCoreLib.cc */,
 			);
 			path = script;
 			sourceTree = "<group>";
@@ -2043,6 +2050,7 @@
 				7050E6780D74C36F008B3CA0 /* AvidaScript.cc in Sources */,
 				7050E69F0D74CFED008B3CA0 /* cDumpASTVisitor.cc in Sources */,
 				7050E7D70D7DC979008B3CA0 /* cDirectInterpretASTVisitor.cc in Sources */,
+				70A33CF60D8DCBB4008EF976 /* ASCoreLib.cc in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};

Added: development/source/script/ASCoreLib.cc
===================================================================
--- development/source/script/ASCoreLib.cc	                        (rev 0)
+++ development/source/script/ASCoreLib.cc	2008-03-17 04:08:02 UTC (rev 2458)
@@ -0,0 +1,43 @@
+/*
+ *  ASCoreLib.cc
+ *  Avida
+ *
+ *  Created by David on 3/16/08.
+ *  Copyright 2008 Michigan State University. All rights reserved.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; version 2
+ *  of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ */
+
+#include "ASCoreLib.h"
+
+#include "cASLibrary.h"
+
+#include <iostream>
+
+
+namespace ASCoreLib {
+  void print(const cString& value)
+  {
+    std::cout << value << std::endl;
+  }
+};
+
+
+void RegisterASCoreLib(cASLibrary* lib)
+{
+  lib->RegisterFunction(new tASFunction<void (const cString&)>(&ASCoreLib::print, "print"));
+}

Added: development/source/script/ASCoreLib.h
===================================================================
--- development/source/script/ASCoreLib.h	                        (rev 0)
+++ development/source/script/ASCoreLib.h	2008-03-17 04:08:02 UTC (rev 2458)
@@ -0,0 +1,33 @@
+/*
+ *  ASCoreLib.h
+ *  Avida
+ *
+ *  Created by David on 3/16/08.
+ *  Copyright 2008 Michigan State University. All rights reserved.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; version 2
+ *  of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ */
+
+#ifndef ASCoreLib_h
+#define ASCoreLib_h
+
+class cASLibrary;
+
+void RegisterASCoreLib(cASLibrary* lib);
+
+#endif
+

Modified: development/source/script/AvidaScript.h
===================================================================
--- development/source/script/AvidaScript.h	2008-03-14 17:16:18 UTC (rev 2457)
+++ development/source/script/AvidaScript.h	2008-03-17 04:08:02 UTC (rev 2458)
@@ -206,6 +206,7 @@
   ASType_t type;
   cString info;
   
+  sASTypeInfo() : type(AS_TYPE_INVALID) { ; }
   sASTypeInfo(ASType_t in_type) : type(in_type) { ; }
   
   bool operator==(const sASTypeInfo& ot) const { return (type == ot.type && info == ot.info); }
@@ -217,6 +218,14 @@
   const char* mapBuiltIn(ASBuiltIn_t builtin);  
   const char* mapToken(ASToken_t token);
   const char* mapType(const sASTypeInfo& type);
+  
+  template<typename T> inline sASTypeInfo TypeOf() { return sASTypeInfo(AS_TYPE_INVALID); }
+  template<> inline sASTypeInfo TypeOf<bool>() { return sASTypeInfo(AS_TYPE_BOOL); }
+  template<> inline sASTypeInfo TypeOf<char>() { return sASTypeInfo(AS_TYPE_CHAR); }
+  template<> inline sASTypeInfo TypeOf<int>() { return sASTypeInfo(AS_TYPE_INT); }
+  template<> inline sASTypeInfo TypeOf<double>() { return sASTypeInfo(AS_TYPE_FLOAT); }
+  template<> inline sASTypeInfo TypeOf<const cString&>() { return sASTypeInfo(AS_TYPE_STRING); }
+  template<> inline sASTypeInfo TypeOf<void>() { return sASTypeInfo(AS_TYPE_VOID); }
 };
 
 #endif

Added: development/source/script/cASFunction.h
===================================================================
--- development/source/script/cASFunction.h	                        (rev 0)
+++ development/source/script/cASFunction.h	2008-03-17 04:08:02 UTC (rev 2458)
@@ -0,0 +1,144 @@
+/*
+ *  cASFunction.h
+ *  Avida
+ *
+ *  Created by David on 3/16/08.
+ *  Copyright 2008 Michigan State University. All rights reserved.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; version 2
+ *  of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ */
+
+#ifndef cASFunction_h
+#define cASFunction_h
+
+#include "AvidaScript.h"
+#include "cString.h"
+
+
+class cASFunction
+{
+public:
+  class cParameter
+  {
+  private:
+    union {
+      bool m_bool;
+      char m_char;
+      int m_int;
+      double m_float;
+      const cString* m_string;
+    };
+    
+  public:
+    cParameter() { ; }
+    
+    void Set(bool val) { m_bool = val; }
+    void Set(char val) { m_char = val; }
+    void Set(int val) { m_int = val; }
+    void Set(double val) { m_float = val; }
+    void Set(cString* val) { m_string = val; }
+    
+    bool Get(bool) const { return m_bool; }
+    char Get(char) const { return m_char; }
+    int Get(int) const { return m_int; }
+    double Get(double) const { return m_float; }
+    const cString& Get(const cString&) const { return *m_string; }
+  };
+  
+  
+protected:
+  cString m_name;
+  sASTypeInfo m_rtype;
+  cParameter m_rvalue;
+  
+  
+public:
+  cASFunction(const cString& name) : m_name(name) { ; }
+  virtual ~cASFunction() { ; }
+  
+  const cString& GetName() const { return m_name; }
+
+  virtual int GetArity() = 0;
+  const sASTypeInfo& GetReturnType() const { return m_rtype; }
+  virtual const sASTypeInfo& GetArgumentType(int arg) const = 0;
+  
+  virtual void Call(cParameter args[]) = 0;
+  const cParameter& GetReturnValue() const { return m_rvalue; }
+};
+
+
+template<typename FunctionType> class tASFunction;
+
+
+template<typename ReturnType, typename Arg1Type> 
+class tASFunction<ReturnType (Arg1Type)> : public cASFunction
+{
+private:
+  typedef ReturnType (*TrgtFunType)(Arg1Type);
+
+  sASTypeInfo m_signature;
+  TrgtFunType m_func;
+  
+  
+public:
+  tASFunction(TrgtFunType func, const cString& name) : cASFunction(name), m_func(func)
+  {
+    m_rtype = AvidaScript::TypeOf<ReturnType>();
+    m_signature = AvidaScript::TypeOf<Arg1Type>();
+  }
+  
+  int GetArity() { return 1; }
+  const sASTypeInfo& GetArgumentType(int arg) const { return m_signature; }
+  
+  void Call(cParameter args[])
+  {
+    void* x = NULL;
+    m_rvalue.Set((*m_func)(args[0].Get((Arg1Type)x)));
+  }
+};
+                  
+                  
+template<typename Arg1Type> 
+class tASFunction<void (Arg1Type)> : public cASFunction
+{
+private:
+  typedef void (*TrgtFunType)(Arg1Type);
+  
+  sASTypeInfo m_signature;
+  TrgtFunType m_func;
+  
+  
+public:
+  tASFunction(TrgtFunType func, const cString& name) : cASFunction(name), m_func(func)
+  {
+    m_rtype = AvidaScript::TypeOf<void>();
+    m_signature = AvidaScript::TypeOf<Arg1Type>();
+  }
+  
+  int GetArity() { return 1; }
+  const sASTypeInfo& GetArgumentType(int arg) const { return m_signature; }
+  
+  void Call(cParameter args[])
+  {
+    void* x = NULL;
+    (*m_func)(args[0].Get((Arg1Type)x));
+  }
+};
+
+
+
+#endif

Modified: development/source/script/cASLibrary.cc
===================================================================
--- development/source/script/cASLibrary.cc	2008-03-14 17:16:18 UTC (rev 2457)
+++ development/source/script/cASLibrary.cc	2008-03-17 04:08:02 UTC (rev 2458)
@@ -24,3 +24,24 @@
 
 #include "cASLibrary.h"
 
+
+cASLibrary::~cASLibrary()
+{
+  for (int i = 0; i < m_obj_tbl.GetSize(); i++) delete m_obj_tbl[i];
+  
+  // @TODO - cleanup function objects
+}
+
+
+bool cASLibrary::RegisterFunction(cASFunction* func)
+{
+  cASFunction* old_func = NULL;
+  bool found = m_fun_dict.Find(func->GetName(), old_func);
+  
+  if (found) {
+    return false;
+  } else {
+    m_fun_dict.Add(func->GetName(), func);
+    return true;
+  }
+}

Modified: development/source/script/cASLibrary.h
===================================================================
--- development/source/script/cASLibrary.h	2008-03-14 17:16:18 UTC (rev 2457)
+++ development/source/script/cASLibrary.h	2008-03-17 04:08:02 UTC (rev 2458)
@@ -3,7 +3,7 @@
  *  Avida
  *
  *  Created by David on 1/16/06.
- *  Copyright 1999-2008 Michigan State University. All rights reserved.
+ *  Copyright 2006-2008 Michigan State University. All rights reserved.
  *
  *
  *  This program is free software; you can redistribute it and/or
@@ -25,16 +25,47 @@
 #ifndef cASLibrary_h
 #define cASLibrary_h
 
+#include "cASFunction.h"
 #include "tDictionary.h"
 
 
 class cASLibrary
 {
 private:
-//  tDictionary<cASSymbol> m_symtbl;
+  // --------  Internal Type Declarations  --------
+  struct sObjectEntry;
+  
 
+  // --------  Internal Variables  --------
+  tArray<sObjectEntry*> m_obj_tbl;
+  tDictionary<int> m_obj_dict;
+  tDictionary<cASFunction*> m_fun_dict;
+
+  
+  // --------  Private Constructors  --------
+  cASLibrary(const cASLibrary&); // @not_implemented
+  cASLibrary& operator=(const cASLibrary&); // @not_implemented
+  
+  
 public:
   cASLibrary() { ; }
+  ~cASLibrary();
+
+  bool LookupObject(const cString& obj_name, int& obj_id);
+  bool LookupFunction(const cString& name, cASFunction*& func);
+
+  bool RegisterFunction(cASFunction* func);
+  
+  
+private:
+  // --------  Internal Type Definitions  --------
+  struct sObjectEntry
+  {
+    cString name;
+    
+    sObjectEntry(const cString& in_name) : name(in_name) { ; }
+  };
+  
 };
 
 #endif

Modified: development/source/script/cParser.cc
===================================================================
--- development/source/script/cParser.cc	2008-03-14 17:16:18 UTC (rev 2457)
+++ development/source/script/cParser.cc	2008-03-17 04:08:02 UTC (rev 2458)
@@ -669,23 +669,26 @@
 {
   PARSE_TRACE("parseForeachStatement");
   
-  ASType_t type = AS_TYPE_INVALID;
+  sASTypeInfo type(AS_TYPE_INVALID);
   switch (nextToken()) {
-    case TOKEN(TYPE_ARRAY):  type = AS_TYPE_ARRAY;  break;
-    case TOKEN(TYPE_BOOL):   type = AS_TYPE_BOOL;   break;
-    case TOKEN(TYPE_CHAR):   type = AS_TYPE_CHAR;   break;
-    case TOKEN(TYPE_FLOAT):  type = AS_TYPE_FLOAT;  break;
-    case TOKEN(TYPE_INT):    type = AS_TYPE_INT;    break;
-    case TOKEN(TYPE_MATRIX): type = AS_TYPE_MATRIX; break;
-    case TOKEN(TYPE_STRING): type = AS_TYPE_STRING; break;
-    case TOKEN(TYPE_VOID):   type = AS_TYPE_VOID;   break;
+    case TOKEN(TYPE_ARRAY):  type.type = AS_TYPE_ARRAY;  break;
+    case TOKEN(TYPE_BOOL):   type.type = AS_TYPE_BOOL;   break;
+    case TOKEN(TYPE_CHAR):   type.type = AS_TYPE_CHAR;   break;
+    case TOKEN(TYPE_FLOAT):  type.type = AS_TYPE_FLOAT;  break;
+    case TOKEN(TYPE_INT):    type.type = AS_TYPE_INT;    break;
+    case TOKEN(TYPE_MATRIX): type.type = AS_TYPE_MATRIX; break;
+    case TOKEN(TYPE_STRING): type.type = AS_TYPE_STRING; break;
+    case TOKEN(TYPE_VOID):   type.type = AS_TYPE_VOID;   break;
     case TOKEN(ID):
       if (peekToken() != TOKEN(REF)) {
         nextToken();
         PARSE_UNEXPECT();
-        return NULL;
       }
-      type = AS_TYPE_OBJECT_REF;
+      
+      type.type = AS_TYPE_OBJECT_REF;
+      type.info = currentText();
+      
+      nextToken(); // consume id
       break;
       
     default:
@@ -734,19 +737,26 @@
 {
   PARSE_TRACE("parseFunctionHeader");
   
-  ASType_t type = AS_TYPE_INVALID;
+  sASTypeInfo type(AS_TYPE_INVALID);
   switch (nextToken()) {
-    case TOKEN(TYPE_ARRAY):  type = AS_TYPE_ARRAY;  break;
-    case TOKEN(TYPE_BOOL):   type = AS_TYPE_BOOL;   break;
-    case TOKEN(TYPE_CHAR):   type = AS_TYPE_CHAR;   break;
-    case TOKEN(TYPE_FLOAT):  type = AS_TYPE_FLOAT;  break;
-    case TOKEN(TYPE_INT):    type = AS_TYPE_INT;    break;
-    case TOKEN(TYPE_MATRIX): type = AS_TYPE_MATRIX; break;
-    case TOKEN(TYPE_STRING): type = AS_TYPE_STRING; break;
-    case TOKEN(TYPE_VOID):   type = AS_TYPE_VOID;   break;
+    case TOKEN(TYPE_ARRAY):  type.type = AS_TYPE_ARRAY;  break;
+    case TOKEN(TYPE_BOOL):   type.type = AS_TYPE_BOOL;   break;
+    case TOKEN(TYPE_CHAR):   type.type = AS_TYPE_CHAR;   break;
+    case TOKEN(TYPE_FLOAT):  type.type = AS_TYPE_FLOAT;  break;
+    case TOKEN(TYPE_INT):    type.type = AS_TYPE_INT;    break;
+    case TOKEN(TYPE_MATRIX): type.type = AS_TYPE_MATRIX; break;
+    case TOKEN(TYPE_STRING): type.type = AS_TYPE_STRING; break;
+    case TOKEN(TYPE_VOID):   type.type = AS_TYPE_VOID;   break;
     case TOKEN(ID):
-      if (nextToken() != TOKEN(REF)) PARSE_UNEXPECT();
-      type = AS_TYPE_OBJECT_REF;
+      if (peekToken() != TOKEN(REF)) {
+        nextToken();
+        PARSE_UNEXPECT();
+      }
+      
+      type.type = AS_TYPE_OBJECT_REF;
+      type.info = currentText();
+      
+      nextToken(); // consume id
       break;
       
     default:
@@ -974,19 +984,25 @@
 {
   PARSE_TRACE("parseVariableDefinition");
   
-  ASType_t vtype = AS_TYPE_INVALID;
+  sASTypeInfo vtype(AS_TYPE_INVALID);
   switch (currentToken()) {
-    case TOKEN(TYPE_ARRAY):  vtype = AS_TYPE_ARRAY;  break;
-    case TOKEN(TYPE_BOOL):   vtype = AS_TYPE_BOOL;   break;
-    case TOKEN(TYPE_CHAR):   vtype = AS_TYPE_CHAR;   break;
-    case TOKEN(TYPE_FLOAT):  vtype = AS_TYPE_FLOAT;  break;
-    case TOKEN(TYPE_INT):    vtype = AS_TYPE_INT;    break;
-    case TOKEN(TYPE_MATRIX): vtype = AS_TYPE_MATRIX; break;
-    case TOKEN(TYPE_STRING): vtype = AS_TYPE_STRING; break;
+    case TOKEN(TYPE_ARRAY):  vtype.type = AS_TYPE_ARRAY;  break;
+    case TOKEN(TYPE_BOOL):   vtype.type = AS_TYPE_BOOL;   break;
+    case TOKEN(TYPE_CHAR):   vtype.type = AS_TYPE_CHAR;   break;
+    case TOKEN(TYPE_FLOAT):  vtype.type = AS_TYPE_FLOAT;  break;
+    case TOKEN(TYPE_INT):    vtype.type = AS_TYPE_INT;    break;
+    case TOKEN(TYPE_MATRIX): vtype.type = AS_TYPE_MATRIX; break;
+    case TOKEN(TYPE_STRING): vtype.type = AS_TYPE_STRING; break;
     case TOKEN(ID):
-      if (nextToken() != TOKEN(REF)) PARSE_UNEXPECT();
-
-      vtype = AS_TYPE_OBJECT_REF;
+      if (peekToken() != TOKEN(REF)) {
+        nextToken();
+        PARSE_UNEXPECT();
+      }
+      
+      vtype.type = AS_TYPE_OBJECT_REF;
+      vtype.info = currentText();
+      
+      nextToken(); // consume id
       break;
       
     default:

Modified: development/source/targets/avida-s/main.cc
===================================================================
--- development/source/targets/avida-s/main.cc	2008-03-14 17:16:18 UTC (rev 2457)
+++ development/source/targets/avida-s/main.cc	2008-03-17 04:08:02 UTC (rev 2458)
@@ -25,6 +25,8 @@
 #include "avida.h"
 #include "PlatformExpert.h"
 
+#include "ASCoreLib.h"
+
 #include "cASLibrary.h"
 #include "cDirectInterpretASTVisitor.h"
 #include "cDumpASTVisitor.h"
@@ -40,7 +42,9 @@
 {
   PlatformExpert::Initialize();
 
-  cASLibrary* lib = new cASLibrary;
+  cASLibrary* lib = new cASLibrary;  
+  RegisterASCoreLib(lib);
+  
   cParser* parser = new cParser;
   
   cFile file;




More information about the Avida-cvs mailing list