• Home
  • Raw
  • Download

Lines Matching refs:Lex

310   if (Lex.getCode() != tgtok::Id)  in ParseObjectName()
313 std::string Ret = Lex.getCurStrVal(); in ParseObjectName()
314 Lex.Lex(); in ParseObjectName()
325 if (Lex.getCode() != tgtok::Id) { in ParseClassID()
330 Record *Result = Records.getClass(Lex.getCurStrVal()); in ParseClassID()
332 TokError("Couldn't find class '" + Lex.getCurStrVal() + "'"); in ParseClassID()
334 Lex.Lex(); in ParseClassID()
344 if (Lex.getCode() != tgtok::Id) { in ParseMultiClassID()
349 MultiClass *Result = MultiClasses[Lex.getCurStrVal()]; in ParseMultiClassID()
351 TokError("Couldn't find class '" + Lex.getCurStrVal() + "'"); in ParseMultiClassID()
353 Lex.Lex(); in ParseMultiClassID()
358 if (Lex.getCode() != tgtok::Id) { in ParseDefmID()
363 MultiClass *MC = MultiClasses[Lex.getCurStrVal()]; in ParseDefmID()
365 TokError("Couldn't find multiclass '" + Lex.getCurStrVal() + "'"); in ParseDefmID()
369 Lex.Lex(); in ParseDefmID()
383 Result.RefLoc = Lex.getLoc(); in ParseSubClassReference()
392 if (Lex.getCode() != tgtok::less) in ParseSubClassReference()
394 Lex.Lex(); // Eat the '<' in ParseSubClassReference()
396 if (Lex.getCode() == tgtok::greater) { in ParseSubClassReference()
408 if (Lex.getCode() != tgtok::greater) { in ParseSubClassReference()
413 Lex.Lex(); in ParseSubClassReference()
428 Result.RefLoc = Lex.getLoc(); in ParseSubMultiClassReference()
434 if (Lex.getCode() != tgtok::less) in ParseSubMultiClassReference()
436 Lex.Lex(); // Eat the '<' in ParseSubMultiClassReference()
438 if (Lex.getCode() == tgtok::greater) { in ParseSubMultiClassReference()
450 if (Lex.getCode() != tgtok::greater) { in ParseSubMultiClassReference()
455 Lex.Lex(); in ParseSubMultiClassReference()
465 if (Lex.getCode() != tgtok::IntVal) { in ParseRangePiece()
469 int64_t Start = Lex.getCurIntVal(); in ParseRangePiece()
475 switch (Lex.Lex()) { // eat first character. in ParseRangePiece()
480 if (Lex.Lex() != tgtok::IntVal) { in ParseRangePiece()
484 End = Lex.getCurIntVal(); in ParseRangePiece()
487 End = -Lex.getCurIntVal(); in ParseRangePiece()
492 Lex.Lex(); in ParseRangePiece()
515 while (Lex.getCode() == tgtok::comma) { in ParseRangeList()
516 Lex.Lex(); // Eat the comma. in ParseRangeList()
529 if (Lex.getCode() != tgtok::less) in ParseOptionalRangeList()
532 SMLoc StartLoc = Lex.getLoc(); in ParseOptionalRangeList()
533 Lex.Lex(); // eat the '<' in ParseOptionalRangeList()
539 if (Lex.getCode() != tgtok::greater) { in ParseOptionalRangeList()
543 Lex.Lex(); // eat the '>'. in ParseOptionalRangeList()
551 if (Lex.getCode() != tgtok::l_brace) in ParseOptionalBitList()
554 SMLoc StartLoc = Lex.getLoc(); in ParseOptionalBitList()
555 Lex.Lex(); // eat the '{' in ParseOptionalBitList()
561 if (Lex.getCode() != tgtok::r_brace) { in ParseOptionalBitList()
565 Lex.Lex(); // eat the '}'. in ParseOptionalBitList()
582 switch (Lex.getCode()) { in ParseType()
584 case tgtok::String: Lex.Lex(); return StringRecTy::get(); in ParseType()
585 case tgtok::Bit: Lex.Lex(); return BitRecTy::get(); in ParseType()
586 case tgtok::Int: Lex.Lex(); return IntRecTy::get(); in ParseType()
587 case tgtok::Code: Lex.Lex(); return CodeRecTy::get(); in ParseType()
588 case tgtok::Dag: Lex.Lex(); return DagRecTy::get(); in ParseType()
593 if (Lex.Lex() != tgtok::less) { // Eat 'bits' in ParseType()
597 if (Lex.Lex() != tgtok::IntVal) { // Eat '<' in ParseType()
601 uint64_t Val = Lex.getCurIntVal(); in ParseType()
602 if (Lex.Lex() != tgtok::greater) { // Eat count. in ParseType()
606 Lex.Lex(); // Eat '>' in ParseType()
610 if (Lex.Lex() != tgtok::less) { // Eat 'bits' in ParseType()
614 Lex.Lex(); // Eat '<' in ParseType()
618 if (Lex.getCode() != tgtok::greater) { in ParseType()
622 Lex.Lex(); // Eat '>' in ParseType()
637 assert(Lex.getCode() == tgtok::Id && "Expected ID in ParseIDValue"); in ParseIDValue()
638 std::string Name = Lex.getCurStrVal(); in ParseIDValue()
639 SMLoc Loc = Lex.getLoc(); in ParseIDValue()
640 Lex.Lex(); in ParseIDValue()
684 switch (Lex.getCode()) { in ParseOperation()
696 switch (Lex.getCode()) { in ParseOperation()
699 Lex.Lex(); // eat the operation in ParseOperation()
711 Lex.Lex(); // eat the operation in ParseOperation()
715 Lex.Lex(); // eat the operation in ParseOperation()
719 Lex.Lex(); // eat the operation in ParseOperation()
724 if (Lex.getCode() != tgtok::l_paren) { in ParseOperation()
728 Lex.Lex(); // eat the '(' in ParseOperation()
791 if (Lex.getCode() != tgtok::r_paren) { in ParseOperation()
795 Lex.Lex(); // eat the ')' in ParseOperation()
805 tgtok::TokKind OpTok = Lex.getCode(); in ParseOperation()
806 SMLoc OpLoc = Lex.getLoc(); in ParseOperation()
807 Lex.Lex(); // eat the operation in ParseOperation()
825 if (Lex.getCode() != tgtok::l_paren) { in ParseOperation()
829 Lex.Lex(); // eat the '(' in ParseOperation()
836 while (Lex.getCode() == tgtok::comma) { in ParseOperation()
837 Lex.Lex(); // eat the ',' in ParseOperation()
843 if (Lex.getCode() != tgtok::r_paren) { in ParseOperation()
847 Lex.Lex(); // eat the ')' in ParseOperation()
874 tgtok::TokKind LexCode = Lex.getCode(); in ParseOperation()
875 Lex.Lex(); // eat the operation in ParseOperation()
888 if (Lex.getCode() != tgtok::l_paren) { in ParseOperation()
892 Lex.Lex(); // eat the '(' in ParseOperation()
897 if (Lex.getCode() != tgtok::comma) { in ParseOperation()
901 Lex.Lex(); // eat the ',' in ParseOperation()
906 if (Lex.getCode() != tgtok::comma) { in ParseOperation()
910 Lex.Lex(); // eat the ',' in ParseOperation()
915 if (Lex.getCode() != tgtok::r_paren) { in ParseOperation()
919 Lex.Lex(); // eat the ')' in ParseOperation()
1004 if (Lex.getCode() != tgtok::less) { in ParseOperatorType()
1008 Lex.Lex(); // eat the < in ParseOperatorType()
1017 if (Lex.getCode() != tgtok::greater) { in ParseOperatorType()
1021 Lex.Lex(); // eat the > in ParseOperatorType()
1046 switch (Lex.getCode()) { in ParseSimpleValue()
1048 case tgtok::IntVal: R = IntInit::get(Lex.getCurIntVal()); Lex.Lex(); break; in ParseSimpleValue()
1050 std::string Val = Lex.getCurStrVal(); in ParseSimpleValue()
1051 Lex.Lex(); in ParseSimpleValue()
1054 while (Lex.getCode() == tgtok::StrVal) { in ParseSimpleValue()
1055 Val += Lex.getCurStrVal(); in ParseSimpleValue()
1056 Lex.Lex(); in ParseSimpleValue()
1063 R = CodeInit::get(Lex.getCurStrVal()); in ParseSimpleValue()
1064 Lex.Lex(); in ParseSimpleValue()
1068 Lex.Lex(); in ParseSimpleValue()
1071 SMLoc NameLoc = Lex.getLoc(); in ParseSimpleValue()
1072 std::string Name = Lex.getCurStrVal(); in ParseSimpleValue()
1073 if (Lex.Lex() != tgtok::less) // consume the Id. in ParseSimpleValue()
1077 if (Lex.Lex() == tgtok::greater) { in ParseSimpleValue()
1094 if (Lex.getCode() != tgtok::greater) { in ParseSimpleValue()
1098 Lex.Lex(); // eat the '>' in ParseSimpleValue()
1119 SMLoc BraceLoc = Lex.getLoc(); in ParseSimpleValue()
1120 Lex.Lex(); // eat the '{' in ParseSimpleValue()
1123 if (Lex.getCode() != tgtok::r_brace) { in ParseSimpleValue()
1127 if (Lex.getCode() != tgtok::r_brace) { in ParseSimpleValue()
1131 Lex.Lex(); // eat the '}' in ParseSimpleValue()
1147 Lex.Lex(); // eat the '[' in ParseSimpleValue()
1165 if (Lex.getCode() != tgtok::r_square) { in ParseSimpleValue()
1170 if (Lex.getCode() != tgtok::r_square) { in ParseSimpleValue()
1174 Lex.Lex(); // eat the ']' in ParseSimpleValue()
1177 if (Lex.getCode() == tgtok::less) { in ParseSimpleValue()
1179 Lex.Lex(); // eat the '<' in ParseSimpleValue()
1187 if (Lex.getCode() != tgtok::greater) { in ParseSimpleValue()
1191 Lex.Lex(); // eat the '>' in ParseSimpleValue()
1246 Lex.Lex(); // eat the '(' in ParseSimpleValue()
1247 if (Lex.getCode() != tgtok::Id && Lex.getCode() != tgtok::XCast) { in ParseSimpleValue()
1257 if (Lex.getCode() == tgtok::colon) { in ParseSimpleValue()
1258 if (Lex.Lex() != tgtok::VarName) { // eat the ':' in ParseSimpleValue()
1262 OperatorName = Lex.getCurStrVal(); in ParseSimpleValue()
1263 Lex.Lex(); // eat the VarName. in ParseSimpleValue()
1267 if (Lex.getCode() != tgtok::r_paren) { in ParseSimpleValue()
1272 if (Lex.getCode() != tgtok::r_paren) { in ParseSimpleValue()
1276 Lex.Lex(); // eat the ')' in ParseSimpleValue()
1314 switch (Lex.getCode()) { in ParseValue()
1317 SMLoc CurlyLoc = Lex.getLoc(); in ParseValue()
1318 Lex.Lex(); // eat the '{' in ParseValue()
1331 if (Lex.getCode() != tgtok::r_brace) { in ParseValue()
1335 Lex.Lex(); in ParseValue()
1339 SMLoc SquareLoc = Lex.getLoc(); in ParseValue()
1340 Lex.Lex(); // eat the '[' in ParseValue()
1351 if (Lex.getCode() != tgtok::r_square) { in ParseValue()
1355 Lex.Lex(); in ParseValue()
1359 if (Lex.Lex() != tgtok::Id) { // eat the . in ParseValue()
1363 if (!Result->getFieldType(Lex.getCurStrVal())) { in ParseValue()
1364 TokError("Cannot access field '" + Lex.getCurStrVal() + "' of value '" + in ParseValue()
1368 Result = FieldInit::get(Result, Lex.getCurStrVal()); in ParseValue()
1369 Lex.Lex(); // eat field name in ParseValue()
1389 if (Lex.getCode() == tgtok::colon) { in ParseDagArgList()
1390 if (Lex.Lex() != tgtok::VarName) { // eat the ':' in ParseDagArgList()
1394 VarName = Lex.getCurStrVal(); in ParseDagArgList()
1395 Lex.Lex(); // eat the VarName. in ParseDagArgList()
1400 if (Lex.getCode() != tgtok::comma) break; in ParseDagArgList()
1401 Lex.Lex(); // eat the ',' in ParseDagArgList()
1433 while (Lex.getCode() == tgtok::comma) { in ParseValueList()
1434 Lex.Lex(); // Eat the comma in ParseValueList()
1468 bool HasField = Lex.getCode() == tgtok::Field; in ParseDeclaration()
1469 if (HasField) Lex.Lex(); in ParseDeclaration()
1474 if (Lex.getCode() != tgtok::Id) { in ParseDeclaration()
1479 SMLoc IdLoc = Lex.getLoc(); in ParseDeclaration()
1480 std::string DeclName = Lex.getCurStrVal(); in ParseDeclaration()
1481 Lex.Lex(); in ParseDeclaration()
1498 if (Lex.getCode() == tgtok::equal) { in ParseDeclaration()
1499 Lex.Lex(); in ParseDeclaration()
1500 SMLoc ValLoc = Lex.getLoc(); in ParseDeclaration()
1518 assert(Lex.getCode() == tgtok::less && "Not a template arg list!"); in ParseTemplateArgList()
1519 Lex.Lex(); // eat the '<' in ParseTemplateArgList()
1530 while (Lex.getCode() == tgtok::comma) { in ParseTemplateArgList()
1531 Lex.Lex(); // eat the ',' in ParseTemplateArgList()
1540 if (Lex.getCode() != tgtok::greater) in ParseTemplateArgList()
1542 Lex.Lex(); // eat the '>'. in ParseTemplateArgList()
1552 if (Lex.getCode() != tgtok::Let) { in ParseBodyItem()
1556 if (Lex.getCode() != tgtok::semi) in ParseBodyItem()
1558 Lex.Lex(); in ParseBodyItem()
1563 if (Lex.Lex() != tgtok::Id) in ParseBodyItem()
1566 SMLoc IdLoc = Lex.getLoc(); in ParseBodyItem()
1567 std::string FieldName = Lex.getCurStrVal(); in ParseBodyItem()
1568 Lex.Lex(); // eat the field name. in ParseBodyItem()
1575 if (Lex.getCode() != tgtok::equal) in ParseBodyItem()
1577 Lex.Lex(); // eat the '='. in ParseBodyItem()
1588 if (Lex.getCode() != tgtok::semi) in ParseBodyItem()
1590 Lex.Lex(); in ParseBodyItem()
1604 if (Lex.getCode() == tgtok::semi) { in ParseBody()
1605 Lex.Lex(); in ParseBody()
1609 if (Lex.getCode() != tgtok::l_brace) in ParseBody()
1612 Lex.Lex(); in ParseBody()
1614 while (Lex.getCode() != tgtok::r_brace) in ParseBody()
1619 Lex.Lex(); in ParseBody()
1634 if (Lex.getCode() == tgtok::colon) { in ParseObjectBody()
1635 Lex.Lex(); in ParseObjectBody()
1647 if (Lex.getCode() != tgtok::comma) break; in ParseObjectBody()
1648 Lex.Lex(); // eat ','. in ParseObjectBody()
1669 SMLoc DefLoc = Lex.getLoc(); in ParseDef()
1670 assert(Lex.getCode() == tgtok::Def && "Unknown tok"); in ParseDef()
1671 Lex.Lex(); // Eat the 'def' token. in ParseDef()
1728 assert(Lex.getCode() == tgtok::Class && "Unexpected token!"); in ParseClass()
1729 Lex.Lex(); in ParseClass()
1731 if (Lex.getCode() != tgtok::Id) in ParseClass()
1734 Record *CurRec = Records.getClass(Lex.getCurStrVal()); in ParseClass()
1743 CurRec = new Record(Lex.getCurStrVal(), Lex.getLoc(), Records); in ParseClass()
1746 Lex.Lex(); // eat the name. in ParseClass()
1749 if (Lex.getCode() == tgtok::less) in ParseClass()
1767 if (Lex.getCode() != tgtok::Id) { in ParseLetList()
1771 std::string Name = Lex.getCurStrVal(); in ParseLetList()
1772 SMLoc NameLoc = Lex.getLoc(); in ParseLetList()
1773 Lex.Lex(); // Eat the identifier. in ParseLetList()
1781 if (Lex.getCode() != tgtok::equal) { in ParseLetList()
1785 Lex.Lex(); // eat the '='. in ParseLetList()
1793 if (Lex.getCode() != tgtok::comma) in ParseLetList()
1795 Lex.Lex(); // eat the comma. in ParseLetList()
1806 assert(Lex.getCode() == tgtok::Let && "Unexpected token"); in ParseTopLevelLet()
1807 Lex.Lex(); in ParseTopLevelLet()
1814 if (Lex.getCode() != tgtok::In) in ParseTopLevelLet()
1816 Lex.Lex(); in ParseTopLevelLet()
1819 if (Lex.getCode() != tgtok::l_brace) { in ParseTopLevelLet()
1824 SMLoc BraceLoc = Lex.getLoc(); in ParseTopLevelLet()
1826 Lex.Lex(); // eat the '{'. in ParseTopLevelLet()
1832 if (Lex.getCode() != tgtok::r_brace) { in ParseTopLevelLet()
1836 Lex.Lex(); in ParseTopLevelLet()
1850 assert(Lex.getCode() == tgtok::MultiClass && "Unexpected token"); in ParseMultiClass()
1851 Lex.Lex(); // Eat the multiclass token. in ParseMultiClass()
1853 if (Lex.getCode() != tgtok::Id) in ParseMultiClass()
1855 std::string Name = Lex.getCurStrVal(); in ParseMultiClass()
1861 Lex.getLoc(), Records); in ParseMultiClass()
1862 Lex.Lex(); // Eat the identifier. in ParseMultiClass()
1865 if (Lex.getCode() == tgtok::less) in ParseMultiClass()
1872 if (Lex.getCode() == tgtok::colon) { in ParseMultiClass()
1875 Lex.Lex(); in ParseMultiClass()
1888 if (Lex.getCode() != tgtok::comma) break; in ParseMultiClass()
1889 Lex.Lex(); // eat ','. in ParseMultiClass()
1894 if (Lex.getCode() != tgtok::l_brace) { in ParseMultiClass()
1897 else if (Lex.getCode() != tgtok::semi) in ParseMultiClass()
1900 Lex.Lex(); // eat the ';'. in ParseMultiClass()
1902 if (Lex.Lex() == tgtok::r_brace) // eat the '{'. in ParseMultiClass()
1905 while (Lex.getCode() != tgtok::r_brace) { in ParseMultiClass()
1906 switch (Lex.getCode()) { in ParseMultiClass()
1917 Lex.Lex(); // eat the '}'. in ParseMultiClass()
2038 assert(Lex.getCode() == tgtok::Defm && "Unexpected token!"); in ParseDefm()
2041 if (Lex.Lex() == tgtok::Id) { // eat the defm. in ParseDefm()
2042 DefmPrefix = Lex.getCurStrVal(); in ParseDefm()
2043 Lex.Lex(); // Eat the defm prefix. in ParseDefm()
2046 SMLoc DefmPrefixLoc = Lex.getLoc(); in ParseDefm()
2047 if (Lex.getCode() != tgtok::colon) in ParseDefm()
2057 Lex.Lex(); in ParseDefm()
2059 SMLoc SubClassLoc = Lex.getLoc(); in ParseDefm()
2095 if (Lex.getCode() != tgtok::comma) break; in ParseDefm()
2096 Lex.Lex(); // eat ','. in ParseDefm()
2098 SubClassLoc = Lex.getLoc(); in ParseDefm()
2102 InheritFromClass = (Records.getClass(Lex.getCurStrVal()) != 0); in ParseDefm()
2135 if (Lex.getCode() != tgtok::comma) break; in ParseDefm()
2136 Lex.Lex(); // eat ','. in ParseDefm()
2148 if (Lex.getCode() != tgtok::semi) in ParseDefm()
2150 Lex.Lex(); in ParseDefm()
2163 switch (Lex.getCode()) { in ParseObject()
2177 while (isObjectStart(Lex.getCode())) { in ParseObjectList()
2185 Lex.Lex(); // Prime the lexer. in ParseFile()
2189 if (Lex.getCode() == tgtok::Eof) in ParseFile()