@@ -678,6 +678,7 @@ public void data_stmt_object_list__begin() {
678678 }
679679
680680 public void data_stmt_value (Token asterisk ) {
681+ contextCloseAllInner ("values" );
681682 if (verbosity >= 100 )
682683 super .data_stmt_value (asterisk );
683684 }
@@ -757,9 +758,17 @@ public void pointer_decl(Token id, boolean hasSpecList) {
757758 public void save_stmt (Token label , Token keyword , Token eos , boolean hasSavedEntityList ) {
758759 if (!context .getTagName ().equals ("declaration" ))
759760 contextOpen ("declaration" );
761+ setAttribute ("type" , "save" );
760762 super .save_stmt (label , keyword , eos , hasSavedEntityList );
761763 }
762764
765+ public void saved_entity (Token id , boolean isCommonBlockName ) {
766+ contextOpen ("name" );
767+ super .saved_entity (id , isCommonBlockName );
768+ setAttribute ("id" , id );
769+ contextClose ();
770+ }
771+
763772 public void target_decl_list__begin () {
764773 if (!context .getTagName ().equals ("declaration" ))
765774 contextOpen ("declaration" );
@@ -1753,6 +1762,30 @@ public void goto_stmt(Token label, Token goKeyword, Token toKeyword, Token targe
17531762 super .goto_stmt (label , goKeyword , toKeyword , target_label , eos );
17541763 }
17551764
1765+ public void arithmetic_if_stmt (Token label , Token ifKeyword , Token label1 , Token label2 , Token label3 , Token eos ) {
1766+ Element test = contextNode (-4 );
1767+ Element ifNegative = contextNode (-3 );
1768+ Element ifZero = contextNode (-2 );
1769+ Element ifPositive = contextNode (-1 );
1770+ contextOpen ("arithmetic-if" );
1771+ contextOpen ("header" );
1772+ moveHere (test );
1773+ contextClose ();
1774+ contextOpen ("body" );
1775+ contextOpen ("if-negative" );
1776+ moveHere (ifNegative );
1777+ contextClose ();
1778+ contextOpen ("if-zero" );
1779+ moveHere (ifZero );
1780+ contextClose ();
1781+ contextOpen ("if-positive" );
1782+ moveHere (ifPositive );
1783+ contextClose ();
1784+ contextClose ();
1785+ super .arithmetic_if_stmt (label , ifKeyword , label1 , label2 , label3 , eos );
1786+ contextClose ();
1787+ }
1788+
17561789 public void continue_stmt (Token label , Token continueKeyword , Token eos ) {
17571790 Element labelNode = contextNodesCount () > 0 ? contextNode (-1 ) : null ;
17581791 labelNode = labelNode != null && labelNode .getTagName () == "label" ? labelNode : null ;
@@ -1956,6 +1989,8 @@ public void format_stmt(Token label, Token formatKeyword, Token eos) {
19561989 if (verbosity >= 60 )
19571990 super .format_stmt (label , formatKeyword , eos );
19581991 contextClose ();
1992+ if (context .getTagName ().equals ("declaration" ))
1993+ setAttribute ("type" , "format" );
19591994 }
19601995
19611996 public void format_specification (boolean hasFormatItemList ) {
@@ -2155,6 +2190,9 @@ public void end_interface_stmt(Token label, Token kw1, Token kw2, Token eos, boo
21552190 contextCloseAllInner ("interface" );
21562191 super .end_interface_stmt (label , kw1 , kw2 , eos , hasGenericSpec );
21572192 contextClose ();
2193+ if (!context .getTagName ().equals ("declaration" ))
2194+ cleanUpAfterError ("expected interface to be within declaration context, but its in " + context .getTagName ());
2195+ setAttribute ("type" , "interface" );
21582196 }
21592197
21602198 public void interface_body (boolean hasPrefix ) {
0 commit comments