day 18: minor cleanups

This commit is contained in:
xenia 2020-12-18 00:43:38 -05:00
parent f0f426ddfc
commit e706f6444c
1 changed files with 2 additions and 2 deletions

4
18.rkt
View File

@ -1,6 +1,6 @@
#lang curly-fn racket #lang curly-fn racket
(require "scripts/aoc.rkt" parser-tools/lex parser-tools/yacc (prefix-in : parser-tools/lex-sre)) (require "scripts/aoc.rkt" parser-tools/lex parser-tools/yacc)
;; solution for day 18 ;; solution for day 18
@ -14,7 +14,7 @@
["*" (token-*)] ["*" (token-*)]
["(" (token-lp)] ["(" (token-lp)]
[")" (token-rp)] [")" (token-rp)]
[(:+ (char-set "0123456789")) (token-number (string->number lexeme))] [numeric (token-number (string->number lexeme))]
[(eof) (token-eof)])) [(eof) (token-eof)]))
(define-simple-macro (make-oo-parser/precs needed-precs ...) (define-simple-macro (make-oo-parser/precs needed-precs ...)