cue: allow # and disallow #0 as identifiers

At a later point, we will probably rewrite `#: "x": y` to `#("x"): y`. This
change will make that easier. At that time, we may prohibit # again.

We also disallow #<num> for now. We may want to assign special meaning to that later, so we will reserve them for now.

See https://github.com/cuelang/cue/discussions/388

Change-Id: I9095df572db1da34525267b06c7ed0b021de1ca9
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/6101
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/doc/ref/spec.md b/doc/ref/spec.md
index 122b133..851714e 100644
--- a/doc/ref/spec.md
+++ b/doc/ref/spec.md
@@ -179,8 +179,9 @@
 Identifiers name entities such as fields and aliases.
 An identifier is a sequence of one or more letters (which includes `_` and `$`)
 and digits, optionally preceded by `#` or `_#`.
-It may not be `_`, `$`, `#`, or `_#`.
-The first character in an identifier must be a letter or `#`.
+It may not be `_` or `$`.
+The first character in an identifier, or after an `#` if it contains one,
+must be a letter.
 Identifiers starting with a `#` or `_` are reserved for definitions and hidden
 fields.