Administrator
|
For the most part it looks good, but there are terminals that aren't indicated because they aren't expressed as literals in the grammar. For instance, an identifier is a terminal. In fact, the first category, "Lexical Elements", are ALL terminals. Any stringConstant is a terminal (the entire string, not just the quotes that delimit it) and any integerConstant is a terminal.
In a truly properly expressed grammar the terminals would be nothing more than the set of characters that can appear in the source code. But that is carrying things a bit to far if the objective is to make things better match the level at which humans think. So we strike a balance and call certain collections of characters, such as identifiers, a terminal. The point being, that there is wiggle room on what gets called a terminal and what doesn't.
|