Determining the kinds of words and punctuation to provide in your language
Programming languages have several different categories of words and punctuation. In natural language, words are categorized into parts of speech – nouns, verbs, adjectives, and so on. The categories that correspond to the parts of speech that you will have to invent for a programming language can be constructed by doing the following:
- Defining a set of reserved words or keywords
- Specifying characters in identifiers that name variables, functions, and constants
- Creating a format for literal constant values for built-in data types
- Defining single and multi-letter operators and punctuation marks
You should write down precise descriptions of each of these categories as part of your language design document. In some cases, you might just make lists of particular words or punctuation to use, but in other cases, you will need patterns or some other way to convey what is...