• Home
  • Raw
  • Download

Lines Matching refs:Lex

492   if (Lex.getCode() == K) {  in consume()
493 Lex.Lex(); in consume()
506 switch (Lex.getCode()) { in ParseObjectName()
544 if (Lex.getCode() != tgtok::Id) { in ParseClassID()
549 Record *Result = Records.getClass(Lex.getCurStrVal()); in ParseClassID()
551 std::string Msg("Couldn't find class '" + Lex.getCurStrVal() + "'"); in ParseClassID()
552 if (MultiClasses[Lex.getCurStrVal()].get()) in ParseClassID()
554 Lex.getCurStrVal() + "'"); in ParseClassID()
559 Lex.Lex(); in ParseClassID()
569 if (Lex.getCode() != tgtok::Id) { in ParseMultiClassID()
574 MultiClass *Result = MultiClasses[Lex.getCurStrVal()].get(); in ParseMultiClassID()
576 TokError("Couldn't find multiclass '" + Lex.getCurStrVal() + "'"); in ParseMultiClassID()
578 Lex.Lex(); in ParseMultiClassID()
591 Result.RefRange.Start = Lex.getLoc(); in ParseSubClassReference()
603 Result.RefRange.End = Lex.getLoc(); in ParseSubClassReference()
607 if (Lex.getCode() == tgtok::greater) { in ParseSubClassReference()
624 Result.RefRange.End = Lex.getLoc(); in ParseSubClassReference()
639 Result.RefRange.Start = Lex.getLoc(); in ParseSubMultiClassReference()
646 Result.RefRange.End = Lex.getLoc(); in ParseSubMultiClassReference()
650 if (Lex.getCode() == tgtok::greater) { in ParseSubMultiClassReference()
667 Result.RefRange.End = Lex.getLoc(); in ParseSubMultiClassReference()
694 switch (Lex.getCode()) { in ParseRangePiece()
701 Lex.Lex(); // eat in ParseRangePiece()
714 End = -Lex.getCurIntVal(); in ParseRangePiece()
715 Lex.Lex(); in ParseRangePiece()
754 SMLoc StartLoc = Lex.getLoc(); in ParseOptionalRangeList()
773 SMLoc StartLoc = Lex.getLoc(); in ParseOptionalBitList()
800 switch (Lex.getCode()) { in ParseType()
803 case tgtok::Code: Lex.Lex(); return StringRecTy::get(); in ParseType()
804 case tgtok::Bit: Lex.Lex(); return BitRecTy::get(); in ParseType()
805 case tgtok::Int: Lex.Lex(); return IntRecTy::get(); in ParseType()
806 case tgtok::Dag: Lex.Lex(); return DagRecTy::get(); in ParseType()
812 if (Lex.Lex() != tgtok::less) { // Eat 'bits' in ParseType()
816 if (Lex.Lex() != tgtok::IntVal) { // Eat '<' in ParseType()
820 uint64_t Val = Lex.getCurIntVal(); in ParseType()
821 if (Lex.Lex() != tgtok::greater) { // Eat count. in ParseType()
825 Lex.Lex(); // Eat '>' in ParseType()
829 if (Lex.Lex() != tgtok::less) { // Eat 'bits' in ParseType()
833 Lex.Lex(); // Eat '<' in ParseType()
907 switch (Lex.getCode()) { in ParseOperation()
921 switch (Lex.getCode()) { in ParseOperation()
924 Lex.Lex(); // eat the operation in ParseOperation()
936 Lex.Lex(); // eat the operation in ParseOperation()
941 Lex.Lex(); // eat the operation in ParseOperation()
945 Lex.Lex(); // eat the operation in ParseOperation()
949 Lex.Lex(); in ParseOperation()
954 Lex.Lex(); // eat the operation in ParseOperation()
959 Lex.Lex(); // eat the operation in ParseOperation()
960 if (Lex.getCode() == tgtok::less) { in ParseOperation()
1053 Lex.Lex(); // eat the operation in ParseOperation()
1097 tgtok::TokKind OpTok = Lex.getCode(); in ParseOperation()
1098 SMLoc OpLoc = Lex.getLoc(); in ParseOperation()
1099 Lex.Lex(); // eat the operation in ParseOperation()
1191 SMLoc InitLoc = Lex.getLoc(); in ParseOperation()
1368 tgtok::TokKind LexCode = Lex.getCode(); in ParseOperation()
1369 Lex.Lex(); // eat the operation in ParseOperation()
1397 SMLoc MHSLoc = Lex.getLoc(); in ParseOperation()
1407 SMLoc RHSLoc = Lex.getLoc(); in ParseOperation()
1504 Lex.Lex(); // eat the operation in ParseOperation()
1544 if (Lex.getCode() != tgtok::comma) { in ParseOperation()
1549 if (Lex.Lex() != tgtok::Id) { // eat the ',' in ParseOperation()
1554 Init *A = StringInit::get(Lex.getCurStrVal()); in ParseOperation()
1562 if (Lex.Lex() != tgtok::comma) { // eat the id in ParseOperation()
1567 if (Lex.Lex() != tgtok::Id) { // eat the ',' in ParseOperation()
1572 Init *B = StringInit::get(Lex.getCurStrVal()); in ParseOperation()
1580 if (Lex.Lex() != tgtok::comma) { // eat the id in ParseOperation()
1584 Lex.Lex(); // eat the ',' in ParseOperation()
1640 if (Lex.getCode() == tgtok::Code) in ParseOperatorType()
1663 SMLoc OpLoc = Lex.getLoc(); in ParseOperationForEachFilter()
1664 tgtok::TokKind Operation = Lex.getCode(); in ParseOperationForEachFilter()
1665 Lex.Lex(); // eat the operation in ParseOperationForEachFilter()
1666 if (Lex.getCode() != tgtok::l_paren) { in ParseOperationForEachFilter()
1671 if (Lex.Lex() != tgtok::Id) { // eat the '(' in ParseOperationForEachFilter()
1676 Init *LHS = StringInit::get(Lex.getCurStrVal()); in ParseOperationForEachFilter()
1677 Lex.Lex(); // eat the ID. in ParseOperationForEachFilter()
1786 Lex.Lex(); // eat the operation 'cond' in ParseOperationCond()
1888 switch (Lex.getCode()) { in ParseSimpleValue()
1893 Lex.Lex(); in ParseSimpleValue()
1897 Lex.Lex(); in ParseSimpleValue()
1900 R = IntInit::get(Lex.getCurIntVal()); in ParseSimpleValue()
1901 Lex.Lex(); in ParseSimpleValue()
1904 auto BinaryVal = Lex.getCurBinaryIntVal(); in ParseSimpleValue()
1909 Lex.Lex(); in ParseSimpleValue()
1913 std::string Val = Lex.getCurStrVal(); in ParseSimpleValue()
1914 Lex.Lex(); in ParseSimpleValue()
1917 while (Lex.getCode() == tgtok::StrVal) { in ParseSimpleValue()
1918 Val += Lex.getCurStrVal(); in ParseSimpleValue()
1919 Lex.Lex(); in ParseSimpleValue()
1926 R = StringInit::get(Lex.getCurStrVal(), StringInit::SF_Code); in ParseSimpleValue()
1927 Lex.Lex(); in ParseSimpleValue()
1931 Lex.Lex(); in ParseSimpleValue()
1934 SMLoc NameLoc = Lex.getLoc(); in ParseSimpleValue()
1935 StringInit *Name = StringInit::get(Lex.getCurStrVal()); in ParseSimpleValue()
1936 if (Lex.Lex() != tgtok::less) // consume the Id. in ParseSimpleValue()
1940 if (Lex.Lex() == tgtok::greater) { in ParseSimpleValue()
1998 SMLoc BraceLoc = Lex.getLoc(); in ParseSimpleValue()
1999 Lex.Lex(); // eat the '{' in ParseSimpleValue()
2002 if (Lex.getCode() != tgtok::r_brace) { in ParseSimpleValue()
2048 Lex.Lex(); // eat the '[' in ParseSimpleValue()
2064 if (Lex.getCode() != tgtok::r_square) { in ParseSimpleValue()
2139 Lex.Lex(); // eat the '(' in ParseSimpleValue()
2140 if (Lex.getCode() != tgtok::Id && Lex.getCode() != tgtok::XCast && in ParseSimpleValue()
2141 Lex.getCode() != tgtok::question && Lex.getCode() != tgtok::XGetDagOp) { in ParseSimpleValue()
2152 if (Lex.getCode() != tgtok::VarName) { // eat the ':' in ParseSimpleValue()
2156 OperatorName = StringInit::get(Lex.getCurStrVal()); in ParseSimpleValue()
2157 Lex.Lex(); // eat the VarName. in ParseSimpleValue()
2161 if (Lex.getCode() != tgtok::r_paren) { in ParseSimpleValue()
2230 switch (Lex.getCode()) { in ParseValue()
2237 SMLoc CurlyLoc = Lex.getLoc(); in ParseValue()
2238 Lex.Lex(); // eat the '{' in ParseValue()
2259 SMLoc SquareLoc = Lex.getLoc(); in ParseValue()
2260 Lex.Lex(); // eat the '[' in ParseValue()
2279 if (Lex.Lex() != tgtok::Id) { // eat the . in ParseValue()
2283 StringInit *FieldName = StringInit::get(Lex.getCurStrVal()); in ParseValue()
2285 TokError("Cannot access field '" + Lex.getCurStrVal() + "' of value '" + in ParseValue()
2290 Lex.Lex(); // eat field name in ParseValue()
2295 SMLoc PasteLoc = Lex.getLoc(); in ParseValue()
2304 Lex.Lex(); // Eat the '#'. in ParseValue()
2308 switch (Lex.getCode()) { in ParseValue()
2340 Lex.Lex(); // Eat the '#'. in ParseValue()
2341 switch (Lex.getCode()) { in ParseValue()
2396 if (Lex.getCode() == tgtok::VarName) { in ParseDagArgList()
2398 StringInit *VarName = StringInit::get(Lex.getCurStrVal()); in ParseDagArgList()
2400 Lex.Lex(); in ParseDagArgList()
2411 if (Lex.getCode() == tgtok::colon) { in ParseDagArgList()
2412 if (Lex.Lex() != tgtok::VarName) { // eat the ':' in ParseDagArgList()
2417 VarName = StringInit::get(Lex.getCurStrVal()); in ParseDagArgList()
2418 Lex.Lex(); // eat the VarName. in ParseDagArgList()
2462 if (Lex.getCode() == tgtok::r_square) in ParseValueList()
2503 if (Lex.getCode() != tgtok::Id) { in ParseDeclaration()
2508 std::string Str = Lex.getCurStrVal(); in ParseDeclaration()
2514 SMLoc IdLoc = Lex.getLoc(); in ParseDeclaration()
2516 Lex.Lex(); in ParseDeclaration()
2534 SMLoc ValLoc = Lex.getLoc(); in ParseDeclaration()
2556 if (Lex.getCode() != tgtok::Id) { in ParseForeachDeclaration()
2561 Init *DeclName = StringInit::get(Lex.getCurStrVal()); in ParseForeachDeclaration()
2562 Lex.Lex(); in ParseForeachDeclaration()
2573 switch (Lex.getCode()) { in ParseForeachDeclaration()
2575 Lex.Lex(); // eat the '{' in ParseForeachDeclaration()
2585 SMLoc ValueLoc = Lex.getLoc(); in ParseForeachDeclaration()
2639 assert(Lex.getCode() == tgtok::less && "Not a template arg list!"); in ParseTemplateArgList()
2640 Lex.Lex(); // eat the '<' in ParseTemplateArgList()
2653 SMLoc Loc = Lex.getLoc(); in ParseTemplateArgList()
2676 if (Lex.getCode() == tgtok::Defvar) in ParseBodyItem()
2679 if (Lex.getCode() != tgtok::Let) { in ParseBodyItem()
2689 if (Lex.Lex() != tgtok::Id) in ParseBodyItem()
2692 SMLoc IdLoc = Lex.getLoc(); in ParseBodyItem()
2693 StringInit *FieldName = StringInit::get(Lex.getCurStrVal()); in ParseBodyItem()
2694 Lex.Lex(); // eat the field name. in ParseBodyItem()
2742 while (Lex.getCode() != tgtok::r_brace) in ParseBody()
2749 Lex.Lex(); in ParseBody()
2816 SMLoc DefLoc = Lex.getLoc(); in ParseDef()
2817 assert(Lex.getCode() == tgtok::Def && "Unknown tok"); in ParseDef()
2818 Lex.Lex(); // Eat the 'def' token. in ParseDef()
2843 assert(Lex.getCode() == tgtok::Defset); in ParseDefset()
2844 Lex.Lex(); // Eat the 'defset' token in ParseDefset()
2847 Defset.Loc = Lex.getLoc(); in ParseDefset()
2855 if (Lex.getCode() != tgtok::Id) in ParseDefset()
2857 StringInit *DeclName = StringInit::get(Lex.getCurStrVal()); in ParseDefset()
2861 if (Lex.Lex() != tgtok::equal) // Eat the identifier in ParseDefset()
2863 if (Lex.Lex() != tgtok::l_brace) // Eat the '=' in ParseDefset()
2865 SMLoc BraceLoc = Lex.getLoc(); in ParseDefset()
2866 Lex.Lex(); // Eat the '{' in ParseDefset()
2889 assert(Lex.getCode() == tgtok::Defvar); in ParseDefvar()
2890 Lex.Lex(); // Eat the 'defvar' token in ParseDefvar()
2892 if (Lex.getCode() != tgtok::Id) in ParseDefvar()
2894 StringInit *DeclName = StringInit::get(Lex.getCurStrVal()); in ParseDefvar()
2903 Lex.Lex(); in ParseDefvar()
2929 SMLoc Loc = Lex.getLoc(); in ParseForeach()
2930 assert(Lex.getCode() == tgtok::Foreach && "Unknown tok"); in ParseForeach()
2931 Lex.Lex(); // Eat the 'for' token. in ParseForeach()
2949 if (Lex.getCode() != tgtok::l_brace) { in ParseForeach()
2954 SMLoc BraceLoc = Lex.getLoc(); in ParseForeach()
2956 Lex.Lex(); // eat the '{'. in ParseForeach()
2983 SMLoc Loc = Lex.getLoc(); in ParseIf()
2984 assert(Lex.getCode() == tgtok::If && "Unknown tok"); in ParseIf()
2985 Lex.Lex(); // Eat the 'if' token. in ParseIf()
3058 if (Lex.getCode() != tgtok::l_brace) { in ParseIfBody()
3063 SMLoc BraceLoc = Lex.getLoc(); in ParseIfBody()
3065 Lex.Lex(); // eat the '{'. in ParseIfBody()
3086 assert(Lex.getCode() == tgtok::Class && "Unexpected token!"); in ParseClass()
3087 Lex.Lex(); in ParseClass()
3089 if (Lex.getCode() != tgtok::Id) in ParseClass()
3092 Record *CurRec = Records.getClass(Lex.getCurStrVal()); in ParseClass()
3103 std::make_unique<Record>(Lex.getCurStrVal(), Lex.getLoc(), Records, in ParseClass()
3108 Lex.Lex(); // eat the name. in ParseClass()
3111 if (Lex.getCode() == tgtok::less) in ParseClass()
3126 if (Lex.getCode() != tgtok::Id) { in ParseLetList()
3132 StringInit *Name = StringInit::get(Lex.getCurStrVal()); in ParseLetList()
3133 SMLoc NameLoc = Lex.getLoc(); in ParseLetList()
3134 Lex.Lex(); // Eat the identifier. in ParseLetList()
3168 assert(Lex.getCode() == tgtok::Let && "Unexpected token"); in ParseTopLevelLet()
3169 Lex.Lex(); in ParseTopLevelLet()
3183 if (Lex.getCode() != tgtok::l_brace) { in ParseTopLevelLet()
3188 SMLoc BraceLoc = Lex.getLoc(); in ParseTopLevelLet()
3190 Lex.Lex(); // eat the '{'. in ParseTopLevelLet()
3220 assert(Lex.getCode() == tgtok::MultiClass && "Unexpected token"); in ParseMultiClass()
3221 Lex.Lex(); // Eat the multiclass token. in ParseMultiClass()
3223 if (Lex.getCode() != tgtok::Id) in ParseMultiClass()
3225 std::string Name = Lex.getCurStrVal(); in ParseMultiClass()
3229 std::make_unique<MultiClass>(Name, Lex.getLoc(),Records))); in ParseMultiClass()
3235 Lex.Lex(); // Eat the identifier. in ParseMultiClass()
3238 if (Lex.getCode() == tgtok::less) in ParseMultiClass()
3265 if (Lex.getCode() != tgtok::l_brace) { in ParseMultiClass()
3271 if (Lex.Lex() == tgtok::r_brace) // eat the '{'. in ParseMultiClass()
3277 while (Lex.getCode() != tgtok::r_brace) { in ParseMultiClass()
3278 switch (Lex.getCode()) { in ParseMultiClass()
3293 Lex.Lex(); // eat the '}'. in ParseMultiClass()
3307 assert(Lex.getCode() == tgtok::Defm && "Unexpected token!"); in ParseDefm()
3308 Lex.Lex(); // eat the defm in ParseDefm()
3322 if (Lex.getCode() != tgtok::colon) in ParseDefm()
3332 Lex.Lex(); in ParseDefm()
3334 SMLoc SubClassLoc = Lex.getLoc(); in ParseDefm()
3379 if (Lex.getCode() != tgtok::Id) in ParseDefm()
3382 SubClassLoc = Lex.getLoc(); in ParseDefm()
3386 InheritFromClass = (Records.getClass(Lex.getCurStrVal()) != nullptr); in ParseDefm()
3439 switch (Lex.getCode()) { in ParseObject()
3470 while (isObjectStart(Lex.getCode())) { in ParseObjectList()
3478 Lex.Lex(); // Prime the lexer. in ParseFile()
3482 if (Lex.getCode() == tgtok::Eof) in ParseFile()