For the record, the current syntax of "alphanumeric" identifiers is ([a-zA-Z][a-zA-Z0-9]*'*)(-[a-zA-Z][a-zA-Z0-9]*'*)*.
They consist of segments separated by a single dash - where each segment may contain ASCII alphabetic characters and — except for the first character — digits and may end with several primes '.
I now think allowing primes leads to poor naming strategies, so it's better to remove them from the syntax of identifiers.
Next, we probably should allow underscores in identifiers even if our naming convention is kebap case not snake or pascal case.
With that, the new lexical syntax should be: ([a-zA-Z_]\w*)(-[a-zA-Z]\w*)* where a single _ becomes a keyword.
For the record, the current syntax of "alphanumeric" identifiers is
([a-zA-Z][a-zA-Z0-9]*'*)(-[a-zA-Z][a-zA-Z0-9]*'*)*
. They consist of segments separated by a single dash-
where each segment may contain ASCII alphabetic characters and — except for the first character — digits and may end with several primes'
.I now think allowing primes leads to poor naming strategies, so it's better to remove them from the syntax of identifiers. Next, we probably should allow underscores in identifiers even if our naming convention is kebap case not snake or pascal case.
With that, the new lexical syntax should be:
([a-zA-Z_]\w*)(-[a-zA-Z]\w*)*
where a single_
becomes a keyword.