How to define a token which is all those characters in set A, except those in sub-set B?

By David Bullock

In RFC2616 (HTTP/1.1) the definition of a ‘token’ in section ‘2.2 Basic Rules’ is given as:

token          = 1*<any CHAR except CTLs or separators>

From that section, I’ve got the following fragments, and now I want to define ‘TOKEN’:

lexer grammar AcceptEncoding;
TOKEN: /* (ASCII excluding (CTRL | SEPARATORS | SP | HT)) */
fragment ASCII: [u0000-u0127];
fragment CTRL: [u0000-u0031];
fragment SEPARATORS: [()<>@,;:\;"/[]?={|}];
fragment SP: ' ';
fragment HT: 't';

How to I approximate my hypothetical ‘excluding’ operator for the definition of TOKEN?

Source: Stack Overflow

    

Share it with your friends!

    Fatal error: Uncaught Exception: 12: REST API is deprecated for versions v2.1 and higher (12) thrown in /home/content/19/9652219/html/wp-content/plugins/seo-facebook-comments/facebook/base_facebook.php on line 1273