Fully synchronize sys/boot from FreeBSD-5.x, but add / to the module path
[dragonfly.git] / sys / boot / ficl / softwords / ficllocal.fr
CommitLineData
984263bc
MD
1\ ** ficl/softwords/ficllocal.fr
2\ ** stack comment style local syntax...
3\ {{ a b c -- d e }}
4\ variables before the "--" are initialized in reverse order
5\ from the stack. Those after the "--" are zero initialized
6\ Uses locals...
7\ locstate: 0 = looking for -- or }}
8\ 1 = found --
9\
10\ $FreeBSD: src/sys/boot/ficl/softwords/ficllocal.fr,v 1.1 1999/09/29 04:43:15 dcs Exp $
5ee58eed 11\ $DragonFly: src/sys/boot/ficl/softwords/ficllocal.fr,v 1.3 2003/11/10 06:08:34 dillon Exp $
984263bc
MD
12
13hide
140 constant zero
15
16: ?-- s" --" compare 0= ;
17: ?}} s" }}" compare 0= ;
18
19set-current
20
21: {{
22 0 dup locals| nLocs locstate |
23 begin
24 parse-word
25 ?dup 0= abort" Error: out of text without seeing }}"
26 2dup 2dup ?-- -rot ?}} or 0=
27 while
28 nLocs 1+ to nLocs
29 repeat
30
31 ?-- if 1 to locstate endif
32
33 nLocs 0 do
34 (local)
35 loop
36
37 locstate 1 = if
38 begin
39 parse-word
40 2dup ?}} 0=
41 while
42 postpone zero (local)
43 repeat
44 2drop
45 endif
46
47 0 0 (local)
48; immediate compile-only
49
50previous