|
|
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: 3072 (0xc00)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Token_Pkg, seg_04279e
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
package body Token_Pkg is
type Keywords is (Vrai, Faux, Mais, Peut, Etre, Constitue, De,
Dans, La, Piece, Est, Ou, Et, Non, Si, Alors,
Fin_Si, Vaut, Dire, Jeu_Termine, Directions,
Pieces, Objets, Liens, Pnjs, Hero, Actions,
Scenario, Generales, Locales, Pseudo_Generales,
Piece_Courante, Objet, Pnj, Direction, Lien);
function Iskeyword (Word : in String) return Boolean is
--------------------------------------------------------------------------------
-- <SUBPROGRAM>
-- <UNIT> IsKeyWord
--
-- <DESCRIPTION> check if the string in input is a keyword of the langage.
--
-- <EXCEPTIONS> Nothing
--
--------------------------------------------------------------------------------
K : Keywords;
begin
-- Mettre la chaine word en MAJUSCULE
K := Keywords'Value (Word);
return True;
exception
when Constraint_Error =>
return False;
end Iskeyword;
function To_Token (Word : in String) return Token is
--------------------------------------------------------------------------------
-- <SUBPROGRAM>
-- <UNIT> To_Token
--
-- <DESCRIPTION> convert a string to a token.
--
-- <EXCEPTIONS> Nothing
--
--------------------------------------------------------------------------------
begin
return (Token'Val (Keywords'Pos (Keywords'Value (Word))));
end To_Token;
end Token_Pkg;
nblk1=2
nid=0
hdr6=4
[0x00] rec0=1b rec1=00 rec2=01 rec3=00e
[0x01] rec0=14 rec1=00 rec2=02 rec3=001
tail 0x217435078862f6c41af1c 0x42a00088462060003