< prev index next >

src/hotspot/share/adlc/adlparse.cpp

Print this page




 466     else if (!strcmp(ident, "ins_encode")) {
 467       parse_err(SYNERR, "Operands specify 'encode', not 'ins_encode'\n");
 468     }
 469     else if (!strcmp(ident, "opcode"))    {
 470       parse_err(SYNERR, "Operands do not specify an opcode\n");
 471     }
 472     else if (!strcmp(ident, "effect"))    {
 473       parse_err(SYNERR, "Operands do not specify an effect\n");
 474     }
 475     else if (!strcmp(ident, "expand"))    {
 476       parse_err(SYNERR, "Operands do not specify an expand\n");
 477     }
 478     else if (!strcmp(ident, "rewrite"))   {
 479       parse_err(SYNERR, "Operands do not specify a rewrite\n");
 480     }
 481     else if (!strcmp(ident, "constraint"))oper->_constraint= constraint_parse();
 482     else if (!strcmp(ident, "construct")) oper->_construct = construct_parse();
 483     else if (!strcmp(ident, "format"))    oper->_format    = format_parse();
 484     else if (!strcmp(ident, "interface")) oper->_interface = interface_parse();
 485     // Check identifier to see if it is the name of an attribute
 486     else if (((attr = _globalNames[ident]->is_attribute()) != NULL) &&

 487              (attr->_atype == OP_ATTR))   oper->_attribs   = attr_parse(ident);
 488     else {
 489       parse_err(SYNERR, "expected one of - constraint, predicate, match, encode, format, construct, or the name of a defined operand attribute at %s\n", ident);
 490     }
 491     skipws();
 492   } while(_curchar != '%');
 493   next_char();
 494   if (_curchar != '}') {
 495     parse_err(SYNERR, "missing '%%}' in operand definition\n");
 496     return;
 497   }
 498   // Add operand to tail of operand list
 499   _AD.addForm(oper);
 500 }
 501 
 502 //------------------------------opclass_parse----------------------------------
 503 // Operand Classes are a block with a comma delimited list of operand names
 504 void ADLParser::opclass_parse(void) {
 505   char          *ident;
 506   OpClassForm   *opc;




 466     else if (!strcmp(ident, "ins_encode")) {
 467       parse_err(SYNERR, "Operands specify 'encode', not 'ins_encode'\n");
 468     }
 469     else if (!strcmp(ident, "opcode"))    {
 470       parse_err(SYNERR, "Operands do not specify an opcode\n");
 471     }
 472     else if (!strcmp(ident, "effect"))    {
 473       parse_err(SYNERR, "Operands do not specify an effect\n");
 474     }
 475     else if (!strcmp(ident, "expand"))    {
 476       parse_err(SYNERR, "Operands do not specify an expand\n");
 477     }
 478     else if (!strcmp(ident, "rewrite"))   {
 479       parse_err(SYNERR, "Operands do not specify a rewrite\n");
 480     }
 481     else if (!strcmp(ident, "constraint"))oper->_constraint= constraint_parse();
 482     else if (!strcmp(ident, "construct")) oper->_construct = construct_parse();
 483     else if (!strcmp(ident, "format"))    oper->_format    = format_parse();
 484     else if (!strcmp(ident, "interface")) oper->_interface = interface_parse();
 485     // Check identifier to see if it is the name of an attribute
 486     else if (_globalNames[ident] &&
 487              ((attr = _globalNames[ident]->is_attribute()) != NULL) &&
 488              (attr->_atype == OP_ATTR))   oper->_attribs   = attr_parse(ident);
 489     else {
 490       parse_err(SYNERR, "expected one of - constraint, predicate, match, encode, format, construct, or the name of a defined operand attribute at %s\n", ident);
 491     }
 492     skipws();
 493   } while(_curchar != '%');
 494   next_char();
 495   if (_curchar != '}') {
 496     parse_err(SYNERR, "missing '%%}' in operand definition\n");
 497     return;
 498   }
 499   // Add operand to tail of operand list
 500   _AD.addForm(oper);
 501 }
 502 
 503 //------------------------------opclass_parse----------------------------------
 504 // Operand Classes are a block with a comma delimited list of operand names
 505 void ADLParser::opclass_parse(void) {
 506   char          *ident;
 507   OpClassForm   *opc;


< prev index next >