aboutsummaryrefslogtreecommitdiff
path: root/unix/boot/spp/rpp/rpprat/gocode.r
blob: 26e201c4eb453a95bee6ff82ef7e90084bf7b921 (plain) (blame)
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
include  defs

# GOCODE - generate code for goto statement

subroutine gocode

character token (MAXTOK), t
character gnbtok
integer	ctoi, i
include	COMMON_BLOCKS

	t = gnbtok (token, MAXTOK)
	if (t != DIGIT)
	    call synerr ("Invalid label for goto.")
	else {
	    call outtab
	    i = 1
	    call ogotos (ctoi(token,i), NO)
	}
	xfer = YES

	for (t=gnbtok(token,MAXTOK);  t == NEWLINE;  t=gnbtok(token,MAXTOK))
	    ;
	call pbstr (token)
end