contrib/jwrapper grammar: fix parsing many files at once
[nit.git] / contrib / jwrapper / grammar / javap.sablecc
index fa2775a..3f9318b 100644 (file)
@@ -13,9 +13,10 @@ wildcard = '?';
 Parser
 Ignored blank;
 
-multi_files = compiled_from? class_declaration;
 
 compiled_from = 'Compiled from "' identifier+ '.java"';
+files = file+;
+file = compiled_from? class_declaration;
 
 class_declaration = modifier* class_or_interface full_class_name
        extends_declaration? implements_declaration? throws_declaration?
@@ -65,8 +66,8 @@ property_declaration
        | {static:} modifier* '{' '}' ';'
        | ';';
 
-implements_declaration = 'implements' interface_list*;
-extends_declaration = 'extends' type;
+implements_declaration = 'implements' interface_list;
+extends_declaration = 'extends' interface_list;
 interface_list
        = {tail:} interface_list ',' full_class_name
        | {head:} full_class_name;