Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions book/book.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1083,23 +1083,23 @@ \section{Formal and natural languages}
For example, in mathematics the statement
$3 + 3 = 6$ has correct syntax, but
$3 + = 3 \$ 6$ does not. In chemistry
$H_2O$ is a syntactically correct formula, but $_2Zz$ is not.
$H_2O$ is a syntactically correct formula, but $Zz^2$ is not.
\index{syntax}

Syntax rules come in two flavors, pertaining to {\bf tokens} and
structure. Tokens are the basic elements of the language, such as
words, numbers, and chemical elements. One of the problems with
$3 += 3 \$ 6$ is that \( \$ \) is not a legal token in mathematics
(at least as far as I know). Similarly, $_2Zz$ is not legal because
(at least as far as I know). Similarly, $Zz^2$ is not legal because
there is no element with the abbreviation $Zz$.
\index{token}
\index{structure}

The second type of syntax rule pertains to the way tokens are
combined. The equation $3 += 3$ is illegal because even though $+$
and $=$ are legal tokens, you can't have one right after the other.
Similarly, in a chemical formula the subscript comes after the element
name, not before.
Similarly, in a chemical formula the number of atoms is indicated
using a subscript, not a superscript.

This is @ well-structured Engli\$h
sentence with invalid t*kens in it. This sentence all valid tokens
Expand Down