Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the chemical formula example truly syntactically incorrect #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions book/book.tex
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