Notepad++
Stewart Gordon
smjg_1998 at yahoo.com
Fri Aug 21 17:32:30 PDT 2009
Sergey Gromov wrote:
<snip>
> Here's a string which is valid in D but is invalid in C:
>
> "foo
> bar"
>
> Here's another string which is, on the contrary, valid in C but is
> invalid in D:
>
> "foo\
> bar"
>
> They both "span lines."
Doesn't quite relate to what I was querying ... but anyway, it's
perfectly straightforward to add another rule like
LineSplice = \
among other possibilities.
You could argue over whether it's worth going to all this effort, if you
think the only point is to support C, C++ and D. But really, there are
many C-like languages out there with their own slightly different rules,
and even the likes of Prolog, SQL and Unix shell scripts with their own
variants of C string syntax. I think the scheme I've come up with would
be a good way to capture the subtle differences between these languages'
string syntaxes, while at the same time being something that the average
user wanting to add a new language to the system should be able to get
their head around sooner or later.
Stewart.
More information about the Digitalmars-d
mailing list