|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 4096 (0x1000) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, function Next_Token_Scanner, seg_00fde2
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─⟦5a81ac88f⟧ »Space Info Vol 1« └─⟦this⟧
function Next_Token_Scanner return String is -- global parameters: Buffer, Buffer_Index Token_Start : Natural; Next_Char : Character; Quote : constant Character := '"'; begin while Buffer_Index <= Buffer'Last and then Buffer (Buffer_Index) = ' ' loop Buffer_Index := Buffer_Index + 1; end loop; Token_Start := Buffer_Index; if Buffer_Index > Buffer'Last then return ""; end if; if Buffer (Buffer_Index) = Quote then -- quoted string token; look for ending Quote Buffer_Index := Buffer_Index + 1; -- point to 1st string char Token_Start := Buffer_Index; while Buffer_Index <= Buffer'Last loop Next_Char := Buffer (Buffer_Index); Buffer_Index := Buffer_Index + 1; if Next_Char = Quote then -- if 2 quotes in a row; treat as one quote -- single quote; end of token if Buffer_Index > Buffer'Last or else Buffer (Buffer_Index) /= Quote then -- Just one quote. Done return Buffer (Token_Start .. Buffer_Index - 1); else -- Got 2 quotes! -- Shift array left 1. Leave Buffer_Index -- at char past double-" Buffer (Buffer_Index .. Buffer'Last - 1) := Buffer (Buffer_Index + 1 .. Buffer'Last); end if; end if; end loop; -- open but no matching quote return Buffer (Token_Start .. Buffer'Last); else while Buffer_Index <= Buffer'Last loop -- regular case; just eat chars till delimiter Next_Char := Buffer (Buffer_Index); Buffer_Index := Buffer_Index + 1; case Next_Char is when '!' .. '~' => -- all printing characters null; when others => exit; end case; end loop; if Buffer_Index > Buffer'Last then return Buffer (Token_Start .. Buffer'Last); else return Buffer (Token_Start .. Buffer_Index - 2); -- delim + incremented again end if; end if; end Next_Token_Scanner;
nblk1=3 nid=0 hdr6=6 [0x00] rec0=1b rec1=00 rec2=01 rec3=054 [0x01] rec0=18 rec1=00 rec2=02 rec3=01a [0x02] rec0=10 rec1=00 rec2=03 rec3=000 tail 0x2150bb450822f6350b21d 0x42a00088462060003