On 09/19/2013 05:38 PM, Colomban Wendling wrote:
Le 20/09/2013 02:05, Tory Gaurnier a écrit :
On 09/19/2013 03:21 PM, Colomban Wendling wrote:
Le 20/09/2013 00:07, Tory Gaurnier a écrit :
[...]

So, the issue now is I can't really figure out how to build CTags, from
what I could figure out it seems I need to run the configure script to
add values to the Makefile.in, then run make -f Makefile.in, but that
doesn't seem to work, and there are no instructions that I can find on
building, I've checked the Readme
It's in INSTALL, though a little too detailed (I guess this INSTALL file
is just Autotool's one with slight modifications)

, and the FAQ. Have any of you guys
built CTags before and can point me in the right direction???
You need to first generate the configure script using `autoreconf`, then
run that configure script (`./configure [OPTIONS]`, which will generate
Makefiles), and then run make:

     autoreconf -v && ./configure && make

Regards,
Colomban
Ok, so now when I build it, I'm getting some warning, I'm not sure if
these are normal or if something needs to be configured, I'm getting
these warnings on build:
[...]
Those are "normal" and harmless.  Actually this means the CTags guys
should fix a little thing in their configure.ac but that's no biggie and
not your problem.

Then the rest appears normal.
Good :)

Then when I run, the program segfaults on freeParserResources () at
parse.c:364
Which is this line of code: eFree (lang->name);
Which is being called from main.c:572

Now my findQMLTags function in my qml.c file is very closely following
the awk.c function findAwkTags, so I don't see how it could be caused by
this, but I may be wrong.
You should not manually set def->name, this is set by parserNew() as the
name you give it.  And the reason it segfaults is because it should be
an allocated string -- but again, you should just not touch it.

----CODE STARTS HERE----
#include "general.h"    /* always include first */

#include <string.h>     /* to declare strxxx() functions */
you should include <ctype.h> for isspace() and isalnum().

#include "parse.h"      /* always include */
#include "read.h"       /* to define file fileReadLine() */

[...]

extern parserDefinition *QMLParser(void) {
     parserDefinition* def = parserNew("QML");
     static const char *const extensions [] = { "QML", NULL };

     def->name = "QML";
here, remove this line.

     def->kinds = QMLKinds;
     def->kindCount = KIND_COUNT(QMLKinds);
     def->extensions = extensions;
     def->parser = findQMLTags;
     //def->parser2; // Not sure I will need this
parser2 is for "retry parsers", e.g. if your parser should use an
alternative algorithm or something if it encountered something in the
middle of the file.  This is rarely needed.  Fortran parser uses it to
switch to free form if struct form failed, and C one uses it to try a
different branch conditional method.

     def->regex = FALSE;
you don't need to set this, it's the default -- though, it's harmless to
set it again.

     return def;
}
----CODE ENDS HERE----
_______________________________________________
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel
Just thought I would give you guys an update, it's coming along quite nicely now, it can successfully find all the Javascript functions and QML Objects, now I'm just working on getting the IDs of the QML Objects if they exist, and I've pretty much figured out how that part's going to work.
_______________________________________________
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel

Reply via email to