@@ -419,7 +419,7 @@ let update (msg: Msg) (model: Model) : Model * Cmd<Msg> =
419
419
|> SweetAlert.Run
420
420
421
421
422
- let projectSyntactical ( grammar : Grammar ) analysisTable lexSpec lexer ( head : string , body : string ) dispatch =
422
+ let projectSyntactical ( grammar : Grammar ) lexSpec lexer ( head : string , body : string ) dispatch =
423
423
let viewProductionRule ( head , body ) =
424
424
Bulma.columns [
425
425
columns.isVCentered
@@ -633,17 +633,10 @@ let projectSyntactical (grammar: Grammar) analysisTable lexSpec lexer (head: str
633
633
column.isFull
634
634
prop.children [ viewSpec ]
635
635
]
636
- match analysisTable with
637
- | None -> ()
638
- | Some table ->
639
- Bulma.column [
640
- column.isFull
641
- prop.children [ table ]
642
- ]
643
636
]
644
637
]
645
638
646
- let projectLexical spec analysisTable ( kind , name , body ) dispatch =
639
+ let projectLexical spec ( kind , name , body ) dispatch =
647
640
// kinds of regular definitions
648
641
let tokenOption = " token"
649
642
let fragmentOption = " fragment"
@@ -958,13 +951,6 @@ let projectLexical spec analysisTable (kind, name, body) dispatch =
958
951
column.isFull
959
952
prop.children [ viewSpec ]
960
953
]
961
- match analysisTable with
962
- | None -> ()
963
- | Some table ->
964
- Bulma.column [
965
- column.isFull
966
- prop.children [ table ]
967
- ]
968
954
]
969
955
]
970
956
@@ -1095,17 +1081,15 @@ let main model dispatch =
1095
1081
Bulma.cardContent [
1096
1082
projectLexical
1097
1083
model.Project.Lexicon
1098
- model.LexicalAnalysisTable
1099
1084
model.RegularDefinitionText
1100
1085
dispatch ]
1101
1086
]
1102
1087
| Syntactical ->
1103
1088
Bulma.card [
1104
- Bulma.cardHeader [ cardTitle " LL(1) Grammar" ]
1089
+ Bulma.cardHeader [ cardTitle " LL(1) BNF Grammar" ]
1105
1090
Bulma.cardContent [
1106
1091
projectSyntactical
1107
1092
model.Project.Syntax
1108
- model.SyntacticalAnalysisTable
1109
1093
model.Project.Lexicon
1110
1094
model.Lexer
1111
1095
model.GrammarProductionText
@@ -1126,6 +1110,22 @@ let main model dispatch =
1126
1110
]
1127
1111
]
1128
1112
1113
+ let tableInterface =
1114
+ Bulma.card [
1115
+ Bulma.cardHeader [ cardTitle " Automaton" ]
1116
+ Bulma.cardContent [
1117
+ match model.Phase with
1118
+ | Lexical ->
1119
+ match model.LexicalAnalysisTable with
1120
+ | None -> ()
1121
+ | Some table -> table
1122
+ | Syntactical ->
1123
+ match model.SyntacticalAnalysisTable with
1124
+ | None -> ()
1125
+ | Some table -> table
1126
+ ]
1127
+ ]
1128
+
1129
1129
Bulma.columns [
1130
1130
columns.isMultiline
1131
1131
columns.isCentered
@@ -1140,6 +1140,10 @@ let main model dispatch =
1140
1140
column.isHalfWidescreen
1141
1141
prop.children [ recognitionInterface ]
1142
1142
]
1143
+ Bulma.column [
1144
+ column.isFull
1145
+ prop.children [ tableInterface ]
1146
+ ]
1143
1147
]
1144
1148
]
1145
1149
0 commit comments