Home | History | Annotate | Download | only in TableGen

Lines Matching refs:tgtok

377 static bool isObjectStart(tgtok::TokKind K) {
378 return K == tgtok::Class || K == tgtok::Def ||
379 K == tgtok::Defm || K == tgtok::Let ||
380 K == tgtok::MultiClass || K == tgtok::Foreach;
396 case tgtok::colon:
397 case tgtok::semi:
398 case tgtok::l_brace:
430 if (Lex.getCode() != tgtok::Id) {
449 if (Lex.getCode() != tgtok::Id) {
482 if (Lex.getCode() != tgtok::less) {
488 if (Lex.getCode() == tgtok::greater) {
500 if (Lex.getCode() != tgtok::greater) {
527 if (Lex.getCode() != tgtok::less) {
533 if (Lex.getCode() == tgtok::greater) {
545 if (Lex.getCode() != tgtok::greater) {
561 if (Lex.getCode() != tgtok::IntVal) {
575 case tgtok::minus:
576 if (Lex.Lex() != tgtok::IntVal) {
582 case tgtok::IntVal:
611 while (Lex.getCode() == tgtok::comma) {
625 if (Lex.getCode() != tgtok::less)
635 if (Lex.getCode() != tgtok::greater) {
647 if (Lex.getCode() != tgtok::l_brace)
657 if (Lex.getCode() != tgtok::r_brace) {
680 case tgtok::String: Lex.Lex(); return StringRecTy::get();
681 case tgtok::Code: Lex.Lex(); return StringRecTy::get();
682 case tgtok::Bit: Lex.Lex(); return BitRecTy::get();
683 case tgtok::Int: Lex.Lex(); return IntRecTy::get();
684 case tgtok::Dag: Lex.Lex(); return DagRecTy::get();
685 case tgtok::Id:
688 case tgtok::Bits: {
689 if (Lex.Lex() != tgtok::less) { // Eat 'bits'
693 if (Lex.Lex() != tgtok::IntVal) { // Eat '<'
698 if (Lex.Lex() != tgtok::greater) { // Eat count.
705 case tgtok::List: {
706 if (Lex.Lex() != tgtok::less) { // Eat 'bits'
714 if (Lex.getCode() != tgtok::greater) {
733 assert(Lex.getCode() == tgtok::Id && "Expected ID in ParseIDValue");
805 case tgtok::XHead:
806 case tgtok::XTail:
807 case tgtok::XEmpty:
808 case tgtok::XCast: { // Value ::= !unop '(' Value ')'
814 case tgtok::XCast:
826 case tgtok::XHead:
830 case tgtok::XTail:
834 case tgtok::XEmpty:
840 if (Lex.getCode() != tgtok::l_paren) {
907 if (Lex.getCode() != tgtok::r_paren) {
915 case tgtok::XConcat:
916 case tgtok::XADD:
917 case tgtok::XSRA:
918 case tgtok::XSRL:
919 case tgtok::XSHL:
920 case tgtok::XEq:
921 case tgtok::XStrConcat: { // Value ::= !binop '(' Value ',' Value ')'
922 tgtok::TokKind OpTok = Lex.getCode();
931 case tgtok::XConcat: Code = BinOpInit::CONCAT;Type = DagRecTy::get(); break;
932 case tgtok::XADD: Code = BinOpInit::ADD; Type = IntRecTy::get(); break;
933 case tgtok::XSRA: Code = BinOpInit::SRA; Type = IntRecTy::get(); break;
934 case tgtok::XSRL: Code = BinOpInit::SRL; Type = IntRecTy::get(); break;
935 case tgtok::XSHL: Code = BinOpInit::SHL; Type = IntRecTy::get(); break;
936 case tgtok::XEq: Code = BinOpInit::EQ; Type = BitRecTy::get(); break;
937 case tgtok::XStrConcat:
943 if (Lex.getCode() != tgtok::l_paren) {
954 while (Lex.getCode() == tgtok::comma) {
961 if (Lex.getCode() != tgtok::r_paren) {
986 case tgtok::XIf:
987 case tgtok::XForEach:
988 case tgtok::XSubst: { // Value ::= !ternop '(' Value ',' Value ',' Value ')'
992 tgtok::TokKind LexCode = Lex.getCode();
996 case tgtok::XIf:
999 case tgtok::XForEach:
1002 case tgtok::XSubst:
1006 if (Lex.getCode() != tgtok::l_paren) {
1015 if (Lex.getCode() != tgtok::comma) {
1024 if (Lex.getCode() != tgtok::comma) {
1033 if (Lex.getCode() != tgtok::r_paren) {
1041 case tgtok::XIf: {
1080 case tgtok::XForEach: {
1089 case tgtok::XSubst: {
1113 if (Lex.getCode() != tgtok::less) {
1126 if (Lex.getCode() != tgtok::greater) {
1159 case tgtok::paste:
1164 case tgtok::IntVal: R = IntInit::get(Lex.getCurIntVal()); Lex.Lex(); break;
1165 case tgtok::StrVal: {
1170 while (Lex.getCode() == tgtok::StrVal) {
1178 case tgtok::CodeFragment:
1182 case tgtok::question:
1186 case tgtok::Id: {
1189 if (Lex.Lex() != tgtok::less) // consume the Id.
1193 if (Lex.Lex() == tgtok::greater) {
1210 if (Lex.getCode() != tgtok::greater) {
1236 case tgtok::l_brace: { // Value ::= '{' ValueList '}'
1241 if (Lex.getCode() != tgtok::r_brace) {
1245 if (Lex.getCode() != tgtok::r_brace) {
1264 case tgtok::l_square: { // Value ::= '[' ValueList ']'
1284 if (Lex.getCode() != tgtok::r_square) {
1289 if (Lex.getCode() != tgtok::r_square) {
1296 if (Lex.getCode() == tgtok::less) {
1306 if (Lex.getCode() != tgtok::greater) {
1364 case tgtok::l_paren: { // Value ::= '(' IDValue DagArgList ')'
1366 if (Lex.getCode() != tgtok::Id && Lex.getCode() != tgtok::XCast) {
1376 if (Lex.getCode() == tgtok::colon) {
1377 if (Lex.Lex() != tgtok::VarName) { // eat the ':'
1386 if (Lex.getCode() != tgtok::r_paren) {
1391 if (Lex.getCode() != tgtok::r_paren) {
1400 case tgtok::XHead:
1401 case tgtok::XTail:
1402 case tgtok::XEmpty:
1403 case tgtok::XCast: // Value ::= !unop '(' Value ')'
1404 case tgtok::XConcat:
1405 case tgtok::XADD:
1406 case tgtok::XSRA:
1407 case tgtok::XSRL:
1408 case tgtok::XSHL:
1409 case tgtok::XEq:
1410 case tgtok::XStrConcat: // Value ::= !binop '(' Value ',' Value ')'
1411 case tgtok::XIf:
1412 case tgtok::XForEach:
1413 case tgtok::XSubst: { // Value ::= !ternop '(' Value ',' Value ',' Value ')'
1436 case tgtok::l_brace: {
1455 if (Lex.getCode() != tgtok::r_brace) {
1462 case tgtok::l_square: {
1475 if (Lex.getCode() != tgtok::r_square) {
1482 case tgtok::period:
1483 if (Lex.Lex() != tgtok::Id) { // eat the .
1496 case tgtok::paste:
1516 case tgtok::colon:
1517 case tgtok::semi:
1518 case tgtok::l_brace:
1561 if (Lex.getCode() == tgtok::VarName) {
1573 if (Lex.getCode() == tgtok::colon) {
1574 if (Lex.Lex() != tgtok::VarName) { // eat the ':'
1584 if (Lex.getCode() != tgtok::comma) break;
1621 while (Lex.getCode() == tgtok::comma) {
1656 bool HasField = Lex.getCode() == tgtok::Field;
1662 if (Lex.getCode() != tgtok::Id) {
1687 if (Lex.getCode() == tgtok::equal) {
1708 if (Lex.getCode() != tgtok::Id) {
1717 if (Lex.getCode() != tgtok::equal) {
1728 case tgtok::l_square: { // '[' ValueList ']'
1745 case tgtok::IntVal: { // RangePiece.
1751 case tgtok::l_brace: { // '{' RangeList '}'
1754 if (Lex.getCode() != tgtok::r_brace) {
1786 assert(Lex.getCode() == tgtok::less && "Not a template arg list!");
1798 while (Lex.getCode() == tgtok::comma) {
1808 if (Lex.getCode() != tgtok::greater)
1820 if (Lex.getCode() != tgtok::Let) {
1824 if (Lex.getCode() != tgtok::semi)
1831 if (Lex.Lex() != tgtok::Id)
1843 if (Lex.getCode() != tgtok::equal)
1856 if (Lex.getCode() != tgtok::semi)
1872 if (Lex.getCode() == tgtok::semi) {
1877 if (Lex.getCode() != tgtok::l_brace)
1882 while (Lex.getCode() != tgtok::r_brace)
1913 if (Lex.getCode() == tgtok::colon) {
1926 if (Lex.getCode() != tgtok::comma) break;
1945 assert(Lex.getCode() == tgtok::Def && "Unknown tok");
2019 assert(Lex.getCode() == tgtok::Foreach && "Unknown tok");
2029 if (Lex.getCode() != tgtok::In)
2036 if (Lex.getCode() != tgtok::l_brace) {
2050 if (Lex.getCode() != tgtok::r_brace) {
2068 assert(Lex.getCode() == tgtok::Class && "Unexpected token!");
2071 if (Lex.getCode() != tgtok::Id)
2090 if (Lex.getCode() == tgtok::less)
2108 if (Lex.getCode() != tgtok::Id) {
2122 if (Lex.getCode() != tgtok::equal) {
2134 if (Lex.getCode() != tgtok::comma)
2147 assert(Lex.getCode() == tgtok::Let && "Unexpected token");
2155 tgtok::In)
2160 if (Lex.getCode() != tgtok::l_brace) {
2173 if (Lex.getCode() != tgtok::r_brace) {
2196 assert(Lex.getCode() == tgtok::MultiClass && "Unexpected token");
2199 if (Lex.getCode() != tgtok::Id)
2211 if (Lex.getCode() == tgtok::less)
2218 if (Lex.getCode() == tgtok::colon) {
2234 if (Lex.getCode() != tgtok::comma) break;
2240 if (Lex.getCode() != tgtok::l_brace) {
2243 else if (Lex.getCode() != tgtok::semi)
2248 if (Lex.Lex() == tgtok::r_brace) // eat the '{'.
2251 while (Lex.getCode() != tgtok::r_brace) {
2255 case tgtok::Let:
2256 case tgtok::Def:
2257 case tgtok::Defm:
2258 case tgtok::Foreach:
2435 assert(Lex.getCode() == tgtok::Defm && "Unexpected token!");
2439 if (Lex.Lex() == tgtok::Id) { // eat the defm.
2444 if (Lex.getCode() != tgtok::colon)
2496 if (Lex.getCode() != tgtok::comma) break;
2532 if (Lex.getCode() != tgtok::comma) break;
2545 if (Lex.getCode() != tgtok::semi)
2563 case tgtok::Let: return ParseTopLevelLet(MC);
2564 case tgtok::Def: return ParseDef(MC);
2565 case tgtok::Foreach: return ParseForeach(MC);
2566 case tgtok::Defm: return ParseDefm(MC);
2567 case tgtok::Class: return ParseClass();
2568 case tgtok::MultiClass: return ParseMultiClass();
2587 if (Lex.getCode() == tgtok::Eof)