Vincent Semeria | 21 Nov 10:49 2014
Picon

Semantic cannot parse a c++ enum

Hello,

In the attached c++ file which contains a simple enum and 2 functions, set the point in function main, on word seBadPassword (an entry of the enum).

Then run semantic-ia-fast-jump, which will fail to locate this entry in the enum's definition, whereas it's only 15 lines above.

Thanks,
Vincent
Attachment (BugSemanticEnum.cpp): text/x-c++src, 1544 bytes
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Cedet-devel mailing list
Cedet-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cedet-devel
Tu Do | 21 Nov 10:04 2014
Picon

Senator is not enabled for other modes except C/C++ modes

Hi Eric,

It seems like Senator is not available for any other modes that Semantic supports, other than C/C++. I don't know if it should be enabled by default in other modes supported by Sematnic? Currently, how do I enable it?

Thanks,

Tu.
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Cedet-devel mailing list
Cedet-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cedet-devel
Isak Andersson | 28 Oct 22:29 2014

Trouble opening EDE projects on Windows

Hello I'm having some issues opening projects after restarting emacs. 
EDE works just fine
before restarting emacs. So any project that I created during the 
current session works as it
should. When I try to open a file again then I get the following 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 "cybi" :name "cybi" :path "" 
:source (quote ("error.c" "lex.c" "main.c" "parse.c" "parser.c")) 
:auxsource (quote ("bool.h" "lex.h" "parse.h" "parser.h")))))
   eieio-persistent-convert-list-to-object((ede-proj-project 
"cybi-project" :file "Project.ede" :name "cybi-project" :targets (list 
(ede-proj-target-makefile-program "cybi" :name "cybi" :path "" :source 
(quote ("error.c" "lex.c" "main.c" "parse.c" "parser.c")) :auxsource 
(quote ("bool.h" "lex.h" "parse.h" "parser.h")))) 
:configuration-variables (quote (("debug" ("CFLAGS" . "-Werror -Wall 
-Wextra -std=c89 -pedantic-errors -Wmissing-prototypes 
-Wstrict-prototypes -Wold-style-definition -g"))))))
eieio-persistent-read("c:/msys64/home/usefulProgrammer/src/yig/cybi/Project.ede" 
ede-proj-project)
   ede-proj-load("c:/msys64/home/usefulProgrammer/src/yig/cybi/")
   #[(this dir) "\303\304\"\204

And if I call M-x customize-project instead I get this backtrace:

Debugger entered--Lisp error: (wrong-type-argument (or eieio-object-p 
class-p) nil)
   signal(wrong-type-argument ((or eieio-object-p class-p) nil))
   eieio-oref(nil local-variables)
   customize-project()
   call-interactively(customize-project record nil)
   command-execute(customize-project record)
   execute-extended-command(nil "customize-project")
   call-interactively(execute-extended-command nil nil)

I have tried doing the process without my .emacs file so I know that 
it's not a configuration error. Hope I can get some
help resolving this. I believe it to be a bug. I also tried it with 
Emacs 24.4 and it was the same.

Cheers!
Isak Andersson

------------------------------------------------------------------------------
Eric M. Ludlam | 24 Oct 23:42 2014

EDE Security & Config files update

Greetings,

I've continued to update EDE in the CEDET/BZR repository.  The latest 
update includes tests for EDE's security system that prevents lisp code 
(the EDE config files) from loading without asking.

Feature wise, the main change is that generic projects are now 
considered safe, and will be automatically created w/out loading of the 
config files.  If you customize a generic project, it will then ask to 
be added to the safe projects list.  If you download someone else's 
project that has a config, it will ignore it until you try to do an 
action that needs the config file, and then it will ask.  There are 
tests to keep this working which were previously lacking.

I've also made the config file handling into a utility, and the arduino 
project type now has its own config file so you can have some sketches 
for one kind of board, and other projects for a different board.  Folks 
who have a favorite project type that could benefit from a config file 
should have an easy time of getting a safe config feature working now.

Please let me know if you run into any problems with these new changes.

Thanks
Eric

------------------------------------------------------------------------------
Xaver Gerster | 8 Oct 10:20 2014
Picon

*EDE Shell v2* buffer consecutively kills other windows content

Hi,

I have an issue with the *EDE Shell v2* shell buffer: it kills my other
windows content.

When I run code using 'C-c . R' from within one of the project's
modules, a new window on the Emacs frame pops up showing the output of
the code in a 'Shell' major mode window. The corresponding buffer is
named *EDE Shell v2*.

My problem starts when I try to do this several times.
Then, the output of the code will not remain within the window which
popped up prior, but the *EDE Shell v2* buffer will consecutively
replace the content of all windows previously displaying other buffers,
until all of the Emacs frame is filled with windows displaying only the
*EDE Shell v2* buffers.

How can I force the *EDE Shell v2* buffer to display and update in only
*one* window?

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
Steven Rémot | 3 Oct 14:00 2014
Picon

Need advice for PHP class autoloading

Hello,

I am trying to support PHP class autoloading in Cedet. Unlike Java and C++ that have explicit "import" and "#include" directives, PHP behaves differently.

When it encounters a symbol it doesn't know, it will try to automatically load the class by guessing in which file it is defined. The way the file name is guessed and loaded is implemented by the user, in PHP, by registering an "autoload" function that takes the class name as parameter, and includes the definition file. For example :

  <?php
  // Directly taken from PHP official documentation
  function my_autoloader($class) {
      include 'classes/' . $class . '.class.php';
  }

  spl_autoload_register('my_autoloader');

There are several loading conventions. For example, the PSR-4 convention will autoload the class "\Foo\Bar" by including a file with a name like "<foo-namespace-dir>/Bar.php"

Supporting this functionnality in Cedet would be very helpful to have completion and smart jump accross sources, so I tried to implement it. What I done is first creating a new project type, inspired by `ede-cpp-project-root', in which the user can specify its autoloading configuration like this :

  (ede-php-root-project "Test project"
                          :file "~/test-project/.projectile"
                          :class-autoloads '(:psr4 (("MyNs" . "src/MyNs"))))

Then, I override  `semantic-ctxt-scoped-types' to detect references to types in scope. For example, in this code :

  <?php
  class SuperUser extends User
  {
      public function setName(UserName $name)
      {
          $this->[] // cursor here
      }
  }

It will gather "UserName" and "User" as referenced types.

Then `semantic-ctxt-scoped-types' guesses according to current project's configuration where these classes are defined, and return all the files' tags.

This first approach succeeded, but it requires to code by hand a detection method for each kind of type reference. Moreover, for example, if the class "User" has a superclass, it currently won't be loaded. I must add some recursive loading to it.

What do you think about this approach ? Is there a better way to do this kind of autoloading ?

Regards,
Steven Rémot
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Cedet-devel mailing list
Cedet-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cedet-devel
Andrey Torba | 28 Sep 01:14 2014
Picon

python imports

Hello CEDET developers,

I'm investigating how to parse python's imports for the cases:

1. from ... import <classes> (works well in current implementation)
  Example:
  from a.b.c import Class1, Class2

2. from ... import <modules> (doesn't work)
  Example:
  from a.b.c import module1, module2

  In this case parser must create:
    - two INCLUDE-TAGs: 'a.b.c.module1' and 'a.b.c.module2'.

When we import something we don't know if it is module or class or function... So include-tag should be 'a.b.c.something', 'a.b.c.class1', 'a.b.c.module1'. And then in the functions 'semantic-dependency-find-file-on-path' and 'semantic-tag-include-filename' we can guess which file to open:
  - a/b/c/something.py
  - a/b/c.py   class:something
  - a/b/c/__init__.py    class:something

My question is: how can i build the grammar which makes 2 include tags from the string: 'from a.b.c import module1, module2'. I need to remember context ('a.b.c') and then build a full module path (format "%s.%s" "a.b.c" "module1") ?

Thanks,
-Andrey
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Cedet-devel mailing list
Cedet-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cedet-devel
Eric Ludlam | 26 Sep 01:33 2014
Picon

Re: request: add const member function flag for C++

  On 09/24/2014 07:21 AM, Oleh wrote:
> Hi Eric,
>
> Thanks for the patch. The recursive template parameters work for this case.
> I'll keep using it to see if any problems come up in more complex cases.
>
>>>       #include<vector>
>>>
>>>       template<int dim>
>>>       class Point
>>>       {
>>>       };
>>>
>>>       class ABC
>>>       {
>>>           template<int dim>   bool test(std::vector<Point<dim>   >   x);
>>>       };
>>>
> However, while the "dim" in "std::vector<Point<dim>  >" is correctly
> parsed, the "dim" in "template<int dim>" isn't parsed.
> Instead this is produced:
>
>      ("test" function
>                        (:template
>                         (("int" type nil nil nil))
>                         :type "bool" :arguments
>                         ...)
>
> while I would expect something like this:
>
>      ("test" function
>                        (:template
>                         (("dim" variable (:type ("int" type nil nil nil))))
>                         :type "bool" :arguments
>                         ...)
>
> i.e. template arguments should be parsed similar to :arguments of a function.
>

Hi Oleh,

I've submitted a patch for the previous thing you emailed me, and to add 
the extra detail of "dim" into the template tags that you note above.

I did not change the template value from a TYPE tag to a VARIABLE tag 
because the current completion engine depends on the original 
structure.  Instead I just put a :varname into the type so it is there.

David Engster did most of the template handling in the smart completion 
engine.  Changing things around a bit would be something he'd have 
better advice on.

Eric

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
Zack | 25 Sep 19:46 2014
Picon

Cross compiler project setup help

Hello-

I'm looking for help getting a cross compiler environment working
through CEDET/EDE/Semantic. Right now I'm using Eclipse and it's giving
me fits... it works erratically and I've been unable to get my multiple
development machines to work alike. So I'd really like to use CEDET, but
I'm struggling with it and probably missing the obvious.

My first environment I'd like to get working is avr-gcc (simpler to
start with, I'm thinking, than the arm-eabi toolchain). From my
understanding of the documentation, I need to define another
ede-$NAME-compiler for avr-gcc.  Those are defined in ede/proj-obj.el
but should I edit that directly, or is there a method for declaring that
new compiler in my personal config? 

And before this goes any further, I want to make sure I'm not barking
completely up the wrong tree. I'd really like to be able to set up the
EDE project with the correct MCU compiler flags and have Semantic
correctly index the relevant code (not a huge problem with AVRs, but a
headache with Cortex processors).

I'm running emacs 24.3.1 and CEDET from git. 

Thanks!
Z

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
Tu Do | 15 Sep 13:53 2014
Picon

How to integrate external parser

Hi Eric,

If I want to create external parser, for example based on Clang, and generate Semantic compatible tags for indexing an existing project, where should I start? What parts of Semantic should I have a look? 

Thanks,

Tu.
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Cedet-devel mailing list
Cedet-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cedet-devel
rsgodcraftriot | 13 Sep 05:14 2014
Picon

C structs and Semantic aren't working well together


Well, as the subject says, C structs are broken in Semantic.

Take the code for example:

struct Foo
{
        int Bar;
}

int main()
{
        struct Foo Baz;
        Ba -- Cannot find completion for `"Ba"'
        Baz. -- Cannot find types for `"Ba"'
        return 0
}

What makes it even weirder is that it pretty much works(?, I haven't
tried structs on headers, but functions on headers works), except for
the fact that if you declare a struct inside the code itself, it fails.

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk

Gmane