<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 09/17/2013 06:45 PM, Matthew Brush
wrote:<br>
</div>
<blockquote cite="mid:523905AB.10601@codebrainz.ca" type="cite">On
13-09-17 03:59 PM, Tory Gaurnier wrote:
<br>
<blockquote type="cite">[...]
<br>
I didn't realize I'd have to create the lexer myself. Is it
possible to use the C lexer that's already in Geany and then
work it into the QML file type? The only thing I really want to
get working is the symbol list (which would be the ctags thing
you refered to if I'm not mistaken, right?).
<br>
<br>
</blockquote>
<br>
You could look at the CTags tutorial about extending[1], it has an
example for writing a "regex-based" parser which will probably be
quite a bit easier for a language like QML, if maybe less powerful
than a character-based parser.
<br>
<br>
Cheers,
<br>
Matthew Brush
<br>
<br>
[1] <a class="moz-txt-link-freetext" href="http://ctags.sourceforge.net/EXTENDING.html">http://ctags.sourceforge.net/EXTENDING.html</a>
<br>
<br>
_______________________________________________
<br>
Devel mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Devel@lists.geany.org">Devel@lists.geany.org</a>
<br>
<a class="moz-txt-link-freetext" href="https://lists.geany.org/cgi-bin/mailman/listinfo/devel">https://lists.geany.org/cgi-bin/mailman/listinfo/devel</a>
<br>
</blockquote>
Ok, so I've been looking at the CTags tutorial you posted, and it
really looks pretty easy, especially using regex, but there is one
thing I can't find. Would you happen to know if when using regex
it's possible to have mulitple regexes? For example, the tutorial
has this:<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<pre style="color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><code>addTagRegex (language, "^def[ \t]*([a-zA-Z0-9_]+)", "\\1", "d,definition", NULL);</code></pre>
Which is using the regex to create tags labelled 'definition'
(unless I'm missing something). But since QML supports javascript I
at the very least want to have it recognize Items/Components, and
functions. And I'd eventually like to have it label the
Items/Components by ID if it's present.<br>
<br>
Now I know there's also the callback method, but for now, do you
know if it will work to have addTagRegex appear multiple times? <br>
<br>
Also, I can't seem to find anything on how I'll even test this, do
you know if ctags can maybe be run from terminal or something???<br>
<br>
Anyways, I know I'm asking a lot of questions, so thanks for all the
help.<br>
</body>
</html>