On Monday, 11 August 2014 at 22:24:28 UTC, Brian Schott wrote:
On Monday, 11 August 2014 at 22:20:54 UTC, Brian Schott wrote:
On Monday, 11 August 2014 at 19:47:46 UTC, Klaus wrote:
I mean when writing a D lexer, you necessarly reach the
moment when you think:
"Oh no! is this feature just her
On Monday, 11 August 2014 at 22:56:27 UTC, Klaus wrote:
On Monday, 11 August 2014 at 22:24:28 UTC, Brian Schott wrote:
On Monday, 11 August 2014 at 22:20:54 UTC, Brian Schott wrote:
On Monday, 11 August 2014 at 19:47:46 UTC, Klaus wrote:
I mean when writing a D lexer, you necessarly reach the
On Monday, 11 August 2014 at 22:20:54 UTC, Brian Schott wrote:
On Monday, 11 August 2014 at 19:47:46 UTC, Klaus wrote:
I mean when writing a D lexer, you necessarly reach the moment
when you think:
"Oh no! is this feature just here to suck ?"
They are and they do.
Also, use this: https://g
On Monday, 11 August 2014 at 19:47:46 UTC, Klaus wrote:
I mean when writing a D lexer, you necessarly reach the moment
when you think:
"Oh no! is this feature just here to suck ?"
They are and they do.
On Mon, Aug 11, 2014 at 10:58 PM, H. S. Teoh via Digitalmars-d-learn
wrote:
> In Flex, one way you can implement heredocs is to have a separate "mode"
> where the lexer is scanning for the ending string. So basically you
> have a sub-lexer that treats the heredoc as three tokens, one that
> defi
f built-in help
text, for
example.
Delimited strings are useful when writing code/text generators
when you
need to be able to use ' and " as literal characters without
crazy
leaning-toothpick syndrome \"x\"y\"z\"w\"'s sprinkled
everywhere.
The crazy variety
On Mon, Aug 11, 2014 at 10:50:34PM +0200, Philippe Sigaud via
Digitalmars-d-learn wrote:
> On Mon, Aug 11, 2014 at 10:09 PM, H. S. Teoh via Digitalmars-d-learn
> wrote:
> > On Mon, Aug 11, 2014 at 07:47:44PM +, Klaus via Digitalmars-d-learn
> > wrote:
> >> I mean when writing a D lexer, you
On Mon, Aug 11, 2014 at 10:09 PM, H. S. Teoh via Digitalmars-d-learn
wrote:
> On Mon, Aug 11, 2014 at 07:47:44PM +, Klaus via Digitalmars-d-learn wrote:
>> I mean when writing a D lexer, you necessarly reach the moment when
>> you think:
>>
>> "Oh no! is this feature just here to suck ?"
> T
strings in
my program. It's one of the things I *like* about D, in fact. Nobody
wants to manually parenthesize every quoted line with '"...\n"' when the
program need to incorporate several pages of built-in help text, for
example.
Delimited strings are useful when writing c
I mean when writing a D lexer, you necessarly reach the moment
when you think:
"Oh no! is this feature just here to suck ?"
On 02/15/2012 02:03 AM, H. S. Teoh wrote:
On Wed, Feb 15, 2012 at 01:46:51AM +0100, Timon Gehr wrote:
[...]
No, q"abca" is illegal. The pattern is
q"identifier
string
identifier"
(The terminating new line is kept, so the string in this case is
"string\n")
I see. The online specs need to be c
On Wed, Feb 15, 2012 at 01:46:51AM +0100, Timon Gehr wrote:
[...]
> No, q"abca" is illegal. The pattern is
>
> q"identifier
> string
> identifier"
>
> (The terminating new line is kept, so the string in this case is
> "string\n")
I see. The online specs need to be clarified, then.
[...]
> >So
On 02/15/2012 01:38 AM, H. S. Teoh wrote:
I've finally got my lexer to the point where it can successfully
tokenize /usr/include/d2/4.3.2/std/*.d. Yay! :-) Now I'm going back to
fill in the gaps that still haven't been implemented yet. Among which
are delimited strings.
Accordin
I've finally got my lexer to the point where it can successfully
tokenize /usr/include/d2/4.3.2/std/*.d. Yay! :-) Now I'm going back to
fill in the gaps that still haven't been implemented yet. Among which
are delimited strings.
According to the online specs, delimited strin
On 10/04/2011 21:51, Jonathan M Davis wrote:
If that had been `something instead of 'something, _then_ the delimited string
becomes useful, but given how rarely backticks are needed, it does seem rather
odd to have delimited strings just for that. So, I definitely have to wonder
why they
On 4/10/11 5:51 PM, Jonathan M Davis wrote:
On 4/10/11 11:03 AM, simendsjo wrote:
Ref http://digitalmars.com/d/2.0/lex.html
What are some possible use cases for delimited strings?
What is solved by having this in the language?
Readability.
auto s = "This is 'something' that
> On 4/10/11 11:03 AM, simendsjo wrote:
> > Ref http://digitalmars.com/d/2.0/lex.html
> >
> > What are some possible use cases for delimited strings?
> > What is solved by having this in the language?
>
> Readability.
>
> auto s = "This is 's
On 4/10/11 11:03 AM, simendsjo wrote:
Ref http://digitalmars.com/d/2.0/lex.html
What are some possible use cases for delimited strings?
What is solved by having this in the language?
Readability.
auto s = "This is 'something' that \"could\" have been made easier to
Hmm..
Well then, those I've never seen used before. :)
On 10.04.2011 21:17, Andrej Mitrovic wrote:
Are we forgetting the fact that using delimited strings allows us to
have syntax highlighting in editors?
E.g.:
void stringParser(string str)()
{
mixin(str);
}
void main()
{
stringParser!(q{
int x = 1;
int y = 2
Are we forgetting the fact that using delimited strings allows us to
have syntax highlighting in editors?
E.g.:
void stringParser(string str)()
{
mixin(str);
}
void main()
{
stringParser!(q{
int x = 1;
int y = 2;
writefln("%s %s", x, y);
});
}
> On 10/04/2011 17:51, Jonathan M Davis wrote:
> >> Ref http://digitalmars.com/d/2.0/lex.html
> >>
> >> What are some possible use cases for delimited strings?
> >> What is solved by having this in the language?
> >
> > It's probably so
On 10/04/2011 17:51, Jonathan M Davis wrote:
Ref http://digitalmars.com/d/2.0/lex.html
What are some possible use cases for delimited strings?
What is solved by having this in the language?
It's probably so that you can still use characters that require escaping in
the string without h
> Ref http://digitalmars.com/d/2.0/lex.html
>
> What are some possible use cases for delimited strings?
> What is solved by having this in the language?
It's probably so that you can still use characters that require escaping in
the string without having to escape " ever
Ref http://digitalmars.com/d/2.0/lex.html
What are some possible use cases for delimited strings?
What is solved by having this in the language?
25 matches
Mail list logo