Skip to content

Commit 25a4588

Browse files
committed
Move input.syntax to the corresponding chapter
We had a set of grammar rules we had placed in the notation chapter under the label of "common productions". There's a certain sense to that, particularly if we had more of them. As it is, though, all of the productions seem related enough to the "input format" chapter, and in fact we had already labeled these productions with the identifier `input.syntax`, so let's go ahead and move these productions to the "input format" chapter. This looks more orderly, especially as we now have rule labels in the notation chapter.
1 parent fd70409 commit 25a4588

File tree

2 files changed

+14
-20
lines changed

2 files changed

+14
-20
lines changed

src/input-format.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
r[input]
22
# Input format
33

4+
r[input.syntax]
5+
```grammar,lexer
6+
@root CHAR -> <a Unicode scalar value>
7+
8+
NUL -> U+0000
9+
10+
TAB -> U+0009
11+
12+
LF -> U+000A
13+
14+
CR -> U+000D
15+
```
16+
417
r[input.intro]
518
This chapter describes how a source file is interpreted as a sequence of tokens.
619

src/notation.md

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -50,27 +50,8 @@ r[notation.grammar.visualizations]
5050

5151
Below each grammar block is a button to toggle the display of a [syntax diagram]. A square element is a non-terminal rule, and a rounded rectangle is a terminal.
5252

53-
[syntax diagram]: https://en.wikipedia.org/wiki/Syntax_diagram
54-
55-
r[notation.grammar.common]
56-
### Common productions
57-
58-
The following are common definitions used in the grammar.
59-
60-
r[input.syntax]
61-
```grammar,lexer
62-
@root CHAR -> <a Unicode scalar value>
63-
64-
NUL -> U+0000
65-
66-
TAB -> U+0009
67-
68-
LF -> U+000A
69-
70-
CR -> U+000D
71-
```
72-
7353
[binary operators]: expressions/operator-expr.md#arithmetic-and-logical-binary-operators
7454
[keywords]: keywords.md
55+
[syntax diagram]: https://en.wikipedia.org/wiki/Syntax_diagram
7556
[tokens]: tokens.md
7657
[unary operators]: expressions/operator-expr.md#borrow-operators

0 commit comments

Comments
 (0)