PreviousNextTracker indexSee it online !

(23/211) 3005 - syntax: does not allow matching of newlines

In jEdit mode files, the following does not work:
<SEQ_REGEXP DELEGATE="FOO">\n</SEQ_REGEXP>

Likewise, the following does not include newlines:
<SEQ_REGEXP DELEGATE="FOO">\s</SEQ_REGEXP>

This would allow to fix bug 958013, so that a PHP line comment could either on "\n" or "?>".

Submitted blueyed - 2008-01-04 13:01:44 Assigned tsourick
Priority 5 Labels text area and syntax packages
Status open Group normal bug
Resolution None

Comments

2009-02-17 21:46:34
altonator

+1 vote for fixing this.
The PHP line comment problem is very annoying.

2017-11-24 16:37:19.475000
tsourick

- **status**: open --> closed-wont-fix

2017-11-24 16:37:19.833000
tsourick

\n support does not seem to be necessary as SEQ (SEQ_REGEXP) is only applied to a single line i.e.
until \n. And this is why \s does not "include" newlines here.

A fix to the bug will follow (new URL https://sourceforge.net/p/jedit/bugs/2106/).

2017-12-04 03:30:45.082000
tsourick

- **status**: closed-wont-fix --> open

2017-12-04 03:30:45.653000
tsourick

I did probably wrong closing the ticket.

Now I am trying to implement multiline strings in C mode (https://sourceforge.net/p/jedit/bugs/2935/)

I delegated the string SPAN to a separate rule:

<RULES SET="STRING_LITERAL" DEFAULT="LITERAL1" ESCAPE="\">
<SEQ_REGEXP DELEGATE="MAIN"><![CDATA[[^\\]$]]></SEQ_REGEXP>
</RULES>

... so that EOL without backslash should trigger fallback to MAIN. But when I try to use negative lookbehind assertion (instead of [^\\] which improperly includes the token) nothing works.

Seems like EOL does not match by itself but with something else. Thus, [^\\]$ matches but (?<!\)$ does not.

This needs further investigation.

2017-12-04 03:31:01.976000
tsourick

- **assigned_to**: Roman Tsourick