diff options
author | acolyer <acolyer> | 2004-12-09 08:59:22 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2004-12-09 08:59:22 +0000 |
commit | a4d5eeba2909a5ba1814b5c21fe6a21747882fcb (patch) | |
tree | 4c62d19dbd0dbc704476c718e0f287a0d9c94378 /docs/adk15ProgGuideDB/grammar.xml | |
parent | ed461c8c7755f2b615030e9494d757c9479dbd07 (diff) | |
download | aspectj-a4d5eeba2909a5ba1814b5c21fe6a21747882fcb.tar.gz aspectj-a4d5eeba2909a5ba1814b5c21fe6a21747882fcb.zip |
updates for 1.5.0 M1
Diffstat (limited to 'docs/adk15ProgGuideDB/grammar.xml')
-rw-r--r-- | docs/adk15ProgGuideDB/grammar.xml | 189 |
1 files changed, 186 insertions, 3 deletions
diff --git a/docs/adk15ProgGuideDB/grammar.xml b/docs/adk15ProgGuideDB/grammar.xml index 42a7065d4..42ed65644 100644 --- a/docs/adk15ProgGuideDB/grammar.xml +++ b/docs/adk15ProgGuideDB/grammar.xml @@ -2,8 +2,191 @@ <title>A Grammar for the AspectJ 5 Language</title> - Collect together all the grammar fragments scattered throughout this documented - and present them as a coherent whole... - + <programlisting><![CDATA[ + === type patterns === + + TypePattern := SimpleTypePattern | + '!' TypePattern | + '(' AnnotationPattern? TypePattern ')' + TypePattern '&&' TypePattern | + TypePattern '||' TypePattern | + + SimpleTypePattern := DottedNamePattern '+'? '[]'* + + DottedNamePattern := FullyQualifiedName RestOfNamePattern? | + '*' NotStarNamePattern? + + RestOfNamePattern := '..' DottedNamePattern | + '*' NotStarNamePattern? + + NotStarNamePattern := FullyQualifiedName RestOfNamePattern? | + '..' DottedNamePattern + + FullyQualifiedName := JavaIdentifierCharacter+ ('.' JavaIdentifierCharacter+)* + + === annotation patterns === + + AnnotationPattern := '@' AnnotationTypePattern AnnotationPattern* | + '!' AnnotationPattern + + AnnotationTypePattern := FullyQualifiedName | + '(' TypePattern ')' + + === signature patterns === + + -- field -- + + FieldPattern := + AnnotationPattern? FieldModifiersPattern? + TypePattern (TypePattern DotOrDotDot)? SimpleNamePattern + + FieldModifiersPattern := '!'? FieldModifier FieldModifiersPattern* + + FieldModifier := 'public' | 'private' | 'protected' | 'static' | + 'transient' | 'final' + + DotOrDotDot := '.' | '..' + + SimpleNamePattern := JavaIdentifierChar+ ('*' SimpleNamePattern)? + + -- method -- + + MethodPattern := + AnnotationPattern? MethodModifiersPattern? TypePattern + (TypePattern DotOrDotDot)? SimpleNamePattern + '(' FormalsPattern ')' ThrowsPattern? + + MethodModifiersPattern := '!'? MethodModifier MethodModifiersPattern* + + MethodModifier := 'public' | 'private' | 'protected' | 'static' | + 'synchronized' | 'final' + + FormalsPattern := '..' (',' FormalsPatternAfterDotDot)? | + OptionalParensTypePattern (',' FormalsPattern)* | + TypePattern '...' + + FormalsPatternAfterDotDot := + OptionalParensTypePattern (',' FormalsPatternAfterDotDot)* | + TypePattern '...' + + ThrowsPattern := 'throws' TypePatternList + + TypePatternList := TypePattern (',' TypePattern)* + + -- constructor -- + + ConstructorPattern := + AnnotationPattern? ConstructorModifiersPattern? + (TypePattern DotOrDotDot)? 'new' '(' FormalsPattern ')' + ThrowsPattern? + + ConstructorModifiersPattern := '!'? ConstructorModifier ConstructorModifiersPattern* + + ConstructorModifier := 'public' | 'private' | 'protected' + + === Pointcuts === + + PointcutPrimitive := + Call | Execution | Get | Set | Handler | + Initialization | PreInitialization | + StaticInitialization | AdviceExecution | + This | Target | Args | CFlow | CFlowBelow | + Within | WithinCode | If | + AnnotationPointcut + + AnnotationPointcut := AtAnnotation | AtThis | AtTarget | + AtWithin | AtWithinCode | AtArgs + + + Call := 'call' '(' MethodOrConstructorPattern ')' + + MethodOrConstructorPattern := MethodPattern | ConstructorPattern + + Execution := 'execution' '(' MethodOrConstructorPattern ')' + + Get := 'get' '(' FieldPattern ')' + Set := 'set' '(' FieldPattern ')' + Handler := 'handler' '(' OptionalParensTypePattern ')' + Initialization := 'initialization' '(' ConstructorPattern ')' + PreInitialization := 'preinitialization' '(' ConstructorPattern ')' + StaticInitialization := 'staticinitialization' '(' OptionalParensTypePattern ')' + AdviceExecution := 'adviceexecution' '(' ')' + This := 'this' '(' TypeOrIdentifier ')' + Target := 'target' '(' TypeOrIdentifier ')' + Args := 'args' '(' FormalsOrIdentifiersPattern ')' + CFlow := 'cflow' '(' Pointcut ')' + CFlowBelow := 'cflowbelow' '(' Pointcut ')' + Within := 'within' '(' OptionalParensTypePattern ')' + WithinCode := 'withincode' '(' OptionalParensTypePattern ')' + If := 'if' '(' BooleanJavaExpression ')' + + TypeOrIdentifier := FullyQualifiedName ('[' ']')* | Identifier + Identifier := JavaIdentifierChar+ + + FormalsOrIdentifiersPattern := + '..' (',' FormalsOrIdentifiersPatternAfterDotDot)? | + TypeOrIdentifier (',' FormalsOrIdentifiersPattern)* | + '*' (',' FormalsOrIdentifiersPattern)* + + FormalsOrIdentifiersPatternAfterDotDot := + TypeOrIdentifier (',' FormalsOrIdentifiersPatternAfterDotDot)* | + '*' (',' FormalsOrIdentifiersPatternAfterDotDot)* + + AtAnnotation := '@annotation' '(' AnnotationOrIdentifier ')' + AtThis := '@this' '(' AnnotationOrIdentifer ')' + AtTarget := '@target' '(' AnnotationOrIdentifier ')' + AtWithin := '@within' '(' AnnotationOrIdentifier ')' + AtWithinCode := '@withincode' '(' AnnotationOrIdentifier ')' + + AnnotationOrIdentifier := '@' FullyQualifiedName | Identifier + + AtArgs := '@args' '(' AnnotationsOrIdentifiersPattern ')' + + AnnotationsOrIdentifiersPattern := + '..' (',' AnnotationsOrIdentifiersPatternAfterDotDot)? | + AnnotationOrIdentifier (',' AnnotationsOrIdentifiersPattern)* | + '*' (',' AnnotationsOrIdentifiersPattern)* + + AnnotationsOrIdentifiersPatternAfterDotDot := + AnnotationOrIdentifier (',' AnnotationsOrIdentifiersPatternAfterDotDot)* | + '*' (',' AnnotationsOrIdentifiersPatternAfterDotDot)* + + PointcutDeclaration := PointcutModifiers? 'pointcut' Identifier Formals + ':' PointcutExpression + + PointcutModifiers := PointcutModifier* + + PointcutModifier := 'public' | 'private' | 'protected' | 'abstract' + + Formals := '(' ParamList? ')' + ParamList := FullyQualifiedName Identifier (',' ParamList)* + + ReferencePointcut := (FullyQualifiedName '.')? Identifier Formals + + PointcutExpression := (PointcutPrimitive | ReferencePointcut) | + '!' PointcutExpression | + '(' PointcutExpression ')' | + PointcutExpression '&&' PointcutExpression | + PointcutExpression '||' PointcutExpression + + === Advice === + + to be written... + + === Inter-type Declarations === + + to be written... + + === Declare Statements === + + to be written... + + === Aspects === + + to be written... + + ]]></programlisting> + + </appendix> |