47 class Attribute; 48 class Effect; 49 class ExpandRule; 50 class RewriteRule; 51 class Constraint; 52 class ConstructRule; 53 // ***** Register Section ***** 54 class RegDef; 55 class RegClass; 56 class AllocClass; 57 class ResourceForm; 58 // ***** Pipeline Section ***** 59 class PipeDesc; 60 class PipeClass; 61 class RegList; 62 // ***** Peephole Section ***** 63 class PeepMatch; 64 class PeepConstraint; 65 class PeepReplace; 66 67 // class ostream; // ostream is a typedef in some systems 68 69 extern char *toUpper(const char *str); 70 71 //---------------------------ADLParser----------------------------------------- 72 class ADLParser { 73 protected: 74 char *_curline; // Start of current line 75 char *_ptr; // Pointer into current location in File Buffer 76 char _curchar; // Current character from buffer 77 FormDict &_globalNames; // Global names 78 79 enum { _preproc_limit = 20 }; 80 int _preproc_depth; // How deep are we into ifdefs? 81 int _preproc_not_taken; // How deep in not-taken ifdefs? 82 bool _preproc_taken[_preproc_limit]; // Are we taking this ifdef level? 83 bool _preproc_else[_preproc_limit]; // Did this level have an else yet? 84 85 // ***** Level 1 Parse functions ***** 86 void instr_parse(void); // Parse instruction definitions 87 void oper_parse(void); // Parse operand definitions 88 void opclass_parse(void); // Parse operand class definitions | 47 class Attribute; 48 class Effect; 49 class ExpandRule; 50 class RewriteRule; 51 class Constraint; 52 class ConstructRule; 53 // ***** Register Section ***** 54 class RegDef; 55 class RegClass; 56 class AllocClass; 57 class ResourceForm; 58 // ***** Pipeline Section ***** 59 class PipeDesc; 60 class PipeClass; 61 class RegList; 62 // ***** Peephole Section ***** 63 class PeepMatch; 64 class PeepConstraint; 65 class PeepReplace; 66 67 extern char *toUpper(const char *str); 68 69 //---------------------------ADLParser----------------------------------------- 70 class ADLParser { 71 protected: 72 char *_curline; // Start of current line 73 char *_ptr; // Pointer into current location in File Buffer 74 char _curchar; // Current character from buffer 75 FormDict &_globalNames; // Global names 76 77 enum { _preproc_limit = 20 }; 78 int _preproc_depth; // How deep are we into ifdefs? 79 int _preproc_not_taken; // How deep in not-taken ifdefs? 80 bool _preproc_taken[_preproc_limit]; // Are we taking this ifdef level? 81 bool _preproc_else[_preproc_limit]; // Did this level have an else yet? 82 83 // ***** Level 1 Parse functions ***** 84 void instr_parse(void); // Parse instruction definitions 85 void oper_parse(void); // Parse operand definitions 86 void opclass_parse(void); // Parse operand class definitions |