You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
503 B
Racket
25 lines
503 B
Racket
21 years ago
|
(module lex-plt-v200 mzscheme
|
||
17 years ago
|
(require parser-tools/lex
|
||
|
(prefix : parser-tools/lex-sre))
|
||
21 years ago
|
|
||
|
(provide epsilon
|
||
|
~
|
||
|
(rename :* *)
|
||
|
(rename :+ +)
|
||
|
(rename :? ?)
|
||
|
(rename :or :)
|
||
|
(rename :& &)
|
||
|
(rename :: @)
|
||
|
(rename :~ ^)
|
||
|
(rename :/ -))
|
||
|
|
||
|
(define-lex-trans epsilon
|
||
|
(syntax-rules ()
|
||
|
((_) "")))
|
||
|
|
||
|
(define-lex-trans ~
|
||
|
(syntax-rules ()
|
||
|
((_ re) (complement re)))))
|
||
|
|
||
|
|