DMD 1.021 and 2.004 releases

Bruno Medeiros brunodomedeiros+spam at com.gmail
Tue Sep 11 12:57:21 PDT 2007


Jari-Matti Mäkelä wrote:
> Jascha Wetzel wrote:
> 
>> D's delimited strings can (luckily) be scanned with regular languages,
>> because the enclosing double quotes are required. else the lexical
>> structure wouldn't even be context free and a nightmare for
>> automatically generated lexers.
> 
> Right, thanks.
> 
>> therefore you can match q"[^"]*" and check the delimiters during
>> (context sensitive) semantic analysis.
> 
> But e.g. syntax highlighting needs the semantic info to change the style of
> the text within the delimiters. The analyser also needs to check whether
> the two delimiters match. Like I said above, if the tool doesn't provide
> enough support, you're stuck. I haven't searched for all corner cases, but
> wasn't the old grammar scannable and highlightable with plain regular
> expressions (except the nested comments of course).

Why would syntax highlighting have to be implemented with a regexp in 
the first place?

-- 
Bruno Medeiros - MSc in CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D



More information about the Digitalmars-d-announce mailing list