Parser.cpp 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615
  1. //===--- Parser.cpp - C Language Family Parser ----------------------------===//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file was developed by Chris Lattner and is distributed under
  6. // the University of Illinois Open Source License. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. //
  10. // This file implements the Parser interfaces.
  11. //
  12. //===----------------------------------------------------------------------===//
  13. #include "clang/Parse/Parser.h"
  14. #include "clang/Parse/DeclSpec.h"
  15. #include "clang/Parse/Scope.h"
  16. using namespace clang;
  17. Parser::Parser(Preprocessor &pp, Action &actions)
  18. : PP(pp), Actions(actions), Diags(PP.getDiagnostics()) {
  19. Tok.setKind(tok::eof);
  20. CurScope = 0;
  21. ParenCount = BracketCount = BraceCount = 0;
  22. }
  23. /// Out-of-line virtual destructor to provide home for Action class.
  24. Action::~Action() {}
  25. void Parser::Diag(SourceLocation Loc, unsigned DiagID,
  26. const std::string &Msg) {
  27. Diags.Report(Loc, DiagID, &Msg, 1);
  28. }
  29. /// MatchRHSPunctuation - For punctuation with a LHS and RHS (e.g. '['/']'),
  30. /// this helper function matches and consumes the specified RHS token if
  31. /// present. If not present, it emits the specified diagnostic indicating
  32. /// that the parser failed to match the RHS of the token at LHSLoc. LHSName
  33. /// should be the name of the unmatched LHS token.
  34. SourceLocation Parser::MatchRHSPunctuation(tok::TokenKind RHSTok,
  35. SourceLocation LHSLoc) {
  36. if (Tok.getKind() == RHSTok)
  37. return ConsumeAnyToken();
  38. SourceLocation R = Tok.getLocation();
  39. const char *LHSName = "unknown";
  40. diag::kind DID = diag::err_parse_error;
  41. switch (RHSTok) {
  42. default: break;
  43. case tok::r_paren : LHSName = "("; DID = diag::err_expected_rparen; break;
  44. case tok::r_brace : LHSName = "{"; DID = diag::err_expected_rbrace; break;
  45. case tok::r_square: LHSName = "["; DID = diag::err_expected_rsquare; break;
  46. case tok::greater: LHSName = "<"; DID = diag::err_expected_greater; break;
  47. }
  48. Diag(Tok, DID);
  49. Diag(LHSLoc, diag::err_matching, LHSName);
  50. SkipUntil(RHSTok);
  51. return R;
  52. }
  53. /// ExpectAndConsume - The parser expects that 'ExpectedTok' is next in the
  54. /// input. If so, it is consumed and false is returned.
  55. ///
  56. /// If the input is malformed, this emits the specified diagnostic. Next, if
  57. /// SkipToTok is specified, it calls SkipUntil(SkipToTok). Finally, true is
  58. /// returned.
  59. bool Parser::ExpectAndConsume(tok::TokenKind ExpectedTok, unsigned DiagID,
  60. const char *Msg, tok::TokenKind SkipToTok) {
  61. if (Tok.getKind() == ExpectedTok) {
  62. ConsumeAnyToken();
  63. return false;
  64. }
  65. Diag(Tok, DiagID, Msg);
  66. if (SkipToTok != tok::unknown)
  67. SkipUntil(SkipToTok);
  68. return true;
  69. }
  70. //===----------------------------------------------------------------------===//
  71. // Error recovery.
  72. //===----------------------------------------------------------------------===//
  73. /// SkipUntil - Read tokens until we get to the specified token, then consume
  74. /// it (unless DontConsume is false). Because we cannot guarantee that the
  75. /// token will ever occur, this skips to the next token, or to some likely
  76. /// good stopping point. If StopAtSemi is true, skipping will stop at a ';'
  77. /// character.
  78. ///
  79. /// If SkipUntil finds the specified token, it returns true, otherwise it
  80. /// returns false.
  81. bool Parser::SkipUntil(const tok::TokenKind *Toks, unsigned NumToks,
  82. bool StopAtSemi, bool DontConsume) {
  83. // We always want this function to skip at least one token if the first token
  84. // isn't T and if not at EOF.
  85. bool isFirstTokenSkipped = true;
  86. while (1) {
  87. // If we found one of the tokens, stop and return true.
  88. for (unsigned i = 0; i != NumToks; ++i) {
  89. if (Tok.getKind() == Toks[i]) {
  90. if (DontConsume) {
  91. // Noop, don't consume the token.
  92. } else {
  93. ConsumeAnyToken();
  94. }
  95. return true;
  96. }
  97. }
  98. switch (Tok.getKind()) {
  99. case tok::eof:
  100. // Ran out of tokens.
  101. return false;
  102. case tok::l_paren:
  103. // Recursively skip properly-nested parens.
  104. ConsumeParen();
  105. SkipUntil(tok::r_paren, false);
  106. break;
  107. case tok::l_square:
  108. // Recursively skip properly-nested square brackets.
  109. ConsumeBracket();
  110. SkipUntil(tok::r_square, false);
  111. break;
  112. case tok::l_brace:
  113. // Recursively skip properly-nested braces.
  114. ConsumeBrace();
  115. SkipUntil(tok::r_brace, false);
  116. break;
  117. // Okay, we found a ']' or '}' or ')', which we think should be balanced.
  118. // Since the user wasn't looking for this token (if they were, it would
  119. // already be handled), this isn't balanced. If there is a LHS token at a
  120. // higher level, we will assume that this matches the unbalanced token
  121. // and return it. Otherwise, this is a spurious RHS token, which we skip.
  122. case tok::r_paren:
  123. if (ParenCount && !isFirstTokenSkipped)
  124. return false; // Matches something.
  125. ConsumeParen();
  126. break;
  127. case tok::r_square:
  128. if (BracketCount && !isFirstTokenSkipped)
  129. return false; // Matches something.
  130. ConsumeBracket();
  131. break;
  132. case tok::r_brace:
  133. if (BraceCount && !isFirstTokenSkipped)
  134. return false; // Matches something.
  135. ConsumeBrace();
  136. break;
  137. case tok::string_literal:
  138. case tok::wide_string_literal:
  139. ConsumeStringToken();
  140. break;
  141. case tok::semi:
  142. if (StopAtSemi)
  143. return false;
  144. // FALL THROUGH.
  145. default:
  146. // Skip this token.
  147. ConsumeToken();
  148. break;
  149. }
  150. isFirstTokenSkipped = false;
  151. }
  152. }
  153. //===----------------------------------------------------------------------===//
  154. // Scope manipulation
  155. //===----------------------------------------------------------------------===//
  156. /// ScopeCache - Cache scopes to avoid malloc traffic.
  157. /// FIXME: eliminate this static ctor
  158. static llvm::SmallVector<Scope*, 16> ScopeCache;
  159. /// EnterScope - Start a new scope.
  160. void Parser::EnterScope(unsigned ScopeFlags) {
  161. if (!ScopeCache.empty()) {
  162. Scope *N = ScopeCache.back();
  163. ScopeCache.pop_back();
  164. N->Init(CurScope, ScopeFlags);
  165. CurScope = N;
  166. } else {
  167. CurScope = new Scope(CurScope, ScopeFlags);
  168. }
  169. }
  170. /// ExitScope - Pop a scope off the scope stack.
  171. void Parser::ExitScope() {
  172. assert(CurScope && "Scope imbalance!");
  173. // Inform the actions module that this scope is going away.
  174. Actions.PopScope(Tok.getLocation(), CurScope);
  175. Scope *Old = CurScope;
  176. CurScope = Old->getParent();
  177. if (ScopeCache.size() == 16)
  178. delete Old;
  179. else
  180. ScopeCache.push_back(Old);
  181. }
  182. //===----------------------------------------------------------------------===//
  183. // C99 6.9: External Definitions.
  184. //===----------------------------------------------------------------------===//
  185. Parser::~Parser() {
  186. // If we still have scopes active, delete the scope tree.
  187. delete CurScope;
  188. // Free the scope cache.
  189. while (!ScopeCache.empty()) {
  190. delete ScopeCache.back();
  191. ScopeCache.pop_back();
  192. }
  193. }
  194. /// Initialize - Warm up the parser.
  195. ///
  196. void Parser::Initialize() {
  197. // Prime the lexer look-ahead.
  198. ConsumeToken();
  199. // Create the global scope, install it as the current scope.
  200. assert(CurScope == 0 && "A scope is already active?");
  201. EnterScope(0);
  202. // Install builtin types.
  203. // TODO: Move this someplace more useful.
  204. {
  205. const char *Dummy;
  206. //__builtin_va_list
  207. DeclSpec DS;
  208. bool Error = DS.SetStorageClassSpec(DeclSpec::SCS_typedef, SourceLocation(),
  209. Dummy);
  210. // TODO: add a 'TST_builtin' type?
  211. Error |= DS.SetTypeSpecType(DeclSpec::TST_int, SourceLocation(), Dummy);
  212. assert(!Error && "Error setting up __builtin_va_list!");
  213. Declarator D(DS, Declarator::FileContext);
  214. D.SetIdentifier(PP.getIdentifierInfo("__builtin_va_list"),SourceLocation());
  215. Actions.ParseDeclarator(CurScope, D, 0, 0);
  216. }
  217. if (Tok.getKind() == tok::eof) // Empty source file is an extension.
  218. Diag(Tok, diag::ext_empty_source_file);
  219. }
  220. /// ParseTopLevelDecl - Parse one top-level declaration, return whatever the
  221. /// action tells us to. This returns true if the EOF was encountered.
  222. bool Parser::ParseTopLevelDecl(DeclTy*& Result) {
  223. Result = 0;
  224. if (Tok.getKind() == tok::eof) return true;
  225. Result = ParseExternalDeclaration();
  226. return false;
  227. }
  228. /// Finalize - Shut down the parser.
  229. ///
  230. void Parser::Finalize() {
  231. ExitScope();
  232. assert(CurScope == 0 && "Scope imbalance!");
  233. }
  234. /// ParseTranslationUnit:
  235. /// translation-unit: [C99 6.9]
  236. /// external-declaration
  237. /// translation-unit external-declaration
  238. void Parser::ParseTranslationUnit() {
  239. Initialize();
  240. DeclTy *Res;
  241. while (!ParseTopLevelDecl(Res))
  242. /*parse them all*/;
  243. Finalize();
  244. }
  245. /// ParseExternalDeclaration:
  246. /// external-declaration: [C99 6.9]
  247. /// function-definition [TODO]
  248. /// declaration [TODO]
  249. /// [EXT] ';'
  250. /// [GNU] asm-definition
  251. /// [GNU] __extension__ external-declaration [TODO]
  252. /// [OBJC] objc-class-definition
  253. /// [OBJC] objc-class-declaration
  254. /// [OBJC] objc-alias-declaration
  255. /// [OBJC] objc-protocol-definition
  256. /// [OBJC] objc-method-definition
  257. /// [OBJC] @end
  258. ///
  259. /// [GNU] asm-definition:
  260. /// simple-asm-expr ';'
  261. ///
  262. Parser::DeclTy *Parser::ParseExternalDeclaration() {
  263. switch (Tok.getKind()) {
  264. case tok::semi:
  265. Diag(Tok, diag::ext_top_level_semi);
  266. ConsumeToken();
  267. // TODO: Invoke action for top-level semicolon.
  268. return 0;
  269. case tok::kw_asm:
  270. ParseSimpleAsm();
  271. ExpectAndConsume(tok::semi, diag::err_expected_semi_after,
  272. "top-level asm block");
  273. // TODO: Invoke action for top-level asm.
  274. return 0;
  275. case tok::at:
  276. // @ is not a legal token unless objc is enabled, no need to check.
  277. ParseObjCAtDirectives();
  278. return 0;
  279. case tok::minus:
  280. if (getLang().ObjC1) {
  281. ParseObjCInstanceMethodDeclaration();
  282. } else {
  283. Diag(Tok, diag::err_expected_external_declaration);
  284. ConsumeToken();
  285. }
  286. return 0;
  287. case tok::plus:
  288. if (getLang().ObjC1) {
  289. ParseObjCClassMethodDeclaration();
  290. } else {
  291. Diag(Tok, diag::err_expected_external_declaration);
  292. ConsumeToken();
  293. }
  294. return 0;
  295. case tok::kw_typedef:
  296. // A function definition cannot start with a 'typedef' keyword.
  297. return ParseDeclaration(Declarator::FileContext);
  298. default:
  299. // We can't tell whether this is a function-definition or declaration yet.
  300. return ParseDeclarationOrFunctionDefinition();
  301. }
  302. }
  303. /// ParseDeclarationOrFunctionDefinition - Parse either a function-definition or
  304. /// a declaration. We can't tell which we have until we read up to the
  305. /// compound-statement in function-definition.
  306. ///
  307. /// function-definition: [C99 6.9.1]
  308. /// declaration-specifiers[opt] declarator declaration-list[opt]
  309. /// compound-statement [TODO]
  310. /// declaration: [C99 6.7]
  311. /// declaration-specifiers init-declarator-list[opt] ';' [TODO]
  312. /// [!C99] init-declarator-list ';' [TODO]
  313. /// [OMP] threadprivate-directive [TODO]
  314. ///
  315. Parser::DeclTy *Parser::ParseDeclarationOrFunctionDefinition() {
  316. // Parse the common declaration-specifiers piece.
  317. DeclSpec DS;
  318. ParseDeclarationSpecifiers(DS);
  319. // C99 6.7.2.3p6: Handle "struct-or-union identifier;", "enum { X };"
  320. // declaration-specifiers init-declarator-list[opt] ';'
  321. if (Tok.getKind() == tok::semi) {
  322. ConsumeToken();
  323. return Actions.ParsedFreeStandingDeclSpec(CurScope, DS);
  324. }
  325. // Parse the first declarator.
  326. Declarator DeclaratorInfo(DS, Declarator::FileContext);
  327. ParseDeclarator(DeclaratorInfo);
  328. // Error parsing the declarator?
  329. if (DeclaratorInfo.getIdentifier() == 0) {
  330. // If so, skip until the semi-colon or a }.
  331. SkipUntil(tok::r_brace, true);
  332. if (Tok.getKind() == tok::semi)
  333. ConsumeToken();
  334. return 0;
  335. }
  336. // If the declarator is the start of a function definition, handle it.
  337. if (Tok.getKind() == tok::equal || // int X()= -> not a function def
  338. Tok.getKind() == tok::comma || // int X(), -> not a function def
  339. Tok.getKind() == tok::semi || // int X(); -> not a function def
  340. Tok.getKind() == tok::kw_asm || // int X() __asm__ -> not a fn def
  341. Tok.getKind() == tok::kw___attribute) {// int X() __attr__ -> not a fn def
  342. // FALL THROUGH.
  343. } else if (DeclaratorInfo.isFunctionDeclarator() &&
  344. (Tok.getKind() == tok::l_brace || // int X() {}
  345. isDeclarationSpecifier())) { // int X(f) int f; {}
  346. return ParseFunctionDefinition(DeclaratorInfo);
  347. } else {
  348. if (DeclaratorInfo.isFunctionDeclarator())
  349. Diag(Tok, diag::err_expected_fn_body);
  350. else
  351. Diag(Tok, diag::err_expected_after_declarator);
  352. SkipUntil(tok::semi);
  353. return 0;
  354. }
  355. // Parse the init-declarator-list for a normal declaration.
  356. return ParseInitDeclaratorListAfterFirstDeclarator(DeclaratorInfo);
  357. }
  358. /// ParseFunctionDefinition - We parsed and verified that the specified
  359. /// Declarator is well formed. If this is a K&R-style function, read the
  360. /// parameters declaration-list, then start the compound-statement.
  361. ///
  362. /// declaration-specifiers[opt] declarator declaration-list[opt]
  363. /// compound-statement [TODO]
  364. ///
  365. Parser::DeclTy *Parser::ParseFunctionDefinition(Declarator &D) {
  366. const DeclaratorChunk &FnTypeInfo = D.getTypeObject(0);
  367. assert(FnTypeInfo.Kind == DeclaratorChunk::Function &&
  368. "This isn't a function declarator!");
  369. const DeclaratorChunk::FunctionTypeInfo &FTI = FnTypeInfo.Fun;
  370. // If this declaration was formed with a K&R-style identifier list for the
  371. // arguments, parse declarations for all of the args next.
  372. // int foo(a,b) int a; float b; {}
  373. if (!FTI.hasPrototype && FTI.NumArgs != 0)
  374. ParseKNRParamDeclarations(D);
  375. // Enter a scope for the function body.
  376. EnterScope(Scope::FnScope);
  377. // Tell the actions module that we have entered a function definition with the
  378. // specified Declarator for the function.
  379. DeclTy *Res = Actions.ParseStartOfFunctionDef(CurScope, D);
  380. // We should have an opening brace now.
  381. if (Tok.getKind() != tok::l_brace) {
  382. Diag(Tok, diag::err_expected_fn_body);
  383. // Skip over garbage, until we get to '{'. Don't eat the '{'.
  384. SkipUntil(tok::l_brace, true, true);
  385. // If we didn't find the '{', bail out.
  386. if (Tok.getKind() != tok::l_brace) {
  387. ExitScope();
  388. return 0;
  389. }
  390. }
  391. // Do not enter a scope for the brace, as the arguments are in the same scope
  392. // (the function body) as the body itself. Instead, just read the statement
  393. // list and put it into a CompoundStmt for safe keeping.
  394. StmtResult FnBody = ParseCompoundStatementBody();
  395. if (FnBody.isInvalid) {
  396. ExitScope();
  397. return 0;
  398. }
  399. // Leave the function body scope.
  400. ExitScope();
  401. // TODO: Pass argument information.
  402. return Actions.ParseFunctionDefBody(Res, FnBody.Val);
  403. }
  404. /// ParseKNRParamDeclarations - Parse 'declaration-list[opt]' which provides
  405. /// types for a function with a K&R-style identifier list for arguments.
  406. void Parser::ParseKNRParamDeclarations(Declarator &D) {
  407. // We know that the top-level of this declarator is a function.
  408. DeclaratorChunk::FunctionTypeInfo &FTI = D.getTypeObject(0).Fun;
  409. // Read all the argument declarations.
  410. while (isDeclarationSpecifier()) {
  411. SourceLocation DSStart = Tok.getLocation();
  412. // Parse the common declaration-specifiers piece.
  413. DeclSpec DS;
  414. ParseDeclarationSpecifiers(DS);
  415. // C99 6.9.1p6: 'each declaration in the declaration list shall have at
  416. // least one declarator'.
  417. // NOTE: GCC just makes this an ext-warn. It's not clear what it does with
  418. // the declarations though. It's trivial to ignore them, really hard to do
  419. // anything else with them.
  420. if (Tok.getKind() == tok::semi) {
  421. Diag(DSStart, diag::err_declaration_does_not_declare_param);
  422. ConsumeToken();
  423. continue;
  424. }
  425. // C99 6.9.1p6: Declarations shall contain no storage-class specifiers other
  426. // than register.
  427. if (DS.getStorageClassSpec() != DeclSpec::SCS_unspecified &&
  428. DS.getStorageClassSpec() != DeclSpec::SCS_register) {
  429. Diag(DS.getStorageClassSpecLoc(),
  430. diag::err_invalid_storage_class_in_func_decl);
  431. DS.ClearStorageClassSpecs();
  432. }
  433. if (DS.isThreadSpecified()) {
  434. Diag(DS.getThreadSpecLoc(),
  435. diag::err_invalid_storage_class_in_func_decl);
  436. DS.ClearStorageClassSpecs();
  437. }
  438. // Parse the first declarator attached to this declspec.
  439. Declarator ParmDeclarator(DS, Declarator::KNRTypeListContext);
  440. ParseDeclarator(ParmDeclarator);
  441. // Handle the full declarator list.
  442. while (1) {
  443. DeclTy *AttrList;
  444. // If attributes are present, parse them.
  445. if (Tok.getKind() == tok::kw___attribute)
  446. // FIXME: attach attributes too.
  447. AttrList = ParseAttributes();
  448. // Ask the actions module to compute the type for this declarator.
  449. Action::TypeResult TR =
  450. Actions.ParseParamDeclaratorType(CurScope, ParmDeclarator);
  451. if (!TR.isInvalid &&
  452. // A missing identifier has already been diagnosed.
  453. ParmDeclarator.getIdentifier()) {
  454. // Scan the argument list looking for the correct param to apply this
  455. // type.
  456. for (unsigned i = 0; ; ++i) {
  457. // C99 6.9.1p6: those declarators shall declare only identifiers from
  458. // the identifier list.
  459. if (i == FTI.NumArgs) {
  460. Diag(ParmDeclarator.getIdentifierLoc(), diag::err_no_matching_param,
  461. ParmDeclarator.getIdentifier()->getName());
  462. break;
  463. }
  464. if (FTI.ArgInfo[i].Ident == ParmDeclarator.getIdentifier()) {
  465. // Reject redefinitions of parameters.
  466. if (FTI.ArgInfo[i].TypeInfo) {
  467. Diag(ParmDeclarator.getIdentifierLoc(),
  468. diag::err_param_redefinition,
  469. ParmDeclarator.getIdentifier()->getName());
  470. } else {
  471. FTI.ArgInfo[i].TypeInfo = TR.Val;
  472. }
  473. break;
  474. }
  475. }
  476. }
  477. // If we don't have a comma, it is either the end of the list (a ';') or
  478. // an error, bail out.
  479. if (Tok.getKind() != tok::comma)
  480. break;
  481. // Consume the comma.
  482. ConsumeToken();
  483. // Parse the next declarator.
  484. ParmDeclarator.clear();
  485. ParseDeclarator(ParmDeclarator);
  486. }
  487. if (Tok.getKind() == tok::semi) {
  488. ConsumeToken();
  489. } else {
  490. Diag(Tok, diag::err_parse_error);
  491. // Skip to end of block or statement
  492. SkipUntil(tok::semi, true);
  493. if (Tok.getKind() == tok::semi)
  494. ConsumeToken();
  495. }
  496. }
  497. // The actions module must verify that all arguments were declared.
  498. }
  499. /// ParseAsmStringLiteral - This is just a normal string-literal, but is not
  500. /// allowed to be a wide string, and is not subject to character translation.
  501. ///
  502. /// [GNU] asm-string-literal:
  503. /// string-literal
  504. ///
  505. void Parser::ParseAsmStringLiteral() {
  506. if (!isTokenStringLiteral()) {
  507. Diag(Tok, diag::err_expected_string_literal);
  508. return;
  509. }
  510. ExprResult Res = ParseStringLiteralExpression();
  511. if (Res.isInvalid) return;
  512. // TODO: Diagnose: wide string literal in 'asm'
  513. }
  514. /// ParseSimpleAsm
  515. ///
  516. /// [GNU] simple-asm-expr:
  517. /// 'asm' '(' asm-string-literal ')'
  518. ///
  519. void Parser::ParseSimpleAsm() {
  520. assert(Tok.getKind() == tok::kw_asm && "Not an asm!");
  521. ConsumeToken();
  522. if (Tok.getKind() != tok::l_paren) {
  523. Diag(Tok, diag::err_expected_lparen_after, "asm");
  524. return;
  525. }
  526. SourceLocation Loc = ConsumeParen();
  527. ParseAsmStringLiteral();
  528. MatchRHSPunctuation(tok::r_paren, Loc);
  529. }