#623 Regexp -> editor highlighting problem

open
nobody
Editor (234)
5
2011-03-09
2011-03-09
Anonymous
No

I am using this lengthy regexp in my app to parse config file lines:
if (/^\s*([a-zA-Z_]+[a-zA-Z_0-9]*(::[a-zA-Z_]+[a-zA-Z_0-9:]*)?)\s*=\s*('(?:[^\\']|\\.)*'|"(?:[^\\"]|\\.)*"|(?:\s*(?:[^;\\\s]|\\.)+)*)/) {
process_line()...
}

It seems that all the subsequent text starting from
'|"(?:[^
and after this regexp is having the same colour (blue) in editor.
Also the outline does not show any subroutines after the regexp.

I am using Eclipse SDK, Version: 3.6.2
EPIC: 0.6.39

Discussion

  • Jan Ploski
    Jan Ploski
    2011-03-09

    The code snippet you quoted doesn't cause syntax highlighting problems for me in 0.6.39.

     

  • Anonymous
    2011-03-10

    Hm, that's strange, please look at the screenshot at http://goo.gl/7Ex48
    and let me know if (and how) I can give you more debug info...

     

  • Anonymous
    2011-03-10

    Sorry for double post, here is the short script so you don't have to rewrite it from the picture...

    http://pastebin.com/SxzTvEGv

     
  • Jan Ploski
    Jan Ploski
    2011-03-10

    The problem is two lines earlier, in the line with "unless". If you use m/.../ rather than just /.../ to give EPIC more clue, the highlighting problem will disappear.

     

  • Anonymous
    2011-03-10

    You're right, thank you.