Terminals (Terminals), lesson, page 724609
https://www.purl.org/stefan_ram/pub/terminals_programming (permalink) is the canonical URI of this page.
Stefan Ram
Python Course

>724399 Terminalsymbole

Railroad Diagrams Terminals

Railroad Diagrams describe the structure  of a program without also indicating its meaning.

They make it possible to judge whether a text is a program and to break a program down into individual parts.

Productions

Structure diagrams consist of productions.

A production  (also called a production rule ) consists of symbols connected by arrows.

A production
        .-.
|-|--->( A )--->|-|
'-'

Interpretation of a Production

First an (imaginary or real) blank sheet of paper is prepared.

You enter the production at the top left at the entrance »|-|« and must leave the production through the exit »|-|« at the top right.

You are not allowed  to move against  the direction of an arrow »--->« or to leave the production via the entrance.

If you move over a rounded box with a character (a terminal , also called a terminal symbol ), then you write this character on the sheet of paper (behind the last character written so far or at the top left of the sheet if no character has been written yet). For example, you write an »A« on the sheet when you move over the »( A )« symbol.

What is on the sheet after leaving the production via the exit »|-|« is what we call a result  of the production.

The text set of the above production (the character "A")
A

Practice Questions

?   Practice Question

Production
        .-.
|-|--->( A )--->|-|
'-'

What is the result of the above production?

?   Practice Question

Production
        .-.
|-|--->( B )--->|-|
'-'

What is the result of the above production?

?   Practice Question

Production
        .-.      .-.
|-|--->( B )--->( C )--->|-|
'-' '-'

What is the result of the above production?

For Linguists *

Railroad Diagrams depict context-free phrase structure grammars.

 

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 stefanram724609 stefan_ram:724609 Terminals Stefan Ram, Berlin, and, or, near, uni, online, slrprd, slrprdqxx, slrprddoc, slrprd724609, slrprddef724609, 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/terminals_programming