Describe the comment syntax
This commit is contained in:
+19
-4
@@ -10,10 +10,25 @@ Each procedure can get some input and produce an output as a result of
|
||||
executing a \textbf{statement block}, a list, where each \textbf{statement}
|
||||
is executed in the order it appears in the block.
|
||||
|
||||
Statement components are other statement blocks and \textbf{expressions},
|
||||
where a statement has control over the evaluation of its components.
|
||||
Statements can also modify the state of the procedure or the program by
|
||||
mutating variables.
|
||||
\chapter{Vocabulary}
|
||||
|
||||
A language is an infinite set of sentences, namely the sentences well formed
|
||||
according to its syntax. In Elna, these sentences are called compilation units.
|
||||
Each unit is a finite sequence of \textit{tokens} from a finite vocabulary.
|
||||
The vocabulary of Elna consists of identifiers, key words, numbers, characters,
|
||||
strings, operators, delimiters, and comments. They are called \textit{tokens}
|
||||
and are composed of sequences of characters.
|
||||
|
||||
The following lexical rules must be observed when composing tokens. Blanks and
|
||||
line breaks must not occur within tokens (except in comments and strings). They
|
||||
are ignored unless they are essential to separate two consecutive tokens.
|
||||
Capital and lower-case letters are considered as being distinct.
|
||||
|
||||
\section{Comments}
|
||||
|
||||
\textit{Comments} may be inserted between any two tokens in a program. They
|
||||
are arbitrary character sequences opened by the bracket \verb|(*| and closed
|
||||
by \verb|*)|. Comments do not affect the meaning of a program.
|
||||
|
||||
\chapter{Expressions}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user