Skip to content

Commit

Permalink
dogfood ...
Browse files Browse the repository at this point in the history
  • Loading branch information
rain-1 committed Aug 31, 2018
1 parent ee6cf86 commit f7fc668
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion peg-src/s-exp.peg
Expand Up @@ -47,7 +47,7 @@ syntax-unquote <- '#,' _ s:s-exp -> (list 'unsyntax s);

boolean <- x:'#t' / x:'#f' -> (equal? "#t" x);
identifier <- s:[^. \t\n()\[\]{}",'`;#|\\]+ -> (string->symbol s);
dotdotdot <- '...' -> (string->symbol "...");
dotdotdot <- '...' -> '...;
keyword <- '#:' s:identifier -> (symbol->keyword s);
number <- floating-point;
string <- ["] s:([^"\\] / ~[\\] .)* ["] -> s;
Expand Down
2 changes: 1 addition & 1 deletion s-exp.rkt
Expand Up @@ -16,7 +16,7 @@
(define-peg syntax-unquote (and "#," _ (name s s-exp)) (list 'unsyntax s))
(define-peg boolean (or (name x "#t") (name x "#f")) (equal? "#t" x))
(define-peg identifier (name s (+ (and (! (or #\. #\space #\tab #\newline #\( #\) #\[ #\] #\{ #\} #\" #\, #\' #\` #\; #\# #\| #\\)) (any-char)))) (string->symbol s))
(define-peg dotdotdot "..." (string->symbol "..."))
(define-peg dotdotdot "..." '...)
(define-peg keyword (and "#:" (name s identifier)) (symbol->keyword s))
(define-peg number floating-point)
(define-peg string (and #\" (name s (* (or (and (! (or #\" #\\)) (any-char)) (and (drop #\\) (any-char))))) #\") s)
Expand Down

0 comments on commit f7fc668

Please sign in to comment.