snapkitty
hardware
ada
File size: 859 Bytes
52edc5a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
with Core_Types; use Core_Types;
with Memory_Structures;
with Errors;
package Parser is
   type Parsed_Command is record
      Id : Command_Id := Cmd_None;
      Arg_Count : Natural := 0;
      Args : Byte_Array (0 .. Max_Command_Args - 1) := (others => 0);
      Raw : Bounded_String := (others => ' ');
   end record;
   function Parse_Line (Line : String; Cmd : out Parsed_Command; Log : in out Errors.Error_Log) return Status_Code;
   function Is_Whitespace (C : Character) return Boolean;
   function Is_Digit (C : Character) return Boolean;
   function Is_Alpha (C : Character) return Boolean;
   function Is_Alnum (C : Character) return Boolean;
   function Char_To_Byte (C : Character) return Byte;
   function Byte_To_Char (B : Byte) return Character;
   function Command_Requires_Args (C : Command_Id) return Boolean;
end Parser;