drkm | 1 Nov 21:50 2005
Picon

[EIEIO] Using 'setf' on a slot accessor

  Hi

  In the past few months, I unfortunately can't work a lot with
EIEIO [1].  Today, I surprisingly found the following error while
trying to use 'setf' on a slot accessor function:

    ELISP> (defclass A () ((s :initarg :s :accessor get-s)))
    [defclass A nil nil
      ...]
    ELISP> (setf (get-s (A "name" :s 'value)) 'new-value)
    *** Eval error ***  Invalid slot name: "#<A name>", get-s
    ELISP> 

  I found nowhere if this is valid or not.  Is it?

  [1] Erik, did FSF say you I signed the copyright assignment?

--drkm

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
Eric M. Ludlam | 2 Nov 02:34 2005

Re[1]: [EIEIO] Using 'setf' on a slot accessor

>>> drkm <darkman_spam <at> yahoo.fr> seems to think that:
>  Hi
>
>  In the past few months, I unfortunately can't work a lot with
>EIEIO [1].  Today, I surprisingly found the following error while
>trying to use 'setf' on a slot accessor function:
>
>    ELISP> (defclass A () ((s :initarg :s :accessor get-s)))
>    [defclass A nil nil
>      ...]
>    ELISP> (setf (get-s (A "name" :s 'value)) 'new-value)
>    *** Eval error ***  Invalid slot name: "#<A name>", get-s
>    ELISP> 
>
>  I found nowhere if this is valid or not.  Is it?

It probably should be.  The setf macro is in eieio.el line 519, and I
don't really know how it works.

>  [1] Erik, did FSF say you I signed the copyright assignment?
  [ ... ]

I have had no news of your assignment.  I've gotten email confirmation
about my own assignments, but no paper mail in return.  I was told by
rms to ask tedt <at> gnu.org to learn about if any such mail arrives, but
got actual email from copyright-clerk <at> fsf.org, which seems like a
better choice of email addresses.

Thanks
Eric
(Continue reading)

drkm | 2 Nov 10:19 2005
Picon

RE: Re[1]: [EIEIO] Using 'setf' on a slot accessor

Eric M. Ludlam wrote:

> >>> drkm seems to think that:

> It probably should be.  The setf macro is in eieio.el line 519, and I
> don't really know how it works.

  Ok, thanks.  I didn't really look for.  I guess there is a typo.  See
the patch at the end of the email.

> >  [1] Erik, did FSF say you I signed the copyright assignment?

> I have had no news of your assignment.  I've gotten email
> confirmation
> about my own assignments, but no paper mail in return.  I was told by
> rms to ask tedt <at> gnu.org to learn about if any such mail arrives, but
> got actual email from copyright-clerk <at> fsf.org, which seems like a
> better choice of email addresses.

  I've receive an email for my assignments, too.  This email had a PDF
file attached, wich is a scan of the both-parties signatures.  If I
remember well, no paper will be send, until explicit demand.  I'll
forward you this PDF.

  Here is the patch:

--- eieio.el-OLD	2005-11-02 10:10:06.955731200 +0100
+++ eieio.el	2005-11-02 10:10:16.930073600 +0100
 <at>  <at>  -522,8 +522,8  <at>  <at> 
 	      (eval (macroexpand
(Continue reading)

drkm | 5 Nov 20:41 2005
Picon

[EIEIO] 'initialize-instance' SLOTS arg is a list of list

  Hi

  From (info "(eieio)Default Superclass"):

     - Function: initialize-instance obj &rest slots
         Initialize OBJ.  Sets slots of OBJ with SLOTS which is a
         list of name/value pairs.  These are actually just
         passed to `shared-initialize'.

  But this method effectively receive a list of list.  More
precisely a list of a single element, itself a property list of
slots names and values (I'm not sure its the same as "name/value
pairs", which sounds more like an alist to me):

    ELISP> (defclass A () ((a :initarg :a)))
    [defclass A nil nil ...]
    ELISP> (defmethod initialize-instance ((obj A) &rest slots)
             (message "Slots: %S" slots))
    initialize-instance
    ELISP> (make-instance 'A "name" :a 'a)
    [object A "name" unbound]
    ELISP> 

  In the echo area:

    Slots: ((:a a))

  The 'constructor' static method call 'initialize-instance' like
this:

(Continue reading)

klaus.berndl | 8 Nov 11:51 2005
Picon

AW: [ECB-list] Navigating case labels

AFAIK this is not possible because the underlying parsing engine does not support it.
Eric, please correct me, if i tell nonsense ;-)

AFAIK in general the wisent-parser would allow to parse not only the methods etc.. but
also do a full parsing of the method-bodies. But currently the C++-parser is not based
on the wisent engine but still on the old bovine-engine and the latter one is not
able to parse method-bodies. If someone ports the C++-parser to the wisent-engine and
enhance then the new parser also parsing the bodies, then ECB could offer the informations
you aksed for... but i would not hold my breath ..... ;-)

Ciao,
klaus


-----Ursprüngliche Nachricht-----
Von: ecb-list-admin <at> lists.sourceforge.net im Auftrag von Brendan Hanna
Gesendet: Do 03.11.2005 05:46
An: ecb-list <at> lists.sourceforge.net
Betreff: [ECB-list] Navigating case labels

Greetings all,

I have just come around to using ECB and was wondering
if there was a way a navigating functions using flow
control statements, such as switch/case labels.

I am working with C++ code that has some functions
with big switch(){} statements in them. It would be
nice to be able to expand a function name in the
methods window and be able to navigate to a particular
case label within the function from the methods
window.

Does anybody know if this functionality is already
available in ECB, and if so how to enable it?

Thanks

Brendan


               
____________________________________________________
Do you Yahoo!?
Never miss an Instant Message - Yahoo! Messenger for SMS
http://au.mobile.yahoo.com/mweb/index.html


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Ecb-list mailing list
Ecb-list <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecb-list


Eric M. Ludlam | 10 Nov 13:24 2005

Punkin Chunk

Hi all,

  I haven't been very communicative on this mailing list lately.  As
happens every year, I've been getting ready for the annual Punkin
Chunk.  That is now over, and you can read all about this years'
adventure at this URL:

http://www.siege-engine.com/PunkinChunk2005.shtml

Enjoy
Eric

--

-- 
          Eric Ludlam:                 zappo <at> gnu.org, eric <at> siege-engine.com
   Home: http://www.ludlam.net            Siege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net               GNU: www.gnu.org

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
Joakim Verona | 14 Nov 13:17 2005
Picon

semanticdb-default-save-directory

I have this in my .emacs:

 '(semanticdb-default-save-directory "$HOME/semantic")

added with a normal customize operation.
However, files do not appear there. 

How do I debug this?

--

-- 
Joakim Verona
www.verona.se

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
drkm | 14 Nov 22:43 2005
Picon

Re: semanticdb-default-save-directory

Joakim Verona writes:

> I have this in my .emacs:

>  '(semanticdb-default-save-directory "$HOME/semantic")

> added with a normal customize operation.
> However, files do not appear there. 

  Mmh, what exactly appears in your ~/.emacs.el?  If it's exactly
what you show above, it's normal.  This creates a list, of two
elements, a symbol and a string, and then throw away this list.
Maybe you can make your ~/.emacs.el available on the web, at
least temporarily, in order to have a look at it.

  You can simply use this:

    (setq semanticdb-default-save-directory "~/semantic")

--drkm

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
Suraj Acharya | 16 Nov 23:44 2005
Picon

semantic-get-local-variables and wisent-java

semantic-get-local-variables seems to be broken for me when using the Java 1.5 wisent parser in cedet 1.0pre3

Debugger entered: (((("className" 15214 . 15244) variable (:type "String") (reparse-symbol local_variable_declaration) [15207 15244])))
  byte-code("ÁÂ!?!? [tag message "A Rule must return a single tag-line list!" debug] 2)
  semantic--tag-expand(((("className" 15214 . 15244) variable (:type "String") (reparse-symbol local_variable_declaration) [15207 15244])))
  semantic-repeat-parse-whole-stream(((IDENTIFIER 15207 . 15213) (IDENTIFIER 15214 . 15223) (EQ 15224 . 15225) (STRING_LITERAL 15226 . 15244) (SEMICOLON 15244 . 15245) (IF 15254 . 15256) (LPAREN 15257 . 15258) (IDENTIFIER 15258 . 15262) (DOT 15262 . 15263) (IDENTIFIER 15263 . 15269) (GT 15270 . 15271) (NUMBER_LITERAL 15272 . 15273) (RPAREN 15273 . 15274) (IDENTIFIER 15287 . 15296) (EQ 15297 . 15298) (IDENTIFIER 15299 . 15303) (LBRACK 15303 . 15304) (NUMBER_LITERAL 15304 . 15305) (RBRACK 15305 . 15306) (SEMICOLON 15306 . 15307) (IDENTIFIER 15316 . 15324) (LPAREN 15324 . 15325) (IDENTIFIER 15325 . 15334) (COMMA 15334 . 15335) (BOOLEAN_LITERAL 15336 . 15340) (COMMA 15340 . 15341) (BOOLEAN_LITERAL 15342 . 15346) (COMMA 15346 . 15347) (IDENTIFIER 15348 . 15354) (DOT 15354 . 15355) (IDENTIFIER 15355 . 15358) (RPAREN 15358 . 15359) (SEMICOLON 15359 . 15360)) block_statement t)
  semantic-parse-region-default(15198 15365 block_statement nil t)
  semantic-parse-region(15198 15365 block_statement nil t)
  semantic-get-local-variables-java-mode()
  semantic-get-local-variables()
  eval((semantic-get-local-variables))
  eval-expression((semantic-get-local-variables) nil)


This was from within a method that looked like this :

    public static void main (String [] args) {
        String className = "Usages|jde.util.";
        if (args.length > 0)
            className = args[0];
        findSubs(className, true, true, System.out);
    }

but it seems to fail with any method that defines local variables. For methods with no locals, semantic-get-local-variables correctly
returns nil without throwing any errors.

Suraj

David PONCE | 17 Nov 10:24 2005
Picon

Re: semantic-get-local-variables and wisent-java

Hi Suraj,

> semantic-get-local-variables seems to be broken for me when using
> the Java 1.5 wisent parser in cedet 1.0pre3
[...]

Oops you're right.  In fact I introduced that bug in my last change to
the grammar to handle the definitions of anonymous classes.  
I committed a fix to wisent-java.wy in CVS.

Copy the new version in your local cedet/semantic/wisent directory,
then, in that directory, run 'make wy' to recompile the grammar.

Thanks for your report.

Sincerely,
David

-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click

Gmane