private String findParserName ( final String grammar ) { final String parserBegin = "PARSER_BEGIN\\s*\\(\\s*([^\\s\\)]+)\\s*\\)" ; final Matcher matcher = Pattern . compile ( parserBegin ) . matcher ( grammar ) ; if ( matcher . find ( ) ) { return matcher . group ( 1 ) ; } return "" ; }
Extracts the simple parser name from the specified grammar file .