Add CL style
[clnl] / src / main / parse.lisp
index a88d833c493f3b2b1ca6148843238852f953874e..70e141d249e30fd398908497436e136c8d53be41 100644 (file)
@@ -1,4 +1,4 @@
-(in-package #:cl-nl.parser)
+(in-package #:clnl-parser)
 
 ; Ok, after thinking about this a little, the parser is completely contextual
 ; based on what has come before.  We can't do a contextless parsing, like we
@@ -45,7 +45,7 @@
       (prim-name prim)
       (mapcar
        #'help-arg
-       (prim-args prim) 
+       (prim-args prim)
        (butlast parsed-remainder (- (length parsed-remainder) num-args))))
      (nthcdr num-args parsed-remainder))))
   (t (error "Couldn't parse ~S" lexed-ast))))
@@ -54,8 +54,8 @@
  (case arg-type
   (:command-block
    (if (not (and (consp arg) (eql 'block (car arg))))
-       (error "Required a block, but found a ~A" arg)
-       (cons :command-block (cdr arg))))
+    (error "Required a block, but found a ~A" arg)
+    (cons :command-block (cdr arg))))
   (t arg)))
 
 (defun parse-block (tokens)
 ; This list of prims will get combined with the mapping to actual code later
 ; Current list of argument types we accept:
 ; - :number
+; - :agentset
+; - :command-block
 ; - t - any type
 (defprim :ask (:agentset :command-block))
 (defprim :crt (:number))
 (defprim :fd (:number))
+(defprim :random-float (:number))
 (defprim :show (t))
 (defprim :turtles ())