* @return
* @throws RecognitionException
*/
private String stringId() throws RecognitionException {
if ( input.LA( 1 ) == DRL5Lexer.ID ) {
Token id = match( input,
DRL5Lexer.ID,
null,
null,
DroolsEditorType.IDENTIFIER );
if ( state.failed ) return null;
return id.getText();
} else if ( input.LA( 1 ) == DRL5Lexer.STRING ) {
Token id = match( input,
DRL5Lexer.STRING,
null,
null,
DroolsEditorType.IDENTIFIER );
if ( state.failed ) return null;
return StringUtils.unescapeJava( safeStripStringDelimiters( id.getText() ) );
} else {
throw new MismatchedTokenException( DRL5Lexer.ID,
input );
}
}