If you need to case-insensitive keywords (reserved identifiers),
you can do something like:
; Reserved keywords in Pacal ignore case.
; Thus the "PrOgRaM" and "program" are
; the same keyword. Since the lexer has
; no builtin support for matching mixed case
; strings, we define our own lexer
; transformation, mixed, that turns
; (mixed "foo") into
; (concatenation
; (union #\f #\F) (union #\o #\o) (union #\o #\o))
; Remember to use string-downcase on the
; resulting lexeme.
(require (for-syntax syntax/parse))
(define-lex-trans mixed
(λ (stx)
(syntax-parse stx
[(_ datum)
(define str (string-downcase (syntax->datum #'datum)))
(define STR (string-upcase str))
#`(concatenation
#,@(for/list ([c (in-string str)]
[C (in-string STR)])
#`(union #,c #,C)))])))
; The following lexer transformation turns
; (union-mixed "foo" "bar") into
; (union (mixed "foo") (mixed "bar"))
(define-lex-trans union-mixed
(λ (stx)
(syntax-parse stx
[(_ str ...)
#`(union (mixed str) ...)])))