[plt-scheme] Parser Tools group-id for tokens

From: Jon Rafkind (workmin at ccs.neu.edu)
Date: Wed Nov 26 11:28:02 EST 2008

> Not bothersome at all. I just couldn't and maybe still can't see the
> point, since the usual way is to pass one token into the parser. Why
> pass a group of them?
But the tokens are the things you can use in the grammar. If you only 
passed in one token how would you match more than one of the lexemes?

Some code from a lexer
(define-tokens c-val-tokens
    (number-literal     char-literal))

And from the parser
          [(number-literal) (make-exp:const 'number $1)]
          [(char-literal) (make-exp:const 'char $1)])

Posted on the users mailing list.