some rules on syntax
This commit is contained in:
parent
2a1b1a2ba9
commit
0efe793c3e
1 changed files with 15 additions and 0 deletions
|
@ -19,6 +19,21 @@
|
|||
\begin{document}
|
||||
\maketitle
|
||||
|
||||
\section{Syntax}
|
||||
|
||||
\subsection{Lexing}
|
||||
|
||||
Comments start with \verb,(*, and end with \verb,*),. They can be nested.
|
||||
Strings start with \verb,", and end with \verb,",. They can contain evaluatable expressions in \verb,{, \verb,}, brackets.
|
||||
Thus strings get split into multiple tokens (\texttt{<string\_start> <string>$^?$ <tokens...> <string>$^?$ <string\_end>}).
|
||||
For these two features, the lexer contains stack handling. Whitespace separated tokens.
|
||||
|
||||
\begin{tabular}{cc}
|
||||
Token & rule \\
|
||||
Integer & \texttt{[1-9][0-9]$^+$|0x[0-9a-fA-F]$^+$} \\
|
||||
Identifier & Unicode-XID (\texttt{<XID\_start><XID\_continue>$^*$}) \\
|
||||
\end{tabular}
|
||||
|
||||
\section{Types}
|
||||
|
||||
\[
|
||||
|
|
Loading…
Reference in a new issue