From 5953a8ef5fa0b4c4477044ac3225da43e9678d50 Mon Sep 17 00:00:00 2001 From: Jonathan Brachthäuser Date: Wed, 21 Dec 2016 20:01:10 +0100 Subject: Replace tex headers by markdown headers --- docs/docs/internals/syntax.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'docs') diff --git a/docs/docs/internals/syntax.md b/docs/docs/internals/syntax.md index 13faa195e..5bdc3add2 100644 --- a/docs/docs/internals/syntax.md +++ b/docs/docs/internals/syntax.md @@ -16,8 +16,10 @@ hexDigit ::= ‘0’ | … | ‘9’ | ‘A’ | … | ‘F’ | ‘a’ | Informal descriptions are typeset as `“some comment”`. -{\small -\begin{lstlisting} +### Lexical Syntax +The lexical syntax of Scala is given by the following grammar in EBNF +form. +```ebnf upper ::= `A' | $\cdots$ | `Z' | `$\Dollar$' | `_' $\mbox{\rm\em and Unicode category Lu}$ lower ::= `a' | $\cdots$ | `z' $\mbox{\rm\em and Unicode category Ll}$ letter ::= upper | lower $\mbox{\rm\em and Unicode categories Lo, Lt, Nl}$ @@ -78,13 +80,14 @@ Informal descriptions are typeset as `“some comment”`. nl ::= $\mbox{\rm\em ``new line character''}$ semi ::= `;' | nl {nl} -\end{lstlisting}} +``` + +## Context-free Syntax The context-free syntax of Scala is given by the following EBNF -grammar. +grammar: -{\small -\begin{lstlisting} +```ebnf SimpleLiteral ::= [`-'] integerLiteral | [`-'] floatingPointLiteral | booleanLiteral @@ -333,5 +336,4 @@ grammar. PackageObject ::= `package' `object' ObjectDef object with package in mods. CompilationUnit ::= {`package' QualId semi} TopStatSeq Package(qid, stats) -\end{lstlisting} -} +``` -- cgit v1.2.3