public String packageStatement ( PackageDescrBuilder pkg ) throws RecognitionException { String pkgName = null ; try { helper . start ( pkg , PackageDescrBuilder . class , null ) ; match ( input , DRL5Lexer . ID , DroolsSoftKeywords . PACKAGE , null , DroolsEditorType . KEYWORD ) ; if ( state . failed ) return pkgName ; pkgName = qualifiedIdentifier ( ) ; if ( state . failed ) return pkgName ; if ( state . backtracking == 0 ) { helper . setParaphrasesValue ( DroolsParaphraseTypes . PACKAGE , pkgName ) ; } if ( input . LA ( 1 ) == DRL5Lexer . SEMICOLON ) { match ( input , DRL5Lexer . SEMICOLON , null , null , DroolsEditorType . SYMBOL ) ; if ( state . failed ) return pkgName ; } } catch ( RecognitionException re ) { reportError ( re ) ; } finally { helper . end ( PackageDescrBuilder . class , pkg ) ; } return pkgName ; }
Parses a package statement and returns the name of the package or null if none is defined .