X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=jars.git;a=blobdiff_plain;f=parser.scm;h=7bc3f907c3ad6afb324aca1408bec44459b5062a;hp=427d398c1f384cbc1cb8d3be56a4c157b0834e9b;hb=15c7998e7f70909c46c5f66d53af4ce6c6e91c14;hpb=7526b1f66f4c7a0d460d0e267b1eb4553c0d981b diff --git a/parser.scm b/parser.scm index 427d398..7bc3f90 100644 --- a/parser.scm +++ b/parser.scm @@ -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)