Home | History | Annotate | Download | only in TableGen

Lines Matching refs:tgtok

294 static bool isObjectStart(tgtok::TokKind K) {
295 return K == tgtok::Class || K == tgtok::Def ||
296 K == tgtok::Defm || K == tgtok::Let || K == tgtok::MultiClass;
310 if (Lex.getCode() != tgtok::Id)
325 if (Lex.getCode() != tgtok::Id) {
344 if (Lex.getCode() != tgtok::Id) {
358 if (Lex.getCode() != tgtok::Id) {
392 if (Lex.getCode() != tgtok::less)
396 if (Lex.getCode() == tgtok::greater) {
408 if (Lex.getCode() != tgtok::greater) {
434 if (Lex.getCode() != tgtok::less)
438 if (Lex.getCode() == tgtok::greater) {
450 if (Lex.getCode() != tgtok::greater) {
465 if (Lex.getCode() != tgtok::IntVal) {
479 case tgtok::minus:
480 if (Lex.Lex() != tgtok::IntVal) {
486 case tgtok::IntVal:
515 while (Lex.getCode() == tgtok::comma) {
529 if (Lex.getCode() != tgtok::less)
539 if (Lex.getCode() != tgtok::greater) {
551 if (Lex.getCode() != tgtok::l_brace)
561 if (Lex.getCode() != tgtok::r_brace) {
584 case tgtok::String: Lex.Lex(); return StringRecTy::get();
585 case tgtok::Bit: Lex.Lex(); return BitRecTy::get();
586 case tgtok::Int: Lex.Lex(); return IntRecTy::get();
587 case tgtok::Code: Lex.Lex(); return CodeRecTy::get();
588 case tgtok::Dag: Lex.Lex(); return DagRecTy::get();
589 case tgtok::Id:
592 case tgtok::Bits: {
593 if (Lex.Lex() != tgtok::less) { // Eat 'bits'
597 if (Lex.Lex() != tgtok::IntVal) { // Eat '<'
602 if (Lex.Lex() != tgtok::greater) { // Eat count.
609 case tgtok::List: {
610 if (Lex.Lex() != tgtok::less) { // Eat 'bits'
618 if (Lex.getCode() != tgtok::greater) {
637 assert(Lex.getCode() == tgtok::Id && "Expected ID in ParseIDValue");
689 case tgtok::XHead:
690 case tgtok::XTail:
691 case tgtok::XEmpty:
692 case tgtok::XCast: { // Value ::= !unop '(' Value ')'
698 case tgtok::XCast:
710 case tgtok::XHead:
714 case tgtok::XTail:
718 case tgtok::XEmpty:
724 if (Lex.getCode() != tgtok::l_paren) {
791 if (Lex.getCode() != tgtok::r_paren) {
799 case tgtok::XConcat:
800 case tgtok::XSRA:
801 case tgtok::XSRL:
802 case tgtok::XSHL:
803 case tgtok::XEq:
804 case tgtok::XStrConcat: { // Value ::= !binop '(' Value ',' Value ')'
805 tgtok::TokKind OpTok = Lex.getCode();
814 case tgtok::XConcat: Code = BinOpInit::CONCAT;Type = DagRecTy::get(); break;
815 case tgtok::XSRA: Code = BinOpInit::SRA; Type = IntRecTy::get(); break;
816 case tgtok::XSRL: Code = BinOpInit::SRL; Type = IntRecTy::get(); break;
817 case tgtok::XSHL: Code = BinOpInit::SHL; Type = IntRecTy::get(); break;
818 case tgtok::XEq: Code = BinOpInit::EQ; Type = BitRecTy::get(); break;
819 case tgtok::XStrConcat:
825 if (Lex.getCode() != tgtok::l_paren) {
836 while (Lex.getCode() == tgtok::comma) {
843 if (Lex.getCode() != tgtok::r_paren) {
868 case tgtok::XIf:
869 case tgtok::XForEach:
870 case tgtok::XSubst: { // Value ::= !ternop '(' Value ',' Value ',' Value ')'
874 tgtok::TokKind LexCode = Lex.getCode();
878 case tgtok::XIf:
881 case tgtok::XForEach:
884 case tgtok::XSubst:
888 if (Lex.getCode() != tgtok::l_paren) {
897 if (Lex.getCode() != tgtok::comma) {
906 if (Lex.getCode() != tgtok::comma) {
915 if (Lex.getCode() != tgtok::r_paren) {
923 case tgtok::XIf: {
969 case tgtok::XForEach: {
978 case tgtok::XSubst: {
1004 if (Lex.getCode() != tgtok::less) {
1017 if (Lex.getCode() != tgtok::greater) {
1048 case tgtok::IntVal: R = IntInit::get(Lex.getCurIntVal()); Lex.Lex(); break;
1049 case tgtok::StrVal: {
1054 while (Lex.getCode() == tgtok::StrVal) {
1062 case tgtok::CodeFragment:
1066 case tgtok::question:
1070 case tgtok::Id: {
1073 if (Lex.Lex() != tgtok::less) // consume the Id.
1077 if (Lex.Lex() == tgtok::greater) {
1094 if (Lex.getCode() != tgtok::greater) {
1118 case tgtok::l_brace: { // Value ::= '{' ValueList '}'
1123 if (Lex.getCode() != tgtok::r_brace) {
1127 if (Lex.getCode() != tgtok::r_brace) {
1146 case tgtok::l_square: { // Value ::= '[' ValueList ']'
1165 if (Lex.getCode() != tgtok::r_square) {
1170 if (Lex.getCode() != tgtok::r_square) {
1177 if (Lex.getCode() == tgtok::less) {
1187 if (Lex.getCode() != tgtok::greater) {
1245 case tgtok::l_paren: { // Value ::= '(' IDValue DagArgList ')'
1247 if (Lex.getCode() != tgtok::Id && Lex.getCode() != tgtok::XCast) {
1257 if (Lex.getCode() == tgtok::colon) {
1258 if (Lex.Lex() != tgtok::VarName) { // eat the ':'
1267 if (Lex.getCode() != tgtok::r_paren) {
1272 if (Lex.getCode() != tgtok::r_paren) {
1281 case tgtok::XHead:
1282 case tgtok::XTail:
1283 case tgtok::XEmpty:
1284 case tgtok::XCast: // Value ::= !unop '(' Value ')'
1285 case tgtok::XConcat:
1286 case tgtok::XSRA:
1287 case tgtok::XSRL:
1288 case tgtok::XSHL:
1289 case tgtok::XEq:
1290 case tgtok::XStrConcat: // Value ::= !binop '(' Value ',' Value ')'
1291 case tgtok::XIf:
1292 case tgtok::XForEach:
1293 case tgtok::XSubst: { // Value ::= !ternop '(' Value ',' Value ',' Value ')'
1316 case tgtok::l_brace: {
1331 if (Lex.getCode() != tgtok::r_brace) {
1338 case tgtok::l_square: {
1351 if (Lex.getCode() != tgtok::r_square) {
1358 case tgtok::period:
1359 if (Lex.Lex() != tgtok::Id) { // eat the .
1389 if (Lex.getCode() == tgtok::colon) {
1390 if (Lex.Lex() != tgtok::VarName) { // eat the ':'
1400 if (Lex.getCode() != tgtok::comma) break;
1433 while (Lex.getCode() == tgtok::comma) {
1468 bool HasField = Lex.getCode() == tgtok::Field;
1474 if (Lex.getCode() != tgtok::Id) {
1498 if (Lex.getCode() == tgtok::equal) {
1518 assert(Lex.getCode() == tgtok::less && "Not a template arg list!");
1530 while (Lex.getCode() == tgtok::comma) {
1540 if (Lex.getCode() != tgtok::greater)
1552 if (Lex.getCode() != tgtok::Let) {
1556 if (Lex.getCode() != tgtok::semi)
1563 if (Lex.Lex() != tgtok::Id)
1575 if (Lex.getCode() != tgtok::equal)
1588 if (Lex.getCode() != tgtok::semi)
1604 if (Lex.getCode() == tgtok::semi) {
1609 if (Lex.getCode() != tgtok::l_brace)
1614 while (Lex.getCode() != tgtok::r_brace)
1634 if (Lex.getCode() == tgtok::colon) {
1647 tgtok::comma) break;
1670 assert(Lex.getCode() == tgtok::Def && "Unknown tok");
1728 assert(Lex.getCode() == tgtok::Class && "Unexpected token!");
1731 if (Lex.getCode() != tgtok::Id)
1749 if (Lex.getCode() == tgtok::less)
1767 if (Lex.getCode() != tgtok::Id) {
1781 if (Lex.getCode() != tgtok::equal) {
1793 if (Lex.getCode() != tgtok::comma)
1806 assert(Lex.getCode() == tgtok::Let && "Unexpected token");
1814 if (Lex.getCode() != tgtok::In)
1819 if (Lex.getCode() != tgtok::l_brace) {
1832 if (Lex.getCode() != tgtok::r_brace) {
1850 assert(Lex.getCode() == tgtok::MultiClass && "Unexpected token");
1853 if (Lex.getCode() != tgtok::Id)
1865 if (Lex.getCode() == tgtok::less)
1872 if (Lex.getCode() == tgtok::colon) {
1888 if (Lex.getCode() != tgtok::comma) break;
1894 if (Lex.getCode() != tgtok::l_brace) {
1897 else if (Lex.getCode() != tgtok::semi)
1902 if (Lex.Lex() == tgtok::r_brace) // eat the '{'.
1905 while (Lex.getCode() != tgtok::r_brace) {
1909 case tgtok::Let:
1910 case tgtok::Def:
1911 case tgtok::Defm:
2038 assert(Lex.getCode() == tgtok::Defm && "Unexpected token!");
2041 if (Lex.Lex() == tgtok::Id) { // eat the defm.
2047 if (Lex.getCode() != tgtok::colon)
2095 if (Lex.getCode() != tgtok::comma) break;
2135 if (Lex.getCode() != tgtok::comma) break;
2148 if (Lex.getCode() != tgtok::semi)
2166 case tgtok::Let: return ParseTopLevelLet(MC);
2167 case tgtok::Def: return ParseDef(MC);
2168 case tgtok::Defm: return ParseDefm(MC);
2169 case tgtok::Class: return ParseClass();
2170 case tgtok::MultiClass: return ParseMultiClass();
2189 if (Lex.getCode() == tgtok::Eof)