<div dir="ltr"><div><br></div>Have you tried to see if the javascript lexer and parser work well enough for QML? its supposed to be based on js.<div><br></div><div>Cheers</div><div>Lex<br><div class="gmail_extra"><br><br><div class="gmail_quote">
On 19 September 2013 06:52, Matthew Brush <span dir="ltr"><<a href="mailto:mbrush@codebrainz.ca" target="_blank">mbrush@codebrainz.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On 13-09-18 11:47 AM, Tory Gaurnier wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 09/17/2013 06:45 PM, Matthew Brush wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 13-09-17 03:59 PM, Tory Gaurnier wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
[...]<br>
I didn't realize I'd have to create the lexer myself. Is it possible<br>
to use the C lexer that's already in Geany and then work it into the<br>
QML file type? The only thing I really want to get working is the<br>
symbol list (which would be the ctags thing you refered to if I'm not<br>
mistaken, right?).<br>
<br>
</blockquote>
<br>
You could look at the CTags tutorial about extending[1], it has an<br>
example for writing a "regex-based" parser which will probably be<br>
quite a bit easier for a language like QML, if maybe less powerful<br>
than a character-based parser.<br>
<br>
Cheers,<br>
Matthew Brush<br>
<br>
[1] <a href="http://ctags.sourceforge.net/EXTENDING.html" target="_blank">http://ctags.sourceforge.net/<u></u>EXTENDING.html</a><br>
<br>
______________________________<u></u>_________________<br>
Devel mailing list<br>
<a href="mailto:Devel@lists.geany.org" target="_blank">Devel@lists.geany.org</a><br>
<a href="https://lists.geany.org/cgi-bin/mailman/listinfo/devel" target="_blank">https://lists.geany.org/cgi-<u></u>bin/mailman/listinfo/devel</a><br>
</blockquote>
Ok, so I've been looking at the CTags tutorial you posted, and it really<br>
looks pretty easy, especially using regex, but there is one thing I<br>
can't find. Would you happen to know if when using regex it's possible<br>
to have mulitple regexes? For example, the tutorial has this:<br>
<br>
|addTagRegex (language, "^def[ \t]*([a-zA-Z0-9_]+)", "\\1",<br>
"d,definition", NULL);|<br>
<br>
Which is using the regex to create tags labelled 'definition' (unless<br>
I'm missing something). But since QML supports javascript I at the very<br>
least want to have it recognize Items/Components, and functions. And I'd<br>
eventually like to have it label the Items/Components by ID if it's<br>
present.<br>
<br>
Now I know there's also the callback method, but for now, do you know if<br>
it will work to have addTagRegex appear multiple times?<br>
<br>
</blockquote>
<br></div></div>
Yeah, I think you can call it multiple times, see COBOL parser, for example:<br>
<a href="https://sourceforge.net/p/ctags/code/HEAD/tree/trunk/cobol.c" target="_blank">https://sourceforge.net/p/<u></u>ctags/code/HEAD/tree/trunk/<u></u>cobol.c</a><div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Also, I can't seem to find anything on how I'll even test this, do you<br>
know if ctags can maybe be run from terminal or something???<br>
<br>
</blockquote>
<br></div>
ctags is actually a command-line (only) program, the fork we have in Geany was an attempt by the/an Anjuta developer to make it into a library for use by IDEs and such. So yeah, your best bet is to check out CTags SVN code, add your parser to it, so you can test it standalone, and also it has the advantage that it will be fully compatible with upstream CTags so you can contribute it to that project first and all of its users will be able to use CTags for QML code. Once you have it all working, it should be quite trivial to move it into Geany.<br>

<br>
Cheers,<br>
Matthew Brush<div class="HOEnZb"><div class="h5"><br>
<br>
______________________________<u></u>_________________<br>
Devel mailing list<br>
<a href="mailto:Devel@lists.geany.org" target="_blank">Devel@lists.geany.org</a><br>
<a href="https://lists.geany.org/cgi-bin/mailman/listinfo/devel" target="_blank">https://lists.geany.org/cgi-<u></u>bin/mailman/listinfo/devel</a><br>
</div></div></blockquote></div><br></div></div></div>