Skip to content

Commit 95ab9c8

Browse files
committed
switch
1 parent 31468c1 commit 95ab9c8

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed

JavaFront/lib/native/linux/implodePT

100644100755
File mode changed.

JavaFront/lib/native/linux/sdf2table

100644100755
File mode changed.

JavaFrontParser/syntax/languages/java-15/statements/Statements.sdf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,11 @@ exports
5656
context-free syntax
5757
"switch" "(" Expr ")" SwitchBlock -> Stm {cons("Switch")}
5858
"{" SwitchGroupList SwitchLabelList "}" -> SwitchBlock {cons("SwitchBlock")}
59-
SwitchLabelList BlockStmList -> SwitchGroup {cons("SwitchGroup")}
59+
SwitchLabelPlusList BlockStmPlusList -> SwitchGroup {cons("SwitchGroup")}
6060
SwitchGroup* -> SwitchGroupList {cons("SwitchGroupList")}
6161
SwitchLabel* -> SwitchLabelList {cons("SwitchLabelList")}
62+
SwitchLabel+ -> SwitchLabelPlusList {cons("SwitchLabelList")}
63+
BlockStm+ -> BlockStmPlusList {cons("BlockStmList")}
6264

6365
"case" Expr ":" -> SwitchLabel {cons("Case")}
6466
"default" ":" -> SwitchLabel {cons("Default")}

JavaFrontParser/test/example.jva

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ public class helloWorld {
55
public static void main(String[] args) {
66
System.out.println("Hello World!");
77
System.out.println("Done!");
8+
switch(3){}
89
}
910
}

0 commit comments

Comments
 (0)