Vague categories (Vague categories), lesson, page 724641
https://www.purl.org/stefan_ram/pub/vague_categories_programming (permalink) is the canonical URI of this page.
Stefan Ram
Python Course

>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.

 

About this page, Impressum  |   Form for messages to the publisher regarding this page  |   "ram@zedat.fu-berlin.de" (without the quotation marks) is the email address of Stefan Ram.   |   A link to the start page of Stefan Ram appears at the top of this page behind the text "Stefan Ram".)  |   Copyright 1998-2020 Stefan Ram, Berlin. All rights reserved. This page is a publication by Stefan Ram. relevant keywords describing this page: Stefan Ram Berlin slrprd slrprd stefanramberlin spellched stefanram724641 stefan_ram:724641 Vague categories Stefan Ram, Berlin, and, or, near, uni, online, slrprd, slrprdqxx, slrprddoc, slrprd724641, slrprddef724641, PbclevtugFgrsnaEnz Explanation, description, info, information, note,

Copyright 1998-2020 Stefan Ram, Berlin. All rights reserved. This page is a publication by Stefan Ram.
https://www.purl.org/stefan_ram/pub/vague_categories_programming