[plt-scheme] parser-tools negation

From: Scott A Owens (sowens at cs.utah.edu)
Date: Thu Dec 16 16:16:51 EST 2004

It turns out that this bug wasn't in complementation, but in the handling of 
lexers that can accept the empty string.  I've fixed the bug for the next 
release.

-Scott

On Thursday 16 December 2004 10:49 am, besson baptiste wrote:
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> 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/



Posted on the users mailing list.