I'm working on using the GPS indentation engine directly as a back-end for Emacs ada-mode.
So far I have a command line executable that reads a file and outputs the indentation for each line. Using gnatcoll-1.7w-src/src/sqlite/gnatcoll-xref.adb (from GNAT GPL 2014 gnatcoll) for a test case, this takes 0.177 seconds; that includes reading the file (from a hot disk cache) and writing an output file with the line number and indent info. So it's fast :). For comparison, wisi-parse-buffer takes 1.35 seconds. Of course, wisi-parse-buffer does a lot more than compute the indentation. So the GPS back-end will support only a subset of the ada-mode functionality. And there are many corner cases where GPS indentation disagrees with ada-mode 5.0. So this will be suitable only for large files where the elisp wisi parser is too slow. But I hope that's a useful compromise. Now I need to design a protocol to allow using that executable in a sub-process, and passing it the buffer text to compute the indentation for a single line. After that works, I'll release the next ada-mode version (there may be a bug fix release in the mean time). Then the next step would be to implement the wisi generalized LALR parser in Ada as part of OpenToken, and use that as the back-end; that should allow supporting all of the ada-mode functions, and still be fast. -- -- Stephe _______________________________________________ Emacs-ada-mode mailing list [email protected] http://host114.hostmonster.com/mailman/listinfo/emacs-ada-mode_stephe-leake.org
