The build instructions language: the steps, their sentences, and how to write them
v0.72.146.291

Table of Contents

List of Listings

List of Tables

List of Figures

  • Figure 1 The board of the example document, as pprender draws it

1. Purpose of this document

The build instructions are the numbered text that tells a person which part goes into which hole of a breadboard, and which wire joins which two holes. They are written from a schematic by ppbuild_instructions(1) and read back by ppparse_instructions(1) and ppresolve_components(1). This document is the definition of the language they are written in: what a document of instructions consists of, the kinds of step, the exact sentence of each kind at the two levels of wording (for an adult and for a child), and what the tools read.

It is written for three readers:

  1. A builder who wants to know what a step means, and why it is worded as it is.
  2. A person who writes or edits instructions by hand, for a circuit that has no schematic yet or because the instructions came from somewhere else. Instructions shared in the DIY communities are usually a picture with loose sentences ("put the resistor between row 5 and row 10"); this language is the strict form of the same actions: every step names its holes, and its sentence is fixed, so that a tool can read it back and say which line it cannot.
  3. A developer who adds a kind of step, a level of wording or a language. The generator keeps the words apart from the logic for that purpose (see 8).

The sentences quoted here are not typed from memory: a check of the test suite (check_instructions_language_is_defined) builds a step of each kind with the generator and compares its sentences with the listings below, reads the adult sentences back with the parser, and fails when the generator knows a kind of step that this document does not define. If the document and the code ever disagree, the code is right and the check says so. The terms are those of the Glossary.

2. What the language is

The language is controlled English: each kind of step has one sentence, and only the names in it change from circuit to circuit (holes, references, values, nets, colours). Three decisions shape it.

  1. A step names holes, never positions in a drawing. "Hole c5" means the same thing on every breadboard of the same geometry, so a builder never has to read the schematic or count columns from a picture.
  2. One step, one action. Placing a part, joining two holes and joining two rails are separate steps, numbered in the order they are to be done.
  3. Two levels of wording, the same steps. The default level is for an adult. With --child-level the same steps, in the same order, with the same holes and the same wire colours, are written in shorter sentences for a child of about seven. The level changes the sentences, not the circuit.

The adult level is the one the tools read back. The child level is written only: the parser does not read it (by decision, recorded in ResearchJournal.org: the child level is a format that the tools write, and no step grammar will read it).

3. The breadboard the steps assume

A step is only as exact as the board it refers to. The vocabulary is the Glossary's: a hole is named by its row letter and its column number; a half is one side of the trench; a sector is a trench with a half above and a half below it; a rail is a long power strip. Table 1 shows how a hole is written.

Table 1: How a hole is written
Written Means
a5 row a, column 5; on the default board row a is the first row above the trench
f8 row f, column 8; on the default board row f is the first row below the trench
a5 (sector 2) row a, column 5 of the second sector of the board (a hole of the first sector says nothing)
[board 2] not a hole: the prefix of a step that sits on the second of several boards

The default board has one sector, five rows in each half (rows a to e above the trench, f to j below) and 63 columns. A board that is not the default says so in one line before the steps (see Listing 1 and Listing 9), and a hole letter that cannot exist on the default board is refused by the reader rather than read onto the wrong strip.

The rails are called by where they lie. The north rail is the one above the first sector, the south rail the one below the last, a middle rail the one shared by two sectors (numbered, as middle 2, when a board has several), and a left or right rail one that runs down the side of the board.

4. The shape of a document

A document of instructions is plain text, in one of four formats (the --format option of the generator: plain, markdown, orgmode and html). The tools read the first three; html is written for a browser only. A fifth text, the algebraic notation, is a second language and not a format of the English (7). Listing 1 is a complete document in the plain format, made by the generator for a small circuit: an NE555 timer, a 10k resistor between its pins 7 and 8 and a 9 V battery.

Build instructions: timer.kicad_sch
===================================

Parts that do not plug straight into a breadboard: U1 (no footprint on
  file: check that it plugs in).

