Skip to content

Commit 286d1c4

Browse files
Edit to be runnable
1 parent 6977f0b commit 286d1c4

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

java_parser.y

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ method_body:
4848

4949
statement_list:
5050
statement
51-
|statement_list marker statement
51+
|statement_list statement
5252
{
5353
//backpatch(nextlist for statment)
5454
//nextlist=goto or marker nextlist
@@ -77,18 +77,9 @@ primitive_type:
7777

7878
if:
7979
IF '(' boolean_expression ')'
80-
marker
8180
'{' statement_list '}'
82-
ELSE '{' marker statement_list '}'
81+
ELSE '{' statement_list '}'
8382
;
84-
{
85-
//
86-
S ! if ( B ) M 1 S 1 N else M 2 S 2
87-
{ backpatch ( B: truelist ; M 1 : instr );
88-
backpatch ( B: falselist ; M 2 : instr );
89-
temp = merge ( S 1 : nextlist ; N: nextlist );
90-
S: nextlist = merge ( temp ; S 2 : nextlist ); }
91-
}
9283

9384
while:
9485
WHILE '(' boolean_expression ')'

0 commit comments

Comments
 (0)