(* --- Extending Base-Grammar --- *) type = primitive_type (* e.g. "byte", "int", "boolean" *) | reference_type ; reference_type = class_type | interface_type | array_type | joinpoint_type ; class_member_declaration = ... | polymorphic_pc_declaration ; type_declaration = ... | joinpointtype_decl ; class_declaration = ... | exhibiting_class_declaration ; block = ... | exhibit_block ; aspect_declaration = ... | advising_aspect_declaration ; advice_declaration = ... | joinpoint_advice_declaration ; basic_pointcut_expr = ... | super_pointcut_expr ; (* ---- IIIA-syntax-extension ---- *) (* Joinpointtype extension *) joinpoint_type = { IDENTIFIER "." } IDENTIFIER joinpointtype_decl = { ( "public" | "final" | "abstract" ) } "joinpointtype" IDENTIFIER ["extends" joinpoint_type] ["allows" allowed_advice_kind {, allowed_advice_kind}] joinpointtype_body ; joinpointtype_body = "{" {joinpointtype_field_declaration} "}" ; joinpointtype_field_declaration = ["final"] type IDENTIFIER ";" ; (* Class-Side Extension *) allowed_advice_kind = "before" | "around" | "after" ; super_pointcut_expr = "super" ; polymorphic_pc_declaration = "pointcut" joinpoint_type ":" pointcut_expr ";" ; exhibiting_class_declaration = [modifiers] "class" IDENTIFIER ["extends" type] ["implements" interface{"," interface}] "exhibits" joinpoint_type {"," joinpoint_type} "{" class_body "}" ; exhibit_block = "exhibit" "new" joinpoint_type ( {argument} ) { {statement} } ";" ; (* Aspect-Side Extension *) advising_aspect_declaration = [modifiers] "aspect" IDENTIFIER "advises" joinpoint_type {"," joinpoint_type} "{" aspect_body "}" ; joinpoint_advice_declaration = ("before"|"around"|"after") "(" joinpoint_type IDENTIFIER ")" "{" {statement} "}" ;