- Subject: Re: newbie DFA question
- From: "Peter D. Gray" <pdg@xxxxxxxxxx>
- Date: Tue, 10 Jun 2003 18:50:41 +1000
On Mon, Jun 02, 2003 at 05:06:47PM -0700, Josh Guilfoyle wrote:
> On Tue, Jun 03, 2003 at 09:25:48AM +1000, Peter D. Gray wrote:
> > I am trying to write a new mode with syntax highlighting
> > and have run into a snag in my understanding. It appears from
> > the documentaion and some experimentation that
> > the dfa regular expressions do not cross line
> > boundaries.
>
The reply below (thanks Josh) was the only reply I received about this
problem so I assume he is correct and across line boundary
syntax highlighting is impossible. This seems like a serious
limitation. Is anybody working on a "fix" for this?
PS I too have seen the vim syntax highlighting and it
does look good. I really liked the way that
#if 0
...
#endif
was detected as a comment.
Regards,
pdg
> I'm pretty sure that there is no way to do DFA syntax highlighting across
> multiple lines without source hacking. I at one point significantly hacked
> the syntax highlighting to do something similar, although it was far too
> inefficient to release unto anyone. I have been trying to get the time to
> rewrite it, but as of yet other projects are taking up too much of my time.
>
> I have also been looking at the way vim does syntax highlighting and I'm
> thinking more and more that is the way to go, although I fear how much work
> would be involved to author such a system....
>
> >
> > So my question is how do I hightlight an area of text
> > bounded by some pattern, ignoring newlines.
> >
> > I know jed can do this because in C mode /* */
> > comments work fine across line boundaries,
> > even though I cannot see how from reading
> > the cmode dfa rules. Any help appreciated.
>
> The C mode does not use DFA by default, it uses a system of internally
> hardcoded rules with primitive run-time control (the old way before DFA came
> about). To be quite honest, the syntax highlighting leaves a lot to be
> desired.
>
> >
> > Regards,
> > pdg
> >
> >
> > --------------------------
> > To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
> > the word "unsubscribe" in the message body.
> > Need help? Email <jed-users-owner@xxxxxxxxxxx>.
>
> --
> Josh Guilfoyle
> http://jasta.gotlinux.org/
>
> --------------------------
> To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
> the word "unsubscribe" in the message body.
> Need help? Email <jed-users-owner@xxxxxxxxxxx>.
>
Regards,
pdg
--
See mail headers for contact information.
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2003 date index]
[2003 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]