Skip to content

Commit

Permalink
Change math delimiter to ACUTE ACCENT (´)
Browse files Browse the repository at this point in the history
  • Loading branch information
sake92 committed Feb 6, 2019
1 parent 7cc6915 commit 60af077
Show file tree
Hide file tree
Showing 21 changed files with 1,737 additions and 1,713 deletions.
4 changes: 1 addition & 3 deletions scripts/generate-spec-pdf.bat
Expand Up @@ -10,7 +10,7 @@ SET ROOT_DIR=%THIS_SCRIPT_DIR%..
SET SPEC_SRC_DIR=%ROOT_DIR%\spec
SET SPEC_BUILD_DIR=%ROOT_DIR%\build\spec

SET WKHTML_OPTS=--print-media-type --window-status loaded --footer-center [page] --javascript-delay 1000
SET WKHTML_OPTS=--print-media-type --window-status loaded --footer-center [page] --javascript-delay 1000 --footer-font-name "Luxi Sans"
SET WKHTML_TOC=toc --xsl-style-sheet %SPEC_SRC_DIR%\spec-toc.xslt

SET HTML_FILES=
Expand All @@ -20,7 +20,5 @@ FOR /F "tokens=*" %%a IN ('dir %SPEC_BUILD_DIR%\*.html /B /O:N ^| findstr /v /i
ECHO Making Spec.pdf with HTML files:
ECHO %SPEC_BUILD_DIR%\index.html %HTML_FILES%

echo wkhtmltopdf %WKHTML_OPTS% %SPEC_BUILD_DIR%\index.html %WKHTML_TOC% %HTML_FILES% %SPEC_BUILD_DIR%\Spec.pdf

REM first goes index.html, then TOC, then rest
wkhtmltopdf %WKHTML_OPTS% %SPEC_BUILD_DIR%\index.html %WKHTML_TOC% %HTML_FILES% %SPEC_BUILD_DIR%\Spec.pdf
5 changes: 3 additions & 2 deletions scripts/generate-spec-pdf.sh
Expand Up @@ -4,11 +4,12 @@
# "toc" -> treated just like another page, its location can be changed
# "--window-status loaded" -> when window.status is set to "loaded", wkhtmltopdf knows js is loaded

ROOT_DIR=..
THIS_SCRIPT_DIR=$(dirname $0)
ROOT_DIR=$THIS_SCRIPT_DIR/..
SPEC_SRC_DIR=$ROOT_DIR/spec
SPEC_BUILD_DIR=$ROOT_DIR/build/spec

WKHTML_OPTS="--print-media-type --window-status loaded --footer-center [page]"
WKHTML_OPTS='--print-media-type --window-status loaded --footer-center [page] --javascript-delay 1000 --footer-font-name "Luxi Sans"'
WKHTML_TOC="toc --xsl-style-sheet $SPEC_SRC_DIR/spec-toc.xslt"

# exclude index.html, prepend SPEC_BUILD_DIR path
Expand Down
50 changes: 25 additions & 25 deletions spec/01-lexical-syntax.md
Expand Up @@ -82,11 +82,11 @@ decomposes into the three identifiers `big_bob`, `++=`, and
The rules for pattern matching further distinguish between
_variable identifiers_, which start with a lower case letter, and
_constant identifiers_, which do not. For this purpose,
underscore `‘_‘` is taken as lower case, and the ‘\$’ character
underscore `‘_‘` is taken as lower case, and the ‘$’ character
is taken as upper case.

The ‘\$’ character is reserved for compiler-synthesized identifiers.
User programs should not define identifiers which contain ‘\$’ characters.
The ‘$’ character is reserved for compiler-synthesized identifiers.
User programs should not define identifiers which contain ‘$’ characters.

The following names are reserved words instead of being members of the
syntactic class `id` of lexical identifiers.
Expand All @@ -103,7 +103,7 @@ val var while with yield
_ : = => <- <: <% >: # @
```

The Unicode operators `\u21D2`$\Rightarrow$’ and `\u2190`$\leftarrow$’, which have the ASCII
The Unicode operators `\u21D2`´\Rightarrow´’ and `\u2190`´\leftarrow´’, which have the ASCII
equivalents `=>` and `<-`, are also reserved.

> Here are examples of identifiers:
Expand Down Expand Up @@ -351,9 +351,9 @@ is _pt_. The numeric ranges given by these types are:

| | |
|----------------|--------------------------|
|`Byte` | $-2\^7$ to $2\^7-1$ |
|`Short` | $-2\^{15}$ to $2\^{15}-1$|
|`Char` | $0$ to $2\^{16}-1$ |
|`Byte` | ´-2\^7´ to ´2\^7-1´ |
|`Short` | ´-2\^{15}´ to ´2\^{15}-1´|
|`Char` | ´0´ to ´2\^{16}-1´ |

The digits of a numeric literal may be separated by
arbitrarily many underscores for purposes of legibility.
Expand Down Expand Up @@ -507,11 +507,11 @@ of the escape sequences [here](#escape-sequences) are interpreted.
#### Interpolated string

```ebnf
interpolatedString ::= alphaid ‘"’ {printableChar \ (‘"’ | ‘\$’) | escape} ‘"’
| alphaid ‘"""’ {[‘"’] [‘"’] char \ (‘"’ | ‘\$’) | escape} {‘"’} ‘"""’
escape ::= ‘\$\$’
| ‘\$’ id
| ‘\$’ BlockExpr
interpolatedString ::= alphaid ‘"’ {printableChar \ (‘"’ | ‘$’) | escape} ‘"’
| alphaid ‘"""’ {[‘"’] [‘"’] char \ (‘"’ | ‘$’) | escape} {‘"’} ‘"""’
escape ::= ‘$$’
| ‘$’ id
| ‘$’ BlockExpr
alphaid ::= upper idrest
| varid
Expand All @@ -526,24 +526,24 @@ or multi-line (triple quote).
Inside a interpolated string none of the usual escape characters are interpreted
(except for unicode escapes) no matter whether the string literal is normal
(enclosed in single quotes) or multi-line (enclosed in triple quotes).
Instead, there is are two new forms of dollar sign escape.
The most general form encloses an expression in \${ and }, i.e. \${expr}.
The expression enclosed in the braces that follow the leading \$ character is of
Instead, there are two new forms of dollar sign escape.
The most general form encloses an expression in `${` and `}`, i.e. `${expr}`.
The expression enclosed in the braces that follow the leading `$` character is of
syntactical category BlockExpr. Hence, it can contain multiple statements,
and newlines are significant. Single ‘\$’-signs are not permitted in isolation
in a interpolated string. A single ‘\$’-sign can still be obtained by doubling the ‘\$
character: ‘\$\$’.
and newlines are significant. Single ‘$’-signs are not permitted in isolation
in a interpolated string. A single ‘$’-sign can still be obtained by doubling the ‘$’
character: ‘$$’.

