<div dir="ltr"><br><div class="gmail_extra">Thanks Dimitar.<br><br><div class="gmail_quote">On Thu, Mar 13, 2014 at 11:42 AM, Dimitar Zhekov <span dir="ltr"><<a href="mailto:dimitar.zhekov@gmail.com" target="_blank">dimitar.zhekov@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="">- data.min_fields = 3;<br></div>
+ data.min_fields = 5;<br>
<br>
Please note that parse_file_line() returns if length(fields) is less<br>
than data->min_fields. With the above change, anything with < 4 colons<br>
will be rejected.<br></blockquote><div> </div><div>Thanks for pointing out the error. I am now extracting all the tokens and then comparing if number of tokens I have is less than data->min_fields. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<br>
+ if (g_strv_length(fields) == data->min_fields)<br>
<br>
N/A: parse_file_line() returns on length(fields) < min_fields, and the<br>
maximum fields to parse are min_fields, so length(fields) is always<br>
equal to min_fields at this point.</blockquote><div><br></div><div>Thanks for pointing that out, I have made the corrections</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

 <br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
+ {<br>
+  *type = g_strstrip(g_strdup(fields[data->line_idx+2]));<br>
<br>
Errr, why do you assume that type is always at line_idx+2?..<br></blockquote><div><br></div><div>As far as I could understand, geany parses the error message by gcc compiler. gcc compilers have specific error message format (<a href="http://gcc.gnu.org/onlinedocs/gcc-4.5.0/gnat_ugn_unw/Warning-Message-Control.html#Warning-Message-Control">http://gcc.gnu.org/onlinedocs/gcc-4.5.0/gnat_ugn_unw/Warning-Message-Control.html#Warning-Message-Control</a>) which is of the form <filename>:<line number>:<column number>:<warning.error>:<message>. This format guarantees that 2 fields after <line number> will be <warning/error>. So I used line_idx+2 to denote type_idx. I should declare type_idx variable and assign line_idx+2 to it which I think is more maintainable than the current version. What do you think?</div>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
--<br>
<br>
Finally:<br>
<br>
1. You wrote support for the fallback parser only, and not for regex.<br></blockquote><div><br></div><div>Yes because the regex parser was returning me NULL for c,cpp and java files, so I wrote for the fallback parser only. I was unable to find the root cause of why the regex parser is returning me NULL for these filetypes. </div>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
2. This should be considered after either pull request #191 or SF<br>
patch #11 is applied. If the PR is chosen, this patch should be fully<br>
rewritten as capturing group <W> or something similar.<br><div class=""><div class="h5"><br></div></div></blockquote><div>Thanks,</div><div>Shankhoneer Chakrovarty </div></div><br></div></div>