1 /*
2 BattleOS : Engage battling programs.
3
4 Copyright (C) 1993 Erich P Gatejen ALL RIGHTS RESERVED
5
6
7 File : LINE.H
8 Purpose : Header file for the BattleOS Assembler Line processor class
9
10 !! Class Line provides all functions !!
11
12 */
13
14 // Enumerate element types
15 enum ElementTypes { COMMENT, // /
16 PROGNAME, // !
17 ASSIGN, // =
18 REFERENCE, // [
19 IMMEDIATEV, // $
20 ADDRESSM, // -
21 ADDRESSP, // +
22 LABEL, // @
23 TEXT, // TEXT, no specific id
24 TAUNTDEFINE, // "
25 TAUNTIMBED // <
26
27 };
28
29
30 // Declare the Element type
31 struct Element {
32 char* Text;
33 ElementTypes Type;
34
35 Element* Next;
36
37 public:
38
39 // Members
40 Element( char* String, int Size );
41 ~Element( void ) { delete Text; };
42
43 ElementTypes IsA( void ) { return Type; };
44
45 };
46
47 // Declare the Line class
48 class Line {
49
50 char Text[80];
51
52 // Element List pointers
53 Element* Head;
54 Element* Tail;
55
56 public:
57
58 Line( char* Input ); // Constructor, supply the line
59 ~Line(); // Destructor
60
61 BOOLEAN HasElement( void );
62 Element* PopNext( void );
63 Element* ShowNext( void ) { return Head; };
64
65 }; // end Line
66
|