Grammar javap; // --- Lexer identifier = ('a'..'z'|'A'..'Z'|'_'|'$') ('a'..'z'|'A'..'Z'|'_'|'-'|'$'|'0'..'9')*; blank = (' '|'\n'|'\t'|'\r')+; separator = ('.'|'/'); brackets = '[]'; wildcard = '?'; compiled_from = 'Compiled from "' (Any-'"')* '"'; dots = '...'; // --- Parser Ignored blank; // --- // Class and properties files = file+; file = compiled_from? class_declaration; class_declaration = modifier* class_or_interface full_class_name extends_declaration? implements_declaration? throws_declaration? '{' property_declaration* '}'; modifier = 'public'|'private'|'protected'|'static'|'final'|'native' |'synchronized'|'abstract'|'threadsafe'|'transient'|'volatile'|'strictfp'; class_or_interface = 'class'|'interface'; implements_declaration = 'implements' types; extends_declaration = 'extends' types; throws_declaration = 'throws' types?; property_declaration = {method:} modifier* generic_parameters? type identifier '(' types? ')' throws_declaration? ';' | {constructor:} modifier* generic_parameters? full_class_name '(' types? ')' throws_declaration? ';' | {attribute:} modifier* type identifier brackets* throws_declaration? ';' | {static:} modifier* '{' '}' ';' | ';'; // --- // Types type = base_type brackets* dots?; types = {tail:} types ',' type | {head:} type; base_type = {primitive:} primitive_base_type | {class:} full_class_name | {extends:} generic_identifier 'extends' type_bound | {super:} generic_identifier 'super' type_bound | {wildcard:} wildcard | {void:} 'void'; primitive_base_type = 'boolean'|'byte'|'char'|'short'|'int'|'float'|'long'|'double'; type_bound = {tail:} type_bound '&' full_class_name | {head:} full_class_name; generic_identifier = {class:} full_class_name | {wildcard:} wildcard; class_name = identifier generic_parameters?; full_class_name = {tail:} full_class_name separator class_name | {head:} class_name; generic_parameters = '<' types '>';