[plt-scheme] parser-tools negation
Hello everyone,
I've got a problem with the negation in DrScheme
Parser-tools collection. In the drscheme 208 doc they
say
(~ re) matches any string that the
sub-expression does not match
for instance:
(~ "1") matches all strings except the string "1".
This includes "11", "111", "0", "01", "" and
so on.
but when I try it
(define-lex-abbrevs
....
[string (~ "1")]
...
(define get-lexeme
(lexer
....
[string (token-STRING (string->symbol lexeme))]
...))
After running I get all the lexemes even the "1"
alone.
-> #(struct:token string 1 1 11 11111 0 111110 0 101
how can I do for matching anything but the string I
put
in re?
Thanks.
Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails !
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/