day 18: minor cleanups
This commit is contained in:
parent
f0f426ddfc
commit
e706f6444c
4
18.rkt
4
18.rkt
|
@ -1,6 +1,6 @@
|
|||
#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
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
|||
["*" (token-*)]
|
||||
["(" (token-lp)]
|
||||
[")" (token-rp)]
|
||||
[(:+ (char-set "0123456789")) (token-number (string->number lexeme))]
|
||||
[numeric (token-number (string->number lexeme))]
|
||||
[(eof) (token-eof)]))
|
||||
|
||||
(define-simple-macro (make-oo-parser/precs needed-precs ...)
|
||||
|
|
Loading…
Reference in New Issue