character-classes.scm 1.1 KB

123456789101112131415161718192021222324252627
  1. (define number-class
  2. '(or #\0 #\1 #\2 #\3 #\4 #\5 #\6 #\7 #\8 #\9))
  3. (define hex-class
  4. '(or #\0 #\1 #\2 #\3 #\4 #\5 #\6 #\7 #\8 #\9
  5. #\A #\B #\C #\D #\E #\F))
  6. (define alpha-class
  7. '(or #\a #\b #\c #\d #\e #\f #\g #\h #\i #\j #\k #\l #\m #\n #\o #\p #\q #\r #\s #\t #\u #\v #\w #\x #\y #\z
  8. #\A #\B #\C #\D #\E #\F #\G #\H #\I #\J #\K #\L #\M #\N #\O #\P #\Q #\R #\S #\T #\U #\V #\W #\X #\Y #\Z))
  9. (define reserved-symbol-class
  10. '(or #\' #\, #\. #\; #\` #\# #\" #\( #\)))
  11. (define symbol-class
  12. '(or #\! #\$ #\% #\& #\* #\+ #\- #\/ #\: #\< #\= #\> #\? #\@ #\[ #\\ #\] #\^ #\_ #\{ #\} #\~))
  13. (define whitespace-class
  14. '(or #\space #\newline))
  15. (define alphabet
  16. '(#\0 #\1 #\2 #\3 #\4 #\5 #\6 #\7 #\8 #\9
  17. #\a #\b #\c #\d #\e #\f #\g #\h #\i #\j #\k #\l #\m #\n #\o #\p #\q #\r #\s #\t #\u #\v #\w #\x #\y #\z
  18. #\A #\B #\C #\D #\E #\F #\G #\H #\I #\J #\K #\L #\M #\N #\O #\P #\Q #\R #\S #\T #\U #\V #\W #\X #\Y #\Z
  19. #\' #\, #\. #\; #\` #\# #\" #\( #\)
  20. #\! #\$ #\% #\& #\* #\+ #\- #\/ #\: #\< #\= #\> #\? #\@ #\[ #\\ #\] #\^ #\_ #\{ #\} #\~
  21. #\space #\newline))