forked from urbiforge/urbi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathurbi-sandbox.tex
223 lines (152 loc) · 4.7 KB
/
urbi-sandbox.tex
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
%% Copyright (C) 2010-2012, Gostai S.A.S.
%%
%% This software is provided "as is" without warranty of any kind,
%% either expressed or implied, including but not limited to the
%% implied warranties of fitness for a particular purpose.
%%
%% See the LICENSE file for more information.
\documentclass[openright,twoside,11pt]{book}
% \usepackage[svgnames]{xcolor} \usepackage{experiment}
\usepackage{urbi-sdk}
\usepackage{lipsum}
\usepackage{multirow}
\title{Urbi Documentation Sandbox}
\shorttitle{Urbi Sandbox \packageVersion}
\subtitle{Version \VcsDescription}
\author{Gostai}
\abstract{This document is not to be published, its point is to toy with
\LaTeX{}. \lipsum[1]}
\begin{document}
\maketitle
\tableofcontents
\chapter{First Chapter}
A useless definition of \lstindex{return}.
\section{\lstinline{while} \lstinline{forPipe}}
\section{\texorpdfstring{\lstinline{for&}}{for\&}}
This is the first chapter\footnote{Footnotes are ugly.}.
\grammar{class-exp, lvalue-end, block-exp}
\begin{verbatim}
for (var i: 10)
echo(i);
\end{verbatim}
\begin{urbiunchecked}
'if' + 'else' + 'bitand';
'if'+'else'+'bitand';
'if'.'else'.'bitand';
.'else';
x xor_eq a;
a.'bitand'(b);
a' "foo";
a'' "foo";
a''' "foo";
"else";
"foo";
[00048238] "foo"
\end{urbiunchecked}
% \grammar{}
\begin{verbatim}
for (var i: 10)
echo(i);
\end{verbatim}
\begin{verbatim}[language=gdb]
(gdb) urbi break input.u:2 Lobby_0x7ffff7f03208.foo(["2" => 2])
UBreakpoint 1:
Location: input.u:2
Lobby_0x7ffff7f03208.foo(["2" => 2])
(gdb) c
Continuing.
//#push 1 "input.u"
function foo (x) { backtrace }|;
for(var i: [1, 2, 3]) foo([i.asString => i]);
[00219506:backtrace] foo (input.u:2.23-44)
[00219506:backtrace] each (input.u:2.12-44)
UBreakpoint 1: [input.u:2.23-45] Lobby_0x7ffff7f03208.foo(["2" => 2])
Inside Job 0x6a2f70
(gdb) urbi stack
#12 [input.u:1.20-29] Lobby_0x7ffff7f03208.backtrace()
#16 [input.u:1.20-29] Call backtrace
#55 [input.u:2.1-40] Stmt
(gdb) #% comment
\end{verbatim}
\begin{urbiassert}
1+2 == 3;
\end{urbiassert}
\sectionObject{Bar}
See also \refObject{Foo}.
\begin{urbiscriptapi}
\item['!'](<arg>) Another test about bang.
\item[!] A test about bang.
\item['!='](<arg>) Another test about bang.
\item['!=='](<arg>) Another test about bang.
Short-circuiting logical or. If \this is \lstinline|false| evaluate and
\item['&&'](<arg>) Another test about bang.
%\item['\%'](<arg>) Another test about bang.
\item[bar] This is Bar.bar.
\item[foo](<x>) This is Bar.foo with arguments.
\item|fun[foo][bar]|(<var>) a function
\item \lstinline|I do it myself|
\item beware (not to catch the first word)
\item[set](<key>, <value>) Map \var{key} to \var{value} and return \this so
that invocations to \lstinline|set| can be chained. The possibly existing
previous mapping is overridden.
\item|slot[foo][bar]| a slot
\end{urbiscriptapi}
\sectionObject{Foo}
See also \refObject{Bar}.
\begin{urbiscriptapi}
\item[bar] This is Foo.bar.
\item[foo] This is Foo.foo.
\end{urbiscriptapi}
\section{Second Section}
\begin{urbiunchecked}[escapeinside=<>]
#<Été>;
[00048238:error] !!! invalid character: `#'
[00048239:error] !!! invalid character: `\xc3'
[00048239:error] !!! invalid character: `\x89'
[00048239:error] !!! invalid character: `\xc3'
[00048239:error] !!! invalid character: `\xa9'
\end{urbiunchecked}
\chapter{Second Chapter}
This is the second chapter, with a useful definition of
\lstindexMain{return}.
\urbitrajectory{smooth}
\urbitrajectory{accel}
\begin{urbiscriptapi}
\item[ccwLimit]
%% FIXME: Something horrible happens when the slot name starts with twice
%% the same letter. I have no idea what's going on, I need to make a
%% small self-contained example and ask for help.
Set max reachable angle. When both \refSlot{cwLimit} and
\refSlot{ccwLimit} equal 0, the motor is put in continuous rotation
mode. In this mode, writing to \refSlot{val} has no effect: the motor
moves at the speed given by the \refSlot{speed} slot.
\item[count] Return the count.
\item[launch]
Fire \this.
\item \lstinline|launch1|~\\
Fire \this.
\end{urbiscriptapi}
\let\sectionOrig\section
\renewcommand{\section}[1]{\clearpage\sectionObject{#1}}
\sectionOrig{Empty section}
\input{specs/pair}
\input{specs/tuple}
\let\section\sectionOrig
You want to use \refSlot[Foo]{foo}, and possibly \refSlot[Bar]{foo}.
\settocbibname{\label{sec:bib}The Bibliography}
\setindexname{\label{sec:index}The Index}
\bibliographystyle{plain}
\bibliography{comp.lang.urbi}
\nocite{*}
\input{tables/notation}
\chapterIndex
\end{document}
%%% Local Variables:
%%% coding: utf-8
%%% mode: latex
%%% coding: utf-8
%%% TeX-master: t
%%% ispell-dictionary: "american"
%%% ispell-personal-dictionary: "urbi.dict"
%%% fill-column: 76
%%% End: