Re: [Geany-Devel] Interested making a patch to add QML support
On 09/17/2013 06:45 PM, Matthew Brush wrote: On 13-09-17 03:59 PM, Tory Gaurnier wrote: [...] 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?). 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. Cheers, Matthew Brush [1] http://ctags.sourceforge.net/EXTENDING.html ___ Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel 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: |addTagRegex (language, ^def[ \t]*([a-zA-Z0-9_]+), \\1, d,definition, NULL);| 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. 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? 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??? Anyways, I know I'm asking a lot of questions, so thanks for all the help. ___ Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel
Re: [Geany-Devel] RFC: Policy for Glade File Updates
On 13-09-18 09:07 AM, Nick Treleaven wrote: On 12/09/2013 01:38, Matthew Brush wrote: P.S. Are we all still agreed to using old 3.8.1 version of Glade? I think this idea of using same version sounds good, at least we won't be causing additional noise in diffs due to different versions writing stuff out in different ways. One might hope so, but 3.8.1 causes massive noise, see: http://lists.geany.org/pipermail/devel/2012-January/006418.html Yeah, that's why I was saying maybe we should do like we (ideally) do with the geany.txt file; make the changes and commit the text changes, and then as a separate commit, generate the HTML and commit the noisy one. If we did this, at least we could be sure that it won't be the next person who edits the file's job to figure out if saving the file will break it (like it will at present if anyone tries to edit it with any version of Glade). I've just seen 3.14.2 is available for windows though. In my experience, after Glade 3.8(.X) it got *much* worse; very very much slower with big files like geany.glade, and crashing so much I had to get into the habit of saving after every single action. I think I only tested up to 3.10 though, so it might've stabilized since the massive GTK3 disruptions in its code base. Cheers, Matthew Brush ___ Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel
Re: [Geany-Devel] Interested making a patch to add QML support
Have you tried to see if the javascript lexer and parser work well enough for QML? its supposed to be based on js. Cheers Lex On 19 September 2013 06:52, Matthew Brush mbr...@codebrainz.ca wrote: On 13-09-18 11:47 AM, Tory Gaurnier wrote: On 09/17/2013 06:45 PM, Matthew Brush wrote: On 13-09-17 03:59 PM, Tory Gaurnier wrote: [...] 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?). 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. Cheers, Matthew Brush [1] http://ctags.sourceforge.net/**EXTENDING.htmlhttp://ctags.sourceforge.net/EXTENDING.html __**_ Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-**bin/mailman/listinfo/develhttps://lists.geany.org/cgi-bin/mailman/listinfo/devel 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: |addTagRegex (language, ^def[ \t]*([a-zA-Z0-9_]+), \\1, d,definition, NULL);| 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. 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? Yeah, I think you can call it multiple times, see COBOL parser, for example: https://sourceforge.net/p/**ctags/code/HEAD/tree/trunk/**cobol.chttps://sourceforge.net/p/ctags/code/HEAD/tree/trunk/cobol.c 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??? 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. Cheers, Matthew Brush __**_ Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-**bin/mailman/listinfo/develhttps://lists.geany.org/cgi-bin/mailman/listinfo/devel ___ Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel
Re: [Geany-Devel] Interested making a patch to add QML support
On 19 September 2013 09:35, Lex Trotman ele...@gmail.com wrote: Have you tried to see if the javascript lexer and parser work well enough for QML? its supposed to be based on js. Looks like the js lexer works ok, but the parser simply treats QML constructs as data and skips them, oh well. Not sure how easy a regex parser will be, IIUC QML symbols are specified as the id: property inside the object, meaning you need to handle nested context. Cheers Lex Cheers Lex ___ Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel