Skip to content
Snippets Groups Projects

Resolve "Structure View Support"

Merged Johannes Mey requested to merge feature/structure-view-support into develop
Files
34
+ 38
26
@@ -34,7 +34,11 @@ modifiers ::= (PUBLIC | STATIC | PROTECTED | PRIVATE | FINAL | ABSTRACT | SYNCH
type_declaration ::= SEMICOLON | (modifiers ( class_declaration | interface_declaration | unmodified_enum_declaration | annotation_type_declaration | aspect_declaration ) )
aspect_declaration ::= ASPECT IDENTIFIER aspect_body
aspect_declaration ::= ASPECT aspect_name aspect_body
{
extends="org.jastadd.tooling.aspect.psi.impl.JastAddAspectAspectDeclarationImplExtension"
implements="org.jastadd.tooling.common.psi.NamedElement"
}
aspect_body ::= LBRACE aspect_body_declaration* RBRACE
@@ -70,7 +74,7 @@ aspect_class_declaration ::= modifiers class_declaration
// aspect_class_body unused
aspect_interface_declaration ::= modifiers INTERFACE IDENTIFIER type_parameters? (EXTENDS type_name_list)? LBRACE aspect_interface_member_declaration* RBRACE
aspect_interface_declaration ::= modifiers INTERFACE simple_type_name type_parameters? (EXTENDS type_name_list)? LBRACE aspect_interface_member_declaration* RBRACE
aspect_interface_member_declaration ::= ( aspect_nested_class_declaration
| aspect_nested_interface_declaration
@@ -79,16 +83,16 @@ aspect_interface_member_declaration ::= ( aspect_nested_class_declaration
| aspect_interface_method_declaration
| aspect_interface_field_declaration )
aspect_interface_syn_attribute_declaration ::= annotation* SYN LAZY? FINAL? aspect_type attribute_name LPAREN (type IDENTIFIER (COMMA type IDENTIFIER)* )? RPAREN (CIRCULAR LBRACKET expression RBRACKET)? SEMICOLON
aspect_interface_syn_attribute_declaration ::= annotation* SYN LAZY? FINAL? aspect_type attribute_name LPAREN (type parameter_name (COMMA type parameter_name)* )? RPAREN (CIRCULAR LBRACKET expression RBRACKET)? SEMICOLON
{
implements="org.jastadd.tooling.aspect.psi.JastAddAspectAttribute"
extends="org.jastadd.tooling.aspect.psi.impl.JastAddAspectSynAttributeImpl"
extends="org.jastadd.tooling.aspect.psi.impl.JastAddAspectAspectSynAttributeDeclarationImplExtension"
}
aspect_interface_inh_attribute_declaration ::= annotation* INH LAZY? FINAL? aspect_type attribute_name LPAREN (type IDENTIFIER (COMMA type IDENTIFIER)* )? RPAREN (CIRCULAR LBRACKET expression RBRACKET)? SEMICOLON
aspect_interface_inh_attribute_declaration ::= annotation* INH LAZY? FINAL? aspect_type attribute_name LPAREN (type parameter_name (COMMA type parameter_name)* )? RPAREN (CIRCULAR LBRACKET expression RBRACKET)? SEMICOLON
{
implements="org.jastadd.tooling.aspect.psi.JastAddAspectAttribute"
extends="org.jastadd.tooling.aspect.psi.impl.JastAddAspectInhAttributeImpl"
extends="org.jastadd.tooling.aspect.psi.impl.JastAddAspectAspectInhAttributeDeclarationImplExtension"
}
aspect_interface_method_declaration ::= (PUBLIC | PROTECTED | PRIVATE | STATIC | ABSTRACT | FINAL | NATIVE | SYNCHRONIZED )* aspect_result_type method_declarator (THROWS name_list)? SEMICOLON
@@ -103,41 +107,41 @@ aspect_nested_class_declaration ::= modifiers class_declaration
aspect_method_declaration ::= modifiers type_parameters? aspect_result_type ast_type_name DOT method_declarator (THROWS name_list)? (block | SEMICOLON)
aspect_refine_method_declaration ::= REFINE [IDENTIFIER] modifiers type_parameters? aspect_result_type IDENTIFIER DOT method_declarator (THROWS name_list)? (block | SEMICOLON)
aspect_refine_method_declaration ::= REFINE [aspect_name] modifiers type_parameters? aspect_result_type ast_type_name DOT method_declarator (THROWS name_list)? (block | SEMICOLON)
aspect_constructor_declaration ::= modifiers ast_type_name DOT ast_type_name formal_parameters (THROWS name_list)? LBRACE explicit_constructor_invocation? block_statement* RBRACE
aspect_refine_constructor_declaration ::= REFINE IDENTIFIER (PUBLIC | PROTECTED | PRIVATE) ast_type_name DOT IDENTIFIER formal_parameters (THROWS name_list)? LBRACE block_statement* RBRACE
aspect_refine_constructor_declaration ::= REFINE aspect_name (PUBLIC | PROTECTED | PRIVATE) ast_type_name DOT method_name formal_parameters (THROWS name_list)? LBRACE block_statement* RBRACE
aspect_field_declaration ::= modifiers aspect_type ast_type_name DOT variable_declarator (COMMA variable_declarator)* SEMICOLON
aspect_syn_attribute_declaration ::= annotation* SYN NTA? LAZY? FINAL? aspect_type ast_type_name DOT attribute_name LPAREN (type IDENTIFIER (COMMA type IDENTIFIER)* )? RPAREN (CIRCULAR LBRACKET expression RBRACKET)? ( ASSIGN expression SEMICOLON | block | SEMICOLON )
aspect_syn_attribute_declaration ::= annotation* SYN NTA? LAZY? FINAL? aspect_type ast_type_name DOT attribute_name LPAREN (type parameter_name (COMMA type parameter_name)* )? RPAREN (CIRCULAR LBRACKET expression RBRACKET)? ( ASSIGN expression SEMICOLON | block | SEMICOLON )
{
implements="org.jastadd.tooling.aspect.psi.JastAddAspectAttribute"
extends="org.jastadd.tooling.aspect.psi.impl.JastAddAspectSynAttributeImpl"
extends="org.jastadd.tooling.aspect.psi.impl.JastAddAspectAspectSynAttributeDeclarationImplExtension"
}
aspect_inh_attribute_declaration ::= annotation* INH NTA? LAZY? FINAL? aspect_type ast_type_name DOT attribute_name LPAREN (type IDENTIFIER (COMMA type IDENTIFIER)* )? RPAREN (CIRCULAR LBRACKET expression RBRACKET)? SEMICOLON
aspect_inh_attribute_declaration ::= annotation* INH NTA? LAZY? FINAL? aspect_type ast_type_name DOT attribute_name LPAREN (type parameter_name (COMMA type parameter_name)* )? RPAREN (CIRCULAR LBRACKET expression RBRACKET)? SEMICOLON
{
implements="org.jastadd.tooling.aspect.psi.JastAddAspectAttribute"
extends="org.jastadd.tooling.aspect.psi.impl.JastAddAspectInhAttributeImpl"
extends="org.jastadd.tooling.aspect.psi.impl.JastAddAspectAspectInhAttributeDeclarationImplExtension"
}
// FIXME parentheses are not required around the WHEN expression?
aspect_rewrite ::= REWRITE IDENTIFIER (ast_type_name DOT IDENTIFIER LPAREN RPAREN)? LBRACE ((WHEN LPAREN expression RPAREN)? TO aspect_type ( expression SEMICOLON | block ))+ RBRACE
aspect_rewrite ::= REWRITE ast_type_name (ast_type_name DOT method_name LPAREN RPAREN)? LBRACE ((WHEN LPAREN expression RPAREN)? TO aspect_type ( expression SEMICOLON | block ))+ RBRACE
aspect_syn_equation ::= annotation* EQUATION ast_type_name DOT attribute_name LPAREN (type IDENTIFIER (COMMA type IDENTIFIER)*)? RPAREN ( ASSIGN expression SEMICOLON | block )
aspect_syn_equation ::= annotation* EQUATION ast_type_name DOT attribute_name LPAREN (type parameter_name (COMMA type parameter_name)*)? RPAREN ( ASSIGN expression SEMICOLON | block )
aspect_refine_syn_equation ::= REFINE IDENTIFIER EQUATION ast_type_name DOT attribute_name LPAREN (type IDENTIFIER (COMMA type IDENTIFIER)*)? RPAREN (ASSIGN expression SEMICOLON | block)
aspect_refine_syn_equation ::= REFINE aspect_name EQUATION ast_type_name DOT attribute_name LPAREN (type parameter_name (COMMA type parameter_name)*)? RPAREN (ASSIGN expression SEMICOLON | block)
aspect_inh_equation ::= annotation* EQUATION ast_type_name DOT IDENTIFIER LPAREN (INT IDENTIFIER)? RPAREN DOT attribute_name LPAREN (type IDENTIFIER (COMMA type IDENTIFIER)*)? RPAREN (ASSIGN expression SEMICOLON | block)
aspect_inh_equation ::= annotation* EQUATION ast_type_name DOT attribute_name LPAREN (INT parameter_name)? RPAREN DOT attribute_name LPAREN (type parameter_name (COMMA type parameter_name)*)? RPAREN (ASSIGN expression SEMICOLON | block)
aspect_refine_inh_equation ::= REFINE IDENTIFIER EQUATION ast_type_name DOT IDENTIFIER LPAREN (INT IDENTIFIER)? RPAREN DOT attribute_name LPAREN (type IDENTIFIER (COMMA type IDENTIFIER)*)? RPAREN (ASSIGN expression SEMICOLON | block)
aspect_refine_inh_equation ::= REFINE aspect_name EQUATION ast_type_name DOT attribute_name LPAREN (INT parameter_name)? RPAREN DOT attribute_name LPAREN (type parameter_name (COMMA type parameter_name)*)? RPAREN (ASSIGN expression SEMICOLON | block)
collection_attribute ::= annotation* COLL aspect_type ast_type_name DOT attribute_name LPAREN RPAREN CIRCULAR? (LBRACKET expression RBRACKET)? (WITH IDENTIFIER)? (ROOT IDENTIFIER)? SEMICOLON
collection_attribute ::= annotation* COLL aspect_type ast_type_name DOT attribute_name LPAREN RPAREN CIRCULAR? (LBRACKET expression RBRACKET)? (WITH method_name)? (ROOT ast_type_name)? SEMICOLON
{
implements="org.jastadd.tooling.aspect.psi.JastAddAspectAttribute"
extends="org.jastadd.tooling.aspect.psi.impl.JastAddAspectCollAttributeImpl"
extends="org.jastadd.tooling.aspect.psi.impl.JastAddAspectCollectionAttributeImplExtension"
}
collection_contribution ::= annotation* ast_type_name CONTRIBUTES ( NTA expression TO ast_type_name DOT attribute_name LPAREN RPAREN | EACH? expression (WHEN expression)? TO ast_type_name DOT attribute_name LPAREN RPAREN (FOR EACH? expression)? | block TO ast_type_name DOT attribute_name LPAREN RPAREN ) SEMICOLON
@@ -146,14 +150,14 @@ aspect_add_interface ::= ast_type_name IMPLEMENTS type_name_list SEMICOLON
aspect_extend_interface ::= ast_type_name EXTENDS type_name_list SEMICOLON
class_declaration ::= CLASS IDENTIFIER type_parameters? (EXTENDS class_or_interface_type)? (implements type_name_list)? class_body
class_declaration ::= CLASS simple_type_name type_parameters? (EXTENDS class_or_interface_type)? (implements type_name_list)? class_body
type_name_list ::= class_or_interface_type (COMMA class_or_interface_type)*
unmodified_class_declaration ::= CLASS IDENTIFIER type_parameters? (EXTENDS class_or_interface_type)? (IMPLEMENTS type_name_list)? class_body
unmodified_class_declaration ::= CLASS simple_type_name type_parameters? (EXTENDS class_or_interface_type)? (IMPLEMENTS type_name_list)? class_body
// TODO check simplification
aspect_enum_declaration ::= modifiers ENUM IDENTIFIER (IMPLEMENTS type_name_list)? enum_body
aspect_enum_declaration ::= modifiers ENUM simple_type_name (IMPLEMENTS type_name_list)? enum_body
unmodified_enum_declaration ::= ENUM java_identifier (IMPLEMENTS type_name_list)? enum_body
@@ -173,7 +177,7 @@ class_body_declaration ::= initializer | modifiers ( unmodified_class_declaratio
interface_declaration ::= unmodified_interface_declaration
unmodified_interface_declaration ::= INTERFACE IDENTIFIER type_parameters? (EXTENDS type_name_list)? LBRACE interface_member_declaration* RBRACE
unmodified_interface_declaration ::= INTERFACE simple_type_name type_parameters? (EXTENDS type_name_list)? LBRACE interface_member_declaration* RBRACE
interface_member_declaration ::= modifiers (unmodified_class_declaration | unmodified_interface_declaration | field_declaration | method_declaration) | SEMICOLON
@@ -217,7 +221,7 @@ reference_type ::= ( primitive_type (LBRACKET RBRACKET)+ ) | ( class_or_interfac
class_or_interface_type ::= java_identifier type_arguments? (DOT java_identifier type_arguments? )*
{
extends="org.jastadd.tooling.aspect.psi.impl.JastAddAspectClassOrInterfaceTypeImplExtension"
implements="org.jastadd.tooling.grammar.psi.GrammarNamedElement"
implements="org.jastadd.tooling.common.psi.NamedElement"
}
type_arguments ::= LT (type_argument (COMMA type_argument)* )? GT
@@ -384,7 +388,7 @@ annotation_type_member_declaration ::= ( modifiers (aspect_type java_identifier
default_value ::= DEFAULT member_value
aspect_cache_declaration ::= (CACHE | UNCACHE) IDENTIFIER DOT attribute_name LPAREN (type IDENTIFIER? (COMMA type IDENTIFIER?)* )? RPAREN SEMICOLON
aspect_cache_declaration ::= (CACHE | UNCACHE) aspect_name DOT attribute_name LPAREN (type parameter_name? (COMMA type parameter_name?)* )? RPAREN SEMICOLON
java_identifier ::= IDENTIFIER | INH | SYN | LAZY | REWRITE | TO | WHEN | ASPECT | EQUATION | CIRCULAR | REFINE | COLL | CONTRIBUTES | EACH | NTA | CACHE | UNCACHE
@@ -393,8 +397,16 @@ attribute_name ::= IDENTIFIER
ast_type_name ::= IDENTIFIER
{
extends="org.jastadd.tooling.aspect.psi.impl.JastAddAspectAstTypeNameImplExtension"
implements="org.jastadd.tooling.grammar.psi.GrammarNamedElement"
implements="org.jastadd.tooling.common.psi.NamedElement"
}
aspect_name ::= IDENTIFIER
simple_type_name ::= IDENTIFIER
parameter_name ::= IDENTIFIER
method_name ::= IDENTIFIER
// unused keywords must still appear somewhere
unused_keywords ::= GOTO | CONST ELLIPSIS | PACKAGE
Loading