*
* @return
* @throws RecognitionException
*/
public EntryPointDeclarationDescr entryPointDeclaration( DeclareDescrBuilder ddb ) throws RecognitionException {
EntryPointDeclarationDescrBuilder declare = null;
try {
declare = helper.start( ddb,
EntryPointDeclarationDescrBuilder.class,
null );
String ep = "";
match( input,
DRLLexer.ID,
DroolsSoftKeywords.ENTRY,
null,
DroolsEditorType.KEYWORD );
if ( state.failed ) return null;
match( input,
DRLLexer.MINUS,
null,
null,
DroolsEditorType.KEYWORD );
if ( state.failed ) return null;
match( input,
DRLLexer.ID,
DroolsSoftKeywords.POINT,
null,
DroolsEditorType.KEYWORD );
if ( state.failed ) return null;
ep = stringId();
if ( state.failed ) return null;
if( state.backtracking == 0 ) {
declare.entryPointId( ep );
}
while ( input.LA( 1 ) == DRLLexer.AT ) {
// annotation*
annotation( declare );
if ( state.failed ) return null;
}
match( input,
DRLLexer.ID,
DroolsSoftKeywords.END,
null,
DroolsEditorType.KEYWORD );
if ( state.failed ) return null;
} catch ( RecognitionException re ) {
reportError( re );
} finally {
helper.end( EntryPointDeclarationDescrBuilder.class,
declare );
}
return (declare != null) ? declare.getDescr() : null;
}