DMD 1.021 and 2.004 releases

Jari-Matti Mäkelä jmjmak at utu.fi.invalid
Tue Sep 11 08:28:53 PDT 2007


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).



More information about the Digitalmars-d-announce mailing list