Index: include/clang/Basic/TokenKinds.def =================================================================== --- include/clang/Basic/TokenKinds.def (revision 145152) +++ include/clang/Basic/TokenKinds.def (working copy) @@ -65,6 +65,7 @@ // C99 6.10.2 - Source File Inclusion. PPKEYWORD(include) +PPKEYWORD(mahomie) // EB++ PPKEYWORD(__include_macros) // C99 6.10.3 - Macro Replacement. @@ -216,39 +217,57 @@ // BOOLSUPPORT - This is a keyword if 'bool' is a built-in type // KEYWORD(auto , KEYALL) +KEYWORD(whatev , KEYALL) // EB++ KEYWORD(break , KEYALL) +KEYWORD(bustanut , KEYALL) // EB++ KEYWORD(case , KEYALL) +KEYWORD(ifa , KEYALL) // EB++ KEYWORD(char , KEYALL) +KEYWORD(alphabizzle , KEYALL) // EB++ KEYWORD(const , KEYALL) +KEYWORD(foodonchange , KEYALL) // EB++ KEYWORD(continue , KEYALL) +KEYWORD(mo , KEYALL) // EB++ KEYWORD(default , KEYALL) +KEYWORD(gondowhatchudo , KEYALL) // EB++ KEYWORD(do , KEYALL) KEYWORD(double , KEYALL) KEYWORD(else , KEYALL) +KEYWORD(elz , KEYALL) // EB++ KEYWORD(enum , KEYALL) KEYWORD(extern , KEYALL) +KEYWORD(othahood , KEYALL) // EB++ KEYWORD(float , KEYALL) +KEYWORD(flo , KEYALL) // EB++ KEYWORD(for , KEYALL) +KEYWORD(fo , KEYALL) // EB++ KEYWORD(goto , KEYALL) KEYWORD(if , KEYALL) KEYWORD(inline , KEYC99|KEYCXX|KEYGNU) KEYWORD(int , KEYALL) KEYWORD(long , KEYALL) +KEYWORD(shlong , KEYALL) // EB++ KEYWORD(register , KEYALL) KEYWORD(restrict , KEYC99) KEYWORD(return , KEYALL) +KEYWORD(putou , KEYALL) // EB++ KEYWORD(short , KEYALL) KEYWORD(signed , KEYALL) KEYWORD(sizeof , KEYALL) KEYWORD(static , KEYALL) KEYWORD(struct , KEYALL) KEYWORD(switch , KEYALL) +KEYWORD(whatchugondo , KEYALL) // EB++ KEYWORD(typedef , KEYALL) +KEYWORD(reprezentin , KEYALL) // EB++ KEYWORD(union , KEYALL) KEYWORD(unsigned , KEYALL) KEYWORD(void , KEYALL) +KEYWORD(shiznit , KEYALL) // EB++ KEYWORD(volatile , KEYALL) +KEYWORD(trippin , KEYALL) // EB++ KEYWORD(while , KEYALL) +KEYWORD(slongas , KEYALL) // EB++ KEYWORD(_Alignas , KEYALL) KEYWORD(_Atomic , KEYALL) KEYWORD(_Bool , KEYNOCXX) @@ -262,32 +281,49 @@ KEYWORD(asm , KEYCXX|KEYGNU) KEYWORD(bool , BOOLSUPPORT|KEYALTIVEC) KEYWORD(catch , KEYCXX) +KEYWORD(wrekdit , KEYCXX) // EB++ KEYWORD(class , KEYCXX) +KEYWORD(claz , KEYCXX) // EB++ KEYWORD(const_cast , KEYCXX) KEYWORD(delete , KEYCXX) +KEYWORD(cap , KEYCXX) // EB++ KEYWORD(dynamic_cast , KEYCXX) KEYWORD(explicit , KEYCXX) KEYWORD(export , KEYCXX) +KEYWORD(bounce , KEYCXX) // EB++ KEYWORD(false , BOOLSUPPORT|KEYALTIVEC) +KEYWORD(falz , BOOLSUPPORT|KEYALTIVEC) // EB++ KEYWORD(friend , KEYCXX) +KEYWORD(homie , KEYCXX) // EB++ KEYWORD(mutable , KEYCXX) KEYWORD(namespace , KEYCXX) +KEYWORD(namespaze , KEYCXX) // EB++ KEYWORD(new , KEYCXX) +KEYWORD(makea , KEYCXX) // EB++ KEYWORD(operator , KEYCXX) KEYWORD(private , KEYCXX|KEYOPENCL) +KEYWORD(nonyobiz , KEYCXX|KEYOPENCL) // EB++ KEYWORD(protected , KEYCXX) +KEYWORD(indafamily , KEYCXX) // EB++ KEYWORD(public , KEYCXX) +KEYWORD(tweetdat , KEYCXX) // EB++ KEYWORD(reinterpret_cast , KEYCXX) KEYWORD(static_cast , KEYCXX) KEYWORD(template , KEYCXX) KEYWORD(this , KEYCXX) +KEYWORD(dis , KEYCXX) // EB++ KEYWORD(throw , KEYCXX) +KEYWORD(throz , KEYCXX) // EB++ KEYWORD(true , BOOLSUPPORT|KEYALTIVEC) +KEYWORD(tru , BOOLSUPPORT|KEYALTIVEC) // EB++ KEYWORD(try , KEYCXX) +KEYWORD(checkit , KEYCXX) // EB++ KEYWORD(typename , KEYCXX) KEYWORD(typeid , KEYCXX) KEYWORD(using , KEYCXX) +KEYWORD(uzin , KEYCXX) // EB++ KEYWORD(virtual , KEYCXX) +KEYWORD(frontin , KEYCXX) // EB++ KEYWORD(wchar_t , KEYCXX) // C++ 2.5p2: Alternative Representations. @@ -302,6 +338,19 @@ CXX_KEYWORD_OPERATOR(or_eq , pipeequal) CXX_KEYWORD_OPERATOR(xor , caret) CXX_KEYWORD_OPERATOR(xor_eq , caretequal) +CXX_KEYWORD_OPERATOR(bitch , semi) // EB++ +CXX_KEYWORD_OPERATOR(biatch , semi) // EB++ +CXX_KEYWORD_OPERATOR(be , equal) // EB++ +CXX_KEYWORD_OPERATOR(sameas , equalequal) // EB++ +CXX_KEYWORD_OPERATOR(aint , exclaimequal) // EB++ +CXX_KEYWORD_OPERATOR(an , plus) // EB++ +CXX_KEYWORD_OPERATOR(widout , minus) // EB++ +CXX_KEYWORD_OPERATOR(dimes , star) // EB++ +CXX_KEYWORD_OPERATOR(videdby , slash) // EB++ +CXX_KEYWORD_OPERATOR(bepimpin, greater) // EB++ +CXX_KEYWORD_OPERATOR(fearin , less) // EB++ +CXX_KEYWORD_OPERATOR(dissin , minusminus) // EB++ +CXX_KEYWORD_OPERATOR(propsta , plusplus) // EB++ // C++0x keywords KEYWORD(alignas , KEYCXX0X) @@ -310,6 +359,7 @@ KEYWORD(char32_t , KEYCXX0X) KEYWORD(constexpr , KEYCXX0X) KEYWORD(decltype , KEYCXX0X) +KEYWORD(whodat , KEYCXX0X) KEYWORD(noexcept , KEYCXX0X) KEYWORD(nullptr , KEYCXX0X) KEYWORD(static_assert , KEYCXX0X) Index: tools/driver/Makefile =================================================================== --- tools/driver/Makefile (revision 145152) +++ tools/driver/Makefile (working copy) @@ -8,8 +8,8 @@ ##===----------------------------------------------------------------------===## CLANG_LEVEL := ../.. -TOOLNAME = clang -TOOLALIAS = clang++ +TOOLNAME = foshizzle +TOOLALIAS = foshizzle++ # We don't currently expect production Clang builds to be interested in # plugins. This is important for startup performance. Index: lib/Frontend/CacheTokens.cpp =================================================================== --- lib/Frontend/CacheTokens.cpp (revision 145152) +++ lib/Frontend/CacheTokens.cpp (working copy) @@ -342,6 +342,7 @@ default: break; + case tok::pp_mahomie: // EB++ case tok::pp_include: case tok::pp_import: case tok::pp_include_next: { Index: lib/Frontend/FrontendOptions.cpp =================================================================== --- lib/Frontend/FrontendOptions.cpp (revision 145152) +++ lib/Frontend/FrontendOptions.cpp (working copy) @@ -25,6 +25,7 @@ .Case("C", IK_CXX) .Cases("C", "cc", "cp", IK_CXX) .Cases("cpp", "CPP", "c++", "cxx", "hpp", IK_CXX) + .Cases("opp", "OPP", IK_CXX) // EB++ .Case("cl", IK_OpenCL) .Case("cu", IK_CUDA) .Cases("ll", "bc", IK_LLVM_IR) Index: lib/Basic/IdentifierTable.cpp =================================================================== --- lib/Basic/IdentifierTable.cpp (revision 145152) +++ lib/Basic/IdentifierTable.cpp (working copy) @@ -215,6 +215,7 @@ CASE( 7, 'd', 'f', defined); CASE( 7, 'i', 'c', include); + CASE( 7, 'm', 'h', mahomie); // EB++ CASE( 7, 'w', 'r', warning); CASE( 8, 'u', 'a', unassert); Index: lib/Sema/SemaExprCXX.cpp =================================================================== --- lib/Sema/SemaExprCXX.cpp (revision 145152) +++ lib/Sema/SemaExprCXX.cpp (working copy) @@ -472,9 +472,9 @@ /// ActOnCXXBoolLiteral - Parse {true,false} literals. ExprResult Sema::ActOnCXXBoolLiteral(SourceLocation OpLoc, tok::TokenKind Kind) { - assert((Kind == tok::kw_true || Kind == tok::kw_false) && + assert((Kind == tok::kw_true || Kind == tok::kw_tru || Kind == tok::kw_false || Kind == tok::kw_falz) && "Unknown C++ Boolean value!"); - return Owned(new (Context) CXXBoolLiteralExpr(Kind == tok::kw_true, + return Owned(new (Context) CXXBoolLiteralExpr(Kind == tok::kw_true || Kind == tok::kw_tru, Context.BoolTy, OpLoc)); } Index: lib/Lex/PPDirectives.cpp =================================================================== --- lib/Lex/PPDirectives.cpp (revision 145152) +++ lib/Lex/PPDirectives.cpp (working copy) @@ -619,6 +619,7 @@ return HandleEndifDirective(Result); // C99 6.10.2 - Source File Inclusion. + case tok::pp_mahomie: // EB++ case tok::pp_include: // Handle #include. return HandleIncludeDirective(SavedHash.getLocation(), Result); Index: lib/Lex/Lexer.cpp =================================================================== --- lib/Lex/Lexer.cpp (revision 145152) +++ lib/Lex/Lexer.cpp (working copy) @@ -2537,8 +2537,9 @@ if (Char == '\'') return LexCharConstant(Result, ConsumeChar(CurPtr, SizeTmp, Result), tok::wide_char_constant); - // FALL THROUGH, treating L like the start of an identifier. + // FALL THROUGH, treat 'L' like an identifier. + // C99 6.4.2: Identifiers. case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': /*'L'*/case 'M': case 'N': Index: lib/Lex/PreprocessingRecord.cpp =================================================================== --- lib/Lex/PreprocessingRecord.cpp (revision 145152) +++ lib/Lex/PreprocessingRecord.cpp (working copy) @@ -299,6 +299,7 @@ InclusionDirective::InclusionKind Kind = InclusionDirective::Include; switch (IncludeTok.getIdentifierInfo()->getPPKeywordID()) { + case tok::pp_mahomie: // EB++ case tok::pp_include: Kind = InclusionDirective::Include; break; Index: lib/Lex/PPExpressions.cpp =================================================================== --- lib/Lex/PPExpressions.cpp (revision 145152) +++ lib/Lex/PPExpressions.cpp (working copy) @@ -180,7 +180,7 @@ // turns into "1". if (ValueLive) PP.Diag(PeekTok, diag::warn_pp_undef_identifier) << II; - Result.Val = II->getTokenID() == tok::kw_true; + Result.Val = II->getTokenID() == tok::kw_true || II->getTokenID() == tok::kw_tru; Result.Val.setIsUnsigned(false); // "0" is signed intmax_t 0. Result.setRange(PeekTok.getLocation()); PP.LexNonComment(PeekTok); Index: lib/Driver/Types.cpp =================================================================== --- lib/Driver/Types.cpp (revision 145152) +++ lib/Driver/Types.cpp (working copy) @@ -139,8 +139,10 @@ .Case("m", TY_ObjC) .Case("M", TY_ObjCXX) .Case("h", TY_CHeader) + .Case("ho",TY_CHeader) // EB++ .Case("C", TY_CXX) .Case("H", TY_CXXHeader) + .Case("HO",TY_CXXHeader) // EB++ .Case("f", TY_PP_Fortran) .Case("F", TY_Fortran) .Case("s", TY_PP_Asm) @@ -167,6 +169,8 @@ .Case("cpp", TY_CXX) .Case("CPP", TY_CXX) .Case("CXX", TY_CXX) + .Case("opp", TY_CXX) // EB++ + .Case("OPP", TY_CXX) // EB++ .Case("for", TY_PP_Fortran) .Case("FOR", TY_PP_Fortran) .Case("fpp", TY_Fortran) Index: lib/Parse/ParseTentative.cpp =================================================================== --- lib/Parse/ParseTentative.cpp (revision 145152) +++ lib/Parse/ParseTentative.cpp (working copy) @@ -53,9 +53,11 @@ case tok::kw_asm: // namespace-alias-definition case tok::kw_namespace: + case tok::kw_namespaze: // EB++ // using-declaration // using-directive case tok::kw_using: + case tok::kw_uzin: // EB++ // static_assert-declaration case tok::kw_static_assert: case tok::kw__Static_assert: @@ -515,8 +517,10 @@ (Tok.is(tok::annot_cxxscope) && NextToken().is(tok::star))) { // ptr-operator ConsumeToken(); - while (Tok.is(tok::kw_const) || - Tok.is(tok::kw_volatile) || + while (Tok.is(tok::kw_const) || + Tok.is(tok::kw_foodonchange) || // EB++ + Tok.is(tok::kw_volatile) || + Tok.is(tok::kw_trippin) || // EB++ Tok.is(tok::kw_restrict)) ConsumeToken(); } else { @@ -633,15 +637,21 @@ case tok::kw___func__: case tok::kw_const_cast: case tok::kw_delete: + case tok::kw_cap: // EB++ case tok::kw_dynamic_cast: case tok::kw_false: + case tok::kw_falz: // EB++ case tok::kw_new: + case tok::kw_makea: // EB++ case tok::kw_operator: case tok::kw_reinterpret_cast: case tok::kw_static_cast: case tok::kw_this: + case tok::kw_dis: // EB++ case tok::kw_throw: + case tok::kw_throz: // EB++ case tok::kw_true: + case tok::kw_tru: // EB++ case tok::kw_typeid: case tok::kw_alignof: case tok::kw_noexcept: @@ -682,13 +692,16 @@ // Obviously starts a type-specifier-seq: case tok::kw_char: + case tok::kw_alphabizzle: // EB++ case tok::kw_const: + case tok::kw_foodonchange: // EB++ case tok::kw_double: case tok::kw_enum: case tok::kw_half: case tok::kw_float: case tok::kw_int: case tok::kw_long: + case tok::kw_shlong: // EB++ case tok::kw___int64: case tok::kw_restrict: case tok::kw_short: @@ -697,15 +710,19 @@ case tok::kw_union: case tok::kw_unsigned: case tok::kw_void: + case tok::kw_shiznit: // EB++ case tok::kw_volatile: + case tok::kw_trippin: // EB++ case tok::kw__Bool: case tok::kw__Complex: case tok::kw_class: + case tok::kw_claz: // EB++ case tok::kw_typename: case tok::kw_wchar_t: case tok::kw_char16_t: case tok::kw_char32_t: case tok::kw_decltype: + case tok::kw_whodat: // EB++ case tok::kw___underlying_type: case tok::kw_thread_local: case tok::kw__Decimal32: @@ -845,7 +862,9 @@ case tok::coloncolon: { // ::foo::bar const Token &Next = NextToken(); if (Next.is(tok::kw_new) || // ::new - Next.is(tok::kw_delete)) // ::delete + Next.is(tok::kw_makea) || // EB++ ::makea + Next.is(tok::kw_delete)|| // ::delete + Next.is(tok::kw_cap)) // EB++ ::cap return TPResult::False(); // Annotate typenames and C++ scope specifiers. If we get one, just @@ -863,18 +882,23 @@ // 'typedef' // 'constexpr' case tok::kw_friend: + case tok::kw_homie: // EB++ case tok::kw_typedef: + case tok::kw_reprezentin: // EB++ case tok::kw_constexpr: // storage-class-specifier case tok::kw_register: case tok::kw_static: case tok::kw_extern: + case tok::kw_othahood: // EB++ case tok::kw_mutable: case tok::kw_auto: + case tok::kw_whatev: // EB++ case tok::kw___thread: // function-specifier case tok::kw_inline: case tok::kw_virtual: + case tok::kw_frontin: // EB++ case tok::kw_explicit: // Modules @@ -890,6 +914,7 @@ // class-specifier // elaborated-type-specifier + case tok::kw_claz: // EB++ case tok::kw_class: case tok::kw_struct: case tok::kw_union: @@ -897,7 +922,9 @@ case tok::kw_enum: // cv-qualifier case tok::kw_const: + case tok::kw_foodonchange: // EB++ case tok::kw_volatile: + case tok::kw_trippin: // EB++ // GNU case tok::kw_restrict: @@ -985,6 +1012,7 @@ } case tok::kw_char: + case tok::kw_alphabizzle: // EB++ case tok::kw_wchar_t: case tok::kw_char16_t: case tok::kw_char32_t: @@ -992,6 +1020,7 @@ case tok::kw_short: case tok::kw_int: case tok::kw_long: + case tok::kw_shlong: // EB++ case tok::kw___int64: case tok::kw_signed: case tok::kw_unsigned: @@ -999,6 +1028,7 @@ case tok::kw_float: case tok::kw_double: case tok::kw_void: + case tok::kw_shiznit: // EB++ if (NextToken().is(tok::l_paren)) return TPResult::Ambiguous(); @@ -1030,6 +1060,7 @@ // C++0x decltype support. case tok::kw_decltype: + case tok::kw_whodat: // EB++ return TPResult::True(); // C++0x type traits support @@ -1252,8 +1283,10 @@ return TPResult::Error(); // cv-qualifier-seq - while (Tok.is(tok::kw_const) || - Tok.is(tok::kw_volatile) || + while (Tok.is(tok::kw_const) || + Tok.is(tok::kw_foodonchange) || // EB++ + Tok.is(tok::kw_volatile) || + Tok.is(tok::kw_trippin) || // EB++ Tok.is(tok::kw_restrict) ) ConsumeToken(); @@ -1262,7 +1295,7 @@ ConsumeToken(); // exception-specification - if (Tok.is(tok::kw_throw)) { + if (Tok.is(tok::kw_throw) || Tok.is(tok::kw_throz)) { ConsumeToken(); if (Tok.isNot(tok::l_paren)) return TPResult::Error(); Index: lib/Parse/ParseDecl.cpp =================================================================== --- lib/Parse/ParseDecl.cpp (revision 145152) +++ lib/Parse/ParseDecl.cpp (working copy) @@ -233,6 +233,7 @@ break; } case tok::kw_char: + case tok::kw_alphabizzle: // EB++ case tok::kw_wchar_t: case tok::kw_char16_t: case tok::kw_char32_t: @@ -240,12 +241,14 @@ case tok::kw_short: case tok::kw_int: case tok::kw_long: + case tok::kw_shlong: // EB++ case tok::kw___int64: case tok::kw_signed: case tok::kw_unsigned: case tok::kw_float: case tok::kw_double: case tok::kw_void: + case tok::kw_shiznit: // EB++ case tok::kw_typeof: { // If it's a builtin type name, eat it and expect a rparen // __attribute__(( vec_type_hint(char) )) @@ -385,6 +388,7 @@ SourceLocation Loc = Tok.getLocation(); switch(Tok.getKind()) { // OpenCL qualifiers: + case tok::kw_nonyobiz: // EB++ case tok::kw___private: case tok::kw_private: DS.getAttributes().addNewInteger( @@ -903,12 +907,13 @@ switch (Tok.getKind()) { case tok::kw_template: case tok::kw_export: + case tok::kw_bounce: // EB++ ProhibitAttributes(attrs); SingleDecl = ParseDeclarationStartingWithTemplate(Context, DeclEnd); break; case tok::kw_inline: // Could be the start of an inline namespace. Allowed as an ext in C++03. - if (getLang().CPlusPlus && NextToken().is(tok::kw_namespace)) { + if (getLang().CPlusPlus && (NextToken().is(tok::kw_namespace) || NextToken().is(tok::kw_namespaze))) { ProhibitAttributes(attrs); SourceLocation InlineLoc = ConsumeToken(); SingleDecl = ParseNamespace(Context, DeclEnd, InlineLoc); @@ -916,10 +921,14 @@ } return ParseSimpleDeclaration(Stmts, Context, DeclEnd, attrs, true); + + case tok::kw_namespaze: // EB++ case tok::kw_namespace: ProhibitAttributes(attrs); SingleDecl = ParseNamespace(Context, DeclEnd); break; + + case tok::kw_uzin: // EB++ case tok::kw_using: SingleDecl = ParseUsingDirectiveOrDeclaration(Context, ParsedTemplateInfo(), DeclEnd, attrs, &OwnedType); @@ -1199,7 +1208,7 @@ if (isTokenEqualOrMistypedEqualEqual( diag::err_invalid_equalequal_after_declarator)) { ConsumeToken(); - if (Tok.is(tok::kw_delete)) { + if (Tok.is(tok::kw_delete) || Tok.is(tok::kw_cap)) { if (D.isFunctionDeclarator()) Diag(ConsumeToken(), diag::err_default_delete_in_multiple_declaration) << 1 /* delete */; @@ -1944,11 +1953,13 @@ continue; // storage-class-specifier + case tok::kw_reprezentin: // EB++ case tok::kw_typedef: isInvalid = DS.SetStorageClassSpec(Actions, DeclSpec::SCS_typedef, Loc, PrevSpec, DiagID); break; case tok::kw_extern: + case tok::kw_othahood: // EB++ if (DS.isThreadSpecified()) Diag(Tok, diag::ext_thread_before) << "extern"; isInvalid = DS.SetStorageClassSpec(Actions, DeclSpec::SCS_extern, Loc, @@ -1964,7 +1975,9 @@ isInvalid = DS.SetStorageClassSpec(Actions, DeclSpec::SCS_static, Loc, PrevSpec, DiagID); break; + case tok::kw_auto: + case tok::kw_whatev: // EB++ if (getLang().CPlusPlus0x) { if (isKnownToBeTypeSpecifier(GetLookAheadToken(1))) { isInvalid = DS.SetStorageClassSpec(Actions, DeclSpec::SCS_auto, Loc, @@ -1996,6 +2009,7 @@ isInvalid = DS.SetFunctionSpecInline(Loc, PrevSpec, DiagID); break; case tok::kw_virtual: + case tok::kw_frontin: // EB++ isInvalid = DS.SetFunctionSpecVirtual(Loc, PrevSpec, DiagID); break; case tok::kw_explicit: @@ -2011,6 +2025,7 @@ // friend case tok::kw_friend: + case tok::kw_homie: // EB++ if (DSContext == DSC_class) isInvalid = DS.SetFriendSpec(Loc, PrevSpec, DiagID); else { @@ -2036,6 +2051,7 @@ DiagID); break; case tok::kw_long: + case tok::kw_shlong: // EB++ if (DS.getTypeSpecWidth() != DeclSpec::TSW_long) isInvalid = DS.SetTypeSpecWidth(DeclSpec::TSW_long, Loc, PrevSpec, DiagID); @@ -2063,11 +2079,13 @@ isInvalid = DS.SetTypeSpecComplex(DeclSpec::TSC_imaginary, Loc, PrevSpec, DiagID); break; + case tok::kw_shiznit: // EB++ case tok::kw_void: isInvalid = DS.SetTypeSpecType(DeclSpec::TST_void, Loc, PrevSpec, DiagID); break; case tok::kw_char: + case tok::kw_alphabizzle: // EB++ isInvalid = DS.SetTypeSpecType(DeclSpec::TST_char, Loc, PrevSpec, DiagID); break; @@ -2138,6 +2156,7 @@ break; // class-specifier: + case tok::kw_claz: // EB++ case tok::kw_class: case tok::kw_struct: case tok::kw_union: { @@ -2155,10 +2174,12 @@ // cv-qualifier: case tok::kw_const: + case tok::kw_foodonchange: // EB++ isInvalid = DS.SetTypeQual(DeclSpec::TQ_const, Loc, PrevSpec, DiagID, getLang()); break; case tok::kw_volatile: + case tok::kw_trippin: // EB++ isInvalid = DS.SetTypeQual(DeclSpec::TQ_volatile, Loc, PrevSpec, DiagID, getLang()); break; @@ -2183,6 +2204,7 @@ continue; case tok::kw_decltype: + case tok::kw_whodat: // EB++ ParseDecltypeSpecifier(DS); continue; @@ -2195,6 +2217,7 @@ continue; // OpenCL qualifiers: + case tok::kw_nonyobiz: // EB++ case tok::kw_private: if (!getLang().OpenCL) goto DoneWithDeclSpec; @@ -2316,7 +2339,9 @@ TemplateInfo, SuppressDeclarations); case tok::coloncolon: // ::foo::bar if (NextToken().is(tok::kw_new) || // ::new - NextToken().is(tok::kw_delete)) // ::delete + NextToken().is(tok::kw_makea) || // EB++ ::makea + NextToken().is(tok::kw_delete) || // ::delete + NextToken().is(tok::kw_cap)) // EB++ ::cap return false; // Annotate typenames and C++ scope specifiers. If we get one, just @@ -2352,6 +2377,7 @@ isInvalid = DS.SetTypeSpecWidth(DeclSpec::TSW_short, Loc, PrevSpec, DiagID); break; case tok::kw_long: + case tok::kw_shlong: // EB++ if (DS.getTypeSpecWidth() != DeclSpec::TSW_long) isInvalid = DS.SetTypeSpecWidth(DeclSpec::TSW_long, Loc, PrevSpec, DiagID); @@ -2378,10 +2404,12 @@ isInvalid = DS.SetTypeSpecComplex(DeclSpec::TSC_imaginary, Loc, PrevSpec, DiagID); break; + case tok::kw_shiznit: // EB++ case tok::kw_void: isInvalid = DS.SetTypeSpecType(DeclSpec::TST_void, Loc, PrevSpec, DiagID); break; case tok::kw_char: + case tok::kw_alphabizzle: // EB++ isInvalid = DS.SetTypeSpecType(DeclSpec::TST_char, Loc, PrevSpec, DiagID); break; case tok::kw_int: @@ -2429,6 +2457,7 @@ break; // class-specifier: + case tok::kw_claz: // EB++ case tok::kw_class: case tok::kw_struct: case tok::kw_union: { @@ -2447,10 +2476,12 @@ // cv-qualifier: case tok::kw_const: + case tok::kw_foodonchange: // EB++ isInvalid = DS.SetTypeQual(DeclSpec::TQ_const , Loc, PrevSpec, DiagID, getLang()); break; case tok::kw_volatile: + case tok::kw_trippin: // EB++ isInvalid = DS.SetTypeQual(DeclSpec::TQ_volatile, Loc, PrevSpec, DiagID, getLang()); break; @@ -2466,6 +2497,7 @@ // C++0x decltype support. case tok::kw_decltype: + case tok::kw_whodat: // EB++ ParseDecltypeSpecifier(DS); return true; @@ -2479,6 +2511,7 @@ return true; // OpenCL qualifiers: + case tok::kw_nonyobiz: // EB++ case tok::kw_private: if (!getLang().OpenCL) return false; @@ -2494,6 +2527,7 @@ // C++0x auto support. case tok::kw_auto: + case tok::kw_whatev: // EB++ // This is only called in situations where a storage-class specifier is // illegal, so we can assume an auto type specifier was intended even in // C++98. In C++98 mode, DeclSpec::Finish will produce an appropriate @@ -2777,7 +2811,7 @@ bool IsScopedUsingClassTag = false; if (getLang().CPlusPlus0x && - (Tok.is(tok::kw_class) || Tok.is(tok::kw_struct))) { + (Tok.is(tok::kw_class) || Tok.is(tok::kw_claz) || Tok.is(tok::kw_struct))) { IsScopedEnum = true; IsScopedUsingClassTag = Tok.is(tok::kw_class); ConsumeToken(); @@ -3085,12 +3119,15 @@ default: return false; // type-qualifier only in OpenCL + case tok::kw_nonyobiz: // EB++ case tok::kw_private: return getLang().OpenCL; // type-qualifier case tok::kw_const: + case tok::kw_foodonchange: // EB++ case tok::kw_volatile: + case tok::kw_trippin: // EB++ case tok::kw_restrict: case tok::kw___private: case tok::kw___local: @@ -3112,13 +3149,16 @@ // type-specifiers case tok::kw_short: case tok::kw_long: + case tok::kw_shlong: // EB++ case tok::kw___int64: case tok::kw_signed: case tok::kw_unsigned: case tok::kw__Complex: case tok::kw__Imaginary: case tok::kw_void: + case tok::kw_shiznit: // EB++ case tok::kw_char: + case tok::kw_alphabizzle: // EB++ case tok::kw_wchar_t: case tok::kw_char16_t: case tok::kw_char32_t: @@ -3134,6 +3174,7 @@ case tok::kw___vector: // struct-or-union-specifier (C99) or class-specifier (C++) + case tok::kw_claz: // EB++ case tok::kw_class: case tok::kw_struct: case tok::kw_union: @@ -3167,7 +3208,9 @@ case tok::coloncolon: // ::foo::bar if (NextToken().is(tok::kw_new) || // ::new - NextToken().is(tok::kw_delete)) // ::delete + NextToken().is(tok::kw_makea) || // EB++ ::makea + NextToken().is(tok::kw_delete)|| // ::delete + NextToken().is(tok::kw_cap)) // EB++ ::cap return false; if (TryAnnotateTypeOrScopeToken()) @@ -3182,13 +3225,16 @@ // type-specifiers case tok::kw_short: case tok::kw_long: + case tok::kw_shlong: // EB++ case tok::kw___int64: case tok::kw_signed: case tok::kw_unsigned: case tok::kw__Complex: case tok::kw__Imaginary: case tok::kw_void: + case tok::kw_shiznit: // EB++ case tok::kw_char: + case tok::kw_alphabizzle: // EB++ case tok::kw_wchar_t: case tok::kw_char16_t: case tok::kw_char32_t: @@ -3204,6 +3250,7 @@ case tok::kw___vector: // struct-or-union-specifier (C99) or class-specifier (C++) + case tok::kw_claz: // EB++ case tok::kw_class: case tok::kw_struct: case tok::kw_union: @@ -3212,7 +3259,9 @@ // type-qualifier case tok::kw_const: + case tok::kw_foodonchange: // EB++ case tok::kw_volatile: + case tok::kw_trippin: // EB++ case tok::kw_restrict: // typedef-name @@ -3243,6 +3292,7 @@ return true; + case tok::kw_nonyobiz: // EB++ case tok::kw_private: return getLang().OpenCL; @@ -3261,6 +3311,7 @@ switch (Tok.getKind()) { default: return false; + case tok::kw_nonyobiz: // EB++ case tok::kw_private: return getLang().OpenCL; @@ -3292,7 +3343,9 @@ case tok::coloncolon: // ::foo::bar if (NextToken().is(tok::kw_new) || // ::new - NextToken().is(tok::kw_delete)) // ::delete + NextToken().is(tok::kw_makea) || // EB++ ::makea + NextToken().is(tok::kw_delete) || // ::delete + NextToken().is(tok::kw_cap)) // EB++ ::cap return false; // Annotate typenames and C++ scope specifiers. If we get one, just @@ -3303,10 +3356,13 @@ // storage-class-specifier case tok::kw_typedef: + case tok::kw_reprezentin: // EB++ case tok::kw_extern: + case tok::kw_othahood: // EB++ case tok::kw___private_extern__: case tok::kw_static: case tok::kw_auto: + case tok::kw_whatev: // EB++ case tok::kw_register: case tok::kw___thread: @@ -3316,13 +3372,16 @@ // type-specifiers case tok::kw_short: case tok::kw_long: + case tok::kw_shlong: // EB++ case tok::kw___int64: case tok::kw_signed: case tok::kw_unsigned: case tok::kw__Complex: case tok::kw__Imaginary: case tok::kw_void: + case tok::kw_shiznit: // EB++ case tok::kw_char: + case tok::kw_alphabizzle: // EB++ case tok::kw_wchar_t: case tok::kw_char16_t: case tok::kw_char32_t: @@ -3339,6 +3398,7 @@ case tok::kw___vector: // struct-or-union-specifier (C99) or class-specifier (C++) + case tok::kw_claz: // EB++ case tok::kw_class: case tok::kw_struct: case tok::kw_union: @@ -3347,12 +3407,15 @@ // type-qualifier case tok::kw_const: + case tok::kw_foodonchange: // EB++ case tok::kw_volatile: + case tok::kw_trippin: // EB++ case tok::kw_restrict: // function-specifier case tok::kw_inline: case tok::kw_virtual: + case tok::kw_frontin: // EB++ case tok::kw_explicit: // static_assert-declaration @@ -3367,6 +3430,7 @@ // C++0x decltype. case tok::kw_decltype: + case tok::kw_whodat: // EB++ return true; // C1x _Atomic() @@ -3495,10 +3559,12 @@ return cutOffParsing(); case tok::kw_const: + case tok::kw_foodonchange: // EB++ isInvalid = DS.SetTypeQual(DeclSpec::TQ_const , Loc, PrevSpec, DiagID, getLang()); break; case tok::kw_volatile: + case tok::kw_trippin: // EB++ isInvalid = DS.SetTypeQual(DeclSpec::TQ_volatile, Loc, PrevSpec, DiagID, getLang()); break; @@ -3508,6 +3574,7 @@ break; // OpenCL qualifiers: + case tok::kw_nonyobiz: // EB++ case tok::kw_private: if (!getLang().OpenCL) goto DoneWithTypeQuals; @@ -4595,10 +4662,13 @@ default: return false; case tok::kw_short: case tok::kw_long: + case tok::kw_shlong: // EB++ case tok::kw_signed: case tok::kw_unsigned: case tok::kw_void: + case tok::kw_shiznit: // EB++ case tok::kw_char: + case tok::kw_alphabizzle: // EB++ case tok::kw_int: case tok::kw_float: case tok::kw_double: @@ -4623,10 +4693,13 @@ switch (Next.getKind()) { case tok::kw_short: case tok::kw_long: + case tok::kw_shlong: // EB++ case tok::kw_signed: case tok::kw_unsigned: case tok::kw_void: + case tok::kw_shiznit: // EB++ case tok::kw_char: + case tok::kw_alphabizzle: // EB++ case tok::kw_int: case tok::kw_float: case tok::kw_double: Index: lib/Parse/ParseTemplate.cpp =================================================================== --- lib/Parse/ParseTemplate.cpp (revision 145152) +++ lib/Parse/ParseTemplate.cpp (working copy) @@ -81,7 +81,9 @@ SourceLocation &DeclEnd, AccessSpecifier AS, AttributeList *AccessAttrs) { - assert((Tok.is(tok::kw_export) || Tok.is(tok::kw_template)) && + assert((Tok.is(tok::kw_export) || + Tok.is(tok::kw_bounce) || + Tok.is(tok::kw_template)) && "Token does not start a template declaration."); // Enter template-parameter scope. @@ -119,7 +121,7 @@ do { // Consume the 'export', if any. SourceLocation ExportLoc; - if (Tok.is(tok::kw_export)) { + if (Tok.is(tok::kw_export) || Tok.is(tok::kw_bounce)) { ExportLoc = ConsumeToken(); } @@ -156,7 +158,7 @@ } else { LastParamListWasEmpty = true; } - } while (Tok.is(tok::kw_export) || Tok.is(tok::kw_template)); + } while (Tok.is(tok::kw_export) || Tok.is(tok::kw_bounce) || Tok.is(tok::kw_template)); // Parse the actual template declaration. return ParseSingleDeclarationAfterTemplate(Context, @@ -363,7 +365,7 @@ /// \brief Determine whether the parser is at the start of a template /// type parameter. bool Parser::isStartOfTemplateTypeParameter() { - if (Tok.is(tok::kw_class)) { + if (Tok.is(tok::kw_class) || Tok.is(tok::kw_claz)) { // "class" may be the start of an elaborated-type-specifier or a // type-parameter. Per C++ [temp.param]p3, we prefer the type-parameter. switch (NextToken().getKind()) { @@ -461,7 +463,7 @@ /// 'typename' ...[opt][C++0x] identifier[opt] /// 'typename' identifier[opt] '=' type-id Decl *Parser::ParseTypeParameter(unsigned Depth, unsigned Position) { - assert((Tok.is(tok::kw_class) || Tok.is(tok::kw_typename)) && + assert((Tok.is(tok::kw_class) || Tok.is(tok::kw_claz) || Tok.is(tok::kw_typename)) && "A type-parameter starts with 'class' or 'typename'"); // Consume the 'class' or 'typename' keyword. @@ -537,7 +539,7 @@ // Generate a meaningful error if the user forgot to put class before the // identifier, comma, or greater. - if (!Tok.is(tok::kw_class)) { + if (!Tok.is(tok::kw_class) && !Tok.is(tok::kw_claz)) { Diag(Tok.getLocation(), diag::err_expected_class_before) << PP.getSpelling(Tok); return 0; @@ -1211,7 +1213,8 @@ // Consume the previously pushed token. ConsumeAnyToken(); - assert((Tok.is(tok::l_brace) || Tok.is(tok::colon) || Tok.is(tok::kw_try)) + assert((Tok.is(tok::l_brace) || Tok.is(tok::colon) || Tok.is(tok::kw_try) || + Tok.is(tok::kw_checkit)) && "Inline method not starting with '{', ':' or 'try'"); // Parse the method body. Function body parsing code is similar enough @@ -1229,7 +1232,7 @@ Actions.ActOnStartOfFunctionDef(getCurScope(), Function); - if (Tok.is(tok::kw_try)) { + if (Tok.is(tok::kw_try) || Tok.is(tok::kw_checkit)) { ParseFunctionTryBlock(LMT.D, FnScope); } else { if (Tok.is(tok::colon)) @@ -1265,8 +1268,8 @@ } // If we're in a function-try-block, we need to store all the catch blocks. - if (kind == tok::kw_try) { - while (Tok.is(tok::kw_catch)) { + if (kind == tok::kw_try || kind == tok::kw_checkit) { + while (Tok.is(tok::kw_catch) || Tok.is(tok::kw_wrekdit)) { ConsumeAndStoreUntil(tok::l_brace, Toks, /*StopAtSemi=*/false); ConsumeAndStoreUntil(tok::r_brace, Toks, /*StopAtSemi=*/false); } Index: lib/Parse/ParseObjc.cpp =================================================================== --- lib/Parse/ParseObjc.cpp (revision 145152) +++ lib/Parse/ParseObjc.cpp (working copy) @@ -654,17 +654,25 @@ case tok::identifier: case tok::kw_asm: case tok::kw_auto: + case tok::kw_whatev: // EB++ case tok::kw_bool: case tok::kw_break: + case tok::kw_bustanut: // EB++ case tok::kw_case: + case tok::kw_ifa: // EB++ case tok::kw_catch: + case tok::kw_wrekdit: // EB++ case tok::kw_char: + case tok::kw_alphabizzle: // EB++ case tok::kw_class: + case tok::kw_claz: // EB++ case tok::kw_const: + case tok::kw_foodonchange: // EB++ case tok::kw_const_cast: case tok::kw_continue: case tok::kw_default: case tok::kw_delete: + case tok::kw_cap: // EB++ case tok::kw_do: case tok::kw_double: case tok::kw_dynamic_cast: @@ -672,23 +680,33 @@ case tok::kw_enum: case tok::kw_explicit: case tok::kw_export: + case tok::kw_bounce: // EB++ case tok::kw_extern: + case tok::kw_othahood: // EB++ case tok::kw_false: + case tok::kw_falz: // EB++ case tok::kw_float: case tok::kw_for: case tok::kw_friend: + case tok::kw_homie: // EB++ case tok::kw_goto: case tok::kw_if: case tok::kw_inline: case tok::kw_int: case tok::kw_long: + case tok::kw_shlong: // EB++ case tok::kw_mutable: case tok::kw_namespace: + case tok::kw_namespaze: // EB++ case tok::kw_new: + case tok::kw_makea: // EB++ case tok::kw_operator: case tok::kw_private: + case tok::kw_nonyobiz: // EB++ case tok::kw_protected: + case tok::kw_indafamily: // EB++ case tok::kw_public: + case tok::kw_tweetdat: // EB++ case tok::kw_register: case tok::kw_reinterpret_cast: case tok::kw_restrict: @@ -700,21 +718,31 @@ case tok::kw_static_cast: case tok::kw_struct: case tok::kw_switch: + case tok::kw_whatchugondo: // EB++ case tok::kw_template: case tok::kw_this: + case tok::kw_dis: // EB++ case tok::kw_throw: + case tok::kw_throz: // EB++ case tok::kw_true: + case tok::kw_tru: // EB++ case tok::kw_try: + case tok::kw_checkit: // EB++ case tok::kw_typedef: + case tok::kw_reprezentin: // EB++ case tok::kw_typeid: case tok::kw_typename: case tok::kw_typeof: case tok::kw_union: case tok::kw_unsigned: case tok::kw_using: + case tok::kw_uzin: // EB++ case tok::kw_virtual: + case tok::kw_frontin: // EB++ case tok::kw_void: + case tok::kw_shiznit: // EB++ case tok::kw_volatile: + case tok::kw_trippin: // EB++ case tok::kw_wchar_t: case tok::kw_while: case tok::kw__Bool: Index: lib/Parse/ParseExpr.cpp =================================================================== --- lib/Parse/ParseExpr.cpp (revision 145152) +++ lib/Parse/ParseExpr.cpp (working copy) @@ -218,7 +218,7 @@ return ExprError(); } - if (Tok.is(tok::kw_throw)) + if (Tok.is(tok::kw_throw) || Tok.is(tok::kw_throz)) return ParseThrowExpression(); ExprResult LHS = ParseCastExpression(/*isUnaryExpression=*/false); @@ -649,7 +649,9 @@ ConsumeToken(); break; + case tok::kw_tru: // EB++ case tok::kw_true: + case tok::kw_falz: // EB++ case tok::kw_false: return ParseCXXBoolLiteral(); @@ -879,6 +881,7 @@ case tok::kw___uuidof: Res = ParseCXXUuidof(); break; + case tok::kw_dis: // EB++ case tok::kw_this: Res = ParseCXXThis(); break; @@ -910,6 +913,7 @@ // Fall through case tok::kw_char: + case tok::kw_alphabizzle: // EB++ case tok::kw_wchar_t: case tok::kw_char16_t: case tok::kw_char32_t: @@ -917,6 +921,7 @@ case tok::kw_short: case tok::kw_int: case tok::kw_long: + case tok::kw_shlong: // EB++ case tok::kw___int64: case tok::kw_signed: case tok::kw_unsigned: @@ -924,6 +929,7 @@ case tok::kw_float: case tok::kw_double: case tok::kw_void: + case tok::kw_shiznit: // EB++ case tok::kw_typename: case tok::kw_typeof: case tok::kw___vector: { @@ -1011,9 +1017,9 @@ // ::new -> [C++] new-expression // ::delete -> [C++] delete-expression SourceLocation CCLoc = ConsumeToken(); - if (Tok.is(tok::kw_new)) + if (Tok.is(tok::kw_new) || Tok.is(tok::kw_makea)) return ParseCXXNewExpression(true, CCLoc); - if (Tok.is(tok::kw_delete)) + if (Tok.is(tok::kw_delete) || Tok.is(tok::kw_cap)) return ParseCXXDeleteExpression(true, CCLoc); // This is not a type name or scope specifier, it is an invalid expression. @@ -1021,9 +1027,11 @@ return ExprError(); } + case tok::kw_makea: // EB++ case tok::kw_new: // [C++] new-expression return ParseCXXNewExpression(false, Tok.getLocation()); + case tok::kw_cap: // EB++ case tok::kw_delete: // [C++] delete-expression return ParseCXXDeleteExpression(false, Tok.getLocation()); Index: lib/Parse/ParseCXXInlineMethods.cpp =================================================================== --- lib/Parse/ParseCXXInlineMethods.cpp (revision 145152) +++ lib/Parse/ParseCXXInlineMethods.cpp (working copy) @@ -28,7 +28,7 @@ const VirtSpecifiers& VS, ExprResult& Init) { assert(D.isFunctionDeclarator() && "This isn't a function declarator!"); assert((Tok.is(tok::l_brace) || Tok.is(tok::colon) || Tok.is(tok::kw_try) || - Tok.is(tok::equal)) && + Tok.is(tok::kw_checkit) || Tok.is(tok::equal)) && "Current token not a '{', ':', '=', or 'try'!"); MultiTemplateParamsArg TemplateParams(Actions, @@ -66,7 +66,7 @@ bool Delete = false; SourceLocation KWLoc; - if (Tok.is(tok::kw_delete)) { + if (Tok.is(tok::kw_delete) || Tok.is(tok::kw_cap)) { if (!getLang().CPlusPlus0x) Diag(Tok, diag::warn_deleted_function_accepted_as_extension); @@ -154,8 +154,8 @@ } // If we're in a function-try-block, we need to store all the catch blocks. - if (kind == tok::kw_try) { - while (Tok.is(tok::kw_catch)) { + if (kind == tok::kw_try || kind == tok::kw_checkit) { + while (Tok.is(tok::kw_catch) || Tok.is(tok::kw_wrekdit)) { ConsumeAndStoreUntil(tok::l_brace, Toks, /*StopAtSemi=*/false); ConsumeAndStoreUntil(tok::r_brace, Toks, /*StopAtSemi=*/false); } @@ -377,7 +377,8 @@ // Consume the previously pushed token. ConsumeAnyToken(); - assert((Tok.is(tok::l_brace) || Tok.is(tok::colon) || Tok.is(tok::kw_try)) + assert((Tok.is(tok::l_brace) || Tok.is(tok::colon) || Tok.is(tok::kw_try) || + Tok.is(tok::kw_checkit)) && "Inline method not starting with '{', ':' or 'try'"); // Parse the method body. Function body parsing code is similar enough @@ -385,7 +386,7 @@ ParseScope FnScope(this, Scope::FnScope|Scope::DeclScope); Actions.ActOnStartOfFunctionDef(getCurScope(), LM.D); - if (Tok.is(tok::kw_try)) { + if (Tok.is(tok::kw_try) || Tok.is(tok::kw_checkit)) { ParseFunctionTryBlock(LM.D, FnScope); assert(!PP.getSourceManager().isBeforeInTranslationUnit(origLoc, Tok.getLocation()) && @@ -592,7 +593,7 @@ /// /// \return True on error. bool Parser::ConsumeAndStoreFunctionPrologue(CachedTokens &Toks) { - if (Tok.is(tok::kw_try)) { + if (Tok.is(tok::kw_try) || Tok.is(tok::kw_checkit)) { Toks.push_back(Tok); ConsumeToken(); } Index: lib/Parse/ParseStmt.cpp =================================================================== --- lib/Parse/ParseStmt.cpp (revision 145152) +++ lib/Parse/ParseStmt.cpp (working copy) @@ -222,6 +222,7 @@ } case tok::kw_case: // C99 6.8.1: labeled-statement + case tok::kw_ifa: // EB++ return ParseCaseStatement(attrs); case tok::kw_default: // C99 6.8.1: labeled-statement return ParseDefaultStatement(attrs); @@ -236,14 +237,18 @@ case tok::kw_if: // C99 6.8.4.1: if-statement return ParseIfStatement(attrs); case tok::kw_switch: // C99 6.8.4.2: switch-statement + case tok::kw_whatchugondo: // EB++ return ParseSwitchStatement(attrs); case tok::kw_while: // C99 6.8.5.1: while-statement + case tok::kw_slongas: // EB++ return ParseWhileStatement(attrs); case tok::kw_do: // C99 6.8.5.2: do-statement Res = ParseDoStatement(attrs); SemiError = "do/while"; break; + + case tok::kw_fo: // EB++ case tok::kw_for: // C99 6.8.5.3: for-statement return ParseForStatement(attrs); @@ -255,10 +260,13 @@ Res = ParseContinueStatement(attrs); SemiError = "continue"; break; + case tok::kw_bustanut: // EB++ case tok::kw_break: // C99 6.8.6.3: break-statement Res = ParseBreakStatement(attrs); SemiError = "break"; break; + + case tok::kw_putou: // EB++ case tok::kw_return: // C99 6.8.6.4: return-statement Res = ParseReturnStatement(attrs); SemiError = "return"; @@ -275,6 +283,7 @@ } case tok::kw_try: // C++ 15: try-block + case tok::kw_checkit: // EB++ return ParseCXXTryBlock(attrs); case tok::kw___try: @@ -478,7 +487,7 @@ /// StmtResult Parser::ParseCaseStatement(ParsedAttributes &attrs, bool MissingCase, ExprResult Expr) { - assert((MissingCase || Tok.is(tok::kw_case)) && "Not a case stmt!"); + assert((MissingCase || Tok.is(tok::kw_case) || Tok.is(tok::kw_ifa)) && "Not a case stmt!"); // FIXME: Use attributes? // It is very very common for code to contain many case statements recursively @@ -581,7 +590,7 @@ } // Handle all case statements. - } while (Tok.is(tok::kw_case)); + } while (Tok.is(tok::kw_case) || Tok.is(tok::kw_ifa)); assert(!TopLevelCase.isInvalid() && "Should have parsed at least one case!"); @@ -942,7 +951,7 @@ SourceLocation ElseStmtLoc; StmtResult ElseStmt; - if (Tok.is(tok::kw_else)) { + if (Tok.is(tok::kw_else) || Tok.is(tok::kw_elz)) { ElseLoc = ConsumeToken(); ElseStmtLoc = Tok.getLocation(); @@ -1002,7 +1011,7 @@ StmtResult Parser::ParseSwitchStatement(ParsedAttributes &attrs) { // FIXME: Use attributes? - assert(Tok.is(tok::kw_switch) && "Not a switch stmt!"); + assert(Tok.is(tok::kw_switch) || Tok.is(tok::kw_whatchugondo) && "Not a switch stmt!"); SourceLocation SwitchLoc = ConsumeToken(); // eat the 'switch'. if (Tok.isNot(tok::l_paren)) { @@ -1087,7 +1096,7 @@ StmtResult Parser::ParseWhileStatement(ParsedAttributes &attrs) { // FIXME: Use attributes? - assert(Tok.is(tok::kw_while) && "Not a while stmt!"); + assert((Tok.is(tok::kw_while) || Tok.is(tok::kw_slongas)) && "Not a while stmt!"); SourceLocation WhileLoc = Tok.getLocation(); ConsumeToken(); // eat the 'while'. @@ -1192,7 +1201,7 @@ // Pop the body scope if needed. InnerScope.Exit(); - if (Tok.isNot(tok::kw_while)) { + if (Tok.isNot(tok::kw_while) && Tok.isNot(tok::kw_slongas)) { if (!Body.isInvalid()) { Diag(Tok, diag::err_expected_while); Diag(DoLoc, diag::note_matching) << "do"; @@ -1244,7 +1253,7 @@ StmtResult Parser::ParseForStatement(ParsedAttributes &attrs) { // FIXME: Use attributes? - assert(Tok.is(tok::kw_for) && "Not a for stmt!"); + assert((Tok.is(tok::kw_for) || Tok.is(tok::kw_fo)) && "Not a for stmt!"); SourceLocation ForLoc = ConsumeToken(); // eat the 'for'. if (Tok.isNot(tok::l_paren)) { @@ -1553,7 +1562,7 @@ StmtResult Parser::ParseReturnStatement(ParsedAttributes &attrs) { // FIXME: Use attributes? - assert(Tok.is(tok::kw_return) && "Not a return stmt!"); + assert((Tok.is(tok::kw_return) || Tok.is(tok::kw_putou)) && "Not a return stmt!"); SourceLocation ReturnLoc = ConsumeToken(); // eat the 'return'. ExprResult R; @@ -1944,7 +1953,7 @@ /// 'try' ctor-initializer[opt] compound-statement handler-seq /// Decl *Parser::ParseFunctionTryBlock(Decl *Decl, ParseScope &BodyScope) { - assert(Tok.is(tok::kw_try) && "Expected 'try'"); + assert(Tok.is(tok::kw_try) || Tok.is(tok::kw_checkit) && "Expected 'try'"); SourceLocation TryLoc = ConsumeToken(); PrettyDeclStackTraceEntry CrashInfo(Actions, Decl, TryLoc, @@ -2002,7 +2011,7 @@ StmtResult Parser::ParseCXXTryBlock(ParsedAttributes &attrs) { // FIXME: Add attributes? - assert(Tok.is(tok::kw_try) && "Expected 'try'"); + assert(Tok.is(tok::kw_try) || Tok.is(tok::kw_checkit) && "Expected 'try'"); SourceLocation TryLoc = ConsumeToken(); return ParseCXXTryBlockCommon(TryLoc); @@ -2059,9 +2068,9 @@ MaybeParseCXX0XAttributes(attrs); ProhibitAttributes(attrs); - if (Tok.isNot(tok::kw_catch)) + if (Tok.isNot(tok::kw_catch) && Tok.isNot(tok::kw_wrekdit)) return StmtError(Diag(Tok, diag::err_expected_catch)); - while (Tok.is(tok::kw_catch)) { + while (Tok.is(tok::kw_catch) || Tok.is(tok::kw_wrekdit)) { StmtResult Handler(ParseCXXCatchBlock()); if (!Handler.isInvalid()) Handlers.push_back(Handler.release()); @@ -2087,7 +2096,7 @@ /// '...' /// StmtResult Parser::ParseCXXCatchBlock() { - assert(Tok.is(tok::kw_catch) && "Expected 'catch'"); + assert((Tok.is(tok::kw_catch) || Tok.is(tok::kw_wrekdit)) && "Expected 'catch'"); SourceLocation CatchLoc = ConsumeToken(); Index: lib/Parse/ParseDeclCXX.cpp =================================================================== --- lib/Parse/ParseDeclCXX.cpp (revision 145152) +++ lib/Parse/ParseDeclCXX.cpp (working copy) @@ -50,7 +50,7 @@ Decl *Parser::ParseNamespace(unsigned Context, SourceLocation &DeclEnd, SourceLocation InlineLoc) { - assert(Tok.is(tok::kw_namespace) && "Not a namespace!"); + assert((Tok.is(tok::kw_namespace) || Tok.is(tok::lw_namespaze)) && "Not a namespace!"); SourceLocation NamespaceLoc = ConsumeToken(); // eat the 'namespace'. ObjCDeclContextSwitch ObjCDC(*this); @@ -321,7 +321,7 @@ SourceLocation &DeclEnd, ParsedAttributesWithRange &attrs, Decl **OwnedType) { - assert(Tok.is(tok::kw_using) && "Not using token"); + assert((Tok.is(tok::kw_using) || Tok.is(tok::kw_uzin)) && "Not using token"); ObjCDeclContextSwitch ObjCDC(*this); // Eat 'using'. @@ -334,7 +334,7 @@ } // 'using namespace' means this is a using-directive. - if (Tok.is(tok::kw_namespace)) { + if (Tok.is(tok::kw_namespace) || Tok.is(tok::kw_namespaze)) { // Template parameters are always an error here. if (TemplateInfo.Kind) { SourceRange R = TemplateInfo.getSourceRange(); @@ -368,7 +368,7 @@ SourceLocation UsingLoc, SourceLocation &DeclEnd, ParsedAttributes &attrs) { - assert(Tok.is(tok::kw_namespace) && "Not 'namespace' token"); + assert((Tok.is(tok::kw_namespace) || Tok.is(tok::kw_namespaze)) && "Not 'namespace' token"); // Eat 'namespace'. SourceLocation NamespcLoc = ConsumeToken(); @@ -629,7 +629,7 @@ /// 'decltype' ( expression ) /// void Parser::ParseDecltypeSpecifier(DeclSpec &DS) { - assert(Tok.is(tok::kw_decltype) && "Not a decltype specifier"); + assert(Tok.is(tok::kw_decltype) || Tok.is(tok::kw_whodat) && "Not a decltype specifier"); SourceLocation StartLoc = ConsumeToken(); BalancedDelimiterTracker T(*this, tok::l_paren); @@ -843,7 +843,7 @@ DeclSpec::TST TagType; if (TagTokKind == tok::kw_struct) TagType = DeclSpec::TST_struct; - else if (TagTokKind == tok::kw_class) + else if (TagTokKind == tok::kw_class || TagTokKind == tok::kw_claz) TagType = DeclSpec::TST_class; else { assert(TagTokKind == tok::kw_union && "Not a class specifier"); @@ -1258,15 +1258,20 @@ break; // Type qualifiers case tok::kw_const: // struct foo {...} const x; + case tok::kw_foodonchange: // EB++ case tok::kw_volatile: // struct foo {...} volatile x; + case tok::kw_trippin: // EB++ case tok::kw_restrict: // struct foo {...} restrict x; case tok::kw_inline: // struct foo {...} inline foo() {}; // Storage-class specifiers case tok::kw_static: // struct foo {...} static x; case tok::kw_extern: // struct foo {...} extern x; + case tok::kw_othahood: // EB++ case tok::kw_typedef: // struct foo {...} typedef x; + case tok::kw_reprezentin: // EB++ case tok::kw_register: // struct foo {...} register x; case tok::kw_auto: // struct foo {...} auto x; + case tok::kw_whatev: // EB++ case tok::kw_mutable: // struct foo {...} mutable x; case tok::kw_constexpr: // struct foo {...} constexpr x; // As shown above, type qualifiers and storage class specifiers absolutely @@ -1367,7 +1372,7 @@ SourceLocation StartLoc = Tok.getLocation(); // Parse the 'virtual' keyword. - if (Tok.is(tok::kw_virtual)) { + if (Tok.is(tok::kw_virtual) || Tok.is(tok::kw_frontin)) { ConsumeToken(); IsVirtual = true; } @@ -1379,7 +1384,7 @@ // Parse the 'virtual' keyword (again!), in case it came after the // access specifier. - if (Tok.is(tok::kw_virtual)) { + if (Tok.is(tok::kw_virtual) || Tok.is(tok::kw_frontin)) { SourceLocation VirtualLoc = ConsumeToken(); if (IsVirtual) { // Complain about duplicate 'virtual' @@ -1429,9 +1434,15 @@ AccessSpecifier Parser::getAccessSpecifierIfPresent() const { switch (Tok.getKind()) { default: return AS_none; - case tok::kw_private: return AS_private; - case tok::kw_protected: return AS_protected; - case tok::kw_public: return AS_public; + case tok::kw_private: + case tok::kw_nonyobiz: // EB++ + return AS_private; + case tok::kw_protected: + case tok::kw_indafamily: // EB++ + return AS_protected; + case tok::kw_public: + case tok::kw_tweetdat: // EB++ + return AS_public; } } @@ -1666,13 +1677,13 @@ MaybeParseCXX0XAttributes(attrs); MaybeParseMicrosoftAttributes(attrs); - if (Tok.is(tok::kw_using)) { + if (Tok.is(tok::kw_using) || Tok.is(tok::kw_uzin)) { ProhibitAttributes(attrs); // Eat 'using'. SourceLocation UsingLoc = ConsumeToken(); - if (Tok.is(tok::kw_namespace)) { + if (Tok.is(tok::kw_namespace) || Tok.is(tok::kw_namespaze)) { Diag(UsingLoc, diag::err_using_namespace_in_class); SkipUntil(tok::semi, true, true); } else { @@ -1749,11 +1760,11 @@ if (Tok.is(tok::l_brace) && !getLang().CPlusPlus0x) { IsDefinition = true; } else if (DeclaratorInfo.isFunctionDeclarator()) { - if (Tok.is(tok::l_brace) || Tok.is(tok::colon) || Tok.is(tok::kw_try)) { + if (Tok.is(tok::l_brace) || Tok.is(tok::colon) || Tok.is(tok::kw_try) || Tok.is(tok::kw_checkit)) { IsDefinition = true; } else if (Tok.is(tok::equal)) { const Token &KW = NextToken(); - if (KW.is(tok::kw_default) || KW.is(tok::kw_delete)) + if (KW.is(tok::kw_default) || KW.is(tok::kw_delete) || KW.is(tok::kw_cap)) IsDefinition = true; } } @@ -1990,7 +2001,7 @@ if (Tok.is(tok::equal)) { EqualLoc = ConsumeToken(); - if (Tok.is(tok::kw_delete)) { + if (Tok.is(tok::kw_delete) || Tok.is(tok::kw_cap)) { // In principle, an initializer of '= delete p;' is legal, but it will // never type-check. It's better to diagnose it as an ill-formed expression // than as an ill-formed deleted non-function member. @@ -2384,7 +2395,7 @@ ExceptionSpecificationType Result = EST_None; // See if there's a dynamic specification. - if (Tok.is(tok::kw_throw)) { + if (Tok.is(tok::kw_throw) || Tok.is(tok::kw_throz)) { Result = ParseDynamicExceptionSpecification(SpecificationRange, DynamicExceptions, DynamicExceptionRanges); @@ -2427,7 +2438,7 @@ // If there's a dynamic specification after a noexcept specification, // parse that and ignore the results. - if (Tok.is(tok::kw_throw)) { + if (Tok.is(tok::kw_throw) || Tok.is(tok::kw_throz)) { Diag(Tok.getLocation(), diag::err_dynamic_and_noexcept_specification); ParseDynamicExceptionSpecification(NoexceptRange, DynamicExceptions, DynamicExceptionRanges); @@ -2454,7 +2465,7 @@ SourceRange &SpecificationRange, SmallVectorImpl &Exceptions, SmallVectorImpl &Ranges) { - assert(Tok.is(tok::kw_throw) && "expected throw"); + assert(Tok.is(tok::kw_throw) || Tok.is(tok::kw_throz) && "expected throw"); SpecificationRange.setBegin(ConsumeToken()); BalancedDelimiterTracker T(*this, tok::l_paren); Index: lib/Parse/ParseExprCXX.cpp =================================================================== --- lib/Parse/ParseExprCXX.cpp (revision 145152) +++ lib/Parse/ParseExprCXX.cpp (working copy) @@ -152,7 +152,7 @@ if (Tok.is(tok::coloncolon)) { // ::new and ::delete aren't nested-name-specifiers. tok::TokenKind NextKind = NextToken().getKind(); - if (NextKind == tok::kw_new || NextKind == tok::kw_delete) + if (NextKind == tok::kw_new || NextKind == tok::kw_makea || NextKind == tok::kw_delete || NextKind == tok::kw_cap) return false; // '::' - Global scope qualifier. @@ -627,7 +627,7 @@ SourceLocation Loc; IdentifierInfo* Id = 0; - if (Tok.is(tok::kw_this)) { + if (Tok.is(tok::kw_this) || Tok.is(tok::kw_dis)) { Kind = LCK_This; Loc = ConsumeToken(); } else { @@ -639,7 +639,7 @@ if (Tok.is(tok::identifier)) { Id = Tok.getIdentifierInfo(); Loc = ConsumeToken(); - } else if (Tok.is(tok::kw_this)) { + } else if (Tok.is(tok::kw_this) || Tok.is(tok::kw_dis)) { // FIXME: If we want to suggest a fixit here, will need to return more // than just DiagnosticID. Perhaps full DiagnosticBuilder that can be // Clear()ed to prevent emission in case of tentative parsing? @@ -1041,7 +1041,7 @@ /// throw-expression: [C++ 15] /// 'throw' assignment-expression[opt] ExprResult Parser::ParseThrowExpression() { - assert(Tok.is(tok::kw_throw) && "Not throw!"); + assert(Tok.is(tok::kw_throw) || Tok.is(tok::kw_throz) && "Not throw!"); SourceLocation ThrowLoc = ConsumeToken(); // Eat the throw token. // If the current token isn't the start of an assignment-expression, @@ -1069,7 +1069,7 @@ /// a non-lvalue expression whose value is the address of the object for which /// the function is called. ExprResult Parser::ParseCXXThis() { - assert(Tok.is(tok::kw_this) && "Not 'this'!"); + assert(Tok.is(tok::kw_this) || Tok.is(tok::kw_dis) && "Not 'this'!"); SourceLocation ThisLoc = ConsumeToken(); return Actions.ActOnCXXThis(ThisLoc); } @@ -1233,11 +1233,14 @@ case tok::annot_typename: case tok::kw_short: case tok::kw_long: + case tok::kw_shlong: // EB++ case tok::kw___int64: case tok::kw_signed: case tok::kw_unsigned: case tok::kw_void: + case tok::kw_shiznit: // EB++ case tok::kw_char: + case tok::kw_alphabizzle: // EB++ case tok::kw_int: case tok::kw_half: case tok::kw_float: @@ -1247,6 +1250,7 @@ case tok::kw_char32_t: case tok::kw_bool: case tok::kw_decltype: + case tok::kw_whodat: // EB++ case tok::kw_typeof: case tok::kw___underlying_type: return true; @@ -1324,6 +1328,7 @@ DS.SetTypeSpecWidth(DeclSpec::TSW_short, Loc, PrevSpec, DiagID); break; case tok::kw_long: + case tok::kw_shlong: // EB++ DS.SetTypeSpecWidth(DeclSpec::TSW_long, Loc, PrevSpec, DiagID); break; case tok::kw___int64: @@ -1335,10 +1340,12 @@ case tok::kw_unsigned: DS.SetTypeSpecSign(DeclSpec::TSS_unsigned, Loc, PrevSpec, DiagID); break; + case tok::kw_shiznit: // EB++ case tok::kw_void: DS.SetTypeSpecType(DeclSpec::TST_void, Loc, PrevSpec, DiagID); break; case tok::kw_char: + case tok::kw_alphabizzle: // EB++ DS.SetTypeSpecType(DeclSpec::TST_char, Loc, PrevSpec, DiagID); break; case tok::kw_int: @@ -1661,9 +1668,11 @@ SourceLocation SymbolLocations[3]; OverloadedOperatorKind Op = OO_None; switch (Tok.getKind()) { + case tok::kw_makea: // EB++ case tok::kw_new: + case tok::kw_cap: // EB++ case tok::kw_delete: { - bool isNew = Tok.getKind() == tok::kw_new; + bool isNew = (Tok.getKind() == tok::kw_new || Tok.getKind() == tok::kw_makea); // Consume the 'new' or 'delete'. SymbolLocations[SymbolIdx++] = ConsumeToken(); if (Tok.is(tok::l_square)) { @@ -2011,7 +2020,7 @@ /// ExprResult Parser::ParseCXXNewExpression(bool UseGlobal, SourceLocation Start) { - assert(Tok.is(tok::kw_new) && "expected 'new' token"); + assert(Tok.is(tok::kw_new) || Tok.is(tok::kw_makea) && "expected 'new' token"); ConsumeToken(); // Consume 'new' // A '(' now can be a new-placement or the '(' wrapping the type-id in the @@ -2192,7 +2201,7 @@ /// '::'[opt] 'delete' '[' ']' cast-expression ExprResult Parser::ParseCXXDeleteExpression(bool UseGlobal, SourceLocation Start) { - assert(Tok.is(tok::kw_delete) && "Expected 'delete' keyword"); + assert(Tok.is(tok::kw_delete) || Tok.is(tok::kw_cap) && "Expected 'delete' keyword"); ConsumeToken(); // Consume 'delete' // Array delete? Index: lib/Parse/Parser.cpp =================================================================== --- lib/Parse/Parser.cpp (revision 145152) +++ lib/Parse/Parser.cpp (working copy) @@ -589,10 +589,14 @@ cutOffParsing(); return DeclGroupPtrTy(); case tok::kw_using: + case tok::kw_uzin: // EB++ case tok::kw_namespace: + case tok::kw_namespaze: // EB++ case tok::kw_typedef: + case tok::kw_reprezentin: // EB++ case tok::kw_template: case tok::kw_export: // As in 'export template' + case tok::kw_bounce: // EB++ case tok::kw_static_assert: case tok::kw__Static_assert: // A function definition cannot start with a these keywords. @@ -619,7 +623,7 @@ tok::TokenKind NextKind = NextToken().getKind(); // Inline namespaces. Allowed as an extension even in C++03. - if (NextKind == tok::kw_namespace) { + if ((NextKind == tok::kw_namespace) || (NextKind == tok::kw_namespaze)) { SourceLocation DeclEnd; StmtVector Stmts(Actions); return ParseDeclaration(Stmts, Declarator::FileContext, DeclEnd, attrs); @@ -638,6 +642,7 @@ goto dont_know; case tok::kw_extern: + case tok::kw_othahood: // EB++ if (getLang().CPlusPlus && NextToken().is(tok::kw_template)) { // Extern templates SourceLocation ExternLoc = ConsumeToken(); @@ -679,7 +684,7 @@ // Check for '= delete' or '= default' if (getLang().CPlusPlus && Tok.is(tok::equal)) { const Token &KW = NextToken(); - if (KW.is(tok::kw_default) || KW.is(tok::kw_delete)) + if (KW.is(tok::kw_default) || KW.is(tok::kw_delete) || KW.is(tok::kw_cap)) return false; } @@ -706,11 +711,12 @@ if (getLang().CPlusPlus && Tok.is(tok::equal)) { const Token &KW = NextToken(); - return KW.is(tok::kw_default) || KW.is(tok::kw_delete); + return KW.is(tok::kw_default) || KW.is(tok::kw_delete) || KW.is(tok::kw_cap); } - return Tok.is(tok::colon) || // X() : Base() {} (used for ctors) - Tok.is(tok::kw_try); // X() try { ... } + return Tok.is(tok::colon) || // X() : Base() {} (used for ctors) + Tok.is(tok::kw_try) || // X() try { ... } + Tok.is(tok::kw_checkit); // EB++ } /// ParseDeclarationOrFunctionDefinition - Parse either a function-definition or @@ -841,7 +847,7 @@ if (Tok.isNot(tok::l_brace) && (!getLang().CPlusPlus || (Tok.isNot(tok::colon) && Tok.isNot(tok::kw_try) && - Tok.isNot(tok::equal)))) { + Tok.isNot(tok::kw_checkit) && Tok.isNot(tok::equal)))) { Diag(Tok, diag::err_expected_fn_body); // Skip over garbage, until we get to '{'. Don't eat the '{'. @@ -917,7 +923,7 @@ bool Delete = false; SourceLocation KWLoc; - if (Tok.is(tok::kw_delete)) { + if (Tok.is(tok::kw_delete) || Tok.is(tok::kw_cap)) { if (!getLang().CPlusPlus0x) Diag(Tok, diag::warn_deleted_function_accepted_as_extension); @@ -946,7 +952,7 @@ return Res; } - if (Tok.is(tok::kw_try)) + if (Tok.is(tok::kw_try) || Tok.is(tok::kw_checkit)) return ParseFunctionTryBlock(Res, BodyScope); // If we have a colon, then we're probably parsing a C++ @@ -1109,7 +1115,7 @@ assert(Tok.is(tok::kw_asm) && "Not an asm!"); SourceLocation Loc = ConsumeToken(); - if (Tok.is(tok::kw_volatile)) { + if (Tok.is(tok::kw_volatile) || Tok.is(tok::kw_trippin)) { // Remove from the end of 'asm' to the end of 'volatile'. SourceRange RemovalRange(PP.getLocForEndOfToken(Loc), PP.getLocForEndOfToken(Tok.getLocation())); Index: lib/Headers/iso646.h =================================================================== --- lib/Headers/iso646.h (revision 145152) +++ lib/Headers/iso646.h (working copy) @@ -38,6 +38,7 @@ #define or_eq |= #define xor ^ #define xor_eq ^= +#define sameas == // EB++ #endif #endif /* __ISO646_H */