diff options
author | Martin Odersky <odersky@gmail.com> | 2003-11-05 14:14:23 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2003-11-05 14:14:23 +0000 |
commit | d37c08ba93b7e3055412a3eafb7efcc4b6c6b3f7 (patch) | |
tree | 2ee2ad2c71c131c4db4201c61fe291bfc0b2ebdf /doc/reference | |
parent | 9bcc8b562fb0f8a7af444c68b1256abea1c6840a (diff) | |
download | scala-d37c08ba93b7e3055412a3eafb7efcc4b6c6b3f7.tar.gz scala-d37c08ba93b7e3055412a3eafb7efcc4b6c6b3f7.tar.bz2 scala-d37c08ba93b7e3055412a3eafb7efcc4b6c6b3f7.zip |
*** empty log message ***
Diffstat (limited to 'doc/reference')
-rw-r--r-- | doc/reference/ScalaReference.tex | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/doc/reference/ScalaReference.tex b/doc/reference/ScalaReference.tex index fa8045290b..b5605be662 100644 --- a/doc/reference/ScalaReference.tex +++ b/doc/reference/ScalaReference.tex @@ -96,16 +96,21 @@ varid ::= lower {letter $|$ digit} [`_' [id]] id ::= upper {letter $|$ digit} [`_' [id]] | varid | op + | `\' stringLit \end{lstlisting} -There are two ways to form an identifier. First, an identifier can +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. Second, an identifier can be start with a special character followed by an arbitrary sequence of special characters. In the first case, the identifier prefix may be immediately followed by an underscore `\lstinline@_@' character and another string of -characters that by themselves make up an identifier. As usual, a -longest match rule applies. For instance, the string +characters that by themselves make up an identifier. Finally, an +identifier may also start with an escape character \lstinline@`\'@ +which is followed by an arbitrary string in apostrophes (host systems +may impose some restrictions on which strings are legal for +identifiers). As usual, a longest match rule applies. For instance, +the string \begin{lstlisting} big_bob++=z3 @@ -4132,6 +4137,7 @@ form. id ::= upper {letter | digit} [`_' [id]] | varid | op + | `\'stringLit intLit ::= $\mbox{\rm\em ``as in Java''}$ floatLit ::= $\mbox{\rm\em ``as in Java''}$ @@ -4207,18 +4213,17 @@ grammar. BlockExpr ::= `{' CaseClause {CaseClause} `}' | `{' Block `}' Block ::= {BlockStat `;'} [Expr] - - Enumerators ::= Generator {`;' Enumerator} - Enumerator ::= Generator - | Expr - Generator ::= val Pattern1 `<-' Expr - Block ::= {BlockStat `;'} [Expr] BlockStat ::= Import | Def | {LocalModifier} ClsDef | Expr | + Enumerators ::= Generator {`;' Enumerator} + Enumerator ::= Generator + | Expr + Generator ::= val Pattern1 `<-' Expr + CaseClause ::= case Pattern [`if' PostfixExpr] `=>' Block Constr ::= StableId [TypeArgs] [`(' [Exprs] `)'] |