lama_byterun/doc/spec/03.concrete_syntax.tex

29 lines
1 KiB
TeX
Raw Normal View History

2020-02-05 20:49:50 +03:00
\chapter{Concrete Syntax and\\
Informal Semantics}
2020-02-05 01:18:20 +03:00
\label{sec:concrete_syntax}
2020-02-04 02:46:38 +03:00
2020-02-04 05:49:12 +03:00
In this chapter we describe the concrete syntax of the language as it is recognized by the parser. In the
syntactic description we will use extended Backus-Naur form with the following conventions:
2020-02-04 02:46:38 +03:00
2020-02-04 05:49:12 +03:00
\begin{itemize}
\item nonterminals are presented in \nonterm{italics};
\item concrete terminals are \term{grayed out};
\item classes of terminals are \token{CAPITALIZED};
\item a postfix ``$^\star$'' designates zero-or-more repetitions;
\item square brackets ``$[\dots]$'' designate zero-or-one repetition;
\item round brackets ``$(\dots)$'' are used for grouping;
\item alteration is denoted by ``$\alt$'', sequencing by juxaposition;
\item a colon ``$:$'' separates a nonterminal being defined from its definition.
\end{itemize}
2020-02-04 02:46:38 +03:00
2020-02-05 01:18:20 +03:00
In the description below we will take in-line code samples in blockquotes "..." which are not considered as a
2020-02-04 05:49:12 +03:00
part of concrete syntax.
2020-02-04 02:46:38 +03:00
2020-02-04 05:49:12 +03:00
\input{03.01.lexical_structure}
\input{03.02.compilation_units}
\input{03.03.scope_expressions}
\input{03.04.expressions}
2020-02-04 02:46:38 +03:00