#207 Allow all tokens by default

open
nobody
None
2
2012-10-10
2003-06-10
Dale King
No

This is an expansion of bug 740030 that I submitted,
that was asked to be recategorized as a feature request.

The issue was that NoWhitespaceAfterCheck did not
allow LITERAL_FOR, LITERAL_WHILE and others. After
talking with someone on another issue, I realized that
the underlying problem is the default value for the set
of allowed tokens is the set of default tokens.

I think it makes more sense for the set of allowed
tokens to be the set of all tokens. If the set of allowed
tokens needs to be restricted it still can be, but I think
it best to err on the side of giving too much freedom
than not enough, even if this means the user can crash
it with bad data. This gives the user the most flexibility.

To make restricting the set of tokens easier to specify it
might make sense to add a disallowedTokens method to
make it possible to disallow certain tokens without
having to specify all tokens. The set of allowed tokens
would then be allowedTokens minus the
disallowedTokens.

Discussion