Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
b44878a9
Commit
b44878a9
authored
Jun 02, 2005
by
Andrew M. Kuchling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bug #1193001] Make the notation section use the same productionlist env. as other grammar rules
parent
183c4bd5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
Doc/ref/ref1.tex
Doc/ref/ref1.tex
+5
-5
No files found.
Doc/ref/ref1.tex
View file @
b44878a9
...
@@ -43,10 +43,10 @@ grammar notation. This uses the following style of definition:
...
@@ -43,10 +43,10 @@ grammar notation. This uses the following style of definition:
\index
{
syntax
}
\index
{
syntax
}
\index
{
notation
}
\index
{
notation
}
\begin{
verbatim
}
\begin{
productionlist
}
name: lc
_
letter (lc
_
letter | "
_
")*
\production
{
name
}{
\token
{
lc
_
letter
}
(
\token
{
lc
_
letter
}
| "
_
")*
}
lc
_
letter: "a"..."z"
\production
{
lc
_
letter
}{
"a"..."z"
}
\end{
verbatim
}
\end{
productionlist
}
The first line says that a
\code
{
name
}
is an
\code
{
lc
_
letter
}
followed by
The first line says that a
\code
{
name
}
is an
\code
{
lc
_
letter
}
followed by
a sequence of zero or more
\code
{
lc
_
letter
}
s and underscores. An
a sequence of zero or more
\code
{
lc
_
letter
}
s and underscores. An
...
@@ -55,7 +55,7 @@ through \character{z}. (This rule is actually adhered to for the
...
@@ -55,7 +55,7 @@ through \character{z}. (This rule is actually adhered to for the
names defined in lexical and grammar rules in this document.)
names defined in lexical and grammar rules in this document.)
Each rule begins with a name (which is the name defined by the rule)
Each rule begins with a name (which is the name defined by the rule)
and
a colon
. A vertical bar (
\code
{
|
}
) is used to separate
and
\code
{
::=
}
. A vertical bar (
\code
{
|
}
) is used to separate
alternatives; it is the least binding operator in this notation. A
alternatives; it is the least binding operator in this notation. A
star (
\code
{
*
}
) means zero or more repetitions of the preceding item;
star (
\code
{
*
}
) means zero or more repetitions of the preceding item;
likewise, a plus (
\code
{
+
}
) means one or more repetitions, and a
likewise, a plus (
\code
{
+
}
) means one or more repetitions, and a
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment