|
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 - download
Length: 6144 (0x1800) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package Lexemes, seg_0057fe
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
with Text_Io; with Vstring_Type; use Vstring_Type; package Lexemes is ------------------------------------------------------------------------------ -- Recognition and separation of lexemes within the input stream. ------------------------------------------------------------------------------ -- Copyright 1989 - 1991 by Rational, Santa Clara, California. -- -- All Rights Reserved. -- -- Permission to use, copy, modify, and distribute this software and its -- documentation for any purpose and without fee is hereby granted, -- provided that the above copyright notice(s) appear in all copies and that -- both that copyright notice(s) and this permission notice appear in -- supporting documentation, and that the name of Rational not be used in -- advertising or publicity pertaining to distribution of the software -- without specific, written prior permission. -- -- Rational disclaims all warranties with regard to this software, including -- all implied warranties of merchantability and fitness, in no event shall -- Rational be liable for any special, indirect or consequential damages or -- any damages whatsoever resulting from loss of use, data or profits, whether -- in an action of contract, negligence or other tortious action, arising out -- of or in connection with the use or performance of this software. ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- Lexeme_Kind - The lexemes that we recognize ------------------------------------------------------------------------------ type Lexeme_Kind is (Lk_If, Lk_Then, Lk_Elsif, Lk_Else, Lk_End, Lk_Identifier, -- recognized parameter name Lk_Unknown, -- unknown/misspelled parameter name Lk_Not, Lk_And, Lk_Or, Lk_Xor, Lk_Eql, -- = Lk_Neq, -- /= -- lk_gtr, -- lk_lss, -- lk_geq, -- lk_leq, Lk_Vbar, -- | Lk_Arrow, -- => Lk_Comma, -- , Lk_Semicolon, -- ; Lk_Lparen, -- ( Lk_Rparen, -- ) Lk_Error, -- bad character, bad token Lk_Eol); -- end of line ------------------------------------------------------------------------------ -- Symbol_Value - Each named keyword or parameter has a value of this type and -- kind. ------------------------------------------------------------------------------ type Symbol_Kind is (Sk_Keyword, -- control keyword Sk_Boolean); -- boolean value type Symbol_Value (Kind : Symbol_Kind := Sk_Boolean) is record Permanent : Boolean; case Kind is when Sk_Keyword => Kwd : Lexeme_Kind; when Sk_Boolean => Bool : Boolean; end case; end record; --\x0c procedure Next_Lexeme (Line : Vstring; Lexeme : in out Lexeme_Kind; Text : in out Vstring; Value : in out Symbol_Value); ------------------------------------------------------------------------------ -- Line - Specifies the input line/fragment to scan -- Lexeme - Receives the Lexeme_Kind of the next lexeme -- Text - Receives the textual representation of the next lexeme; if any -- Value - Receives the value associated with the lexeme; if any -- -- Called to scan the Line and to recognize and remove the next lexeme. -- Lexeme is set to Lk_Error if we get confused. Lk_Eol is returned if -- the line is empty or ends with a comment. The Text argument is only -- set for Lk_Identifier values. The Value argument is changed for any -- lexeme value that is a name (keywords and parameter names); it's value -- only has meaning for Lk_Identifiers. ------------------------------------------------------------------------------ --\x0c end Lexemes;
nblk1=5 nid=0 hdr6=a [0x00] rec0=18 rec1=00 rec2=01 rec3=008 [0x01] rec0=12 rec1=00 rec2=02 rec3=090 [0x02] rec0=19 rec1=00 rec2=03 rec3=09c [0x03] rec0=1a rec1=00 rec2=04 rec3=022 [0x04] rec0=0d rec1=00 rec2=05 rec3=000 tail 0x21700aaf881978e72e004 0x42a00088462063203