This doc comment opens the question as to what it means for a name to be "legal". Maybe drop the term "legal" and just refer to names not being reserved words.