Parser, runner and visualiser now work with string prog names.
[jars.git] / parser.scm
index 427d398..7bc3f90 100644 (file)
@@ -17,7 +17,7 @@
           (period-irx (irregex "^\\."))
           (redcode-irx (irregex "^;redcode\n"))
           (name-start-irx (irregex "^;[ \t]*name "))
-          (name-irx (irregex "^[a-zA-Z0-9]+"))
+          (name-irx (irregex "^[^\n]*"))
           (author-start-irx (irregex "^;[ \t]*author "))
           (author-irx (irregex "^[^\n]*"))
           (comment-irx (irregex "^(;[^\n]*)?\n"))
@@ -92,7 +92,7 @@
             (instruction-line)))
       (define (name-line)
         (if (accept-token name-start-irx)
-            (cons 'name (string->symbol (accept-token name-irx #t)))
+            (cons 'name (string-trim (accept-token name-irx #t)))
             #f))
       (define (author-line)
         (if (accept-token author-start-irx)