zijianyue | 27 Aug 18:34 2014

code between #if #endif seems not be parsed

HI:
    As the pics below show,the code between #if #endif not be parsed.Please help!
My .emacs is in the attachment.




The version of emacs and cedet (stand alone):
----------------
GNU Emacs 24.4.50.1 (i686-pc-mingw32) of 2014-08-24 on ZIJIANYUE-PC

CEDET Version: 2.0
Requested File Loaded
Package Version Version Version
----------------------------------------------------------
cedet: 2.0 ok ok
eieio: 1.4 ok ok
semantic: 2.2 ok ok
srecode: 1.2 ok ok
ede: 1.2 2.0 2.0
cogre: 1.2 ok Not Loaded
cedet-contrib: 1.2 ok Not Loaded


C-h f cedet-version RET
for details on output format. 

zijianyue
Attachment (.emacs): application/octet-stream, 30 KiB
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Cedet-devel mailing list
Cedet-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cedet-devel
Eric M. Ludlam | 24 Aug 18:56 2014

EDE Locate Dominating File branch merged to trunk

I merged the ede-ldf branch into trunk today.  I've been using the 
branch for a while, and it seems to be working well.

When you next update from CEDET/bzr trunk, you will need to do a:

make clean-all

before compiling CEDET due to the large number of changes.

buildbot had a couple problems I was able to resolve but it is still 
having a little trouble I'm not sure how to resolve.

Let me know if you run into problems using the update.
Thanks
Eric

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
Steven Rémot | 23 Aug 18:02 2014
Picon

[PATCH] Extended PHP support

Hello,

I have been working for some weeks on improving PHP support in CEDET. So 
far, I have added:

- Parsing of namespaces declarations
- Parsing of aliases declarations
- Parsing of namespaced names
- Parsing of optional type hints for function arguments
- Proper parsing of class fields and constants
- completion of tags declared in the same file (it also includes the 
special values $this, self and static)

It still lacks a lot of functionnalities, but I think I got enough 
improvements to give you this version.

I don't really know what is the preferred format for substantial 
contributions, so I sent witht this mail an archive containing the 
commit history generated by "git format-patch". It seems to be 
compatible with bazaar.

For more convenience, you can see the changes on my fork of the git 
repository :
https://bitbucket.org/stevenremot/cedet

I am at your service for any remark on my work.

All the best,
Steven Rémot
Attachment (patches-php-support.tar.bz2): application/x-bzip, 11 KiB
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Cedet-devel mailing list
Cedet-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cedet-devel
Xaver Gerster | 17 Aug 19:58 2014
Picon

eieio-persistent-validate/fix-slot-value: Wrong type argument: arrayp, n

Hi,

I am haunted by a:

eieio-persistent-validate/fix-slot-value: Wrong type argument: arrayp, nil

error, when trying to load a previously created project, or when trying
to load files from such projects. Currently I cannot use ede at all. In
the following I will describe a stripped down procedure how this error
occurs on my system. Any help would be most appreciated.

Regards,
Xaver

Prolog:
-------
- I'm running GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, GTK+ Version
3.10.4)

- Torso of an init.el:

(global-ede-mode 1)
(setq ede-project-directories t)

Step 1
------
- Created new empty directory 'khl'
- Started emacs in this directory
- Used ede-new to generate new Automake project
- Created single target 'mmm', type program, named 'tessi' in directory
'khl'
- Added single *.cc file 'test.cc' to target 'mmm':

int main() {
  return 0;
}

- The Project.ede files then reads:

;; Object mmm
;; EDE Project Files are auto generated: Do Not Edit
(ede-proj-project "mmm"
  :file "Project.ede"
  :name "mmm"
  :targets (list
   (ede-proj-target-makefile-program "tessi"
    :name "tessi"
    :path ""
    :source '("test.cc")
    )
   )
  :makefile-type 'Makefile.am
  )

- Compiled the project with C-c . C
- After that the directory 'khl' contains

drwxr-xr-x  4 xxxxxx users   4096 Aug 11 19:29 ./
drwxr-xr-x 89 xxxxxx users   4096 Aug 11 13:50 ../
-rw-r--r--  1 xxxxxx users  38803 Aug 11 19:26 aclocal.m4
-rw-r--r--  1 xxxxxx users     33 Aug 11 19:26 AUTHORS
drwxr-xr-x  2 xxxxxx users   4096 Aug 11 19:29 autom4te.cache/
-rw-r--r--  1 xxxxxx users      1 Aug 11 19:26 ChangeLog
-rw-r--r--  1 xxxxxx users    722 Aug 11 19:26 config.h
-rw-r--r--  1 xxxxxx users    625 Aug 11 19:26 config.h.in
-rw-r--r--  1 xxxxxx users  11523 Aug 11 19:29 config.log
-rwxr-xr-x  1 xxxxxx users  32424 Aug 11 19:29 config.status*
-rwxr-xr-x  1 xxxxxx users 133851 Aug 11 19:29 configure*
-rw-r--r--  1 xxxxxx users    479 Aug 11 19:26 configure.ac
-rw-r--r--  1 xxxxxx users  35147 Aug 11 19:26 COPYING
-rwxr-xr-x  1 xxxxxx users  23566 Aug 11 19:26 depcomp*
drwxr-xr-x  2 xxxxxx users   4096 Aug 11 19:26 .deps/
-rw-r--r--  1 xxxxxx users  15749 Aug 11 19:26 INSTALL
-rwxr-xr-x  1 xxxxxx users  13997 Aug 11 19:26 install-sh*
-rw-r--r--  1 xxxxxx users  27662 Aug 11 19:29 Makefile
-rw-r--r--  1 xxxxxx users    373 Aug 11 19:26 Makefile.am
-rw-r--r--  1 xxxxxx users  28016 Aug 11 19:29 Makefile.in
-rwxr-xr-x  1 xxxxxx users   6873 Aug 11 19:26 missing*
-rw-r--r--  1 xxxxxx users     17 Aug 11 19:26 NEWS
-rw-r--r--  1 xxxxxx users    291 Aug 11 19:25 Project.ede
-rw-r--r--  1 xxxxxx users      1 Aug 11 19:26 README
-rw-r--r--  1 xxxxxx users     30 Aug 11 19:29 stamp-h
-rw-r--r--  1 xxxxxx users     23 Aug 11 19:29 stamp-h1
-rwxr-xr-x  1 xxxxxx users  12887 Aug 11 19:26 tessi*
-rw-r--r--  1 xxxxxx users     27 Aug 11 19:26 test.cc
-rw-r--r--  1 xxxxxx users   2928 Aug 11 19:26 test.o

- The program can be run with C-c . R with no error.
- * Now I close emacs * !!

Step 2
------

- Start emacs
- Trying to load the project in 'khl' I get the error:

eieio-persistent-validate/fix-slot-value: Wrong type argument: arrayp, nil

- If I toggle the debugger: M-x toggle-debug-on-error RET
  and try to load the project in 'khl' I get

Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
  child-of-class-p(ede-proj-target-makefile-program ede-target)
  eieio-persistent-validate/fix-slot-value(ede-proj-project :targets
(list (ede-proj-target-makefile-program "tessi" :name "tessi" :path ""
:source (quote ("test.cc")))))
  eieio-persistent-convert-list-to-object((ede-proj-project "mmm" :file
"Project.ede" :name "mmm" :targets (list
(ede-proj-target-makefile-program "tessi" :name "tessi" :path "" :source
(quote ("test.cc")))) :makefile-type (quote Makefile\.am)))
  eieio-persistent-read("/home/xxxxxx/projects/khl/Project.ede"
ede-proj-project)
  ede-proj-load("/home/xxxxxx/projects/khl/")
  #[(this dir) "\303#\304\"\204##\305	!\204##\306\307!\210\303#\310\"
!\211#\204 #\306\311!\210\312\n!)\207" [this dir o eieio-oref :safe-p
ede-directory-safe-p error "Attempt to load an unsafe project (bug
elsewhere in EDE)" load-type "Project type error: :load-type failed to
create a project" ede-add-project-to-global-list] 4 "Load in the project
associated with THIS project autoload description.\nTHIS project
description should be valid for DIR, where the project will\nbe
loaded."]([object ede-project-autoload "edeproject-makefile" "Make"
ede/proj "Project.ede" "" unbound nil ede-proj-load ede-proj-project nil
t nil] "/home/xxxxxx/projects/khl/")
  apply(#[(this dir) "\303#\304\"\204##\305
!\204##\306\307!\210\303#\310\"	!\211#\204 #\306\311!\210\312\n!)\207"
[this dir o eieio-oref :safe-p ede-directory-safe-p error "Attempt to
load an unsafe project (bug elsewhere in EDE)" load-type "Project type
error: :load-type failed to create a project"
ede-add-project-to-global-list] 4 "Load in the project associated with
THIS project autoload description.\nTHIS project description should be
valid for DIR, where the project will\nbe loaded."] ([object
ede-project-autoload "edeproject-makefile" "Make" ede/proj "Project.ede"
"" unbound nil ede-proj-load ede-proj-project nil t nil]
"/home/xxxxxx/projects/khl/"))
  ede-auto-load-project([object ede-project-autoload
"edeproject-makefile" "Make" ede/proj "Project.ede" "" unbound nil
ede-proj-load ede-proj-project nil t nil] "/home/xxxxxx/projects/khl/")
  ede-load-project-file("/home/xxxxxx/projects/khl")
  ede("/home/xxxxxx/projects/khl")
  call-interactively(ede nil nil)

------------------------------------------------------------------------------
Left Right | 2 Aug 22:01 2014
Picon

Why is font-lock needed for a mode based on Semantic CFG parser?

Hi list,

Please excuse me, if I'm asking something obvious, but this question
bothered me since I've red the guide for making a mode that uses
Semantic. It says that I need to handle font-lock on my own, which, as
far as I can understand uses parsing system based on regular
expressions. It feels self-defeating to have a real CFG parser with
proper syntax analysis and still rely on regular expressions for
coloring.

So, my question is: why, and if really, isn't it possible to employ
Semantic for syntax highlighting as well as completion / syntax
checking / navigation. Do I need font-lock mode for Semantic to work
(properly)? If I may guess: is this because during editing the edited
region may not be syntactically valid and it is hard / not possible /
too costly at the moment to deal with it using Semantic?

Thanks,

Oleg

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
kostafey | 21 Jul 12:27 2014
Picon

Disable semantic-auto-parse-mode for scheme

Hi, all!

How to auto disable semantic-auto-parse-mode for scheme?
This hook is not works:

(defun my-scheme-mode-hook ()
  (semantic-idle-scheduler-mode -1))
(add-hook 'scheme-mode-hook 'my-scheme-mode-hook)
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Cedet-devel mailing list
Cedet-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cedet-devel
Tu Do | 17 Jul 08:42 2014
Picon

Command for indexing source code


Hi Eric,

Semantic usability could be improved by allowing users to parse
all the header files in advance, so they can have immediate
completions without having to wait for Semantic to parse, which is
time-consuming in a fairly large project. So, when users add new code,
it will only take a brief delay for Semantic to update.

I think this makes sense because other IDEs also perform indexing in
advance before users work on their source code.

Regards,

Tu.

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
Tu Do | 15 Jul 18:23 2014
Picon

How to properly create a Srecode template

Hi Eric,

I tried to create a template in Common Lisp like this:

set mode "lisp-mode"

context file

template read-file
----
(defun read-data ()
  (with-open-file (stream "hello")
    (let ((tmp (loop for line = (read-line stream nil :eof)
                     until (eq line :eof)
                     collect (map 'list #'parse-integer (split-sequence:split-sequence #\space line)))))
      (close stream)
      tmp)))
----

And put it in ~/.emacs.d/srt/cl.srt

I added the path ~/.emacs.d/srt to srecode-map-load-path variable to load the template. However, when I ran the command sre-insert in lisp-mode (was writing Common Lisp), my template didn't show up. But if I put it in one of the SRE templates that come with CEDET, then I can retrieve my template.

Thanks.
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Cedet-devel mailing list
Cedet-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cedet-devel
Eric M. Ludlam | 12 Jul 03:40 2014

Re: senator-next-tag: Buffer was not parsed by Semantic.

Hi Oleg,

I'm not sure how to debug the fcns you posted below.  I think they are 
ok.   Since you appear to be defining your own mode, let me instead 
annotate through how the the parsing for "dot" works which is found in 
these files:

lisp/cedet/cogre/dot-mode.el
lisp/cedet/cogre/wisent-dot.wy
lisp/cedet/cogre/wisent-dot.el

and generated file

lisp/cedet/cogre/wisent-dot-wy.el

I picked this mode because it is pretty simple, just enough to get the 
layout code of COGRE working.  It is also not installed by default in 
semantic-new-buffer-setup-functions.

Lets start in dot-mode.el:

Note the syntax table.  This part is critical for the lexer to work.  If 
you duplicated some other mode, you probably have one of these.

In cogre-dot-mode which is named such to avoid conflict with other dot 
modes.  Note it sets up comment-start and comment-start-skip - these are 
important for the lexer also.

Also note the hook running at the end.

Note the auto-mode-alist modification.

Lastly, note the mode-local-parent stuff.  That is setup to make sure 
that cogre-dot-mode is in agree with graphviz-dot-mode.  You don't need 
anything like this if your mode is standalone.

Next is wisent-dot.wy.

At the beginning is the langauage-mode setting that matches, in this 
case, the core graphviz mode which I had to make optional.  I think you 
did this correctly already.

At the end after the %% is a lexer definition.  This uses a bunch of 
default stuff, plus lexers defined in the language for keywords, etc.

You can then compile this grammar into wisent-dot-wy.el.  If you are in 
a compile debug cycle, you need to then enter wisent-dot-wy.el, and 
force eval with C-M-x several tables because the defvars carefully save 
old values if you just eval the buffer causing a no-op. :(

Last is the key piece: wisent-dot.el

Note that this pulls in wisent-dot-wy, plus wisent itself and any 
sources to functions you need to override.

The override for semantic-tag-components is important to implement if 
you have ANY tags that are compound, such as a class with fields, etc.

Note wisent-dot-setup-parser.  It installs the parser using a function 
from wisent-dot-wy.el.  That is how the parser gets pulled in.

It also sets up the lexer, extra syntax mods needed, and a few other 
rndom things such as command separators and how to convert your tag 
classes into text strings.  On the whole, the first statement and the 
first 2 variables are the most important.  The rest is optional.

Lastly are hooks to run the parser setup.

These hooks can be replaced by adding the setup function to 
semantic-new-buffer-setup-functions.

Feel free to start with the hook, and use the setup function when you 
want to make semantic support optional with your mode.

If you already did all this, it could be that your parser is broken, or 
parser recompiles are not getting loaded in correctly.  Fire up a new 
emacs and load your code and test it to avoid the recompile issue.  If 
that helps, you need to hand load variable changes from generated files.

Another good trick is to use semantic-show-parser-state-mode.  this 
shows symbols in the mode line to tell you how the parser is doing.  It 
will either refuse to start if the parser is not installed, or show % if 
the parser is broken, or if the buffer you are parsing is just not complete.

Another fun one is semantic-highlight-edits-mode which shows how the 
buffer is edited and reparsed which is helpful if the incremental parser 
is broken with your language parser.

Lastly use semantic-show-unmatched-syntax-mode to see if the parser is 
just tagging your whole buffer as unparsable.  If this happens, you need 
to work on your parser some more.

I hope this helps.
Eric

------------------------------------------------------------------------------
Tu Do | 7 Jul 07:32 2014
Picon

[Bug Report] Semantic cannot jump if the include headers are inside a macro

For example:

#ifdef USE_GTK
#include "gtkutil.h"
#ifdef HAVE_GTK3
#include <X11/Xproto.h>
#endif
#endif

You can examine the above code here: http://repo.or.cz/w/emacs.git/blob/HEAD:/src/xterm.c#l91

Semantic cannot jump to the header #include <X11/Xproto.h>, but when put it outside the #ifdef USE_GTK...#endif, Semantic can jump fine.

Tu.
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Cedet-devel mailing list
Cedet-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cedet-devel
Tu Do | 3 Jul 15:32 2014
Picon

Error on entering el files in emacs git repo

Hi Eric,

I tried to open an .el file in cloned Emacs repo at http://repo.or.cz/w/emacs.git

However, I could not and got this error:

ede-emacs-version: Search failed: "AC_INIT(emacs,\\s-*\\([0-9.]+\\)\\s-*)"

I am using your experimental ede-test CEDET. It's been great so far with the EDE enhancement on C/C++ buffers. I have a suggestion: it would be more convenient, if CEDET can leverage EDE integration with VCS. For example, instead of manually specifying include path, is it possible to make Semantic search for that file using the new EDE, and cached in SemanticDB for later use?

Thanks.

Tu.
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Cedet-devel mailing list
Cedet-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cedet-devel

Gmane