>724640 Vage Kategorien
Vague categories
Sometimes, a category is not described by a production but only by its name, for example when it would be difficult to describe the category by a production.
- A vague category
.----------------.
| Any character |
| except + and - |
'----------------'
In this course, we occasionally use the category »a character« with the meaning “one (arbitrary) character”.
- Another vague category
.-------------.
| a character |
'-------------'
Each time a non-terminal is passed, a different text can be chosen.
- A production
double character
.-------------. .-------------.
|-|--->| a character |--->| a character |--->|-|
'-------------' '-------------'- A text of the category double character
/g
Ideally, vague categories should not be used at all to provide as clear a description as possible. In practice, however, they are used to avoid productions that would otherwise be too complicated or too large.
Practice Questions
? Practice question
- Production
.-. .-------------.
|-|--->( + )--->| a character |--->|-|
'-' '-------------'
State exactly one possible result of the above production rule.
? Practice question
- Production
.-------------. .-. .-------------.
|-|--->| a character |--->( + )--->| a character |--->|-|
'-------------' '-' '-------------'
State exactly one possible result of the above production rule.