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
(Continue reading)

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
Oleg Sivokon | 2 Jul 21:28 2014
Picon

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

Hi list,
I'm getting this message:

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

After I thought I've compiled a simple grammar for a mode that I'm
trying to test. Below is the initialization mode stuff:

(define-derived-mode fmt-mode fundamental-mode
  "Common Lisp Format mode"
  "Major for highlighting of Common Lisp format mini-language
This mode uses its own keymap:
\\{fmt-mode-map}"
  (kill-all-local-variables)
  (setq major-mode 'fmt-mode)
  (use-local-map fmt-mode-map)
  (setf mode-name "Common Lisp Format")
  (run-hooks 'fmt-mode-hook)
  (semantic-mode 1))

Nothing fancy, I'm sure it reaches the (semantic-mode 1) call.

I have a fmt.wy file from which I can generate a ftm-wy.el which has the
following: 

(defun fmt-wy--install-parser ()
  "Setup the Semantic Parser."
  (semantic-install-function-overrides
   '((parse-stream . wisent-parse-stream)))
  (setq semantic-parser-name "LALR"
        semantic--parse-table fmt-wy--parse-table
        semantic-debug-parser-source "fmt.wy"
        semantic-flex-keywords-obarray fmt-wy--keyword-table
        semantic-lex-types-obarray fmt-wy--token-table)
  ;; Collect unmatched syntax lexical tokens
  (semantic-make-local-hook 'wisent-discarding-token-functions)
  (add-hook 'wisent-discarding-token-functions
            'wisent-collect-unmatched-syntax nil t))

(define-lex wisent-fmt-lexer
  "Lexical analyzer that handles Common Lisp format."
  semantic-lex-ignore-newline
  semantic-lex-ignore-comments
  semantic-lex-default-action)

(provide 'fmt-wy)

I can require fmt-wy allright (it gives some warnings, but they don't
seem to be important) But now parsing seems to be happening in the test
file I'm trying to edit. What did I have to do beside what I've done?

Also, how would I debug reduce conflicts? Is there any way to make
Semantic more verbose when reporting them? The report of having a reduce
conflic is really like pointing a finger at the sky... unless you give a
hint about what terminals or rules are in conflict.

Lastly, sorry I put many issues together! Is there a way to create
character classes, such as, for example "any character but tilda"? Well,
actually, negation would help my case too, but just for general
knowledge I'd like, if possible, to know the answer to the character
classes question too!

Thanks,

Oleg

------------------------------------------------------------------------------
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
Tu Do | 22 Jun 07:52 2014
Picon

How to activate VCS projects with EDE?

Hi Eric,

I am using the ede-ldf branch, but I don't know how to use the VCS feature in EDE. When I run ede-new, it gives additional projects such as GNUSteps aside from the old ones like Arduino, Make and Automake.

How do I make EDE automatically recognize a VCS project?

Thanks,

Tu.
------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Cedet-devel mailing list
Cedet-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cedet-devel
Zach | 19 Jun 03:58 2014
Picon

Re: Error loading projects: eieio-persistent-validate/fix-slot-value: Wrong type argument: arrayp, nil

Yep, now it's working.

On 06/18/2014 07:00 PM, Eric M. Ludlam wrote:
> Interesting. We have tests for that basic case which have been passing 
> for years in the CEDET repository.
>
> I don't know much about stock emacs.  I'll take a wild guess that 
> 'ede-proj-target-makefile-program' is somehow not getting loaded and 
> being available to be tested against.
>
> It may be that:
>
> (require 'ede/proj)
> (require 'ede/proj- <add stuff here>)
>
> where <add stuff here> is the proj-prog, proj-obj, proj-shared, etc as 
> found in the ede lisp directory.
>
> ie
> M-x locate-library RET ede
> C-x C-f ede/ RET
>
> Now look for proj-* files.
>
> If that gets stuff working again, then the real problem is that 
> loaddefs isn't working correctly or something similar.
>
> Eric
>
> On 06/18/2014 07:34 PM, Zach wrote:
>> It happens with any project I create, I've tried Makefile and Automake
>> projects. That backtrace is from an empty test program I made just for
>> this purpose. I have not edited any of the generated files.
>>
>> On 06/18/2014 04:45 PM, Eric M. Ludlam wrote:
>>> Hi Zach,
>>>
>>> The EDE project system tries to protect against bogus project files by
>>> testing everything before it is evaluated.
>>>
>>> Do you have a way to reproduce the problem via creating a project,
>>> saving it, and then loading it in?
>>>
>>> Did you hand-edit the .ede file?
>>>
>>> Thanks
>>> Eric
>>>
>>> On 06/17/2014 10:39 PM, Zach wrote:
>>>> I am getting this error when I try to load a project.
>>>> I'm using Emacs 24.3.1 and the built-in version of CEDET.
>>>>
>>>> Here's the backtrace:
>>>>
>>>> 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 "first" :name "first" :path ""
>>>> :source (quote ("test.cpp")))))
>>>> eieio-persistent-convert-list-to-object((ede-proj-project "test"
>>>> :file "Project.ede" :name "test" :targets (list
>>>> (ede-proj-target-makefile-program "first" :name "first" :path "" 
>>>> :source
>>>> (quote ("test.cpp")))) :makefile-type (quote Makefile\.am)))
>>>> eieio-persistent-read("/home/zach/projects/test/Project.ede"
>>>> ede-proj-project)
>>>> ede-proj-load("/home/zach/projects/test/")
>>>> #[(this dir) "\30\304\"\204\305 !\204\306\307!\210\30\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/zach/projects/test/")
>>>> apply(#[(this dir) "\30\304\"\204\305 !\204\306\307!\210\30\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/zach/projects/test/"))
>>>> 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/zach/projects/test/")
>>>> ede-load-project-file("/home/zach/projects/test/" ROOT)
>>>> ede-initialize-state-current-buffer()
>>>> ede-minor-mode(1)
>>>> ede-turn-on-hook()
>>>> run-hooks(find-file-hook)
>>>> after-find-file(nil t)
>>>> find-file-noselect-1(#<buffer test.cpp> "~/projects/test/test.cpp"
>>>> nil nil "~/projects/test/test.cpp" (53478316 2050))
>>>> find-file-noselect("~/projects/test/test.cpp" nil nil t)
>>>> find-file("~/projects/test/test.cpp" t)
>>>> call-interactively(find-file nil nil)
>>>>
>>>> ------------------------------------------------------------------------------ 
>>>>
>>>>
>>>> HPCC Systems Open Source Big Data Platform from LexisNexis Risk
>>>> Solutions
>>>> Find What Matters Most in Your Big Data with HPCC Systems
>>>> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
>>>> Leverages Graph Analysis for Fast Processing& Easy Data Exploration
>>>> http://p.sf.net/sfu/hpccsystems
>>>> _______________________________________________
>>>> Cedet-devel mailing list
>>>> Cedet-devel <at> lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/cedet-devel
>>>>
>>
>>

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems

Gmane