summaryrefslogtreecommitdiff
path: root/docs/devel_guide_src/parserInstructions.tex
blob: 0af065fad2f2b33f0c46e7f2fd49badc3bc247d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
\section{Directives: Parser Instructions}
\label{parserInstructions}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{\#breakpoint}
\label{parserInstructions.breakpoint}


The template:
\begin{verbatim}
Text before breakpoint.
#breakpoint
Text after breakpoint.
#raise RuntimeError
\end{verbatim}

The output:
\begin{verbatim}
Text before breakpoint.
\end{verbatim}

The generated code:
\begin{verbatim}
write('Text before breakpoint.\n')
\end{verbatim}

Nothing after the breakpoint was compiled.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{\#compiler}
\label{parserInstructions.compiler}

The template:
\begin{verbatim}
// Not a comment
#compiler commentStartToken = '//'
// A comment
#compiler reset
// Not a comment
\end{verbatim}

The output:
\begin{verbatim}
// Not a comment
// Not a comment
\end{verbatim}

The generated code:
\begin{verbatim}
write('// Not a comment\n')
#  A comment
write('// Not a comment\n')
\end{verbatim}

So this didn't affect the generated program, it just affected how the
template definition was read.

% Local Variables:
% TeX-master: "devel_guide"
% End: