// $ANTLR start "fullAnnotation"
// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:180:1: fullAnnotation[AnnotatedDescrBuilder inDescrBuilder] returns [AnnotationDescr result] : AT name= ID ( DOT x= ID )* annotationArgs[result] ;
public final AnnotationDescr fullAnnotation(AnnotatedDescrBuilder inDescrBuilder) throws RecognitionException {
AnnotationDescr result = null;
Token name=null;
Token x=null;
String n = "";
try {
// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:182:3: ( AT name= ID ( DOT x= ID )* annotationArgs[result] )
// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:182:5: AT name= ID ( DOT x= ID )* annotationArgs[result]
{
match(input,AT,FOLLOW_AT_in_fullAnnotation894); if (state.failed) return result;
name=(Token)match(input,ID,FOLLOW_ID_in_fullAnnotation898); if (state.failed) return result;
if ( state.backtracking==0 ) { n = (name!=null?name.getText():null); }
// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:182:36: ( DOT x= ID )*
loop18:
while (true) {
int alt18=2;
int LA18_0 = input.LA(1);
if ( (LA18_0==DOT) ) {
alt18=1;
}
switch (alt18) {
case 1 :
// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:182:38: DOT x= ID
{
match(input,DOT,FOLLOW_DOT_in_fullAnnotation904); if (state.failed) return result;
x=(Token)match(input,ID,FOLLOW_ID_in_fullAnnotation908); if (state.failed) return result;
if ( state.backtracking==0 ) { n += "." + (x!=null?x.getText():null); }
}
break;
default :
break loop18;
}
}
if ( state.backtracking==0 ) { if( buildDescr ) { result = inDescrBuilder != null ? (AnnotationDescr) inDescrBuilder.newAnnotation( n ).getDescr() : new AnnotationDescr( n ); } }
pushFollow(FOLLOW_annotationArgs_in_fullAnnotation929);
annotationArgs(result);
state._fsp--;
if (state.failed) return result;
}