X-Git-Url: https://code.consxy.com/gitweb/gitweb.cgi?p=clnl;a=blobdiff_plain;f=src%2Fmain%2Ftranspile.lisp;h=e4ca36029d46608c0e3d5b4933f89b982c723ee8;hp=db31840ddd35b7f5c4e940a0dee535a94dfaad41;hb=c34fdd7f3b9920b2feaf1dec70d2dd21ddbbadf2;hpb=d429346c4e41599eaae8de2f4baa9c1b8a81aea6 diff --git a/src/main/transpile.lisp b/src/main/transpile.lisp index db31840..e4ca360 100644 --- a/src/main/transpile.lisp +++ b/src/main/transpile.lisp @@ -1,4 +1,4 @@ -(in-package #:cl-nl.transpiler) +(in-package #:clnl-transpiler) ; This is responsible for taking an ast and turning it into valid CL code ; targeting the nvm. Here is where start to care about commands versus reporters @@ -9,6 +9,10 @@ ; or a reporter. So monitors can say "hey, transpile this reporter" and we'll check ; to make sure it actually is. +; Furthermore, the lisp code that any netlogo code would be transpiled to should +; use exported symbols, such that anyone writing NetLogo code in lisp could use +; the nvm in the same way that comes out of this transpiler + (defparameter *prims* nil) (defun prim-name (prim) (getf prim :name)) @@ -51,9 +55,9 @@ *prims*)) ; We count on the parser to handle arguemnts for us, when collating things. -(defprim :ask :command cl-nl.nvm::ask) -(defprim :crt :command cl-nl.nvm::create-turtles) -(defprim :fd :command cl-nl.nvm::fd) -(defprim :random-float :reporter cl-nl.nvm::random-float) -(defprim :show :command cl-nl.nvm::show) -(defprim :turtles :reporter cl-nl.nvm::turtles) +(defprim :ask :command clnl-nvm:ask) +(defprim :crt :command clnl-nvm:create-turtles) +(defprim :fd :command clnl-nvm:forward) +(defprim :random-float :reporter clnl-nvm:random-float) +(defprim :show :command clnl-nvm:show) +(defprim :turtles :reporter clnl-nvm:turtles)