1. Place the NE555 (NE555P, ref U1) straddling the trench, with its
   leftmost pin in hole a5. Its pins, from the left: 1 in a5, 7 in a6,
   8 in f7. It also connects to the power (+) and ground (-) rails.
   Its pins on the power (+) rail: 8. Its pins on the ground (-) rail:
   1. No footprint is on file for it: check that it can be plugged
   into a breadboard.
   [https://www.google.com/search?q=NE555P%20datasheet]
2. Insert the 10k resistor (R1): one lead into hole b6 (also
   connecting to U1's own pin 7), the other into hole e7.
   [https://en.wikipedia.org/wiki/Resistor]
3. Connect a red jumper wire from hole b7 to hole g7 (net VCC).
4. Connect the 9V battery (BT1) directly to the north rail. Its pins
   on the power (+) rail: 1. Its pins on the ground (-) rail: 2.
   [https://www.google.com/search?q=Battery_Cell%20datasheet]
5. Connect a red jumper wire from the north rail to the south rail.

The parts of a document, in order:

  • A title, optional: a line underlined with = in the plain format, a heading in the others. The reader skips it.
  • Notes, optional, in the first lines. The board note states a board that is not the default; the reader takes the geometry from it. The parts note lists the parts that do not plug straight into a breadboard (surface-mount, off the 0.1 inch grid, two rows of pins one hole apart, no footprint on file), and the pin holes note explains that the holes listed for a part's pins follow the diagram. The reader drops these two.
  • Steps, numbered from 1, one per action. A step may be wrapped on several lines, the continuation indented; the reader joins them. A step may end with a link in brackets, to a description of the part, which the reader keeps: steps 1, 2 and 4 of Listing 1 end with one (a search for the datasheet of a part that has no article of its own, the article of the encyclopaedia for a common part such as a resistor); steps 3 and 5 are wires and have none.

Listing 1 has the parts note only: it names U1, which has no footprint on file, as a part that does not plug straight into a breadboard. The board note is absent because the board is the default one (Listing 9 shows the line of a circuit on several boards), and so is the pin holes note, which the generator writes for a part that plugs in and has its pins listed. Figure 1 is the board that the steps build, as pprender(1) draws it from the same circuit.

A breadboard with the NE555, U1, straddling the trench and a 10k resistor, R1, above it, joined to the chip's pin 8 by a red wire; the legend names R1 and U1.

Figure 1: The board of the example document, as pprender draws it

The battery and the wire between the two rails, steps 4 and 5, are not part of the picture: it shows the parts that plug into the board and the wire between two of its holes, step 3.

The order of the steps is part of the text. The anchors come first, left to right, because the reader decides which anchor a hole belongs to from the anchors it has already read: a text that names a hole in an anchor before the anchor is placed is read wrongly. A text written by hand follows the same order.

5. The kinds of step

There are eight kinds. Table 2 lists them with what each tells the builder and with its code name; the sections below define their sentences. Every sentence is quoted in its adult and its child wording by a listing in the section.

Table 2: The eight kinds of step
Kind What it tells the builder Code name
Anchor place a part that has many pins anchor
Passive insert a part that has two leads passive
Rail wire join a hole to the nearby rail rail_wire
Link join two holes with a wire extra_link
Rail bridge join two rails of the same kind rail_bridge
Wire between boards join a hole to its twin on another board offboard
Power source connect a source straight to a rail rail_power_source
Rail jumper join two rails to each other rail_jumper

The first column names the kind in the words of this document, and the second says what a step of the kind asks the builder to do. The third, the code name, is the word that stands for the kind inside the programs: the generator (ppbuild_instructions(1)) sets it on each step it makes (the kind of the step) and chooses the sentence from it, and the reader (ppparse_instructions(1)) sets it again on each line it recognises, so that a sentence read back is known as the kind it was written as. A builder never sees these words: no sentence contains one. They are given for whoever reads or changes the programs and the tests, who finds in the code the name that this document gives in words, and for the person who writes a new kind of step, who adds a row to the table and a name to both programs.

In every sentence below, what varies is the value of a part (10k), its type (resistor), its reference (R1), a hole, a net and a colour; the rest is fixed text. A wire sentence may name the colour of its wire ("a green jumper wire"); the colours are black, blue, brown, green, grey, orange, purple, red, white and yellow, and the rule for choosing them is the practice Colour-code the wires. The reader takes the colour and ignores it.

5.1. Place an anchor

An anchor is a part with at least three connections: an IC, a connector, a module. The step names the part and the hole of its leftmost pin, and says how it stands: straddling the trench, standing in one row (a single-row header), or one pin per column (a part whose two rows of pins are one hole apart). Listing 2 shows three anchors.

Adult level
1. Place the Micro SD Card Module (TRANSFLASH, ref U3) straddling the
   trench, with its leftmost pin in hole a5. Its pins, from the left:
   CS in a5, DATA_IN in a6, DATA_OUT in a7, GND in f8, SCLK in f9, VDD
   in f10. It also connects to the power (+) and ground (-) rails. Its
   pins on the power (+) rail: VDD. Its pins on the ground (-) rail:
   GND. No footprint is on file for it: check that it can be plugged
   into a breadboard.
2. Place NE555 (U1) straddling the trench, with its leftmost pin in
   hole a17.
3. Place the Pin header (Conn_01x04, ref J1) standing in one row, with
   its leftmost pin in hole a30.
Child level
1. Find the Micro SD Card Module part. It's called U3. Lay it across
   the little gap in the middle of the board, with its first pin going
   into hole a5. Its pins, from the left: CS in a5, DATA_IN in a6,
   DATA_OUT in a7, GND in f8, SCLK in f9, VDD in f10. It also connects
   to the power (+) and ground (-) rails. Its pins on the power (+)
   rail: VDD. Its pins on the ground (-) rail: GND. No footprint is on
   file for it: check that it can be plugged into a breadboard.
2. Find the NE555 part. It's called U1. Lay it across the little gap
   in the middle of the board, with its first pin going into hole a17.
3. Find the Pin header part. It's called J1. Lay it across the little
   gap in the middle of the board, with its first pin going into hole
   a30.

A step may continue with sentences, always in this order: which way the part faces (when its pins follow the package: "Its notch faces left: pin 1 is in the lower row, at the left." or "Its pin 1 is at the left."), its pins and their holes, the rails it also connects to, the pins that are on each rail, whether it is the circuit's primary or secondary power source, and a sentence about its fit when it does not plug in as it is (surface-mount; off the 0.1 inch grid; two rows of pins one hole apart; no footprint on file). The first anchor of Listing 2 carries most of them. When the type of the part is not the part's value, the sentence gives both: "the Pin header (Conn_01x04, ref U2)".

5.2. Insert a passive

A passive is a part with fewer than three connections: a resistor, a capacitor, a diode. The step names the part and the two holes its leads go into (Listing 3).

Adult level
1. Insert the 10k resistor (R1): one lead into hole c5, the other into
   hole c10.
2. Insert the 1N4148 diode (D1): one lead into hole d12 (the cathode,
   the end marked with a band), the other into hole d15 (the anode,
   the other end).
3. Insert the 1k resistor (R2): one lead into hole e8 (on the nearby
   power (+) rail), the other into hole e12.
4. Insert the 100nF ceramic capacitor (C1): one lead into hole b7
   (also connecting to U1's own pin 8), the other into hole b11.
5. Insert the 2k resistor (R3): one lead into hole a3. Its own far leg
   could not be placed within this board's own row limit.
6. Insert the TestPoint (TP1): its only lead into hole e21.
Child level
1. Take the little 10k part called R1. It's a resistor. Push one metal
   leg into hole c5. Push the other leg into hole c10.
2. Take the little 1N4148 part called D1. It's a diode. Push one metal
   leg into hole d12 (the cathode, the end marked with a band). Push
   the other leg into hole d15 (the anode, the other end).
3. Take the little 1k part called R2. It's a resistor. Push one metal
   leg into hole e8 (on the nearby power (+) rail). Push the other leg
   into hole e12.
4. Take the little 100nF part called C1. It's a ceramic capacitor.
   Push one metal leg into hole b7 (also connecting to U1's own pin
   8). Push the other leg into hole b11.
5. Take the little 2k part called R3. It's a resistor. Push one metal
   leg into hole a3. The other leg doesn't fit on this board at all.
6. Take the little TestPoint part called TP1. It's a TestPoint. It has
   only one metal leg: push it into hole e21.

A lead may carry a remark in brackets after its hole:

  • its role, for a part that has a polarity: "the cathode, the end marked with a band" for a diode, "the anode, the longer lead" for an LED, "the positive lead, the one marked +" for an electrolytic capacitor. The words after the comma say how to tell the lead on the part;
  • "on the nearby power (+) rail" or "ground (-) rail", when the hole is the one that a rail wire reaches;
  • "also connecting to U1's own pin 8", when the hole is one that a pin of an anchor already uses, so that the lead joins that pin;
  • "(pin S)", when the netlist names the lead otherwise than 1 and 2.

When the second lead has no hole on this board the sentence says so, and the reader registers the first lead only; it never invents the second.

A part whose symbol has ONE pin (a test point) is told with one lead, in the last step of Listing 3: "its only lead into hole e21". It has no second lead to place and none to wire, and the reader registers the pin 1 only, so that the library is never asked for a second pin that the part does not have.

5.3. Join a hole to a rail

A rail wire is a short wire from the hole of a part to the nearby rail (Listing 4). It adds no connection that the part's own step has not already made: the step of the part says that its lead is on the rail, and the wire is what makes it so. The reader therefore checks it instead of adding it (the one wire that adds, the wire of a far lead that has no hole, is the next paragraph): the strip of the hole must hold a pin or a lead of that rail's net. A chip laid out as a diagram also says which of its pins go in the column.

Adult level
1. Connect a black jumper wire from hole e9 to the nearby ground (-)
   rail.
2. Connect a black jumper wire from hole f14 to the nearby ground (-)
   rail. U1's ground (-) pins 21, 3 go in this column: hole f14.
Child level
1. Use a short black wire to connect hole e9 to the ground (-) rail.
2. Use a short black wire to connect hole f14 to the ground (-) rail.

The child level leaves out the sentence about the pins of the chip.

A passive whose far leg has no hole (its row is past the limit of the board, as for R3 in Listing 3) and whose far net is a rail has a rail wire of its own, which starts at the far lead instead of at a hole (Listing 5). That wire adds the connection: the lead has no hole, so no other step says that it is on the rail, and the reader joins the far pin of that part to the rail of the wire. A text that gives such a wire for a part that has a hole at its far end, or for a part that is not in the text, is refused.

Adult level
1. Connect a black jumper wire from R3's far lead to the nearby ground
   (-) rail.
Child level
1. Use a short black wire to connect the other leg of R3 to the ground
   (-) rail.

5.4. Join two holes with a wire

A link is a wire between two holes of one net, for the case where the holes are in different columns (Listing 6). The adult level names the net; if one end of the wire is where a part's far lead connects, it says so ("Its first end is where R19's far lead connects."). The child level leaves both out.

Adult level
1. Connect a green jumper wire from hole b5 to hole b19 (net Net-CS).
Child level
1. Use a green wire to connect hole b5 to hole b19.

5.5. Join two rails of the same kind

A rail bridge joins two rails of the same polarity: the north and the south ground rail, a middle rail and the north one, or the same rail of two boards. On several boards the sentence also names the board of each rail (Listing 7). The reader adds no connection for it, since a rail is one net by its name, but it checks that the rails the rail wires use are joined by the bridges the text gives.

Adult level
1. Connect a black jumper wire from the north ground (-) rail to the
   south ground (-) rail.
2. Connect a red jumper wire from the north power (+) rail of board 1
   to the north power (+) rail of board 2.
Child level
1. Use a black wire to connect the north ground (-) rail to the south
   ground (-) rail.
2. Use a red wire to connect the north power (+) rail of board 1 to
   the north power (+) rail of board 2.

5.6. Join a hole to another board

A design that needs several boards writes a wire between two of them as two steps, one at each end, each starting with the number of its board (Listing 8). The reader pairs the two ends into one link; an end without its twin is an error.

Adult level
1. [board 1] Connect a yellow jumper wire from hole c9 (board 1) to
   the matching connection point on board 2 (net SDA).
Child level
1. [board 1] This wire needs to go to board 2. Connect a yellow wire
   from hole c9 to board 2, to the matching spot.

A text that spans several boards starts with a line that gives the geometry of each, and every step that sits on a board starts with its number (Listing 9).

Boards: 2 breadboards (board 1: 63 columns, 5 rows per half, 1 sector; board 2: 30 columns, 5 rows per half, 1 sector). A step on one of them starts with its number, for example [board 2].

5.7. Connect a power source to a rail

A source that feeds a rail directly (a battery, a supply) is not put in a hole at all: the step names the rail and, for each rail, the pins of the source that go on it (Listing 10).

Adult level
1. Connect the LiPo 3.7V 250mAh (BT1) directly to the north rail. Its
   pins on the power (+) rail: 1. Its pins on the ground (-) rail: 2.
Child level
1. Find the LiPo 3.7V 250mAh part. It's called BT1. Connect it
   straight to the north rail, not to the middle of the board. Its
   pins on the power (+) rail: 1. Its pins on the ground (-) rail: 2.

5.8. Join two rails to each other

When a source feeds one rail and the circuit uses the other, a rail jumper joins them without naming a hole (Listing 11). A source on a left or a right rail gets two such steps, one to the north rail and one to the south rail.

Adult level
1. Connect a red jumper wire from the north rail to the south rail.
Child level
1. Use a red wire to connect the north rail to the south rail.

6. Writing instructions by hand

Instructions written by hand are read by the same tools as the generated ones, so a text can be checked before anyone builds from it. The rules follow from the sections above.

  1. Write one step per action, numbered from 1, in the order of building: the anchors first, left to right, then the other parts, then the wires.
  2. Use the sentence of the kind exactly as Table 2 and its sections give it. A sentence that differs is not a step to the tools, even if a person would understand it.
  3. Name every lead by its hole, and say on the first line which board it is for if it is not the default.
  4. Put the role of each lead in brackets for a part that has a polarity, and "on the nearby power (+) rail" or "ground (-) rail" for a lead that goes to a rail.
  5. Finish a part that sits on a rail with the rail wire that puts it there.

Listing 12 is a circuit written this way, an LED with its resistor on a 9 V battery, and what ppparse_instructions(1) makes of it: the three parts, and the three nets that join them (ground, power, and the one between the resistor and the LED).

$ printf '%s\n' \
    '1. Connect the 9V battery (BT1) directly to the north rail. Its pins on the power (+) rail: 1. Its pins on the ground (-) rail: 2.' \
    '2. Insert the 330 ohm resistor (R1): one lead into hole e5 (on the nearby power (+) rail), the other into hole e10.' \
    '3. Insert the red LED (D1): one lead into hole d10 (the anode, the longer lead), the other into hole e14 (the cathode, the shorter lead) (on the nearby ground (-) rail).' \
    '4. Connect a red jumper wire from hole e5 to the nearby power (+) rail.' \
    '5. Connect a black jumper wire from hole e14 to the nearby ground (-) rail.' \
    > led.txt
$ ppparse_instructions led.txt
3 components, 3 nets
  BT1: 9V battery
  D1: red LED
  R1: 330 ohm resistor
  GND: BT1.2, D1.2
  VBUS: BT1.1, R1.1
  _col10N: R1.2, D1.1

When a line is not one of the sentences, the tool names it and stops (Listing 13), so that the line can be fixed.

$ printf '%s\n' '1. Put a 10k resistor between hole c5 and hole c10.' > bad.txt
$ ppparse_instructions bad.txt
ppparse_instructions: bad.txt: line matches none of this module's own four, real step grammars: '1. Put a 10k resistor between hole c5 and hole c10.'

To go on from instructions to a schematic, ppresolve_components(1) needs to know which real component each reference is; Workflow.org walks that way with the altimeter, and Troubleshooting.org says what to do when a circuit does not come back as it went.

7. The algebraic notation

The steps have a second language, a notation of one line for each step, in the manner of the algebraic notation of chess. It says what the sentences say, with the same holes, rails, colours and references, one line for a step (Listing 16 is the document of Listing 1). It is meant for the person who writes or reads instructions as text (a forum post, a lab notebook, a commit message) and for the tools as a plainer interchange format. It sits beside the English, not instead of it: the English stays the default and the language of the builder and of the child. A file in the notation has the extension .ban.

  • Written only on request: ppbuild_instructions --format algebraic (the value english is the English, as plain). It has no child level: --child-level with it is refused.
  • Read without an option: ppparse_instructions and ppresolve_components look at the text, and a text that begins with a comment (a line that starts with ;) or a board line, or whose first line is a step of the notation, is read as the notation. The steps it gives are the steps that the English of the same instructions gives, and everything after the reading, the netlist and the placement, the schematic, is the same.
  • Two dialects (0.72.136): the notation names HOLES (b6) or STRIPS (6^, see [BROKEN LINK: *The strip dialect]); the holes are the default, and the strips are written with --dialect strips. A text says its dialect on the line after its title, dialect holes or dialect strips (always since 0.72.138; an older text without the line is read as holes).
  • Lowercase: every word of the notation is lowercase (board, rows, anode, the rails n, s, l, r and m). What is capitalised is data: the references (U1), the values (NE555), the pin ids and the nets.

Table 3 gives the eight kinds in the two languages, and Listing 14 the notation of every example step of the sections above, with its lines numbered (the numbers, in italic, are not part of the text) for the explanation that follows it. A line is one of the shapes; the comment after ~ ; ~ carries what the English puts in brackets, the net of a wire, the link of a part and the type of an anchor when it differs from its value.

Table 3: The eight kinds of step in the notation
Kind Notation Reads
Anchor U1 = NE555 @ a17 {1:a17 8:+} rails:+ the part, its leftmost pin's hole, its pins from the left, the marks that are true
Passive R1 = 10k : c5 - c10 the part, then its two leads, each a hole with what it also does
Rail wire e9 <black> - a hole, the colour, the sign of the rail
Link b5 <green> b19 ; Net-CS two holes, the colour, the net after the semicolon
Rail bridge n- <black> s- two rails of the same kind: the sign is on both
Wire between boards 1:c9 <yellow> 2:? ; SDA a hole with its board, the colour, the matching point on the other board
Power source BT1 = 9V battery => n {1:+ 2:-} the source, the rail it sits on, its pins on the rails
Rail jumper n <red> s two rails, no sign
 1: ; anchor
 2: U3 = Micro SD Card Module @ a5 {CS:a5 DATA_IN:a6 DATA_OUT:a7 GND:f8 SCLK:f9 VDD:f10 VDD:+ GND:-} rails:+- ; TRANSFLASH
 3: U1 = NE555 @ a17
 4: J1 = Pin header @ a30 row ; Conn_01x04
 5: ; passive
 6: R1 = 10k : c5 - c10
 7: D1 = 1N4148 : d12 cathode - d15 anode
 8: R2 = 1k : e8/+ - e12
 9: C1 = 100nF : b7&U1.8 - b11
10: R3 = 2k : a3 - ?
11: TP1 = TestPoint : e21
12: ; rail wire
13: e9 <black> -
14: f14 <black> - {U1: 21 3 @ f14}
15: ? <black> - {lead R3}
16: ; link
17: b5 <green> b19 ; Net-CS
18: ; rail bridge
19: n- <black> s-
20: 1:n+ <red> 2:n+
21: ; wire between boards
22: 1:c9 <yellow> 2:? ; SDA
23: ; power source
24: BT1 = LiPo 3.7V 250mAh => n {1:+ 2:-}
25: ; rail jumper
26: n <red> s

Listing 14 line by line. The lines that begin with ; (1, 5, 12, 16, 18, 21, 23 and 25) are comments: here they name the kind of the lines that follow, and in a document of instructions the first line is one, the title.

  • Line 2, an anchor. U3 is the part and Micro SD Card Module its value; @ a5 puts its leftmost pin in hole a5. In braces its pins, from the left: CS:a5 is the pin named CS in hole a5, and so on to VDD:f10, which is in the lower half; VDD:+ and GND:- are the pins that go to the power and the ground rail. rails:+- says that the part also connects to both rails. The comment after ~ ; ~ is its type, TRANSFLASH, which is said because it differs from the value.
  • Line 3, an anchor with nothing to add: the NE555, leftmost pin in hole a17. Its type is its value, so there is no comment.
  • Line 4, an anchor that stands in one row (the mark row), here a pin header; Conn_01x04 is its type.
  • Line 6, a passive: the 10k resistor R1 has one lead in hole c5 and the other in c10. After the colon the two leads, separated by a dash.
  • Line 7, a passive that has a polarity: a lead is followed by its role, the cathode in d12 and the anode in d15.
  • Line 8, a lead on a rail: e8/+ is the lead in hole e8 that goes to the nearby power rail, and the other lead is in e12.
  • Line 9, a lead that is also a pin of an anchor: b7&U1.8 is the lead in hole b7, in the same column as pin 8 of U1.
  • Line 10, a passive whose far lead has no hole (it did not fit on the board): ?.
  • Line 11, a part of one pin (a test point) has one lead: no dash and nothing after it. The English says "its only lead".
  • Line 13, a wire: it begins at hole e9, is black (the colour between < and >) and ends at the ground rail, which a wire to a rail names by its sign, -.
  • Line 14, the same, and the brace tells that pins 21 and 3 of U1 go in this column, hole f14.
  • Line 15, the same for a far lead that has no hole: the wire begins at ? and the brace {lead R3} names the part whose far lead it is (R3, the passive of line 10).
  • Line 17, a wire between two holes, green, from b5 to b19; after ~ ; ~ the net that it joins, Net-CS.
  • Line 19, a wire between two rails of the same kind, from the north ground rail to the south one: the sign is written on both rails.
  • Line 20, the same between two boards, from the north power rail of board 1 to that of board 2: a board is written before what it holds, with a colon.
  • Line 22, a wire between boards: from hole c9 of board 1 to the matching point on board 2 (2:?, since the English does not name a hole there), and its net, SDA.
  • Line 24, a power source on a rail: BT1 is connected straight to the north rail (n), its pin 1 to the power rail and its pin 2 to the ground rail.
  • Line 26, a wire between two rails with no sign: a jumper from the north rail to the south rail.

The details that the table leaves out, in the order of the kinds:

  • The holes are those of the English: a row letter and a column, b6. A hole of a sector after the first is a5.2 (the English writes a5 (sector 2)). Where there are several boards every hole is written with its board, 2:c9, and the text starts with one line for each board, board 1: columns=63 rows=5 sectors=1. A board that is not the default one is stated by a line board rows=7 (with sectors=2 and split where they are true); the default board is not stated, as in the English.
  • An anchor lists its pins in braces, PIN:HOLE for a pin in a hole and PIN:+ or PIN:- for a pin on a rail, then the marks that are true: row (it stands in one row), cols (one pin per column), physical (its pins are where its footprint puts them), rails:+-, source:primary or source:secondary (this circuit's power source) and fit:smd, fit:shorts, fit:offgrid or fit:unknown (the sentences of the English that say a part does not plug straight in).
  • A passive has two leads. A lead is a hole, then #PIN when its pin is not 1 or 2, /+ or /- when it is on the nearby rail, &REF.PIN when it is also a pin of an anchor, and the word anode, cathode, positive or negative for a polar part. A far lead without a hole is ?.
  • A wire has the colour between < and >, empty when the step names none. The two ends are interchangeable. {lead R1} after a link says that its first end is where the far lead of R1 connects; {lead R1 R2} (0.72.143) says that its second end is where the far lead of R2 connects as well, for a wire between two far leads that have no hole (the third lead of a net, on a tight board). On a wire between boards each of the two steps carries its own {lead REF}. A rail wire may join the pins of a part to its rail in the column: {U1: 21 3 @ f14}. A rail wire that begins at ? begins at the far lead of the part that {lead R1} names; on a text of several boards the ? has the number of its board, 2:?.
  • The rails are n, s, l and r (north, south, left and right) and, on a board of several sectors, m (m.2, m.3) for the middle rail; the sign follows the rail when the step says it. A power source sits on a north, south, left or right rail.

The strip dialect (0.72.136). A lead or the end of a wire may be named by the STRIP it is in, not by a hole: the holes of one column of one half are one place, joined by the board, and a builder can use any of them. A strip is its column and its half, 6^ for the upper (north) half and 6v for the lower (south) one; 6^.2 is the strip in sector 2 and 2:6v the strip on board 2. The row is left to the builder. The dialect is written by ppbuild_instructions --format algebraic --dialect strips, and a text of it says so on the line after its title, dialect strips (Listing 15 is Listing 16 in it). What stays a hole: an anchor (its pins stand in the rows its footprint fixes, so @ a5 and {1:a5 7:a6} are as before) and the brace of a rail wire. The reader gives every strip a hole that no other step uses, the holes that a text names itself first, then the strips in the order of the text, the outer row first (a, b, … in the upper half; the last row first in the lower: the rows next to the trench are the anchors'); the holes are not in the text, so two readings of a text agree on the circuit and may differ in a row. A strip with no hole left is refused with its line and its name. A strip in a text that does not say dialect strips is refused, and so is a text that states its dialect twice. The circuit that the strips make is the circuit of the holes (check_algebraic_strip_dialect: nine designs, 458 steps).

; Build instructions: timer.kicad_sch
dialect strips
U1 = NE555 @ a5 {1:a5 7:a6 8:f7 8:+ 1:-} rails:+- fit:unknown ; NE555P ; https://www.google.com/search?q=NE555P%20datasheet
R1 = 10k : 6^&U1.7 - 7^ ; https://en.wikipedia.org/wiki/Resistor
7^ <red> 7v ; VCC
BT1 = 9V battery => n {1:+ 2:-} ; https://www.google.com/search?q=Battery_Cell%20datasheet
n <red> s

The grammar of a line is in the annex at the end of this section (Listing 19). Listing 16 is the document of Listing 1 in the notation. The title is a comment, the parts note and the pin holes note of the English are not repeated (what they say can be worked out from the lines), and the lines are not numbered.

; Build instructions: timer.kicad_sch
dialect holes
U1 = NE555 @ a5 {1:a5 7:a6 8:f7 8:+ 1:-} rails:+- fit:unknown ; NE555P ; https://www.google.com/search?q=NE555P%20datasheet
R1 = 10k : b6&U1.7 - e7 ; https://en.wikipedia.org/wiki/Resistor
b7 <red> g7 ; VCC
BT1 = 9V battery => n {1:+ 2:-} ; https://www.google.com/search?q=Battery_Cell%20datasheet
n <red> s

The notation is written by hand as the English is, and the rules of 6 hold: the parts first, then the wires. Listing 17 is the LED of Listing 12 in the notation, and what the reader makes of it: the same three parts and the same three nets.

$ printf '%s\n' \
    '; an LED with its resistor on a 9 V battery' \
    'BT1 = 9V battery => n {1:+ 2:-}' \
    'R1 = 330 ohm resistor : e5/+ - e10' \
    'D1 = red LED : d10 anode - e14/- cathode' \
    'e5 <red> +' \
    'e14 <black> -' \
    > led.ban
$ ppparse_instructions led.ban
3 components, 3 nets
  BT1: 9V battery
  D1: red LED
  R1: 330 ohm resistor
  GND: BT1.2, D1.2
  VBUS: BT1.1, R1.1
  _col10N: R1.2, D1.1

The reader is as strict as for the English. A line that is none of the shapes, an unknown mark, colour or fit, a wire between holes with no net, a board named in a text that states one board or none in a text that states several, is refused with the number of the line and the line (Listing 18).

$ printf '%s\n' 'R1 = 10k : c5 - c10 fit:wobbly' > bad.ban
$ ppparse_instructions bad.ban
ppparse_instructions: bad.ban: line 1: fit:wobbly is not a fit of a part: 'R1 = 10k : c5 - c10 fit:wobbly'

7.1. Annex: the grammar of the notation

Listing 19 is the grammar of one line of the notation, in the Backus-Naur form with the usual extensions: a rule is <name> ::= ..., a terminal is between quotes, | separates the alternatives, [ ... ] is optional, { ... } is repeated any number of times (also none), ( ... ) groups, (* ... *) is a comment, and a text between question marks, such as ? one or more digits ?, is a class of characters that words would describe better than rules. A document is a sequence of lines, each one the rule <line>. The grammar says how a line is written, in the order in which the generator writes its words; what the reader accepts besides, and what no grammar of this kind can say, follows the listing.

(* a line *)
<line>                ::= <blank> | <comment-line> | <board-line> | <dialect-line> | <step-line>
<blank>               ::= { " " }
<comment-line>        ::= ";" <text>
<board-line>          ::= "board rows=" <number> [ " sectors=" <number> ] [ " split" ]
                        | "board " <number> ": columns=" <number> " rows=" <number>
                          " sectors=" <number>
<dialect-line>        ::= "dialect " ( "holes" | "strips" )

(* a step: one of seven shapes, then its comments *)
<step-line>           ::= <anchor-line> | <passive-line> | <source-line> | <rail-wire-line>
                        | <link-line> | <between-boards-line> | <rails-line>
<anchor-line>         ::= <anchor> [ <type-comment> ] [ <url-comment> ]
<passive-line>        ::= <passive> [ <url-comment> ]
<source-line>         ::= <source> [ <url-comment> ]
<rail-wire-line>      ::= <rail-wire> [ <url-comment> ]
<link-line>           ::= <link> <net-comment> [ <url-comment> ]
<between-boards-line> ::= <between-boards> <net-comment> [ <url-comment> ]
<rails-line>          ::= <rails> [ <url-comment> ]
<type-comment>        ::= " ; " <comment-text>
<net-comment>         ::= " ; " <comment-text>
<url-comment>         ::= " ; " <url>

(* a part with pins *)
<anchor>              ::= <ref> " = " <value> " @ " <hole> [ " {" <pins> "}" ]
                          { " " <mark> }
<pins>                ::= <pin> { " " <pin> }
<pin>                 ::= <pin-id> ":" ( <hole> | <sign> )
<mark>                ::= "row" | "cols" | "physical" | "rails:" <signs>
                        | "source:" ( "primary" | "secondary" ) | "fit:" <fit>
<signs>               ::= "+-" | "+" | "-"
<fit>                 ::= "smd" | "shorts" | "offgrid" | "unknown"

(* a part of two leads *)
<passive>             ::= <ref> " = " <value> " : " <lead> " - " ( <lead> | "?" )
                          [ " fit:" <fit> ]
<lead>                ::= <place> [ "#" <lead-pin> ] [ "/" <sign> | "&" <ref> "." <pin-id> ]
                          [ " " <role> ]
<role>                ::= "anode" | "cathode" | "positive" | "negative"

(* a power source straight on a rail *)
<source>              ::= <ref> " = " <value> " => " <rail-name> [ " {" <pins> "}" ]

(* the wires *)
<rail-wire>           ::= <place> " " <wire-colour> " " <sign>
                          [ " {" <ref> ": " <pin-id> { " " <pin-id> } " @ " <hole> "}" ]
                        | [ <number> ":" ] "?" " " <wire-colour> " " <sign> " {lead " <ref> "}"   (* the far lead of a passive has no hole *)
<link>                ::= <place> " " <wire-colour> " " <place> [ " {lead " <ref> [ " " <ref> ] "}" ]
<between-boards>      ::= <place> " " <wire-colour> " " <number> ":?" [ " {lead " <ref> "}" ]
<rails>               ::= <rail-name> "+" " " <wire-colour> " " <rail-name> "+"
                        | <rail-name> "-" " " <wire-colour> " " <rail-name> "-"
                        | <rail-name> " " <wire-colour> " " <rail-name>
<wire-colour>         ::= "<" [ <colour> ] ">"
<colour>              ::= "black" | "blue" | "brown" | "green" | "grey" | "orange"
                        | "purple" | "red" | "white" | "yellow"

(* places: a hole, or in the strip dialect a strip for a lead and the end of a wire *)
<place>               ::= <hole> | <strip>
<hole>                ::= [ <number> ":" ] <letters> <number> [ "." <number> ]
<strip>               ::= [ <number> ":" ] <number> ( "^" | "v" ) [ "." <number> ]
<rail-name>           ::= [ <number> ":" ] ( "n" | "s" | "l" | "r" | "m" [ "." <number> ] )
<sign>                ::= "+" | "-"

(* the words that are data *)
<ref>                 ::= ? one or more characters other than a space, a dot or "&" ?
<value>               ::= ? one or more characters ?
<pin-id>              ::= ? one or more letters, digits or the characters _ + - # @ / ~ * ?
<lead-pin>            ::= ? one or more characters other than a space, "/" and "&" ?
<comment-text>        ::= ? one or more characters, not containing " ; " ?
<text>                ::= ? any characters ?
<url>                 ::= ? an address such as https://example.org/page, with no space ?
<number>              ::= ? one or more digits ?
<letters>             ::= ? one or more lowercase letters ?

What the reader accepts that the grammar does not write: the words of a board line in another order, the marks of an anchor in any order, blank lines anywhere, and spaces at the end of a line. What no grammar of this kind says, and the reader refuses with the number of the line and the line:

  • the boards are numbered 1, 2, … in order; when the text states several boards every line that sits on a board names it (2:c9), and when it states one board or none no line names one; the two ends of a wire between holes are on one board; the board of a rail bridge is named on both of its rails or on none;
  • a power source sits on the north, south, left or right rail (not on a middle rail), a jumper joins two of those, a bridge joins north, south and middle rails;
  • a line of a link or of a wire between boards has its net after the semicolon;
  • the language of a text is the notation when its first line that is not blank is a comment, a board line, a dialect line or a step;
  • a strip is read only in a text that says dialect strips, which it says once; an anchor, the pins of an anchor and the join of a rail wire are holes in both dialects.

8. What the language does not say

  • The level for a child is not read back. The parser reads the adult sentences only; the generator writes the child's. See the research item named above.
  • No child level in the notation. The algebraic notation is for the person who writes or reads instructions as text; --child-level with --format algebraic is refused.
  • Only English. The generator builds each sentence from small pieces, apart from the logic that decides what to say, so that a translation could replace the sentences without touching the logic. No translation exists.
  • How an IC is turned is said only when its pins follow its package ("Its notch faces left"); otherwise the holes listed are where each net goes, not how the part is seated, as the pin holes note says.
  • What is under a part. The body of a passive takes the room of about three rows in its column; the sentence names the holes of its leads, not the room.
  • The html format. It is written for a browser and is not read back.
  • Datasheets. A step may end with a link to a description of the part. Offline, it is a search query ("datasheet" with the part name); --search-datasheets asks the network for a more direct address and falls back to the query when there is none.
  • The article of the child level. The two child sentences that name the type of a part ("It's a resistor", "It's an LED") take "a" or "an" by the SOUND of the type, not by its first letter: an initialism is said letter by letter ("an LED", "an NPN transistor", "a PNP transistor", "a TVS diode"), a number as a word ("a 7805"), an ordinary word by its first sound ("an electrolytic capacitor", "a resistor"). The reader does not read these sentences (the child level is not read back), so the article is not part of the language.

Author: Péter Felecan
assisted by Claude Sonnet 5.5 (Anthropic)

Created: 2026-11-14 Sat 15:57