private AttributeDescr stringAttribute(AttributeSupportBuilder<?> as,
            String[] key) throws RecognitionException {
        AttributeDescrBuilder<?> attribute = null;
        try {
            StringBuilder builder = new StringBuilder();
            for (String k : key) {
                if ("-".equals(k)) {
                    match(input,
                            DRL6Lexer.MINUS,
                            k,
                            null,
                            DroolsEditorType.KEYWORD); // part of the keyword
                    if (state.failed)
                        return null;
                } else {
                    match(input,
                            DRL6Lexer.ID,
                            k,
                            null,
                            DroolsEditorType.KEYWORD);
                    if (state.failed)
                        return null;
                }
                builder.append(k);
            }
            if (state.backtracking == 0) {
                attribute = helper.start((DescrBuilder<?, ?>) as,
                        AttributeDescrBuilder.class,
                        builder.toString());
            }

            Token value = match(input,
                    DRL6Lexer.STRING,
                    null,
                    null,
                    DroolsEditorType.STRING_CONST);
            if (state.failed)
                return null;
            if (state.backtracking == 0) {
                attribute.value(StringUtils.unescapeJava(safeStripStringDelimiters(value.getText())));
                attribute.type(AttributeDescr.Type.STRING);
            }
        } finally {
            if (attribute != null) {
                helper.end(AttributeDescrBuilder.class,
                        attribute);
            }
        }
        return attribute != null ? attribute.getDescr() : null;
    }
private AttributeDescr stringAttribute ( AttributeSupportBuilder < ? > as , String [ ] key ) throws RecognitionException { AttributeDescrBuilder < ? > attribute = null ; try { StringBuilder builder = new StringBuilder ( ) ; for ( String k : key ) { if ( "-" . equals ( k ) ) { match ( input , DRL6Lexer . MINUS , k , null , DroolsEditorType . KEYWORD ) ; if ( state . failed ) return null ; } else { match ( input , DRL6Lexer . ID , k , null , DroolsEditorType . KEYWORD ) ; if ( state . failed ) return null ; } builder . append ( k ) ; } if ( state . backtracking == 0 ) { attribute = helper . start ( ( DescrBuilder < ? , ? > ) as , AttributeDescrBuilder . class , builder . toString ( ) ) ; } Token value = match ( input , DRL6Lexer . STRING , null , null , DroolsEditorType . STRING_CONST ) ; if ( state . failed ) return null ; if ( state . backtracking == 0 ) { attribute . value ( StringUtils . unescapeJava ( safeStripStringDelimiters ( value . getText ( ) ) ) ) ; attribute . type ( AttributeDescr . Type . STRING ) ; } } finally { if ( attribute != null ) { helper . end ( AttributeDescrBuilder . class , attribute ) ; } } return attribute != null ? attribute . getDescr ( ) : null ; }
stringAttribute := attributeKey STRING
@param key
@throws org.antlr.runtime.RecognitionException