diff options
author | Martin Odersky <odersky@gmail.com> | 2004-10-25 15:08:59 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2004-10-25 15:08:59 +0000 |
commit | 55dc9426182208f9b606fc3145ddcd37e9f1ec20 (patch) | |
tree | c7598896861292f7b32aa719361223b4d9365620 /doc | |
parent | a9664dbf3d60a8e75ea06f7f1b3dac95150d3cc8 (diff) | |
download | scala-55dc9426182208f9b606fc3145ddcd37e9f1ec20.tar.gz scala-55dc9426182208f9b606fc3145ddcd37e9f1ec20.tar.bz2 scala-55dc9426182208f9b606fc3145ddcd37e9f1ec20.zip |
*** empty log message ***
Diffstat (limited to 'doc')
-rw-r--r-- | doc/reference/ReferencePart.tex | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/reference/ReferencePart.tex b/doc/reference/ReferencePart.tex index 6f4455a71d..e8fae6419d 100644 --- a/doc/reference/ReferencePart.tex +++ b/doc/reference/ReferencePart.tex @@ -62,14 +62,14 @@ id ::= upper idrest | varid | op | ```string chars`'' -idrest ::= {letter $|$ digit} {'_' (op | idrest)} +idrest ::= {letter $|$ digit} [`_' op | `_' idrest] \end{lstlisting} There are three ways to form an identifier. First, an identifier can start with a letter which can be followed by an arbitrary sequence of letters and digits. This may be followed by underscore `\lstinline@_@' characters and other string composed of either letters and digits or -of special characeters. Second, an identifier can start with a +of special characters. Second, an identifier can start with a special character followed by an arbitrary sequence of special characters. Finally, an identifier may also be formed by an arbitrary string between back-quotes (host systems may impose some restrictions @@ -77,11 +77,11 @@ on which strings are legal for identifiers). As usual, a longest match rule applies. For instance, the string \begin{lstlisting} -big_bob++=z3 +big_bob++=`def` \end{lstlisting} decomposes into the three identifiers \lstinline@big_bob@, \lstinline@++=@, and -\code{z3}. The rules for pattern matching further distinguish between +\code{def}. The rules for pattern matching further distinguish between {\em variable identifiers}, which start with a lower case letter, and {\em constant identifiers}, which do not. |