标签:解析器 -- 一键 RangeItems char _- Scope RangeItem
Compiler of Scope
The C# source code of the compiler Scope
is generated by bitzhuwei.GrammarFormat
.
Grammar
// 7 VnRegulations:
Scope : '[' 'firstItem1' RangeItems ']' // [0]
| '[^' 'firstItem2' RangeItems ']' // [1]
| '[' 'firstItem1' ']' // [2]
| '[^' 'firstItem2' ']' ; // [3]
RangeItems : RangeItems RangeItem // [4]
| RangeItem ; // [5]
RangeItem : 'char' ; // [6]
// 3 VtPatterns:
'firstItem1' : %%<'['>\\u[0-9]{4}|\\t|\\n|\\r|\\-|[ -Z]|\[|\\\\|]|\\\^|[_-~]%% ; // [0]
'firstItem2' : %%<'[^'>\\u[0-9]{4}|\\t|\\n|\\r|\\-|[ -Z]|\[|\\\\|]|\^|\\\^|[_-~]%% ; // [1]
'char' : %%\\u[0-9]{4}|\\t|\\n|\\r|\\-|[ -Z]|\\\[|\\\\|\\\]|\^|\\\^|[_-~]%% ; // [2]
Lexical Analyzer States
flowchart
classDef c0001 color:#FF0000;
classDef c0010 stroke-dasharray: 10 10;
classDef c0011 stroke-dasharray: 10 10,color:#FF0000;
classDef c0100 fill:#BB66EE;
classDef c0101 fill:#BB66EE,color:#FF0000;
classDef c0110 fill:#BB66EE,stroke-dasharray: 10 10;
classDef c0111 fill:#BB66EE,stroke-dasharray: 10 10,color:#FF0000;
classDef c1000 stroke:#333,stroke-width:4px;
classDef c1001 stroke:#333,stroke-width:4px,color:#FF0000;
classDef c1010 stroke:#333,stroke-width:4px,stroke-dasharray: 10 10;
classDef c1011 stroke:#333,stroke-width:4px,stroke-dasharray: 10 10,color:#FF0000;
classDef c1100 stroke:#333,stroke-width:4px,fill:#BB66EE;
classDef c1101 stroke:#333,stroke-width:4px,fill:#BB66EE,color:#FF0000;
classDef c1110 stroke:#333,stroke-width:4px,fill:#BB66EE,stroke-dasharray: 10 10;
classDef c1111 stroke:#333,stroke-width:4px,fill:#BB66EE,stroke-dasharray: 10 10,color:#FF0000;
DFA0_178694530{{"DFA0 wholeStart"}}
class DFA0_178694530 c1000;
DFA1_-772889398{{"DFA1 {9}"}}
DFA2_-183236595[\"DFA2 {1}"/]
class DFA2_-183236595 c0101;
DFA3_987753403[\"DFA3 {1}"/]
class DFA3_987753403 c0101;
DFA4_-678760965[\"DFA4 {1}"/]
class DFA4_-678760965 c0101;
DFA5_-55324813[\"DFA5 {2}"/]
class DFA5_-55324813 c1101;
DFA6_1405897005[\"DFA6 {1}"/]
class DFA6_1405897005 c0101;
DFA7_-526014914{{"DFA7 {1}"}}
DFA8_-77729058[\"DFA8 {1}"/]
class DFA8_-77729058 c0101;
DFA9_-1969299243[\"DFA9 {1}"/]
class DFA9_-1969299243 c0101;
DFA10_1210241937[\"DFA10 {1}"/]
class DFA10_1210241937 c0101;
DFA11_757152697[\"DFA11 {1}"/]
class DFA11_757152697 c0101;
DFA12_-598210763[\"DFA12 {1}"/]
class DFA12_-598210763 c0101;
DFA13_288695511[\"DFA13 {1}"/]
class DFA13_288695511 c0101;
DFA14_1527739253[\"DFA14 {1}"/]
class DFA14_1527739253 c0101;
DFA15_690638386[\"DFA15 {1}"/]
class DFA15_690638386 c0101;
DFA16_695270034{{"DFA16 {7}"}}
DFA17_-1125009235[\"DFA17 {1}"/]
class DFA17_-1125009235 c0101;
DFA18_-1824766574[\"DFA18 {1}"/]
class DFA18_-1824766574 c0101;
DFA19_-346729537[\"DFA19 {1}"/]
class DFA19_-346729537 c0101;
DFA20_832646392[\"DFA20 {1}"/]
class DFA20_832646392 c0101;
DFA21_348735340[\"DFA21 {1}"/]
class DFA21_348735340 c1101;
DFA22_1623355910{{"DFA22 {1}"}}
DFA23_-966956886{{"DFA23 {1}"}}
DFA24_-1306082567[\"DFA24 {1}"/]
class DFA24_-1306082567 c0101;
DFA25_-1931548102[\"DFA25 {1}"/]
class DFA25_-1931548102 c0101;
DFA26_481872213[\"DFA26 {1}"/]
class DFA26_481872213 c0101;
DFA27_-113939776[\"DFA27 {1}"/]
class DFA27_-113939776 c0101;
DFA28_1197184386[\"DFA28 {1}"/]
class DFA28_1197184386 c0101;
DFA29_1158683928[\"DFA29 {1}"/]
class DFA29_1158683928 c0101;
DFA30_1122838131{{"DFA30 {7}"}}
DFA31_-380737881[\"DFA31 {1}"/]
class DFA31_-380737881 c0101;
DFA32_1297990935[\"DFA32 {1}"/]
class DFA32_1297990935 c0101;
DFA33_314935890[\"DFA33 {1}"/]
class DFA33_314935890 c0101;
DFA34_656572424[\"DFA34 {1}"/]
class DFA34_656572424 c0101;
DFA35_-1581529229[\"DFA35 {1}"/]
class DFA35_-1581529229 c0101;
DFA36_88598524{{"DFA36 {1}"}}
DFA37_-697564398{{"DFA37 {1}"}}
DFA38_1602077691{{"DFA38 {1}"}}
DFA39_-1400035845[\"DFA39 {1}"/]
class DFA39_-1400035845 c0101;
DFA40_-309823494[\"DFA40 {1}"/]
class DFA40_-309823494 c0101;
DFA41_-1920122602[\"DFA41 {1}"/]
class DFA41_-1920122602 c0101;
DFA42_-367677254[\"DFA42 {1}"/]
class DFA42_-367677254 c0101;
DFA43_-24807432[\"DFA43 {1}"/]
class DFA43_-24807432 c0101;
DFA44_533188336[\"DFA44 {1}"/]
class DFA44_533188336 c0101;
DFA45_-1262852157{{"DFA45 {1}"}}
DFA46_-428432942{{"DFA46 {1}"}}
DFA47_-1789142534{{"DFA47 {1}"}}
DFA48_334064317[\"DFA48 {1}"/]
class DFA48_334064317 c0101;
DFA49_-2137454313{{"DFA49 {1}"}}
DFA50_1290846263{{"DFA50 {1}"}}
DFA51_-851077430[\"DFA51 {1}"/]
class DFA51_-851077430 c0101;
DFA52_-1969594929{{"DFA52 {1}"}}
DFA53_1051069287[\"DFA53 {1}"/]
class DFA53_1051069287 c0101;
DFA0_178694530 -->|"#92;
BeginToken 'char'"|DFA1_-772889398
DFA0_178694530 -->|"[#32;-Z]
BeginToken 'char'
ExtendToken 'char'"|DFA2_-183236595
DFA0_178694530 -->|"^
BeginToken 'char'
ExtendToken 'char'"|DFA3_987753403
DFA0_178694530 -->|"[_-~]
BeginToken 'char'
ExtendToken 'char'"|DFA4_-678760965
DFA0_178694530 -->|"[
BeginToken '[''[^'
ExtendToken '['"|DFA5_-55324813
DFA0_178694530 -->|"]
BeginToken ']'
ExtendToken ']'"|DFA6_1405897005
DFA1_-772889398 -->|"u"|DFA7_-526014914
DFA1_-772889398 -->|"t
ExtendToken 'char'"|DFA8_-77729058
DFA1_-772889398 -->|"n
ExtendToken 'char'"|DFA9_-1969299243
DFA1_-772889398 -->|"r
ExtendToken 'char'"|DFA10_1210241937
DFA1_-772889398 -->|"-
ExtendToken 'char'"|DFA11_757152697
DFA1_-772889398 -->|"[
ExtendToken 'char'"|DFA12_-598210763
DFA1_-772889398 -->|"#92;
ExtendToken 'char'"|DFA13_288695511
DFA1_-772889398 -->|"]
ExtendToken 'char'"|DFA14_1527739253
DFA1_-772889398 -->|"^
ExtendToken 'char'"|DFA15_690638386
DFA5_-55324813 -->|"#92;
AcceptPrevious '['
BeginToken 'firstItem1'"|DFA16_695270034
DFA5_-55324813 -->|"[#32;-Z]
AcceptPrevious '['
BeginToken 'firstItem1'
ExtendToken 'firstItem1'"|DFA17_-1125009235
DFA5_-55324813 -->|"[
AcceptPrevious '['
BeginToken 'firstItem1'
ExtendToken 'firstItem1'"|DFA18_-1824766574
DFA5_-55324813 -->|"]
AcceptPrevious '['
BeginToken 'firstItem1'
ExtendToken 'firstItem1'"|DFA19_-346729537
DFA5_-55324813 -->|"[_-~]
AcceptPrevious '['
BeginToken 'firstItem1'
ExtendToken 'firstItem1'"|DFA20_832646392
DFA5_-55324813 -->|"^
ExtendToken '[^'"|DFA21_348735340
DFA7_-526014914 -->|"[0-9]"|DFA22_1623355910
DFA16_695270034 -->|"u"|DFA23_-966956886
DFA16_695270034 -->|"t
ExtendToken 'firstItem1'"|DFA24_-1306082567
DFA16_695270034 -->|"n
ExtendToken 'firstItem1'"|DFA25_-1931548102
DFA16_695270034 -->|"r
ExtendToken 'firstItem1'"|DFA26_481872213
DFA16_695270034 -->|"-
ExtendToken 'firstItem1'"|DFA27_-113939776
DFA16_695270034 -->|"#92;
ExtendToken 'firstItem1'"|DFA28_1197184386
DFA16_695270034 -->|"^
ExtendToken 'firstItem1'"|DFA29_1158683928
DFA21_348735340 -->|"#92;
AcceptPrevious '[^'
BeginToken 'firstItem2'"|DFA30_1122838131
DFA21_348735340 -->|"[#32;-Z]
AcceptPrevious '[^'
BeginToken 'firstItem2'
ExtendToken 'firstItem2'"|DFA31_-380737881
DFA21_348735340 -->|"[
AcceptPrevious '[^'
BeginToken 'firstItem2'
ExtendToken 'firstItem2'"|DFA32_1297990935
DFA21_348735340 -->|"]
AcceptPrevious '[^'
BeginToken 'firstItem2'
ExtendToken 'firstItem2'"|DFA33_314935890
DFA21_348735340 -->|"^
AcceptPrevious '[^'
BeginToken 'firstItem2'
ExtendToken 'firstItem2'"|DFA34_656572424
DFA21_348735340 -->|"[_-~]
AcceptPrevious '[^'
BeginToken 'firstItem2'
ExtendToken 'firstItem2'"|DFA35_-1581529229
DFA22_1623355910 -->|"[0-9]"|DFA36_88598524
DFA23_-966956886 -->|"[0-9]"|DFA37_-697564398
DFA30_1122838131 -->|"u"|DFA38_1602077691
DFA30_1122838131 -->|"t
ExtendToken 'firstItem2'"|DFA39_-1400035845
DFA30_1122838131 -->|"n
ExtendToken 'firstItem2'"|DFA40_-309823494
DFA30_1122838131 -->|"r
ExtendToken 'firstItem2'"|DFA41_-1920122602
DFA30_1122838131 -->|"-
ExtendToken 'firstItem2'"|DFA42_-367677254
DFA30_1122838131 -->|"#92;
ExtendToken 'firstItem2'"|DFA43_-24807432
DFA30_1122838131 -->|"^
ExtendToken 'firstItem2'"|DFA44_533188336
DFA36_88598524 -->|"[0-9]"|DFA45_-1262852157
DFA37_-697564398 -->|"[0-9]"|DFA46_-428432942
DFA38_1602077691 -->|"[0-9]"|DFA47_-1789142534
DFA45_-1262852157 -->|"[0-9]
ExtendToken 'char'"|DFA48_334064317
DFA46_-428432942 -->|"[0-9]"|DFA49_-2137454313
DFA47_-1789142534 -->|"[0-9]"|DFA50_1290846263
DFA49_-2137454313 -->|"[0-9]
ExtendToken 'firstItem1'"|DFA51_-851077430
DFA50_1290846263 -->|"[0-9]"|DFA52_-1969594929
DFA52_-1969594929 -->|"[0-9]
ExtendToken 'firstItem2'"|DFA53_1051069287
FIRST
[0]: FIRST( Scope ) = { '[' '[^' }
[1]: FIRST( RangeItems ) = { 'char' }
[2]: FIRST( RangeItem ) = { 'char' }
[3]: FIRST( '[' ) = { '[' }
[4]: FIRST( 'firstItem1' ) = { 'firstItem1' }
[5]: FIRST( ']' ) = { ']' }
[6]: FIRST( '[^' ) = { '[^' }
[7]: FIRST( 'firstItem2' ) = { 'firstItem2' }
[8]: FIRST( 'char' ) = { 'char' }
[9]: FIRST( ) = { empty }
[10]: FIRST( '[' 'firstItem1' RangeItems ']' ) = { '[' }
[11]: FIRST( '[^' 'firstItem2' RangeItems ']' ) = { '[^' }
[12]: FIRST( '[' 'firstItem1' ']' ) = { '[' }
[13]: FIRST( '[^' 'firstItem2' ']' ) = { '[^' }
[14]: FIRST( RangeItems RangeItem ) = { 'char' }
FOLLOW
[0]: FOLLOW( Scope ) = { }
[1]: FOLLOW( RangeItems ) = { ']' 'char' }
[2]: FOLLOW( RangeItem ) = { ']' 'char' }
LL(1) Syntax Machine
状态 |
'[' |
'firstItem1' |
']' |
'[^' |
'firstItem2' |
'char' |
Scope |
R[0] R[2] |
|
|
R[1] R[3] |
|
|
RangeItems |
|
|
|
|
|
R[4] R[5] |
RangeItem |
|
|
|
|
|
R[6] |
LR(0) Syntax Machine
状态 |
'[' |
'firstItem1' |
']' |
'[^' |
'firstItem2' |
'char' |
'¥' |
Scope |
RangeItems |
RangeItem |
0 |
S2 |
|
|
S3 |
|
|
|
G1 |
|
|
1 |
|
|
|
|
|
|
完成 |
|
|
|
2 |
|
S4 |
|
|
|
|
|
|
|
|
3 |
|
|
|
|
S5 |
|
|
|
|
|
4 |
|
|
S7 |
|
|
S9 |
|
|
G6 |
G8 |
5 |
|
|
S11 |
|
|
S9 |
|
|
G10 |
G8 |
6 |
|
|
S12 |
|
|
S9 |
|
|
|
G13 |
7 |
R[2] |
R[2] |
R[2] |
R[2] |
R[2] |
R[2] |
R[2] |
|
|
|
8 |
R[5] |
R[5] |
R[5] |
R[5] |
R[5] |
R[5] |
R[5] |
|
|
|
9 |
R[6] |
R[6] |
R[6] |
R[6] |
R[6] |
R[6] |
R[6] |
|
|
|
10 |
|
|
S14 |
|
|
S9 |
|
|
|
G13 |
11 |
R[3] |
R[3] |
R[3] |
R[3] |
R[3] |
R[3] |
R[3] |
|
|
|
12 |
R[0] |
R[0] |
R[0] |
R[0] |
R[0] |
R[0] |
R[0] |
|
|
|
13 |
R[4] |
R[4] |
R[4] |
R[4] |
R[4] |
R[4] |
R[4] |
|
|
|
14 |
R[1] |
R[1] |
R[1] |
R[1] |
R[1] |
R[1] |
R[1] |
|
|
|
flowchart
classDef default fill:#C7EDCC,stroke:#993399,stroke-width:0px,text-align:left;
classDef titlebarStyle fill:gold;
titlebar>"LR(1) syntax states"]
class titlebar titlebarStyle
syntaxState0("syntaxState0
[-1] ResolvedScope> : ⏳ Scope ;
[0] Scope : ⏳ '[' 'firstItem1' RangeItems ']' ;
[1] Scope : ⏳ '[^' 'firstItem2' RangeItems ']' ;
[2] Scope : ⏳ '[' 'firstItem1' ']' ;
[3] Scope : ⏳ '[^' 'firstItem2' ']' ; ")
syntaxState1("syntaxState1
[-1] ResolvedScope> : Scope ⏳ ; ")
syntaxState2("syntaxState2
[0] Scope : '[' ⏳ 'firstItem1' RangeItems ']' ;
[2] Scope : '[' ⏳ 'firstItem1' ']' ; ")
syntaxState3("syntaxState3
[1] Scope : '[^' ⏳ 'firstItem2' RangeItems ']' ;
[3] Scope : '[^' ⏳ 'firstItem2' ']' ; ")
syntaxState4("syntaxState4
[0] Scope : '[' 'firstItem1' ⏳ RangeItems ']' ;
[2] Scope : '[' 'firstItem1' ⏳ ']' ;
[4] RangeItems : ⏳ RangeItems RangeItem ;
[5] RangeItems : ⏳ RangeItem ;
[6] RangeItem : ⏳ 'char' ; ")
syntaxState5("syntaxState5
[1] Scope : '[^' 'firstItem2' ⏳ RangeItems ']' ;
[3] Scope : '[^' 'firstItem2' ⏳ ']' ;
[4] RangeItems : ⏳ RangeItems RangeItem ;
[5] RangeItems : ⏳ RangeItem ;
[6] RangeItem : ⏳ 'char' ; ")
syntaxState6("syntaxState6
[0] Scope : '[' 'firstItem1' RangeItems ⏳ ']' ;
[4] RangeItems : RangeItems ⏳ RangeItem ;
[6] RangeItem : ⏳ 'char' ; ")
syntaxState7("syntaxState7
[2] Scope : '[' 'firstItem1' ']' ⏳ ; ")
syntaxState8("syntaxState8
[5] RangeItems : RangeItem ⏳ ; ")
syntaxState9("syntaxState9
[6] RangeItem : 'char' ⏳ ; ")
syntaxState10("syntaxState10
[1] Scope : '[^' 'firstItem2' RangeItems ⏳ ']' ;
[4] RangeItems : RangeItems ⏳ RangeItem ;
[6] RangeItem : ⏳ 'char' ; ")
syntaxState11("syntaxState11
[3] Scope : '[^' 'firstItem2' ']' ⏳ ; ")
syntaxState12("syntaxState12
[0] Scope : '[' 'firstItem1' RangeItems ']' ⏳ ; ")
syntaxState13("syntaxState13
[4] RangeItems : RangeItems RangeItem ⏳ ; ")
syntaxState14("syntaxState14
[1] Scope : '[^' 'firstItem2' RangeItems ']' ⏳ ; ")
syntaxState0 -.-> |"Scope"| syntaxState1
syntaxState0 --> |"'['"| syntaxState2
syntaxState0 --> |"'[^'"| syntaxState3
syntaxState2 --> |"'firstItem1'"| syntaxState4
syntaxState3 --> |"'firstItem2'"| syntaxState5
syntaxState4 -.-> |"RangeItems"| syntaxState6
syntaxState4 --> |"']'"| syntaxState7
syntaxState4 -.-> |"RangeItem"| syntaxState8
syntaxState4 --> |"'char'"| syntaxState9
syntaxState5 -.-> |"RangeItems"| syntaxState10
syntaxState5 --> |"']'"| syntaxState11
syntaxState5 -.-> |"RangeItem"| syntaxState8
syntaxState5 --> |"'char'"| syntaxState9
syntaxState6 --> |"']'"| syntaxState12
syntaxState6 -.-> |"RangeItem"| syntaxState13
syntaxState6 --> |"'char'"| syntaxState9
syntaxState10 --> |"']'"| syntaxState14
syntaxState10 -.-> |"RangeItem"| syntaxState13
syntaxState10 --> |"'char'"| syntaxState9
syntaxState1 o--o |"'¥'"| syntaxState1
syntaxState7 x==x |"'[' 'firstItem1' ']' '[^' 'firstItem2' 'char' '¥'
R[2]= Scope : '[' 'firstItem1' ']' ;"| syntaxState7
syntaxState8 x==x |"'[' 'firstItem1' ']' '[^' 'firstItem2' 'char' '¥'
R[5]= RangeItems : RangeItem ;"| syntaxState8
syntaxState9 x==x |"'[' 'firstItem1' ']' '[^' 'firstItem2' 'char' '¥'
R[6]= RangeItem : 'char' ;"| syntaxState9
syntaxState11 x==x |"'[' 'firstItem1' ']' '[^' 'firstItem2' 'char' '¥'
R[3]= Scope : '[^' 'firstItem2' ']' ;"| syntaxState11
syntaxState12 x==x |"'[' 'firstItem1' ']' '[^' 'firstItem2' 'char' '¥'
R[0]= Scope : '[' 'firstItem1' RangeItems ']' ;"| syntaxState12
syntaxState13 x==x |"'[' 'firstItem1' ']' '[^' 'firstItem2' 'char' '¥'
R[4]= RangeItems : RangeItems RangeItem ;"| syntaxState13
syntaxState14 x==x |"'[' 'firstItem1' ']' '[^' 'firstItem2' 'char' '¥'
R[1]= Scope : '[^' 'firstItem2' RangeItems ']' ;"| syntaxState14
SLR(1) Syntax Machine
状态 |
'[' |
'firstItem1' |
']' |
'[^' |
'firstItem2' |
'char' |
'¥' |
Scope |
RangeItems |
RangeItem |
0 |
S2 |
|
|
S3 |
|
|
|
G1 |
|
|
1 |
|
|
|
|
|
|
完成 |
|
|
|
2 |
|
S4 |
|
|
|
|
|
|
|
|
3 |
|
|
|
|
S5 |
|
|
|
|
|
4 |
|
|
S7 |
|
|
S9 |
|
|
G6 |
G8 |
5 |
|
|
S11 |
|
|
S9 |
|
|
G10 |
G8 |
6 |
|
|
S12 |
|
|
S9 |
|
|
|
G13 |
7 |
|
|
|
|
|
|
R[2] |
|
|
|
8 |
|
|
R[5] |
|
|
R[5] |
|
|
|
|
9 |
|
|
R[6] |
|
|
R[6] |
|
|
|
|
10 |
|
|
S14 |
|
|
S9 |
|
|
|
G13 |
11 |
|
|
|
|
|
|
R[3] |
|
|
|
12 |
|
|
|
|
|
|
R[0] |
|
|
|
13 |
|
|
R[4] |
|
|
R[4] |
|
|
|
|
14 |
|
|
|
|
|
|
R[1] |
|
|
|
flowchart
classDef default fill:#C7EDCC,stroke:#993399,stroke-width:0px,text-align:left;
classDef titlebarStyle fill:gold;
titlebar>"LR(1) syntax states"]
class titlebar titlebarStyle
syntaxState0("syntaxState0
[-1] ResolvedScope> : ⏳ Scope ;
[0] Scope : ⏳ '[' 'firstItem1' RangeItems ']' ;
[1] Scope : ⏳ '[^' 'firstItem2' RangeItems ']' ;
[2] Scope : ⏳ '[' 'firstItem1' ']' ;
[3] Scope : ⏳ '[^' 'firstItem2' ']' ; ")
syntaxState1("syntaxState1
[-1] ResolvedScope> : Scope ⏳ ; ")
syntaxState2("syntaxState2
[0] Scope : '[' ⏳ 'firstItem1' RangeItems ']' ;
[2] Scope : '[' ⏳ 'firstItem1' ']' ; ")
syntaxState3("syntaxState3
[1] Scope : '[^' ⏳ 'firstItem2' RangeItems ']' ;
[3] Scope : '[^' ⏳ 'firstItem2' ']' ; ")
syntaxState4("syntaxState4
[0] Scope : '[' 'firstItem1' ⏳ RangeItems ']' ;
[2] Scope : '[' 'firstItem1' ⏳ ']' ;
[4] RangeItems : ⏳ RangeItems RangeItem ;
[5] RangeItems : ⏳ RangeItem ;
[6] RangeItem : ⏳ 'char' ; ")
syntaxState5("syntaxState5
[1] Scope : '[^' 'firstItem2' ⏳ RangeItems ']' ;
[3] Scope : '[^' 'firstItem2' ⏳ ']' ;
[4] RangeItems : ⏳ RangeItems RangeItem ;
[5] RangeItems : ⏳ RangeItem ;
[6] RangeItem : ⏳ 'char' ; ")
syntaxState6("syntaxState6
[0] Scope : '[' 'firstItem1' RangeItems ⏳ ']' ;
[4] RangeItems : RangeItems ⏳ RangeItem ;
[6] RangeItem : ⏳ 'char' ; ")
syntaxState7("syntaxState7
[2] Scope : '[' 'firstItem1' ']' ⏳ ; ")
syntaxState8("syntaxState8
[5] RangeItems : RangeItem ⏳ ; ")
syntaxState9("syntaxState9
[6] RangeItem : 'char' ⏳ ; ")
syntaxState10("syntaxState10
[1] Scope : '[^' 'firstItem2' RangeItems ⏳ ']' ;
[4] RangeItems : RangeItems ⏳ RangeItem ;
[6] RangeItem : ⏳ 'char' ; ")
syntaxState11("syntaxState11
[3] Scope : '[^' 'firstItem2' ']' ⏳ ; ")
syntaxState12("syntaxState12
[0] Scope : '[' 'firstItem1' RangeItems ']' ⏳ ; ")
syntaxState13("syntaxState13
[4] RangeItems : RangeItems RangeItem ⏳ ; ")
syntaxState14("syntaxState14
[1] Scope : '[^' 'firstItem2' RangeItems ']' ⏳ ; ")
syntaxState0 -.-> |"Scope"| syntaxState1
syntaxState0 --> |"'['"| syntaxState2
syntaxState0 --> |"'[^'"| syntaxState3
syntaxState2 --> |"'firstItem1'"| syntaxState4
syntaxState3 --> |"'firstItem2'"| syntaxState5
syntaxState4 -.-> |"RangeItems"| syntaxState6
syntaxState4 --> |"']'"| syntaxState7
syntaxState4 -.-> |"RangeItem"| syntaxState8
syntaxState4 --> |"'char'"| syntaxState9
syntaxState5 -.-> |"RangeItems"| syntaxState10
syntaxState5 --> |"']'"| syntaxState11
syntaxState5 -.-> |"RangeItem"| syntaxState8
syntaxState5 --> |"'char'"| syntaxState9
syntaxState6 --> |"']'"| syntaxState12
syntaxState6 -.-> |"RangeItem"| syntaxState13
syntaxState6 --> |"'char'"| syntaxState9
syntaxState10 --> |"']'"| syntaxState14
syntaxState10 -.-> |"RangeItem"| syntaxState13
syntaxState10 --> |"'char'"| syntaxState9
syntaxState1 o--o |"'¥'"| syntaxState1
syntaxState7 x==x |"'¥'
R[2]= Scope : '[' 'firstItem1' ']' ;"| syntaxState7
syntaxState8 x==x |"']' 'char'
R[5]= RangeItems : RangeItem ;"| syntaxState8
syntaxState9 x==x |"']' 'char'
R[6]= RangeItem : 'char' ;"| syntaxState9
syntaxState11 x==x |"'¥'
R[3]= Scope : '[^' 'firstItem2' ']' ;"| syntaxState11
syntaxState12 x==x |"'¥'
R[0]= Scope : '[' 'firstItem1' RangeItems ']' ;"| syntaxState12
syntaxState13 x==x |"']' 'char'
R[4]= RangeItems : RangeItems RangeItem ;"| syntaxState13
syntaxState14 x==x |"'¥'
R[1]= Scope : '[^' 'firstItem2' RangeItems ']' ;"| syntaxState14
LALR(1) Syntax Machine
状态 |
'[' |
'firstItem1' |
']' |
'[^' |
'firstItem2' |
'char' |
'¥' |
Scope |
RangeItems |
RangeItem |
0 |
S2 |
|
|
S3 |
|
|
|
G1 |
|
|
1 |
|
|
|
|
|
|
完成 |
|
|
|
2 |
|
S4 |
|
|
|
|
|
|
|
|
3 |
|
|
|
|
S5 |
|
|
|
|
|
4 |
|
|
S7 |
|
|
S9 |
|
|
G6 |
G8 |
5 |
|
|
S11 |
|
|
S9 |
|
|
G10 |
G8 |
6 |
|
|
S12 |
|
|
S9 |
|
|
|
G13 |
7 |
|
|
|
|
|
|
R[2] |
|
|
|
8 |
|
|
R[5] |
|
|
R[5] |
|
|
|
|
9 |
|
|
R[6] |
|
|
R[6] |
|
|
|
|
10 |
|
|
S14 |
|
|
S9 |
|
|
|
G13 |
11 |
|
|
|
|
|
|
R[3] |
|
|
|
12 |
|
|
|
|
|
|
R[0] |
|
|
|
13 |
|
|
R[4] |
|
|
R[4] |
|
|
|
|
14 |
|
|
|
|
|
|
R[1] |
|
|
|
flowchart
classDef default fill:#C7EDCC,stroke:#993399,stroke-width:0px,text-align:left;
classDef titlebarStyle fill:gold;
titlebar>"LR(1) syntax states"]
class titlebar titlebarStyle
syntaxState0("syntaxState0
[-1] ResolvedScope> : ⏳ Scope ; '¥'
[0] Scope : ⏳ '[' 'firstItem1' RangeItems ']' ; '¥'
[1] Scope : ⏳ '[^' 'firstItem2' RangeItems ']' ; '¥'
[2] Scope : ⏳ '[' 'firstItem1' ']' ; '¥'
[3] Scope : ⏳ '[^' 'firstItem2' ']' ; '¥' ")
syntaxState1("syntaxState1
[-1] ResolvedScope> : Scope ⏳ ; '¥' ")
syntaxState2("syntaxState2
[0] Scope : '[' ⏳ 'firstItem1' RangeItems ']' ; '¥'
[2] Scope : '[' ⏳ 'firstItem1' ']' ; '¥' ")
syntaxState3("syntaxState3
[1] Scope : '[^' ⏳ 'firstItem2' RangeItems ']' ; '¥'
[3] Scope : '[^' ⏳ 'firstItem2' ']' ; '¥' ")
syntaxState4("syntaxState4
[0] Scope : '[' 'firstItem1' ⏳ RangeItems ']' ; '¥'
[2] Scope : '[' 'firstItem1' ⏳ ']' ; '¥'
[4] RangeItems : ⏳ RangeItems RangeItem ; ']' 'char'
[5] RangeItems : ⏳ RangeItem ; ']' 'char'
[6] RangeItem : ⏳ 'char' ; ']' 'char' ")
syntaxState5("syntaxState5
[1] Scope : '[^' 'firstItem2' ⏳ RangeItems ']' ; '¥'
[3] Scope : '[^' 'firstItem2' ⏳ ']' ; '¥'
[4] RangeItems : ⏳ RangeItems RangeItem ; ']' 'char'
[5] RangeItems : ⏳ RangeItem ; ']' 'char'
[6] RangeItem : ⏳ 'char' ; ']' 'char' ")
syntaxState6("syntaxState6
[0] Scope : '[' 'firstItem1' RangeItems ⏳ ']' ; '¥'
[4] RangeItems : RangeItems ⏳ RangeItem ; ']' 'char'
[6] RangeItem : ⏳ 'char' ; ']' 'char' ")
syntaxState7("syntaxState7
[2] Scope : '[' 'firstItem1' ']' ⏳ ; '¥' ")
syntaxState8("syntaxState8
[5] RangeItems : RangeItem ⏳ ; ']' 'char' ")
syntaxState9("syntaxState9
[6] RangeItem : 'char' ⏳ ; ']' 'char' ")
syntaxState10("syntaxState10
[1] Scope : '[^' 'firstItem2' RangeItems ⏳ ']' ; '¥'
[4] RangeItems : RangeItems ⏳ RangeItem ; ']' 'char'
[6] RangeItem : ⏳ 'char' ; ']' 'char' ")
syntaxState11("syntaxState11
[3] Scope : '[^' 'firstItem2' ']' ⏳ ; '¥' ")
syntaxState12("syntaxState12
[0] Scope : '[' 'firstItem1' RangeItems ']' ⏳ ; '¥' ")
syntaxState13("syntaxState13
[4] RangeItems : RangeItems RangeItem ⏳ ; ']' 'char' ")
syntaxState14("syntaxState14
[1] Scope : '[^' 'firstItem2' RangeItems ']' ⏳ ; '¥' ")
syntaxState0 -.-> |"Scope"| syntaxState1
syntaxState0 --> |"'['"| syntaxState2
syntaxState0 --> |"'[^'"| syntaxState3
syntaxState2 --> |"'firstItem1'"| syntaxState4
syntaxState3 --> |"'firstItem2'"| syntaxState5
syntaxState4 -.-> |"RangeItems"| syntaxState6
syntaxState4 --> |"']'"| syntaxState7
syntaxState4 -.-> |"RangeItem"| syntaxState8
syntaxState4 --> |"'char'"| syntaxState9
syntaxState5 -.-> |"RangeItems"| syntaxState10
syntaxState5 --> |"']'"| syntaxState11
syntaxState5 -.-> |"RangeItem"| syntaxState8
syntaxState5 --> |"'char'"| syntaxState9
syntaxState6 --> |"']'"| syntaxState12
syntaxState6 -.-> |"RangeItem"| syntaxState13
syntaxState6 --> |"'char'"| syntaxState9
syntaxState10 --> |"']'"| syntaxState14
syntaxState10 -.-> |"RangeItem"| syntaxState13
syntaxState10 --> |"'char'"| syntaxState9
syntaxState1 o--o |"'¥'"| syntaxState1
syntaxState7 x==x |"'¥'
R[2]= Scope : '[' 'firstItem1' ']' ;"| syntaxState7
syntaxState8 x==x |"']' 'char'
R[5]= RangeItems : RangeItem ;"| syntaxState8
syntaxState9 x==x |"']' 'char'
R[6]= RangeItem : 'char' ;"| syntaxState9
syntaxState11 x==x |"'¥'
R[3]= Scope : '[^' 'firstItem2' ']' ;"| syntaxState11
syntaxState12 x==x |"'¥'
R[0]= Scope : '[' 'firstItem1' RangeItems ']' ;"| syntaxState12
syntaxState13 x==x |"']' 'char'
R[4]= RangeItems : RangeItems RangeItem ;"| syntaxState13
syntaxState14 x==x |"'¥'
R[1]= Scope : '[^' 'firstItem2' RangeItems ']' ;"| syntaxState14
LR(1) Syntax Machine
状态 |
'[' |
'firstItem1' |
']' |
'[^' |
'firstItem2' |
'char' |
'¥' |
Scope |
RangeItems |
RangeItem |
0 |
S2 |
|
|
S3 |
|
|
|
G1 |
|
|
1 |
|
|
|
|
|
|
完成 |
|
|
|
2 |
|
S4 |
|
|
|
|
|
|
|
|
3 |
|
|
|
|
S5 |
|
|
|
|
|
4 |
|
|
S7 |
|
|
S9 |
|
|
G6 |
G8 |
5 |
|
|
S11 |
|
|
S9 |
|
|
G10 |
G8 |
6 |
|
|
S12 |
|
|
S9 |
|
|
|
G13 |
7 |
|
|
|
|
|
|
R[2] |
|
|
|
8 |
|
|
R[5] |
|
|
R[5] |
|
|
|
|
9 |
|
|
R[6] |
|
|
R[6] |
|
|
|
|
10 |
|
|
S14 |
|
|
S9 |
|
|
|
G13 |
11 |
|
|
|
|
|
|
R[3] |
|
|
|
12 |
|
|
|
|
|
|
R[0] |
|
|
|
13 |
|
|
R[4] |
|
|
R[4] |
|
|
|
|
14 |
|
|
|
|
|
|
R[1] |
|
|
|
flowchart
classDef default fill:#C7EDCC,stroke:#993399,stroke-width:0px,text-align:left;
classDef titlebarStyle fill:gold;
titlebar>"LR(1) syntax states"]
class titlebar titlebarStyle
syntaxState0("syntaxState0
[-1] ResolvedScope> : ⏳ Scope ; '¥'
[0] Scope : ⏳ '[' 'firstItem1' RangeItems ']' ; '¥'
[1] Scope : ⏳ '[^' 'firstItem2' RangeItems ']' ; '¥'
[2] Scope : ⏳ '[' 'firstItem1' ']' ; '¥'
[3] Scope : ⏳ '[^' 'firstItem2' ']' ; '¥' ")
syntaxState1("syntaxState1
[-1] ResolvedScope> : Scope ⏳ ; '¥' ")
syntaxState2("syntaxState2
[0] Scope : '[' ⏳ 'firstItem1' RangeItems ']' ; '¥'
[2] Scope : '[' ⏳ 'firstItem1' ']' ; '¥' ")
syntaxState3("syntaxState3
[1] Scope : '[^' ⏳ 'firstItem2' RangeItems ']' ; '¥'
[3] Scope : '[^' ⏳ 'firstItem2' ']' ; '¥' ")
syntaxState4("syntaxState4
[0] Scope : '[' 'firstItem1' ⏳ RangeItems ']' ; '¥'
[2] Scope : '[' 'firstItem1' ⏳ ']' ; '¥'
[4] RangeItems : ⏳ RangeItems RangeItem ; ']' 'char'
[5] RangeItems : ⏳ RangeItem ; ']' 'char'
[6] RangeItem : ⏳ 'char' ; ']' 'char' ")
syntaxState5("syntaxState5
[1] Scope : '[^' 'firstItem2' ⏳ RangeItems ']' ; '¥'
[3] Scope : '[^' 'firstItem2' ⏳ ']' ; '¥'
[4] RangeItems : ⏳ RangeItems RangeItem ; ']' 'char'
[5] RangeItems : ⏳ RangeItem ; ']' 'char'
[6] RangeItem : ⏳ 'char' ; ']' 'char' ")
syntaxState6("syntaxState6
[0] Scope : '[' 'firstItem1' RangeItems ⏳ ']' ; '¥'
[4] RangeItems : RangeItems ⏳ RangeItem ; ']' 'char'
[6] RangeItem : ⏳ 'char' ; ']' 'char' ")
syntaxState7("syntaxState7
[2] Scope : '[' 'firstItem1' ']' ⏳ ; '¥' ")
syntaxState8("syntaxState8
[5] RangeItems : RangeItem ⏳ ; ']' 'char' ")
syntaxState9("syntaxState9
[6] RangeItem : 'char' ⏳ ; ']' 'char' ")
syntaxState10("syntaxState10
[1] Scope : '[^' 'firstItem2' RangeItems ⏳ ']' ; '¥'
[4] RangeItems : RangeItems ⏳ RangeItem ; ']' 'char'
[6] RangeItem : ⏳ 'char' ; ']' 'char' ")
syntaxState11("syntaxState11
[3] Scope : '[^' 'firstItem2' ']' ⏳ ; '¥' ")
syntaxState12("syntaxState12
[0] Scope : '[' 'firstItem1' RangeItems ']' ⏳ ; '¥' ")
syntaxState13("syntaxState13
[4] RangeItems : RangeItems RangeItem ⏳ ; ']' 'char' ")
syntaxState14("syntaxState14
[1] Scope : '[^' 'firstItem2' RangeItems ']' ⏳ ; '¥' ")
syntaxState0 -.-> |"Scope"| syntaxState1
syntaxState0 --> |"'['"| syntaxState2
syntaxState0 --> |"'[^'"| syntaxState3
syntaxState2 --> |"'firstItem1'"| syntaxState4
syntaxState3 --> |"'firstItem2'"| syntaxState5
syntaxState4 -.-> |"RangeItems"| syntaxState6
syntaxState4 --> |"']'"| syntaxState7
syntaxState4 -.-> |"RangeItem"| syntaxState8
syntaxState4 --> |"'char'"| syntaxState9
syntaxState5 -.-> |"RangeItems"| syntaxState10
syntaxState5 --> |"']'"| syntaxState11
syntaxState5 -.-> |"RangeItem"| syntaxState8
syntaxState5 --> |"'char'"| syntaxState9
syntaxState6 --> |"']'"| syntaxState12
syntaxState6 -.-> |"RangeItem"| syntaxState13
syntaxState6 --> |"'char'"| syntaxState9
syntaxState10 --> |"']'"| syntaxState14
syntaxState10 -.-> |"RangeItem"| syntaxState13
syntaxState10 --> |"'char'"| syntaxState9
syntaxState1 o--o |"'¥'"| syntaxState1
syntaxState7 x==x |"'¥'
R[2]= Scope : '[' 'firstItem1' ']' ;"| syntaxState7
syntaxState8 x==x |"']' 'char'
R[5]= RangeItems : RangeItem ;"| syntaxState8
syntaxState9 x==x |"']' 'char'
R[6]= RangeItem : 'char' ;"| syntaxState9
syntaxState11 x==x |"'¥'
R[3]= Scope : '[^' 'firstItem2' ']' ;"| syntaxState11
syntaxState12 x==x |"'¥'
R[0]= Scope : '[' 'firstItem1' RangeItems ']' ;"| syntaxState12
syntaxState13 x==x |"']' 'char'
R[4]= RangeItems : RangeItems RangeItem ;"| syntaxState13
syntaxState14 x==x |"'¥'
R[1]= Scope : '[^' 'firstItem2' RangeItems ']' ;"| syntaxState14
End
标签:解析器,
--,
一键,
RangeItems,
char,
_-,
Scope,
RangeItem
From: https://www.cnblogs.com/bitzhuwei/p/Scope-readme-full.html