code: private AttributeDescr booleanAttribute( AttributeSupportBuilder< ? > as,
                                               String[] key ) throws RecognitionException {
          AttributeDescrBuilder< ? > attribute = null;
          try {
              StringBuilder builder = new StringBuilder();
              for ( String k : key ) {
                  if ( "-".equals( k ) ) {
                      match( input,
                             DRL5Lexer.MINUS,
                             k,
                             null,
                             DroolsEditorType.KEYWORD ); // part of the keyword
                      if ( state.failed ) return null;
                  } else {
                      match( input,
                             DRL5Lexer.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() );
              }
  
              String value = "true";
              if ( input.LA( 1 ) == DRL5Lexer.BOOL ) {
                  Token bool = match( input,
                                      DRL5Lexer.BOOL,
                                      null,
                                      null,
                                      DroolsEditorType.KEYWORD );
                  if ( state.failed ) return null;
                  value = bool.getText();
              }
              if ( state.backtracking == 0 ) {
                  attribute.value( value );
                  attribute.type( AttributeDescr.Type.BOOLEAN );
              }
          } finally {
              if ( attribute != null ) {
                  helper.end( AttributeDescrBuilder.class,
                              attribute );
              }
          }
          return attribute != null ? attribute.getDescr() : null;
      }
docs: booleanAttribute := attributeKey (BOOLEAN)?
  @param key
  @throws RecognitionException