The simpler form consists of a ‘\$’-sign followed by an identifier starting with
The simpler form consists of a ‘$’-sign followed by an identifier starting with
a letter and followed only by letters, digits, and underscore characters,
e.g \$id. The simpler form is expanded by putting braces around the identifier,
e.g \$id is equivalent to \${id}. In the following, unless we explicitly state otherwise,
e.g `$id`. The simpler form is expanded by putting braces around the identifier,
e.g `$id` is equivalent to `${id}`. In the following, unless we explicitly state otherwise,
we assume that this expansion has already been performed.

The expanded expression is type checked normally. Usually, StringContext will resolve to
The expanded expression is type checked normally. Usually, `StringContext` will resolve to
the default implementation in the scala package,
but it could also be user-defined. Note that new interpolators can also be added through
implicit conversion of the built-in scala.StringContext.
implicit conversion of the built-in `scala.StringContext`.

One could write an extension
```scala
Expand Down Expand Up @@ -577,8 +577,8 @@ symbolLiteral ::= ‘'’ plainid
```

A symbol literal `'x` is a shorthand for the expression `scala.Symbol("x")` and
is of the [literal type](03-types#literal-types) `'x`. `Symbol` is a [case
class](05-classes-and-objects.html#case-classes), which is defined as follows.
is of the [literal type](03-types#literal-types) `'x`.
`Symbol` is a [case class](05-classes-and-objects.html#case-classes), which is defined as follows.

```scala
package scala
Expand Down
40 changes: 20 additions & 20 deletions spec/02-identifiers-names-and-scopes.md
Expand Up @@ -48,24 +48,24 @@ locally {
}
```

A reference to an unqualified (type- or term-) identifier $x$ is bound
A reference to an unqualified (type- or term-) identifier ´x´ is bound
by the unique binding, which

- defines an entity with name $x$ in the same namespace as the identifier, and
- shadows all other bindings that define entities with name $x$ in that
- defines an entity with name ´x´ in the same namespace as the identifier, and
- shadows all other bindings that define entities with name ´x´ in that
namespace.

It is an error if no such binding exists. If $x$ is bound by an
import clause, then the simple name $x$ is taken to be equivalent to
the qualified name to which $x$ is mapped by the import clause. If $x$
is bound by a definition or declaration, then $x$ refers to the entity
introduced by that binding. In that case, the type of $x$ is the type
It is an error if no such binding exists. If ´x´ is bound by an
import clause, then the simple name ´x´ is taken to be equivalent to
the qualified name to which ´x´ is mapped by the import clause. If ´x´
is bound by a definition or declaration, then ´x´ refers to the entity
introduced by that binding. In that case, the type of ´x´ is the type
of the referenced entity.

A reference to a qualified (type- or term-) identifier $e.x$ refers to
the member of the type $T$ of $e$ which has the name $x$ in the same
namespace as the identifier. It is an error if $T$ is not a [value type](03-types.html#value-types).
The type of $e.x$ is the member type of the referenced entity in $T$.
A reference to a qualified (type- or term-) identifier ´e.x´ refers to
the member of the type ´T´ of ´e´ which has the name ´x´ in the same
namespace as the identifier. It is an error if ´T´ is not a [value type](03-types.html#value-types).
The type of ´e.x´ is the member type of the referenced entity in ´T´.

Binding precedence implies that the way source is bundled in files affects name resolution.
In particular, imported names have higher precedence than names, defined in other files,
Expand Down Expand Up @@ -160,24 +160,24 @@ precedences between them.
package p { // `X' bound by package clause
import Console._ // `println' bound by wildcard import
object Y {
println(s"L4: \$X") // `X' refers to `p.X' here
println(s"L4: $X") // `X' refers to `p.X' here
locally {
import q._ // `X' bound by wildcard import
println(s"L7: \$X") // `X' refers to `q.X' here
println(s"L7: $X") // `X' refers to `q.X' here
import X._ // `x' and `y' bound by wildcard import
println(s"L9: \$x") // `x' refers to `q.X.x' here
println(s"L9: $x") // `x' refers to `q.X.x' here
locally {
val x = 3 // `x' bound by local definition
println(s"L12: \$x") // `x' refers to constant `3' here
println(s"L12: $x") // `x' refers to constant `3' here
locally {
import q.X._ // `x' and `y' bound by wildcard import
// println(s"L15: \$x") // reference to `x' is ambiguous here
// println(s"L15: $x") // reference to `x' is ambiguous here
import X.y // `y' bound by explicit import
println(s"L17: \$y") // `y' refers to `q.X.y' here
println(s"L17: $y") // `y' refers to `q.X.y' here
locally {
val x = "abc" // `x' bound by local definition
import p.X._ // `x' and `y' bound by wildcard import
// println(s"L21: \$y") // reference to `y' is ambiguous here
println(s"L22: \$x") // `x' refers to string "abc" here
// println(s"L21: $y") // reference to `y' is ambiguous here
println(s"L22: $x") // `x' refers to string "abc" here
}}}}}}
```

0 comments on commit 60af077

Please sign in to comment.