>724401 Verzweigungen
Railroad Diagrams Branchings
- Production
.-.
|-|--->.---->( X )--->.--->|-|
| '-' ^
| .-. |
'---->( Y )----'
'-'
When passing a branching, any branch can be chosen (as long as there is no movement against an arrow direction).
We show two possible results of the above production.
- Result
X
- Result
Y
- The text set described by the diagram
X, Y
Each time a non-terminal is passed, a different text can be chosen.
- Production
B
.-.
|-|--->.---->( X )--->.--->|-|
| '-' ^
| .-. |
'---->( Y )----'
'-'C
.---. .---.
|-|--->| B |--->| B |--->|-|
'---' '---'- A possible result of the production C
XY
- The text set described by production C
XX, XY, YX, YY
Railroad diagrams are used to describe text sets in a structured manner. (A text set is a collection of different texts.)
Practice Questions
? Practice Question
- Production
.-.
|-|--->.--->( A )--->.--->|-|
| '-' ^
| .-. |
'--->( B )----'
| '-' ^
| .-. |
'--->( C )----'
'-'
Give exactly one possible result of the above production rule.
? Practice Question 1
- Production
.-.
|-|--->.--->( A )--->.--->|-|
^ '-' |
| .-. |
'----( B )<---'
'-'
Give exactly one possible result of the above production rule that includes at least two characters.
NB: There now is an arrow pointing to the left !
? Practice Question 2
- Production
.-----------.
|-|--->.--->| character |--->.--->|-|
^ '-----------' |
| |
'---------------------'
Give exactly one possible result of the above production rule that includes at least two characters.
? Practice Question 3
- Production
.-. .-.
|-|--->( " )--->.------------------->.--->( " )--->|-|
'-' ^ | '-'
| .-----------. |
'---| character |<---'
'-----------'
Give exactly one possible result of the above production rule that contains as few characters as possible.
? Practice Question 4
Give exactly one possible result of the above production rule (from practice question 3) that comprises four characters.