[e-lang] Peculiar wiki code conversion bug

Mark S. Miller markm at cs.jhu.edu
Fri Dec 8 22:36:54 CST 2006


James Graves wrote:
> It won't be that hard, I don't think.  A lot of it will be just filling 
> in the keywords that E uses and Java doesn't.  Most of the rest, 
> strings, numbers, etc. will be some kind of regular expressions.  And a 
> lot of those should be the same as Java, right?

Yes. However, there are two aspects of syntax-highlighting E that I doubt can 
be captured by keywords + regular expressions.

* Inside a quasiliteral, when a "${" or a "@{" opens up a hole for a nested E 
expression or pattern respectively, this lasts until a *matching* "}". This 
still doesn't need a full parse. It can be done by regular expressions + 
counting nesting levels. Is it possible to express this in GeSHi?

* I'd really like to highlight defining occurrences of identifiers. AFAIK, in 
E, this can only be done accurately with a genuine parse. It wouldn't surprise 
me if we could get 90+% coverage with regular expressions. But I don't know if 
it's better to do a 90+% job, or not to try to do a job that we can't get correct.


> After we've got the GeSHi extension up and running, I'll give it a go.

That would be great! Thanks!

-- 
Text by me above is hereby placed in the public domain

     Cheers,
     --MarkM


More information about the e-lang mailing list