jed-users mailing list

[2008 Date Index] [2008 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: Making compile mode smarter?


Tom Culliton <culliton@xxxxxx> wrote:
> 1) Automatically determine the default compiler warning/error matching
> pattern to use based on the OS.
> 2) Dynamically pick the compiler warning/error matching pattern for mixed
> compilation (say C/C++ and Java).
> 3) Maybe even having it use one of multiple regular expressions to look
> for warning messages?

Do you have one of the slang regular expression modules installed?  The
slang library is distributed with support for both PCRE and oniguruma
regular expression libraries.  Either of these could be used to
provide more powerful regular expressions than the native slang ones.
Assuming you do, you might try the following:

First create a function of the form:

   define my_find_compile_error (dir, filep, linep, colp)
   {
       .
       .
   }

This function will be used by compile.sl to search forward (dir>0) or
backward (dir<0) in the buffer for an error.  If found, the function
will return 1 with the reference variables filep, linep, and columnp
set to the file, line, and column of the error.  If not found, then it
will return 0.

Then add this function to the compiler database using, e.g.,

   compile_add_compiler ("generic", &my_find_compile_error);
   compile_select_compiler ("generic");

The hard part is to figure out what to add to the function so that it
meets your needs.  This is where the more powerful regular expressions
could prove useful.

I know this does not provide a direct answer to your question, but I
believe that it does sketch out a possible path to the answer.

Let me know if the idea needs clarification.
Thanks,
--John


--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2008 date index] [2008 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]