Swift5.1 語言參考(十) 語法匯總

★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
?微信公眾號:山青詠芝(shanqingyongzhi)
?博客園地址:山青詠芝(https://www.cnblogs.com/strengthen/)
?GitHub地址:https://github.com/strengthen/LeetCode
?原文地址:https://www.cnblogs.com/strengthen/p/9740754.html?
?如果鏈接不是山青詠芝的博客園地址,則可能是爬取作者的文章。
?原文已修改更新!強烈建議點擊原文地址閱讀!支持作者!支持原創!
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★

詞法結構

 1 GRAMMAR OF WHITESPACE
 2 
 3 whitespace → whitespace-item whitespace opt
 4 
 5 whitespace-item → line-break
 6 
 7 whitespace-item → comment
 8 
 9 whitespace-item → multiline-comment
10 
11 whitespace-item → U+0000, U+0009, U+000B, U+000C, or U+0020
12 
13 line-break → U+000A
14 
15 line-break → U+000D
16 
17 line-break → U+000D followed by U+000A
18 
19 comment → // comment-text line-break
20 
21 multiline-comment → /* multiline-comment-text */
22 
23 comment-text → comment-text-item comment-text opt
24 
25 comment-text-item → Any Unicode scalar value except U+000A or U+000D
26 
27 multiline-comment-text → multiline-comment-text-item multiline-comment-text opt
28 
29 multiline-comment-text-item → multiline-comment
30 
31 multiline-comment-text-item → comment-text-item
32 
33 multiline-comment-text-item → Any Unicode scalar value except /* or */
 1 GRAMMAR OF AN IDENTIFIER
 2 
 3 identifier → identifier-head identifier-characters opt
 4 
 5 identifier → ` identifier-head identifier-characters opt `
 6 
 7 identifier → implicit-parameter-name
 8 
 9 identifier-list → identifier | identifier , identifier-list
10 
11 identifier-head → Upper- or lowercase letter A through Z
12 
13 identifier-head → _
14 
15 identifier-head → U+00A8, U+00AA, U+00AD, U+00AF, U+00B2–U+00B5, or U+00B7–U+00BA
16 
17 identifier-head → U+00BC–U+00BE, U+00C0–U+00D6, U+00D8–U+00F6, or U+00F8–U+00FF
18 
19 identifier-head → U+0100–U+02FF, U+0370–U+167F, U+1681–U+180D, or U+180F–U+1DBF
20 
21 identifier-head → U+1E00–U+1FFF
22 
23 identifier-head → U+200B–U+200D, U+202A–U+202E, U+203F–U+2040, U+2054, or U+2060–U+206F
24 
25 identifier-head → U+2070–U+20CF, U+2100–U+218F, U+2460–U+24FF, or U+2776–U+2793
26 
27 identifier-head → U+2C00–U+2DFF or U+2E80–U+2FFF
28 
29 identifier-head → U+3004–U+3007, U+3021–U+302F, U+3031–U+303F, or U+3040–U+D7FF
30 
31 identifier-head → U+F900–U+FD3D, U+FD40–U+FDCF, U+FDF0–U+FE1F, or U+FE30–U+FE44
32 
33 identifier-head → U+FE47–U+FFFD
34 
35 identifier-head → U+10000–U+1FFFD, U+20000–U+2FFFD, U+30000–U+3FFFD, or U+40000–U+4FFFD
36 
37 identifier-head → U+50000–U+5FFFD, U+60000–U+6FFFD, U+70000–U+7FFFD, or U+80000–U+8FFFD
38 
39 identifier-head → U+90000–U+9FFFD, U+A0000–U+AFFFD, U+B0000–U+BFFFD, or U+C0000–U+CFFFD
40 
41 identifier-head → U+D0000–U+DFFFD or U+E0000–U+EFFFD
42 
43 identifier-character → Digit 0 through 9
44 
45 identifier-character → U+0300–U+036F, U+1DC0–U+1DFF, U+20D0–U+20FF, or U+FE20–U+FE2F
46 
47 identifier-character → identifier-head
48 
49 identifier-characters → identifier-character identifier-characters opt
50 
51 implicit-parameter-name → $ decimal-digits
1 GRAMMAR OF A LITERAL
2 
3 literal → numeric-literal | string-literal | boolean-literal | nil-literal
4 
5 numeric-literal → -opt integer-literal | -opt floating-point-literal
6 
7 boolean-literal → true | false
8 
9 nil-literal → nil
 1 GRAMMAR OF AN INTEGER LITERAL
 2 
 3 integer-literal → binary-literal
 4 
 5 integer-literal → octal-literal
 6 
 7 integer-literal → decimal-literal
 8 
 9 integer-literal → hexadecimal-literal
10 
11 binary-literal → 0b binary-digit binary-literal-characters opt
12 
13 binary-digit → Digit 0 or 1
14 
15 binary-literal-character → binary-digit | _
16 
17 binary-literal-characters → binary-literal-character binary-literal-characters opt
18 
19 octal-literal → 0o octal-digit octal-literal-characters opt
20 
21 octal-digit → Digit 0 through 7
22 
23 octal-literal-character → octal-digit | _
24 
25 octal-literal-characters → octal-literal-character octal-literal-characters opt
26 
27 decimal-literal → decimal-digit decimal-literal-characters opt
28 
29 decimal-digit → Digit 0 through 9
30 
31 decimal-digits → decimal-digit decimal-digits opt
32 
33 decimal-literal-character → decimal-digit | _
34 
35 decimal-literal-characters → decimal-literal-character decimal-literal-characters opt
36 
37 hexadecimal-literal → 0x hexadecimal-digit hexadecimal-literal-characters opt
38 
39 hexadecimal-digit → Digit 0 through 9, a through f, or A through F
40 
41 hexadecimal-literal-character → hexadecimal-digit | _
42 
43 hexadecimal-literal-characters → hexadecimal-literal-character hexadecimal-literal-characters opt
 1 GRAMMAR OF A FLOATING-POINT LITERAL
 2 
 3 floating-point-literal → decimal-literal decimal-fraction opt decimal-exponent opt
 4 
 5 floating-point-literal → hexadecimal-literal hexadecimal-fraction opt hexadecimal-exponent
 6 
 7 decimal-fraction → . decimal-literal
 8 
 9 decimal-exponent → floating-point-e sign opt decimal-literal
10 
11 hexadecimal-fraction → . hexadecimal-digit hexadecimal-literal-characters opt
12 
13 hexadecimal-exponent → floating-point-p sign opt decimal-literal
14 
15 floating-point-e → e | E
16 
17 floating-point-p → p | P
18 
19 sign → + | -
 1 GRAMMAR OF A STRING LITERAL
 2 
 3 string-literal → static-string-literal | interpolated-string-literal
 4 
 5 static-string-literal → " quoted-text opt "
 6 
 7 static-string-literal → """ multiline-quoted-text opt """
 8 
 9 quoted-text → quoted-text-item quoted-text opt
10 
11 quoted-text-item → escaped-character
12 
13 quoted-text-item → Any Unicode scalar value except ", \, U+000A, or U+000D
14 
15 multiline-quoted-text → multiline-quoted-text-item multiline-quoted-text opt
16 
17 multiline-quoted-text-item → escaped-character
18 
19 multiline-quoted-text-item → Any Unicode scalar value except \
20 
21 multiline-quoted-text-item → escaped-newline
22 
23 interpolated-string-literal → " interpolated-text opt "
24 
25 interpolated-string-literal → """ multiline-interpolated-text opt """
26 
27 interpolated-text → interpolated-text-item interpolated-text opt
28 
29 interpolated-text-item → \( expression ) | quoted-text-item
30 
31 multiline-interpolated-text → multiline-interpolated-text-item multiline-interpolated-text opt
32 
33 multiline-interpolated-text-item → \( expression ) | multiline-quoted-text-item
34 
35 escaped-character → \0 | \\ | \t | \n | \r | \" | \'
36 
37 escaped-character → \u { unicode-scalar-digits }
38 
39 unicode-scalar-digits → Between one and eight hexadecimal digits
40 
41 escaped-newline → \ whitespace opt line-break
 1 GRAMMAR OF OPERATORS
 2 
 3 operatoroperator-head operator-characters opt
 4 
 5 operator → dot-operator-head dot-operator-characters
 6 
 7 operator-head → / | = | - | + | ! | * | % | < | > | & | | | ^ | ~ | ?
 8 
 9 operator-head → U+00A1–U+00A7
10 
11 operator-head → U+00A9 or U+00AB
12 
13 operator-head → U+00AC or U+00AE
14 
15 operator-head → U+00B0–U+00B1, U+00B6, U+00BB, U+00BF, U+00D7, or U+00F7
16 
17 operator-head → U+2016–U+2017 or U+2020–U+2027
18 
19 operator-head → U+2030–U+203E
20 
21 operator-head → U+2041–U+2053
22 
23 operator-head → U+2055–U+205E
24 
25 operator-head → U+2190–U+23FF
26 
27 operator-head → U+2500–U+2775
28 
29 operator-head → U+2794–U+2BFF
30 
31 operator-head → U+2E00–U+2E7F
32 
33 operator-head → U+3001–U+3003
34 
35 operator-head → U+3008–U+3020 or U+3030
36 
37 operator-character → operator-head
38 
39 operator-character → U+0300–U+036F
40 
41 operator-character → U+1DC0–U+1DFF
42 
43 operator-character → U+20D0–U+20FF
44 
45 operator-character → U+FE00–U+FE0F
46 
47 operator-character → U+FE20–U+FE2F
48 
49 operator-character → U+E0100–U+E01EF
50 
51 operator-characters → operator-character operator-characters opt
52 
53 dot-operator-head → .
54 
55 dot-operator-character → . | operator-character
56 
57 dot-operator-characters → dot-operator-character dot-operator-characters opt
58 
59 binary-operatoroperator
60 
61 prefix-operatoroperator
62 
63 postfix-operatoroperator

類型

 1 GRAMMAR OF A TYPE
 2 
 3 type → array-type
 4 
 5 type → dictionary-type
 6 
 7 type → function-type
 8 
 9 type → type-identifier
10 
11 type → tuple-type
12 
13 type → optional-type
14 
15 type → implicitly-unwrapped-optional-type
16 
17 type → protocol-composition-type
18 
19 type → metatype-type
20 
21 type → Any
22 
23 type → Self
24 
25 type → ( type )
1 GRAMMAR OF A TYPE ANNOTATION
2 
3 type-annotation → : attributes opt inoutopt type
1 GRAMMAR OF A TYPE IDENTIFIER
2 
3 type-identifier → type-name generic-argument-clause opt | type-name generic-argument-clause opt . type-identifier
4 
5 type-name → identifier
1 GRAMMAR OF A TUPLE TYPE
2 
3 tuple-type → ( ) | ( tuple-type-element , tuple-type-element-list )
4 
5 tuple-type-element-list → tuple-type-element | tuple-type-element , tuple-type-element-list
6 
7 tuple-type-element → element-name type-annotation | type
8 
9 element-name → identifier
 1 GRAMMAR OF A FUNCTION TYPE
 2 
 3 function-type → attributes opt function-type-argument-clause throwsopt -> type
 4 
 5 function-type → attributes opt function-type-argument-clause rethrows -> type
 6 
 7 function-type-argument-clause → ( )
 8 
 9 function-type-argument-clause → ( function-type-argument-list ...opt )
10 
11 function-type-argument-list → function-type-argument | function-type-argument , function-type-argument-list
12 
13 function-type-argument → attributes opt inoutopt type | argument-label type-annotation
14 
15 argument-label → identifier
1 GRAMMAR OF AN ARRAY TYPE
2 
3 array-type → [ type ]
1 GRAMMAR OF A DICTIONARY TYPE
2 
3 dictionary-type → [ type : type ]
1 GRAMMAR OF AN OPTIONAL TYPE
2 
3 optional-type → type ?
1 GRAMMAR OF AN IMPLICITLY UNWRAPPED OPTIONAL TYPE
2 
3 implicitly-unwrapped-optional-type → type !
1 GRAMMAR OF A PROTOCOL COMPOSITION TYPE
2 
3 protocol-composition-type → type-identifier & protocol-composition-continuation
4 
5 protocol-composition-continuation → type-identifier | protocol-composition-type
1 GRAMMAR OF A METATYPE TYPE
2 
3 metatype-type → type . Type | type . Protocol
1 GRAMMAR OF A TYPE INHERITANCE CLAUSE
2 
3 type-inheritance-clause → : type-inheritance-list
4 
5 type-inheritance-list → type-identifier | type-identifier , type-inheritance-list

表達式

1 GRAMMAR OF AN EXPRESSION
2 
3 expression → try-operator opt prefix-expression binary-expressions opt
4 
5 expression-list → expression | expression , expression-list
1 GRAMMAR OF A PREFIX EXPRESSION
2 
3 prefix-expression → prefix-operator opt postfix-expression
4 
5 prefix-expression → in-out-expression
6 
7 in-out-expression → & identifier
1 GRAMMAR OF A TRY EXPRESSION
2 
3 try-operatortry | try ? | try !
 1 GRAMMAR OF A BINARY EXPRESSION
 2 
 3 binary-expression → binary-operator prefix-expression
 4 
 5 binary-expression → assignment-operator try-operator opt prefix-expression
 6 
 7 binary-expression → conditional-operator try-operator opt prefix-expression
 8 
 9 binary-expression → type-casting-operator
10 
11 binary-expressions → binary-expression binary-expressions opt
1 GRAMMAR OF AN ASSIGNMENT OPERATOR
2 
3 assignment-operator → =
1 GRAMMAR OF A CONDITIONAL OPERATOR
2 
3 conditional-operator → ? expression :
1 GRAMMAR OF A TYPE-CASTING OPERATOR
2 
3 type-casting-operatoris type
4 
5 type-casting-operatoras type
6 
7 type-casting-operatoras ? type
8 
9 type-casting-operatoras ! type
 1 GRAMMAR OF A PRIMARY EXPRESSION
 2 
 3 primary-expression → identifier generic-argument-clause opt
 4 
 5 primary-expression → literal-expression
 6 
 7 primary-expression → self-expression
 8 
 9 primary-expression → superclass-expression
10 
11 primary-expression → closure-expression
12 
13 primary-expression → parenthesized-expression
14 
15 primary-expression → tuple-expression
16 
17 primary-expression → implicit-member-expression
18 
19 primary-expression → wildcard-expression
20 
21 primary-expression → key-path-expression
22 
23 primary-expression → selector-expression
24 
25 primary-expression → key-path-string-expression
 1 GRAMMAR OF A LITERAL EXPRESSION
 2 
 3 literal-expression → literal
 4 
 5 literal-expression → array-literal | dictionary-literal | playground-literal
 6 
 7 literal-expression → #file | #line | #column | #function | #dsohandle
 8 
 9 array-literal → [ array-literal-items opt ]
10 
11 array-literal-items → array-literal-item ,opt | array-literal-item , array-literal-items
12 
13 array-literal-item → expression
14 
15 dictionary-literal → [ dictionary-literal-items ] | [ : ]
16 
17 dictionary-literal-items → dictionary-literal-item ,opt | dictionary-literal-item , dictionary-literal-items
18 
19 dictionary-literal-item → expression : expression
20 
21 playground-literal → #colorLiteral ( red : expression , green : expression , blue : expression , alpha : expression )
22 
23 playground-literal → #fileLiteral ( resourceName : expression )
24 
25 playground-literal → #imageLiteral ( resourceName : expression )
1 GRAMMAR OF A SELF EXPRESSION
2 
3 self-expression → self | self-method-expression | self-subscript-expression | self-initializer-expression
4 
5 self-method-expression → self . identifier
6 
7 self-subscript-expression → self [ function-call-argument-list ]
8 
9 self-initializer-expression → self . init
1 GRAMMAR OF A SUPERCLASS EXPRESSION
2 
3 superclass-expression → superclass-method-expression | superclass-subscript-expression | superclass-initializer-expression
4 
5 superclass-method-expression → super . identifier
6 
7 superclass-subscript-expression → super [ function-call-argument-list ]
8 
9 superclass-initializer-expression → super . init
 1 GRAMMAR OF A CLOSURE EXPRESSION
 2 
 3 closure-expression → { closure-signature opt statements opt }
 4 
 5 closure-signature → capture-list opt closure-parameter-clause throwsopt function-result opt in
 6 
 7 closure-signature → capture-list in
 8 
 9 closure-parameter-clause → ( ) | ( closure-parameter-list ) | identifier-list
10 
11 closure-parameter-list → closure-parameter | closure-parameter , closure-parameter-list
12 
13 closure-parameter → closure-parameter-name type-annotation opt
14 
15 closure-parameter → closure-parameter-name type-annotation ...
16 
17 closure-parameter-name → identifier
18 
19 capture-list → [ capture-list-items ]
20 
21 capture-list-items → capture-list-item | capture-list-item , capture-list-items
22 
23 capture-list-item → capture-specifier opt expression
24 
25 capture-specifier → weak | unowned | unowned(safe) | unowned(unsafe)
1 GRAMMAR OF A IMPLICIT MEMBER EXPRESSION
2 
3 implicit-member-expression → . identifier
1 GRAMMAR OF A PARENTHESIZED EXPRESSION
2 
3 parenthesized-expression → ( expression )
1 GRAMMAR OF A TUPLE EXPRESSION
2 
3 tuple-expression → ( ) | ( tuple-element , tuple-element-list )
4 
5 tuple-element-list → tuple-element | tuple-element , tuple-element-list
6 
7 tuple-element → expression | identifier : expression
1 GRAMMAR OF A WILDCARD EXPRESSION
2 
3 wildcard-expression → _
 1 GRAMMAR OF A KEY-PATH EXPRESSION
 2 
 3 key-path-expression → \ type opt . key-path-components
 4 
 5 key-path-components → key-path-component | key-path-component . key-path-components
 6 
 7 key-path-component → identifier key-path-postfixes opt | key-path-postfixes
 8 
 9 key-path-postfixes → key-path-postfix key-path-postfixes opt
10 
11 key-path-postfix → ? | ! | [ function-call-argument-list ]
1 GRAMMAR OF A SELECTOR EXPRESSION
2 
3 selector-expression → #selector ( expression )
4 
5 selector-expression → #selector ( getter: expression )
6 
7 selector-expression → #selector ( setter: expression )
1 GRAMMAR OF A KEY-PATH STRING EXPRESSION
2 
3 key-path-string-expression → #keyPath ( expression )
 1 GRAMMAR OF A POSTFIX EXPRESSION
 2 
 3 postfix-expression → primary-expression
 4 
 5 postfix-expression → postfix-expression postfix-operator
 6 
 7 postfix-expression → function-call-expression
 8 
 9 postfix-expression → initializer-expression
10 
11 postfix-expression → explicit-member-expression
12 
13 postfix-expression → postfix-self-expression
14 
15 postfix-expression → subscript-expression
16 
17 postfix-expression → forced-value-expression
18 
19 postfix-expression → optional-chaining-expression
 1 GRAMMAR OF A FUNCTION CALL EXPRESSION
 2 
 3 function-call-expression → postfix-expression function-call-argument-clause
 4 
 5 function-call-expression → postfix-expression function-call-argument-clause opt trailing-closure
 6 
 7 function-call-argument-clause → ( ) | ( function-call-argument-list )
 8 
 9 function-call-argument-list → function-call-argument | function-call-argument , function-call-argument-list
10 
11 function-call-argument → expression | identifier : expression
12 
13 function-call-argument → operator | identifier : operator
14 
15 trailing-closure → closure-expression
1 GRAMMAR OF AN INITIALIZER EXPRESSION
2 
3 initializer-expression → postfix-expression . init
4 
5 initializer-expression → postfix-expression . init ( argument-names )
 1 GRAMMAR OF AN EXPLICIT MEMBER EXPRESSION
 2 
 3 explicit-member-expression → postfix-expression . decimal-digits
 4 
 5 explicit-member-expression → postfix-expression . identifier generic-argument-clause opt
 6 
 7 explicit-member-expression → postfix-expression . identifier ( argument-names )
 8 
 9 argument-names → argument-name argument-names opt
10 
11 argument-name → identifier :
1 GRAMMAR OF A SELF EXPRESSION
2 
3 postfix-self-expression → postfix-expression . self
1 GRAMMAR OF A SUBSCRIPT EXPRESSION
2 
3 subscript-expression → postfix-expression [ function-call-argument-list ]
1 GRAMMAR OF A FORCED-VALUE EXPRESSION
2 
3 forced-value-expression → postfix-expression !
1 GRAMMAR OF AN OPTIONAL-CHAINING EXPRESSION
2 
3 optional-chaining-expression → postfix-expression ?

語句

 1 GRAMMAR OF A STATEMENT
 2 
 3 statement → expression ;opt
 4 
 5 statement → declaration ;opt
 6 
 7 statement → loop-statement ;opt
 8 
 9 statement → branch-statement ;opt
10 
11 statement → labeled-statement ;opt
12 
13 statement → control-transfer-statement ;opt
14 
15 statement → defer-statement ;opt
16 
17 statement → do-statement ;opt
18 
19 statement → compiler-control-statement
20 
21 statements → statement statements opt
1 GRAMMAR OF A LOOP STATEMENT
2 
3 loop-statement → for-in-statement
4 
5 loop-statement → while-statement
6 
7 loop-statement → repeat-while-statement
1 GRAMMAR OF A FOR-IN STATEMENT
2 
3 for-in-statement → for caseopt pattern in expression where-clause opt code-block
 1 GRAMMAR OF A WHILE STATEMENT
 2 
 3 while-statement → while condition-list code-block
 4 
 5 condition-list → condition | condition , condition-list
 6 
 7 condition → expression | availability-condition | case-condition | optional-binding-condition
 8 
 9 case-condition → case pattern initializer
10 
11 optional-binding-condition → let pattern initializer | var pattern initializer
1 GRAMMAR OF A REPEAT-WHILE STATEMENT
2 
3 repeat-while-statement → repeat code-block while expression
1 GRAMMAR OF A BRANCH STATEMENT
2 
3 branch-statement → if-statement
4 
5 branch-statement → guard-statement
6 
7 branch-statement → switch-statement
1 GRAMMAR OF AN IF STATEMENT
2 
3 if-statement → if condition-list code-block else-clause opt
4 
5 else-clause → else code-block | else if-statement
1 GRAMMAR OF A GUARD STATEMENT
2 
3 guard-statement → guard condition-list else code-block
 1 GRAMMAR OF A SWITCH STATEMENT
 2 
 3 switch-statement → switch expression { switch-cases opt }
 4 
 5 switch-cases → switch-case switch-cases opt
 6 
 7 switch-casecase-label statements
 8 
 9 switch-casedefault-label statements
10 
11 switch-case → conditional-switch-case
12 
13 case-label → case case-item-list :
14 
15 case-item-list → pattern where-clause opt | pattern where-clause opt , case-item-list
16 
17 default-label → default :
18 
19 where-clause → where where-expression
20 
21 where-expression → expression
22 
23 conditional-switch-caseswitch-if-directive-clause switch-elseif-directive-clauses opt switch-else-directive-clause opt endif-directive
24 
25 switch-if-directive-clause → if-directive compilation-condition switch-cases opt
26 
27 switch-elseif-directive-clauses → elseif-directive-clause switch-elseif-directive-clauses opt
28 
29 switch-elseif-directive-clause → elseif-directive compilation-condition switch-cases opt
30 
31 switch-else-directive-clause → else-directive switch-cases opt
 1 GRAMMAR OF A LABELED STATEMENT
 2 
 3 labeled-statement → statement-label loop-statement
 4 
 5 labeled-statement → statement-label if-statement
 6 
 7 labeled-statement → statement-label switch-statement
 8 
 9 labeled-statement → statement-label do-statement
10 
11 statement-label → label-name :
12 
13 label-name → identifier
 1 GRAMMAR OF A CONTROL TRANSFER STATEMENT
 2 
 3 control-transfer-statement → break-statement
 4 
 5 control-transfer-statement → continue-statement
 6 
 7 control-transfer-statement → fallthrough-statement
 8 
 9 control-transfer-statement → return-statement
10 
11 control-transfer-statement → throw-statement
1 GRAMMAR OF A BREAK STATEMENT
2 
3 break-statement → break label-name opt
1 GRAMMAR OF A CONTINUE STATEMENT
2 
3 continue-statement → continue label-name opt
1 GRAMMAR OF A FALLTHROUGH STATEMENT
2 
3 fallthrough-statement → fallthrough
1 GRAMMAR OF A RETURN STATEMENT
2 
3 return-statement → return expression opt
1 GRAMMAR OF A THROW STATEMENT
2 
3 throw-statement → throw expression
1 GRAMMAR OF A DEFER STATEMENT
2 
3 defer-statement → defer code-block
1 GRAMMAR OF A DO STATEMENT
2 
3 do-statement → do code-block catch-clauses opt
4 
5 catch-clauses → catch-clause catch-clauses opt
6 
7 catch-clause → catch pattern opt where-clause opt code-block
1 GRAMMAR OF A COMPILER CONTROL STATEMENT
2 
3 compiler-control-statement → conditional-compilation-block
4 
5 compiler-control-statement → line-control-statement
6 
7 compiler-control-statement → diagnostic-statement
 1 GRAMMAR OF A CONDITIONAL COMPILATION BLOCK
 2 
 3 conditional-compilation-block → if-directive-clause elseif-directive-clauses opt else-directive-clause opt endif-directive
 4 
 5 if-directive-clause → if-directive compilation-condition statements opt
 6 
 7 elseif-directive-clauses → elseif-directive-clause elseif-directive-clauses opt
 8 
 9 elseif-directive-clause → elseif-directive compilation-condition statements opt
10 
11 else-directive-clause → else-directive statements opt
12 
13 if-directive → #if
14 
15 elseif-directive → #elseif
16 
17 else-directive → #else
18 
19 endif-directive → #endif
20 
21 compilation-condition → platform-condition
22 
23 compilation-condition → identifier
24 
25 compilation-condition → boolean-literal
26 
27 compilation-condition → ( compilation-condition )
28 
29 compilation-condition → ! compilation-condition
30 
31 compilation-condition → compilation-condition && compilation-condition
32 
33 compilation-condition → compilation-condition || compilation-condition
34 
35 platform-condition → os ( operating-system )
36 
37 platform-condition → arch ( architecture )
38 
39 platform-condition → swift ( >= swift-version )
40 
41 platform-condition → compiler ( >= swift-version )
42 
43 platform-condition → canImport ( module-name )
44 
45 platform-condition → targetEnvironment ( environment )
46 
47 operating-system → macOS | iOS | watchOS | tvOS
48 
49 architecture → i386 | x86_64 | arm | arm64
50 
51 swift-version → decimal-digits swift-version-continuation opt
52 
53 swift-version-continuation → . decimal-digits swift-version-continuation opt
54 
55 module-name → identifier
56 
57 environment → simulator
1 GRAMMAR OF A LINE CONTROL STATEMENT
2 
3 line-control-statement → #sourceLocation ( file: file-name , line: line-number )
4 
5 line-control-statement → #sourceLocation ( )
6 
7 line-number → A decimal integer greater than zero
8 
9 file-name → static-string-literal
1 GRAMMAR OF A COMPILE-TIME DIAGNOSTIC STATEMENT
2 
3 diagnostic-statement → #error ( diagnostic-message )
4 
5 diagnostic-statement → #warning ( diagnostic-message )
6 
7 diagnostic-message → static-string-literal
 1 GRAMMAR OF AN AVAILABILITY CONDITION
 2 
 3 availability-condition → #available ( availability-arguments )
 4 
 5 availability-arguments → availability-argument | availability-argument , availability-arguments
 6 
 7 availability-argument → platform-name platform-version
 8 
 9 availability-argument → *
10 
11 platform-name → iOS | iOSApplicationExtension
12 
13 platform-name → macOS | macOSApplicationExtension
14 
15 platform-name → watchOS
16 
17 platform-name → tvOS
18 
19 platform-version → decimal-digits
20 
21 platform-version → decimal-digits . decimal-digits
22 
23 platform-version → decimal-digits . decimal-digits . decimal-digits

聲明

 1 GRAMMAR OF A DECLARATION
 2 
 3 declaration → import-declaration
 4 
 5 declaration → constant-declaration
 6 
 7 declaration → variable-declaration
 8 
 9 declaration → typealias-declaration
10 
11 declaration → function-declaration
12 
13 declaration → enum-declaration
14 
15 declaration → struct-declaration
16 
17 declaration → class-declaration
18 
19 declaration → protocol-declaration
20 
21 declaration → initializer-declaration
22 
23 declaration → deinitializer-declaration
24 
25 declaration → extension-declaration
26 
27 declaration → subscript-declaration
28 
29 declaration → operator-declaration
30 
31 declaration → precedence-group-declaration
32 
33 declarations → declaration declarations opt
1 GRAMMAR OF A TOP-LEVEL DECLARATION
2 
3 top-level-declaration → statements opt
1 GRAMMAR OF A CODE BLOCK
2 
3 code-block → { statements opt }
1 GRAMMAR OF AN IMPORT DECLARATION
2 
3 import-declaration → attributes opt import import-kind opt import-path
4 
5 import-kind → typealias | struct | class | enum | protocol | let | var | func
6 
7 import-path → import-path-identifier | import-path-identifier . import-path
8 
9 import-path-identifier → identifier | operator
1 GRAMMAR OF A CONSTANT DECLARATION
2 
3 constant-declaration → attributes opt declaration-modifiers opt let pattern-initializer-list
4 
5 pattern-initializer-list → pattern-initializer | pattern-initializer , pattern-initializer-list
6 
7 pattern-initializer → pattern initializer opt
8 
9 initializer → = expression
 1 GRAMMAR OF A VARIABLE DECLARATION
 2 
 3 variable-declaration → variable-declaration-head pattern-initializer-list
 4 
 5 variable-declaration → variable-declaration-head variable-name type-annotation code-block
 6 
 7 variable-declaration → variable-declaration-head variable-name type-annotation getter-setter-block
 8 
 9 variable-declaration → variable-declaration-head variable-name type-annotation getter-setter-keyword-block
10 
11 variable-declaration → variable-declaration-head variable-name initializer willSet-didSet-block
12 
13 variable-declaration → variable-declaration-head variable-name type-annotation initializer opt willSet-didSet-block
14 
15 variable-declaration-head → attributes opt declaration-modifiers opt var
16 
17 variable-name → identifier
18 
19 getter-setter-block → code-block
20 
21 getter-setter-block → { getter-clause setter-clause opt }
22 
23 getter-setter-block → { setter-clause getter-clause }
24 
25 getter-clause → attributes opt mutation-modifier opt get code-block
26 
27 setter-clause → attributes opt mutation-modifier opt set setter-name opt code-block
28 
29 setter-name → ( identifier )
30 
31 getter-setter-keyword-block → { getter-keyword-clause setter-keyword-clause opt }
32 
33 getter-setter-keyword-block → { setter-keyword-clause getter-keyword-clause }
34 
35 getter-keyword-clause → attributes opt mutation-modifier opt get
36 
37 setter-keyword-clause → attributes opt mutation-modifier opt set
38 
39 willSet-didSet-block → { willSet-clause didSet-clause opt }
40 
41 willSet-didSet-block → { didSet-clause willSet-clause opt }
42 
43 willSet-clause → attributes opt willSet setter-name opt code-block
44 
45 didSet-clause → attributes opt didSet setter-name opt code-block
1 GRAMMAR OF A TYPE ALIAS DECLARATION
2 
3 typealias-declaration → attributes opt access-level-modifier opt typealias typealias-name generic-parameter-clause opt typealias-assignment
4 
5 typealias-name → identifier
6 
7 typealias-assignment → = type
 1 GRAMMAR OF A FUNCTION DECLARATION
 2 
 3 function-declaration → function-head function-name generic-parameter-clause opt function-signature generic-where-clause opt function-body opt
 4 
 5 function-head → attributes opt declaration-modifiers opt func
 6 
 7 function-name → identifier | operator
 8 
 9 function-signature → parameter-clause throwsopt function-result opt
10 
11 function-signature → parameter-clause rethrows function-result opt
12 
13 function-result → -> attributes opt type
14 
15 function-body → code-block
16 
17 parameter-clause → ( ) | ( parameter-list )
18 
19 parameter-list → parameter | parameter , parameter-list
20 
21 parameter → external-parameter-name opt local-parameter-name type-annotation default-argument-clause opt
22 
23 parameter → external-parameter-name opt local-parameter-name type-annotation
24 
25 parameter → external-parameter-name opt local-parameter-name type-annotation ...
26 
27 external-parameter-name → identifier
28 
29 local-parameter-name → identifier
30 
31 default-argument-clause → = expression
 1 GRAMMAR OF AN ENUMERATION DECLARATION
 2 
 3 enum-declaration → attributes opt access-level-modifier opt union-style-enum
 4 
 5 enum-declaration → attributes opt access-level-modifier opt raw-value-style-enum
 6 
 7 union-style-enum → indirectopt enum enum-name generic-parameter-clause opt type-inheritance-clause opt generic-where-clause opt { union-style-enum-members opt }
 8 
 9 union-style-enum-members → union-style-enum-member union-style-enum-members opt
10 
11 union-style-enum-member → declaration | union-style-enum-case-clause | compiler-control-statement
12 
13 union-style-enum-case-clause → attributes opt indirectopt case union-style-enum-case-list
14 
15 union-style-enum-case-list → union-style-enum-case | union-style-enum-case , union-style-enum-case-list
16 
17 union-style-enum-caseenum-case-name tuple-type opt
18 
19 enum-name → identifier
20 
21 enum-case-name → identifier
22 
23 raw-value-style-enumenum enum-name generic-parameter-clause opt type-inheritance-clause generic-where-clause opt { raw-value-style-enum-members }
24 
25 raw-value-style-enum-members → raw-value-style-enum-member raw-value-style-enum-members opt
26 
27 raw-value-style-enum-member → declaration | raw-value-style-enum-case-clause | compiler-control-statement
28 
29 raw-value-style-enum-case-clause → attributes opt case raw-value-style-enum-case-list
30 
31 raw-value-style-enum-case-list → raw-value-style-enum-case | raw-value-style-enum-case , raw-value-style-enum-case-list
32 
33 raw-value-style-enum-caseenum-case-name raw-value-assignment opt
34 
35 raw-value-assignment → = raw-value-literal
36 
37 raw-value-literal → numeric-literal | static-string-literal | boolean-literal
 1 GRAMMAR OF A STRUCTURE DECLARATION
 2 
 3 struct-declaration → attributes opt access-level-modifier opt struct struct-name generic-parameter-clause opt type-inheritance-clause opt generic-where-clause opt struct-body
 4 
 5 struct-name → identifier
 6 
 7 struct-body → { struct-members opt }
 8 
 9 struct-members → struct-member struct-members opt
10 
11 struct-member → declaration | compiler-control-statement
 1 GRAMMAR OF A CLASS DECLARATION
 2 
 3 class-declaration → attributes opt access-level-modifier opt finalopt class class-name generic-parameter-clause opt type-inheritance-clause opt generic-where-clause opt class-body
 4 
 5 class-declaration → attributes opt final access-level-modifier opt class class-name generic-parameter-clause opt type-inheritance-clause opt generic-where-clause opt class-body
 6 
 7 class-name → identifier
 8 
 9 class-body → { class-members opt }
10 
11 class-members → class-member class-members opt
12 
13 class-member → declaration | compiler-control-statement
 1 GRAMMAR OF A PROTOCOL DECLARATION
 2 
 3 protocol-declaration → attributes opt access-level-modifier opt protocol protocol-name type-inheritance-clause opt generic-where-clause opt protocol-body
 4 
 5 protocol-name → identifier
 6 
 7 protocol-body → { protocol-members opt }
 8 
 9 protocol-members → protocol-member protocol-members opt
10 
11 protocol-member → protocol-member-declaration | compiler-control-statement
12 
13 protocol-member-declaration → protocol-property-declaration
14 
15 protocol-member-declaration → protocol-method-declaration
16 
17 protocol-member-declaration → protocol-initializer-declaration
18 
19 protocol-member-declaration → protocol-subscript-declaration
20 
21 protocol-member-declaration → protocol-associated-type-declaration
22 
23 protocol-member-declaration → typealias-declaration
1 GRAMMAR OF A PROTOCOL PROPERTY DECLARATION
2 
3 protocol-property-declaration → variable-declaration-head variable-name type-annotation getter-setter-keyword-block
1 GRAMMAR OF A PROTOCOL METHOD DECLARATION
2 
3 protocol-method-declaration → function-head function-name generic-parameter-clause opt function-signature generic-where-clause opt
1 GRAMMAR OF A PROTOCOL INITIALIZER DECLARATION
2 
3 protocol-initializer-declaration → initializer-head generic-parameter-clause opt parameter-clause throwsopt generic-where-clause opt
4 
5 protocol-initializer-declaration → initializer-head generic-parameter-clause opt parameter-clause rethrows generic-where-clause opt
1 GRAMMAR OF A PROTOCOL SUBSCRIPT DECLARATION
2 
3 protocol-subscript-declaration → subscript-head subscript-result generic-where-clause opt getter-setter-keyword-block
1 GRAMMAR OF A PROTOCOL ASSOCIATED TYPE DECLARATION
2 
3 protocol-associated-type-declaration → attributes opt access-level-modifier opt associatedtype typealias-name type-inheritance-clause opt typealias-assignment opt generic-where-clause opt
 1 GRAMMAR OF AN INITIALIZER DECLARATION
 2 
 3 initializer-declaration → initializer-head generic-parameter-clause opt parameter-clause throwsopt generic-where-clause opt initializer-body
 4 
 5 initializer-declaration → initializer-head generic-parameter-clause opt parameter-clause rethrows generic-where-clause opt initializer-body
 6 
 7 initializer-head → attributes opt declaration-modifiers opt init
 8 
 9 initializer-head → attributes opt declaration-modifiers opt init ?
10 
11 initializer-head → attributes opt declaration-modifiers opt init !
12 
13 initializer-body → code-block
1 GRAMMAR OF A DEINITIALIZER DECLARATION
2 
3 deinitializer-declaration → attributes opt deinit code-block
1 GRAMMAR OF AN EXTENSION DECLARATION
2 
3 extension-declaration → attributes opt access-level-modifier opt extension type-identifier type-inheritance-clause opt generic-where-clause opt extension-body
4 
5 extension-body → { extension-members opt }
6 
7 extension-members → extension-member extension-members opt
8 
9 extension-member → declaration | compiler-control-statement
 1 GRAMMAR OF A SUBSCRIPT DECLARATION
 2 
 3 subscript-declaration → subscript-head subscript-result generic-where-clause opt code-block
 4 
 5 subscript-declaration → subscript-head subscript-result generic-where-clause opt getter-setter-block
 6 
 7 subscript-declaration → subscript-head subscript-result generic-where-clause opt getter-setter-keyword-block
 8 
 9 subscript-head → attributes opt declaration-modifiers opt subscript generic-parameter-clause opt parameter-clause
10 
11 subscript-result → -> attributes opt type
 1 GRAMMAR OF AN OPERATOR DECLARATION
 2 
 3 operator-declaration → prefix-operator-declaration | postfix-operator-declaration | infix-operator-declaration
 4 
 5 prefix-operator-declaration → prefix operator operator
 6 
 7 postfix-operator-declaration → postfix operator operator
 8 
 9 infix-operator-declaration → infix operator operator infix-operator-group opt
10 
11 infix-operator-group → : precedence-group-name
 1 GRAMMAR OF A PRECEDENCE GROUP DECLARATION
 2 
 3 precedence-group-declaration → precedencegroup precedence-group-name { precedence-group-attributes opt }
 4 
 5 precedence-group-attributes → precedence-group-attribute precedence-group-attributes opt
 6 
 7 precedence-group-attribute → precedence-group-relation
 8 
 9 precedence-group-attribute → precedence-group-assignment
10 
11 precedence-group-attribute → precedence-group-associativity
12 
13 precedence-group-relation → higherThan : precedence-group-names
14 
15 precedence-group-relation → lowerThan : precedence-group-names
16 
17 precedence-group-assignment → assignment : boolean-literal
18 
19 precedence-group-associativity → associativity : left
20 
21 precedence-group-associativity → associativity : right
22 
23 precedence-group-associativity → associativity : none
24 
25 precedence-group-names → precedence-group-name | precedence-group-name , precedence-group-names
26 
27 precedence-group-name → identifier
 1 GRAMMAR OF A DECLARATION MODIFIER
 2 
 3 declaration-modifier → class | convenience | dynamic | final | infix | lazy | optional | override | postfix | prefix | required | static | unowned | unowned ( safe ) | unowned ( unsafe ) | weak
 4 
 5 declaration-modifier → access-level-modifier
 6 
 7 declaration-modifier → mutation-modifier
 8 
 9 declaration-modifiers → declaration-modifier declaration-modifiers opt
10 
11 access-level-modifier → private | private ( set )
12 
13 access-level-modifier → fileprivate | fileprivate ( set )
14 
15 access-level-modifier → internal | internal ( set )
16 
17 access-level-modifier → public | public ( set )
18 
19 access-level-modifier → open | open ( set )
20 
21 mutation-modifier → mutating | nonmutating

屬性

 1 GRAMMAR OF AN ATTRIBUTE
 2 
 3 attribute → @ attribute-name attribute-argument-clause opt
 4 
 5 attribute-name → identifier
 6 
 7 attribute-argument-clause → ( balanced-tokens opt )
 8 
 9 attributes → attribute attributes opt
10 
11 balanced-tokens → balanced-token balanced-tokens opt
12 
13 balanced-token → ( balanced-tokens opt )
14 
15 balanced-token → [ balanced-tokens opt ]
16 
17 balanced-token → { balanced-tokens opt }
18 
19 balanced-token → Any identifier, keyword, literal, or operator
20 
21 balanced-token → Any punctuation except (, ), [, ], {, or }

模式

 1 GRAMMAR OF A PATTERN
 2 
 3 pattern → wildcard-pattern type-annotation opt
 4 
 5 pattern → identifier-pattern type-annotation opt
 6 
 7 pattern → value-binding-pattern
 8 
 9 pattern → tuple-pattern type-annotation opt
10 
11 pattern → enum-case-pattern
12 
13 pattern → optional-pattern
14 
15 pattern → type-casting-pattern
16 
17 pattern → expression-pattern
1 GRAMMAR OF A WILDCARD PATTERN
2 
3 wildcard-pattern → _
1 GRAMMAR OF AN IDENTIFIER PATTERN
2 
3 identifier-pattern → identifier
1 GRAMMAR OF A VALUE-BINDING PATTERN
2 
3 value-binding-pattern → var pattern | let pattern
1 GRAMMAR OF A TUPLE PATTERN
2 
3 tuple-pattern → ( tuple-pattern-element-list opt )
4 
5 tuple-pattern-element-list → tuple-pattern-element | tuple-pattern-element , tuple-pattern-element-list
6 
7 tuple-pattern-element → pattern | identifier : pattern
1 GRAMMAR OF AN ENUMERATION CASE PATTERN
2 
3 enum-case-pattern → type-identifier opt . enum-case-name tuple-pattern opt
1 GRAMMAR OF AN OPTIONAL PATTERN
2 
3 optional-pattern → identifier-pattern ?
1 GRAMMAR OF A TYPE CASTING PATTERN
2 
3 type-casting-pattern → is-pattern | as-pattern
4 
5 is-pattern → is type
6 
7 as-pattern → pattern as type
1 GRAMMAR OF AN EXPRESSION PATTERN
2 
3 expression-pattern → expression

泛型和參數

 1 GRAMMAR OF A GENERIC PARAMETER CLAUSE
 2 
 3 generic-parameter-clause → < generic-parameter-list >
 4 
 5 generic-parameter-list → generic-parameter | generic-parameter , generic-parameter-list
 6 
 7 generic-parameter → type-name
 8 
 9 generic-parameter → type-name : type-identifier
10 
11 generic-parameter → type-name : protocol-composition-type
12 
13 generic-where-clause → where requirement-list
14 
15 requirement-list → requirement | requirement , requirement-list
16 
17 requirement → conformance-requirement | same-type-requirement
18 
19 conformance-requirement → type-identifier : type-identifier
20 
21 conformance-requirement → type-identifier : protocol-composition-type
22 
23 same-type-requirement → type-identifier == type
1 GRAMMAR OF A GENERIC ARGUMENT CLAUSE
2 
3 generic-argument-clause → < generic-argument-list >
4 
5 generic-argument-list → generic-argument | generic-argument , generic-argument-list
6 
7 generic-argument → type

?

?

轉載于:https://www.cnblogs.com/strengthen/p/9740754.html

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/279247.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/279247.shtml
英文地址,請注明出處:http://en.pswp.cn/news/279247.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

timestamp mysql php_PHP和Mysql的Timestamp互換

在mysql中有三種時間字段類型&#xff1a;DATETIME&#xff0c;DATE和TIMESTAMP。DATETIME以YYYY-MM-DD HH:MM:SS格式的字符串來保存數據&#xff1b;DATE則是只有年月日以YYYY-MM-DD形式的字串&#xff1b;TIMESTAMP類型和PHP中的TIMESTAMP類型名字一樣&#xff0c;但是兩者基…

dmg是什么文件格式_什么是DMG文件(以及我該如何使用)?

dmg是什么文件格式DMG files are containers for apps in macOS. You open them, drag the app to your Applications folder, and then eject them, saving you the hassle of the dreaded “Install Wizard” of most Windows apps. So if all they are is a folder for an a…

mysql索引三個字段查詢兩個字段_mysql中關于關聯索引的問題——對a,b,c三個字段建立聯合索引,那么查詢時使用其中的2個作為查詢條件,是否還會走索引?...

情況描述&#xff1a;在MySQL的user表中&#xff0c;對a,b,c三個字段建立聯合索引&#xff0c;那么查詢時使用其中的2個作為查詢條件&#xff0c;是否還會走索引&#xff1f;根據查詢字段的位置不同來決定&#xff0c;如查詢a, a,b a,b,c a,c 都可以走索引的&#…

HDU 3966 Aragorn's Story (樹鏈剖分+線段樹)

題意&#xff1a;給你一棵樹&#xff0c;然后有三種操作 I L R K: 把L與R的路徑上的所有點權值加上K D L R K&#xff1a;把L與R的路徑上的所有點權值減去K Q X&#xff1a;查詢節點編號為X的權值 思路&#xff1a;樹鏈剖分裸題&#xff08;我還沒有怎么學懂&#xff0c;但基本…

canon相機api中文_您應該在佳能相機上掌握的10種相機設置

canon相機api中文Your camera is a tool, and you should be able to use it with total confidence. You should never have to dig through the manual or play around with random buttons trying to work out how to do something on a shoot. Here are the most important…

mysql普通索引自增_mysql中聯合索引中的自增列的增長策略

《深入理解MySQL》中一段介紹MyISAM存儲引擎中自動增長列的示例,如下1 mysql>create table autoincre_demo2 -> (d1 smallint not nullauto_increment,3 -> d2 smallint not null,4 -> name varchar(10),5 ->index(d2,d1)6 -> )enginemyisam;7 Query OK, 0 r…

spring-boot基礎概念與簡單應用

1.spring家族 2.應用開發模式 2.1單體式應用 2.2微服務架構 微服務架構中每個服務都可以有自己的數據庫 3.微服務架構應當注意的細節 3.1關于"持續集成,持續交付,持續部署" 頻繁部署、快速交付以及開發測試流程自動化都將成為未來軟件工程的重要組成部分 可行方案(如…

郵箱客戶端 gmail支持_如何聯系Gmail支持

郵箱客戶端 gmail支持Although you may not be able to directly contact Gmail support without subscribing to G Suite for businesses, there are a couple of ways to get the answers you’re looking for online. Let’s look at how you can get help with your Gmail …

jstorm mysql_zookeeper,kafka,jstorm,memcached,mysql流式數據處理平臺部署

一&#xff0e;平臺環境介紹:1&#xff0e;系統信息&#xff1a;項目信息系統版本:Ubuntu14.04.2 LTS \n \l用戶&#xff1a;*****密碼&#xff1a;******Java環境&#xff1a;openjdk-7-jre語言&#xff1a;en_US.UTF-8&#xff0c;en_US:en磁盤&#xff1a;每臺vda為系統盤(5…

dock模擬macos教程_將macOS首選項窗格添加到您的Dock中以快速訪問

dock模擬macos教程macOS: Is there a certain Preference pane you access constantly? You can quickly add it to your dock. macOS&#xff1a;是否存在您經常訪問的特定“首選項”窗格&#xff1f; 您可以將其快速添加到擴展塢中。 Brett Terpstra, writing for Lifehacke…

怎么做mysql查詢系統_mysql數據庫系統學習(一)---一條SQL查詢語句是如何執行的?...

一、第一節&#xff1a;一條sql查詢語句是怎樣執行的5.5.5版本以后&#xff0c;默認使用存儲引擎為InnoDB不使用查詢緩存&#xff0c;MySQL8.0沒有查詢緩存這個功能總體來說&#xff1a;MySQL分為service層和存儲引擎層1)service層包括&#xff1a;連接器、分析器、優化器、執行…

mysql qt自增_mysql自增設置

MySQL設置自增字段的相關語句&#xff1a;alter table album change ALBUM_ID ALBUM_ID bigint not null auto_increment;alter table album auto_increment1;創建:mysql>create table cc(id int auto_increment,name varchar(20),primary key(id));mysql>create table c…

staem被盜_如何檢查照片是否被盜

staem被盜Photos and other images get stolen all the time online. Someone takes a photo from the photographer’s website or social media channels and uses it for their own needs. This is completely illegal and happens to me all the time here at How-To Geek.…

數據庫、表、表內容增刪改查

數據庫和表的創建 用戶的增 刪 改 查 增 create user 用戶名192.168.16.% identified by ‘123’&#xff1b;創建一個賬戶&#xff0c;并設置密碼&#xff0c;可不設密碼 grant all on *.* to 用戶地址; #給賬戶授權 flush privileges&#xff1b; #刷新授權立即生效 創…

立即通過Xumo.TV在線觀看免費電視

Xumo.TV brings the channel surfing experience to cord cutters, with content from The History Channel, MSNBC, Fox Sports, and more. And it’s free. Xumo.TV將頻道瀏覽體驗帶給剪線鉗&#xff0c;其中包括The History Channel&#xff0c;MSNBC&#xff0c;Fox Sports…

NOIP2009靶形數獨

試題描述小城和小華都是熱愛數學的好學生&#xff0c;最近&#xff0c;他們不約而同地迷上了數獨游戲&#xff0c;好勝的他們想用數獨來一比高低。但普通的數獨對他們來說都過于簡單了&#xff0c;于是他們向 Z 博士請教&#xff0c; Z 博士拿出了他最近發明的“靶形數獨”&…

mysql 1005 - can't create table_關于創建數據表報錯一例(ERROR 1005 Can’t create table (errno: 121))...

問題描述曾遇到創建數據表報錯問題&#xff0c;報錯如下&#xff1a;ERROR 1005 (HY000) at line 18: Cant create table db1.t2 (errno: 121)通過日志查看有一條記錄InnoDB: Error: table db1.t2 already exists in InnoDB internal可見要創建的這個表已經存在&#xff0c;導致…

h5輸出文字write_免費下載:Write是用于手寫的文字處理器

h5輸出文字writeWindows/Mac/Linux/Android: Love the feel of writing by hand, but wish you could use features like copy/paste and undo? Write is a free tool that lets you do just that. Windows / Mac / Linux / Android&#xff1a;喜歡手寫的感覺&#xff0c;但是…

11. IDEA 在同一工作空間創建多個項目

1.創建項目 二.、創建工作空間 JavaWorkspace 1、File-> New Project -> 創建工作空間 JavaWorkspace&#xff0c;并 順便創建項目 JavaOne 2.創建第一個項目后形成的目錄結構如下 三、在已經創建好的工作空間中創建第二個項目 1、File -> New Module -> 創建項目 …

winform 線程監聽兩個目錄下的文件_vb.net 利用.net自帶的GZipStream壓縮或者解壓文件的代碼,不需要任何第三方控件...

網上很少有用VB寫的壓縮文件的代碼&#xff0c;但是&#xff0c;在網絡傳輸&#xff0c;文件下載,打包發布等等方面的需求又比較多&#xff0c;所以&#xff0c;借鑒了一下C#代碼的例子&#xff0c;改造成了VB用的類。另外加上了多層文件夾壓縮解壓。但是&#xff0c;因為時間有…