Skip to content

Commit

Permalink
practice new grammar just added
Browse files Browse the repository at this point in the history
  • Loading branch information
Haoqiang Fan committed Jan 9, 2017
1 parent eb60238 commit d757e50
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions str.u
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
(def digitFromInt (+ '0'))

(let signedParse (\f s
(s (f s) (\h r
((= h '-') (neg (f r))
((= h '+') (f r)
(f s)
)
)
))
(s (f s) (\h r (run
(((= h '-') (neg (f r))))
(((= h '+') (f r)))
(f s)
)))
))
(let signedShow (\f s
((< s 0) (cons '-' (f (neg s))) (f s))
Expand Down

0 comments on commit d757e50

Please sign in to comment.