re end-of-identifier mark lxi h,numids ; reset count of identifiers mvi m,0 ; idlist6:cpi 93 jz idlist5 ; check for identifier call perror db 26 ; idlist5:lhld savptr xchg ; DE -> to next lxi h,sconst ; HL -> word ; idlist1:push h push d ; lxi h,savarea+400 mov a,d ; cmp h ; check for savarea buffer overflow jnz idlist3 ; mov a,e cmp l jc idlist3 ; pop d pop h idlist2:call perror ; overflowed save area db 25 stc ; set error flag ret ; idlist3:pop d pop h mov a,m ; stax d ; move from sconst to savarea inx h ; inx d cpi eos jnz idlist1 ; xchg mvi m,0 ; stuf end of id list mark ; shld savptr lxi h,numids inr m ; call insymbol cpi 77 ; colon? (all id lists end with this) stc!cmc ; reset error byte rz ; cpi 73 ; comma? jnz idlist4 call insymbol ; yes, get next identifier & process jmp idlist6 ; idlist4:call perror ; "," or ":" expected db 24 stc ; forget it ret ; ******************************************************************* * subtype_indication ::= type_mark [constraint] * ******************************************************************* ; subtype$ind: shld host ; save host entry lda token cpi 10 ; ARRAY? jnz sti0 call perror db 10 ; illegal use of array call array$typ$def ; process anyway ret ; sti0: call type$mark ; return type_mark in de call insymbol ; get next symbol lhld host lxi b,class dad b ; hl -> class of host mov a,m cpi type ; was he a type? jnz tmc0 ; no, go process normally lxi b,structure-class dad b ; hl -> structure mov a,m cpi subtype ; subtype/derived type? jc tmc0 ; no, go process normally ; ; stuff type_mark [constraint] into subtype/derived type ; storset bstyp-structure ; stuff typ_mark to base type of subtype/derived lda token cpi 49 ; RANGE? jz tmc4 ; yes, process constraint cpi 69 ; left parenthesis? rnz ; no, exit tmc4: lhld host call constraint