Re: Looking for champion - std.lang.d.lex

2011-02-26 Thread dolive
Walter Bright дµ½: As we all know, tool support is important for D's success. Making tools easier to build will help with that. To that end, I think we need a lexer for the standard library - std.lang.d.lex. It would be helpful in writing color syntax highlighting filters, pretty

Re: Looking for champion - std.lang.d.lex

2011-02-26 Thread Jonathan M Davis
On Saturday 26 February 2011 02:06:18 dolive wrote: Walter Bright ÐŽµœ: As we all know, tool support is important for D's success. Making tools easier to build will help with that. To that end, I think we need a lexer for the standard library - std.lang.d.lex. It would be helpful in

Re: Looking for champion - std.lang.d.lex

2011-02-26 Thread dolive
Jonathan M Davis дµ½: On Saturday 26 February 2011 02:06:18 dolive wrote: Walter Bright дµ½: As we all know, tool support is important for D's success. Making tools easier to build will help with that. To that end, I think we need a lexer for the standard library -

Re: Looking for champion - std.lang.d.lex

2010-11-26 Thread Bruno Medeiros
On 24/11/2010 21:12, Daniel Gibson wrote: bearophile schrieb: Bruno Medeiros: On the other hand, I would be surprised if a person of the female variety would be that interested in D, to the point of contributing in such way. In Python newsgroups I have seen few women, now and then, but in

Re: Looking for champion - std.lang.d.lex

2010-11-25 Thread Bruno Medeiros
On 24/11/2010 18:48, Andrew Wiley wrote: On 24/10/2010 00:46, bearophile wrote: Walter: As we all know, tool support is important for D's success. Making tools easier to build will help with that. To that end, I think we need a

Re: Looking for champion - std.lang.d.lex

2010-11-25 Thread Nick Sabalausky
Daniel Gibson metalcae...@gmail.com wrote in message news:icjv6l$p1...@digitalmars.com... bearophile schrieb: Bruno Medeiros: On the other hand, I would be surprised if a person of the female variety would be that interested in D, to the point of contributing in such way. In Python

Re: Looking for champion - std.lang.d.lex

2010-11-24 Thread Bruno Medeiros
On 19/11/2010 23:39, Andrei Alexandrescu wrote: On 11/19/10 1:03 PM, Bruno Medeiros wrote: On 22/10/2010 20:48, Andrei Alexandrescu wrote: On 10/22/10 14:02 CDT, Tomek Sowiński wrote: Dnia 22-10-2010 o 00:01:21 Walter Bright newshou...@digitalmars.com napisał(a): As we all know, tool

Re: Looking for champion - std.lang.d.lex

2010-11-24 Thread Bruno Medeiros
On 19/11/2010 23:56, Michael Stover wrote: so that was 4 months ago - how do things currently stand on that initiative? -Mike On Fri, Nov 19, 2010 at 6:37 PM, Bruno Medeiros brunodomedeiros+s...@com.gmail wrote: On 19/11/2010 22:25, Michael Stover wrote: As for D lexers and

Re: Looking for champion - std.lang.d.lex

2010-11-24 Thread Ellery Newcomer
On 11/24/2010 09:13 AM, Bruno Medeiros wrote: I don't know about Ellery, as you can see in that thread he/she(?) mentioned interest in working on that, but I don't know anything more. Normally I go by 'it'. Been pretty busy this semester, so I haven't been doing much. But the bottom line

Re: Looking for champion - std.lang.d.lex

2010-11-24 Thread Bruno Medeiros
On 24/10/2010 00:46, bearophile wrote: Walter: As we all know, tool support is important for D's success. Making tools easier to build will help with that. To that end, I think we need a lexer for the standard library - std.lang.d.lex. It would be helpful in writing color syntax highlighting

Re: Looking for champion - std.lang.d.lex

2010-11-24 Thread Andrew Wiley
On 24/10/2010 00:46, bearophile wrote: Walter: As we all know, tool support is important for D's success. Making tools easier to build will help with that. To that end, I think we need a lexer for the standard library - std.lang.d.lex. It would be helpful in writing color syntax

Re: Looking for champion - std.lang.d.lex

2010-11-24 Thread Bruno Medeiros
On 24/11/2010 13:30, Bruno Medeiros wrote: On 19/11/2010 23:39, Andrei Alexandrescu wrote: On 11/19/10 1:03 PM, Bruno Medeiros wrote: On 22/10/2010 20:48, Andrei Alexandrescu wrote: On 10/22/10 14:02 CDT, Tomek Sowiński wrote: Dnia 22-10-2010 o 00:01:21 Walter Bright

Re: Looking for champion - std.lang.d.lex

2010-11-24 Thread Bruno Medeiros
On 20/11/2010 01:29, Jonathan M Davis wrote: On Friday, November 19, 2010 15:17:35 Bruno Medeiros wrote: On 19/11/2010 22:02, Jonathan M Davis wrote: On Friday, November 19, 2010 13:53:12 Bruno Medeiros wrote: On 19/11/2010 21:27, Jonathan M Davis wrote: And by providing a lexer and a parser

Re: Looking for champion - std.lang.d.lex

2010-11-24 Thread Bruno Medeiros
On 24/11/2010 16:19, Ellery Newcomer wrote: On 11/24/2010 09:13 AM, Bruno Medeiros wrote: I don't know about Ellery, as you can see in that thread he/she(?) mentioned interest in working on that, but I don't know anything more. Normally I go by 'it'. I didn't meant to offend or anything,

Re: Looking for champion - std.lang.d.lex

2010-11-24 Thread Ellery Newcomer
On 11/24/2010 02:09 PM, Bruno Medeiros wrote: I didn't meant to offend or anything, I was just unsure of that. None taken; I'm just laughing at you. As I understand it, though, 'Ellery' is a unisex name, so it is entirely ambiguous. It took me like 3 months to read his parser to figure

Re: Looking for champion - std.lang.d.lex

2010-11-24 Thread bearophile
Bruno Medeiros: On the other hand, I would be surprised if a person of the female variety would be that interested in D, to the point of contributing in such way. In Python newsgroups I have seen few women, now and then, but in the D newsgroup so far... not many. So far D seems a male thing.

Re: Looking for champion - std.lang.d.lex

2010-11-24 Thread Daniel Gibson
bearophile schrieb: Bruno Medeiros: On the other hand, I would be surprised if a person of the female variety would be that interested in D, to the point of contributing in such way. In Python newsgroups I have seen few women, now and then, but in the D newsgroup so far... not many. So far

Re: Looking for champion - std.lang.d.lex

2010-11-23 Thread Nick Sabalausky
Andrew Wiley debio...@gmail.com wrote in message news:mailman.501.1290205603.21107.digitalmar...@puremagic.com... On Fri, Nov 19, 2010 at 4:20 PM, bearophile bearophileh...@lycos.comwrote: Bruno Medeiros: Java is quickly becoming a legacy language? the next COBOL? SRSLY?... Just two

Re: Looking for champion - std.lang.d.lex

2010-11-20 Thread Matthias Pleh
Am 20.11.2010 00:56, schrieb Michael Stover: so that was 4 months ago - how do things currently stand on that initiative? -Mike On Fri, Nov 19, 2010 at 6:37 PM, Bruno Medeiros brunodomedeiros+s...@com.gmail wrote: On 19/11/2010 22:25, Michael Stover wrote: As for D lexers and

Re: Looking for champion - std.lang.d.lex

2010-11-19 Thread Bruno Medeiros
On 22/10/2010 20:48, Andrei Alexandrescu wrote: On 10/22/10 14:02 CDT, Tomek Sowiński wrote: Dnia 22-10-2010 o 00:01:21 Walter Bright newshou...@digitalmars.com napisał(a): As we all know, tool support is important for D's success. Making tools easier to build will help with that. To that

Re: Looking for champion - std.lang.d.lex

2010-11-19 Thread Jonathan M Davis
On Friday 19 November 2010 13:03:53 Bruno Medeiros wrote: On 22/10/2010 20:48, Andrei Alexandrescu wrote: On 10/22/10 14:02 CDT, Tomek Sowiński wrote: Dnia 22-10-2010 o 00:01:21 Walter Bright newshou...@digitalmars.com napisał(a): As we all know, tool support is important for D's

Re: Looking for champion - std.lang.d.lex [Java and IDE's]

2010-11-19 Thread Bruno Medeiros
On 27/10/2010 05:39, Walter Bright wrote: What I miss more in Java is not single structs (single values), There's a lot more to miss than that. I find Java code tends to be excessively complex, and that's because it lacks expressive power. It was summed up for me by a colleague who said that

Re: Looking for champion - std.lang.d.lex

2010-11-19 Thread Bruno Medeiros
On 19/11/2010 21:27, Jonathan M Davis wrote: On Friday 19 November 2010 13:03:53 Bruno Medeiros wrote: On 22/10/2010 20:48, Andrei Alexandrescu wrote: On 10/22/10 14:02 CDT, Tomek Sowiński wrote: Dnia 22-10-2010 o 00:01:21 Walter Brightnewshou...@digitalmars.com napisał(a): As we all know,

Re: Looking for champion - std.lang.d.lex

2010-11-19 Thread Jonathan M Davis
On Friday, November 19, 2010 13:53:12 Bruno Medeiros wrote: On 19/11/2010 21:27, Jonathan M Davis wrote: On Friday 19 November 2010 13:03:53 Bruno Medeiros wrote: On 22/10/2010 20:48, Andrei Alexandrescu wrote: On 10/22/10 14:02 CDT, Tomek Sowiński wrote: Dnia 22-10-2010 o 00:01:21 Walter

Re: Looking for champion - std.lang.d.lex

2010-11-19 Thread Bruno Medeiros
On 27/10/2010 22:43, Nick Sabalausky wrote: retardr...@tard.com.invalid wrote in message news:iaa44v$17s...@digitalmars.com... I only meant that the widespead adoption of Java shows how the public at large cares very little about the performance issues you mentioned. The public at large is

Re: Looking for champion - std.lang.d.lex

2010-11-19 Thread bearophile
Bruno Medeiros: Java is quickly becoming a legacy language? the next COBOL? SRSLY?... Just two years ago, the now hugely popular Android platform choose Java as it's language of choice, and you think Java is becoming legacy?... Java on Adroid is not going well, there is a Oracle-Google

Re: Looking for champion - std.lang.d.lex

2010-11-19 Thread Michael Stover
As for D lexers and tokenizers, what would be nice is to A) build an antlr grammar for D B) build D targets for antlr so that antlr can generate lexers and parsers in the D language. For B) I found http://www.mbutscher.de/antlrd/index.html For A) A good list of antlr grammars is at

Re: Looking for champion - std.lang.d.lex

2010-11-19 Thread Andrew Wiley
On Fri, Nov 19, 2010 at 4:20 PM, bearophile bearophileh...@lycos.comwrote: Bruno Medeiros: Java is quickly becoming a legacy language? the next COBOL? SRSLY?... Just two years ago, the now hugely popular Android platform choose Java as it's language of choice, and you think Java is

Re: Looking for champion - std.lang.d.lex

2010-11-19 Thread Bruno Medeiros
On 27/10/2010 22:04, retard wrote: Wed, 27 Oct 2010 13:52:29 -0700, Walter Bright wrote: retard wrote: Wed, 27 Oct 2010 12:08:19 -0700, Walter Bright wrote: retard wrote: This is why the basic data structure in functional languages, algebraic data types, suits better for this purpose. I

Re: Looking for champion - std.lang.d.lex

2010-11-19 Thread Bruno Medeiros
On 19/11/2010 22:02, Jonathan M Davis wrote: On Friday, November 19, 2010 13:53:12 Bruno Medeiros wrote: On 19/11/2010 21:27, Jonathan M Davis wrote: And by providing a lexer and a parser outside the standard library, wouldn't it make it just as easy for those tools to be written? What's the

Re: Looking for champion - std.lang.d.lex

2010-11-19 Thread Andrei Alexandrescu
On 11/19/10 1:03 PM, Bruno Medeiros wrote: On 22/10/2010 20:48, Andrei Alexandrescu wrote: On 10/22/10 14:02 CDT, Tomek Sowiński wrote: Dnia 22-10-2010 o 00:01:21 Walter Bright newshou...@digitalmars.com napisał(a): As we all know, tool support is important for D's success. Making tools

Re: Looking for champion - std.lang.d.lex

2010-11-19 Thread Bruno Medeiros
On 19/11/2010 22:25, Michael Stover wrote: As for D lexers and tokenizers, what would be nice is to A) build an antlr grammar for D B) build D targets for antlr so that antlr can generate lexers and parsers in the D language. For B) I found http://www.mbutscher.de/antlrd/index.html For A) A

Re: Looking for champion - std.lang.d.lex

2010-11-19 Thread Todd VanderVeen
== Quote from Bruno Medeiros (brunodomedeiros+s...@com.gmail)'s article I think much sooner we will have a full D compiler written in D than a (competitive) D IDE written in D. I agree. I do like the suggestion for developing the D grammar in Antlr though and it is something I would be

Re: Looking for champion - std.lang.d.lex

2010-11-19 Thread Michael Stover
so that was 4 months ago - how do things currently stand on that initiative? -Mike On Fri, Nov 19, 2010 at 6:37 PM, Bruno Medeiros brunodomedeiros+s...@com.gmail wrote: On 19/11/2010 22:25, Michael Stover wrote: As for D lexers and tokenizers, what would be nice is to A) build an antlr

Re: Looking for champion - std.lang.d.lex

2010-11-19 Thread Bruno Medeiros
On 27/10/2010 05:39, Walter Bright wrote: bearophile wrote: Walter: Java was designed to be simple! Simple means to have a more uniform semantics. So was Pascal. See the thread about how useless it was as a result. There's good simple, and there's bad simple... -- Bruno Medeiros -

Re: Looking for champion - std.lang.d.lex

2010-11-19 Thread Bruno Medeiros
On 19/11/2010 23:45, Todd VanderVeen wrote: == Quote from Bruno Medeiros (brunodomedeiros+s...@com.gmail)'s article I think much sooner we will have a full D compiler written in D than a (competitive) D IDE written in D. I agree. I do like the suggestion for developing the D grammar in Antlr

Re: Looking for champion - std.lang.d.lex

2010-11-19 Thread Jonathan M Davis
On Friday, November 19, 2010 15:17:35 Bruno Medeiros wrote: On 19/11/2010 22:02, Jonathan M Davis wrote: On Friday, November 19, 2010 13:53:12 Bruno Medeiros wrote: On 19/11/2010 21:27, Jonathan M Davis wrote: And by providing a lexer and a parser outside the standard library, wouldn't

Re: Looking for champion - std.lang.d.lex

2010-11-19 Thread Ellery Newcomer
On 11/19/2010 05:45 PM, Todd VanderVeen wrote: I agree. I do like the suggestion for developing the D grammar in Antlr though and it is something I would be interested in working on. With this in hand, the prospect of adding D support as was done for C++ to Eclipse or Netbeans becomes much

Re: Looking for champion - std.lang.d.lex

2010-10-28 Thread Don
retard wrote: Wed, 27 Oct 2010 16:04:34 -0600, Todd D. VanderVeen wrote: Legacy in the sense that C is perhaps. http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html Probably the top 10 names are more or less correct there, but some funny notes: 33. D 36. Scratch 40. Haskell

Re: Looking for champion - std.lang.d.lex

2010-10-28 Thread Matthias Pleh
Am 28.10.2010 16:46, schrieb Don: retard wrote: Wed, 27 Oct 2010 16:04:34 -0600, Todd D. VanderVeen wrote: Legacy in the sense that C is perhaps. http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html Probably the top 10 names are more or less correct there, but some funny notes:

Re: Looking for champion - std.lang.d.lex

2010-10-27 Thread retard
Tue, 26 Oct 2010 19:32:44 -0700, Walter Bright wrote: Nick Sabalausky wrote: Walter Bright newshou...@digitalmars.com wrote in message news:i9qd8q$1ls...@digitalmars.com... 4. the tokens should be a value type, not a reference type I'm curious, is your reason for this purely to avoid

Re: Looking for champion - std.lang.d.lex

2010-10-27 Thread retard
Tue, 26 Oct 2010 21:39:32 -0700, Walter Bright wrote: bearophile wrote: Walter: Java made a related mistake by failing to acknowledge that value types have any useful purpose at all (unless they are built-in). Java was designed to be simple! Simple means to have a more uniform

Re: Looking for champion - std.lang.d.lex

2010-10-27 Thread Walter Bright
retard wrote: have you even started studying the list of type system concepts I listed few days ago. Java has proved that such things aren't useful in programming languages :-) Adding structs to Java wouldn't fix that. You probably know that. Unifying structs and classes in a language like

Re: Looking for champion - std.lang.d.lex

2010-10-27 Thread Walter Bright
retard wrote: This is why the basic data structure in functional languages, algebraic data types, suits better for this purpose. I think you recently demonstrated otherwise, as proven by the widespread use of Java :-)

Re: Looking for champion - std.lang.d.lex

2010-10-27 Thread bearophile
Walter: So was Pascal. See the thread about how useless it was as a result. But Java is probably currently the most used language, so I guess they have created a simpler language, but not too much simple as Pascal was. Value types and polymorphic types are different, have different

Re: Looking for champion - std.lang.d.lex

2010-10-27 Thread retard
Wed, 27 Oct 2010 12:08:19 -0700, Walter Bright wrote: retard wrote: This is why the basic data structure in functional languages, algebraic data types, suits better for this purpose. I think you recently demonstrated otherwise, as proven by the widespread use of Java :-) I don't

Re: Looking for champion - std.lang.d.lex

2010-10-27 Thread Walter Bright
retard wrote: Wed, 27 Oct 2010 12:08:19 -0700, Walter Bright wrote: retard wrote: This is why the basic data structure in functional languages, algebraic data types, suits better for this purpose. I think you recently demonstrated otherwise, as proven by the widespread use of Java :-) I

Re: Looking for champion - std.lang.d.lex

2010-10-27 Thread Walter Bright
bearophile wrote: After all this discussion I want to remind you that I am here because I like D and I like D structs, unions and all that :-) I prefer to use D many times over Java. And I agree that structs (or tagged unions) are better in D for the lexer if you want the lexer to be quite fast.

Re: Looking for champion - std.lang.d.lex

2010-10-27 Thread retard
Wed, 27 Oct 2010 13:52:29 -0700, Walter Bright wrote: retard wrote: Wed, 27 Oct 2010 12:08:19 -0700, Walter Bright wrote: retard wrote: This is why the basic data structure in functional languages, algebraic data types, suits better for this purpose. I think you recently demonstrated

Re: Looking for champion - std.lang.d.lex

2010-10-27 Thread Walter Bright
retard wrote: I only meant that the widespead adoption of Java shows how the public at large cares very little about the performance issues you mentioned Java is one of the most widely used languages and it's also successful in many fields. Things could be better from programming language

Re: Looking for champion - std.lang.d.lex

2010-10-27 Thread bearophile
Walter: So, there is value in value types after all. I confess I have no idea why you argue against them. I am not arguing against them in absolute. They are good in some situations and not so good in other situations :-) Compound value types are very useful in a certain imperative

Re: Looking for champion - std.lang.d.lex

2010-10-27 Thread Nick Sabalausky
retard r...@tard.com.invalid wrote in message news:iaa44v$17s...@digitalmars.com... I only meant that the widespead adoption of Java shows how the public at large cares very little about the performance issues you mentioned. The public at large is convinced that Java is fast now, really!. So

RE: Looking for champion - std.lang.d.lex

2010-10-27 Thread Todd D. VanderVeen
To: digitalmars-d@puremagic.com Subject: Re: Looking for champion - std.lang.d.lex retard r...@tard.com.invalid wrote in message news:iaa44v$17s...@digitalmars.com... I only meant that the widespead adoption of Java shows how the public at large cares very little about the performance issues you

Re: Looking for champion - std.lang.d.lex

2010-10-27 Thread retard
Wed, 27 Oct 2010 14:15:04 -0700, Walter Bright wrote: retard wrote: I only meant that the widespead adoption of Java shows how the public at large cares very little about the performance issues you mentioned Java is one of the most widely used languages and it's also successful in many

Re: Looking for champion - std.lang.d.lex

2010-10-27 Thread retard
Wed, 27 Oct 2010 16:04:34 -0600, Todd D. VanderVeen wrote: Legacy in the sense that C is perhaps. http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html Probably the top 10 names are more or less correct there, but some funny notes: 33. D 36. Scratch 40. Haskell 42. JavaFX Script

Re: Looking for champion - std.lang.d.lex

2010-10-26 Thread Jacob Carlborg
On 2010-10-26 04:44, Nick Sabalausky wrote: Walter Brightnewshou...@digitalmars.com wrote in message news:ia59si$1r0...@digitalmars.com... Consider a string literal, say abc\def. With Goldie's method, I infer this string has to be scanned twice. Once to find its limits, and the second to

Re: Looking for champion - std.lang.d.lex

2010-10-26 Thread Nick Sabalausky
bearophile bearophileh...@lycos.com wrote in message news:ia6a0h$ns...@digitalmars.com... Nick Sabalausky: I've taken a deeper look at Spirit's docs: I have not used Spirit, but from what I have read, it doesn't scale (the compilation becomes too much slower when the system you have built

Re: Looking for champion - std.lang.d.lex

2010-10-26 Thread Nick Sabalausky
Walter Bright newshou...@digitalmars.com wrote in message news:ia5j41$2bn...@digitalmars.com... To specifically answer your question, yes, in the lexers I make, you know you're parsing a string, so you process it as you parse it. ... I don't know. I'd have to study the issue for a while. I

Re: Looking for champion - std.lang.d.lex

2010-10-26 Thread bearophile
Nick Sabalausky: I've taken a deeper look at Spirit's docs: I have not used Spirit, but from what I have read, it doesn't scale (the compilation becomes too much slower when the system you have built becomes bigger). Bye, bearophile

Re: Looking for champion - std.lang.d.lex

2010-10-26 Thread Leandro Lucarella
bearophile, el 26 de octubre a las 06:20 me escribiste: Nick Sabalausky: I've taken a deeper look at Spirit's docs: I have not used Spirit, but from what I have read, it doesn't scale (the compilation becomes too much slower when the system you have built becomes bigger). I can confirm

Re: Looking for champion - std.lang.d.lex

2010-10-26 Thread Nick Sabalausky
dennis luehring dl.so...@gmx.net wrote in message news:ia6s3b$1q9...@digitalmars.com... Am 26.10.2010 16:48, schrieb dennis luehring: Am 26.10.2010 15:55, schrieb Leandro Lucarella: yupp - Spirit feels right on the integration-side, but becomes more and more evil when stuff gets bigger

Re: Looking for champion - std.lang.d.lex

2010-10-26 Thread Nick Sabalausky
Walter Bright newshou...@digitalmars.com wrote in message news:i9qd8q$1ls...@digitalmars.com... 4. the tokens should be a value type, not a reference type I'm curious, is your reason for this purely to avoid allocations during lexing, or are there other reasons too? If it's mainly to avoid

Re: Looking for champion - std.lang.d.lex

2010-10-26 Thread bearophile
Walter: Java made a related mistake by failing to acknowledge that value types have any useful purpose at all (unless they are built-in). Java was designed to be simple! Simple means to have a more uniform semantics. Removing value types was a good idea if you want to simplify a language

Re: Looking for champion - std.lang.d.lex

2010-10-26 Thread Nick Sabalausky
Walter Bright newshou...@digitalmars.com wrote in message news:ia8321$vu...@digitalmars.com... Nick Sabalausky wrote: Walter Bright newshou...@digitalmars.com wrote in message news:i9qd8q$1ls...@digitalmars.com... 4. the tokens should be a value type, not a reference type I'm curious, is

Re: Looking for champion - std.lang.d.lex

2010-10-26 Thread Walter Bright
Nick Sabalausky wrote: As for whether or not this effect can be reasonably accomplished with structs: I have no idea, I haven't really looked into it. I use a tagged variant for the token struct. This doesn't make any difference if one is parsing small pieces of code. But when you're trying

Re: Looking for champion - std.lang.d.lex

2010-10-25 Thread Nick Sabalausky
Walter Bright newshou...@digitalmars.com wrote in message news:ia34up$ld...@digitalmars.com... In the regexp code, I provided special regexes for email addresses and URLs. Those are hard to get right, so it's a large convenience to provide them. Also, many literals can be fairly complex,

Re: Looking for champion - std.lang.d.lex

2010-10-25 Thread Walter Bright
Nick Sabalausky wrote: Walter Bright newshou...@digitalmars.com wrote in message news:ia34up$ld...@digitalmars.com... In the regexp code, I provided special regexes for email addresses and URLs. Those are hard to get right, so it's a large convenience to provide them. Also, many literals can

Re: Looking for champion - std.lang.d.lex

2010-10-25 Thread Nick Sabalausky
Walter Bright newshou...@digitalmars.com wrote in message news:ia3c3r$14k...@digitalmars.com... Does Goldie's lexer not convert numeric literals to integer values? Are all tokens returned as strings? Goldie's lexer (and parser) are based on the GOLD system (

Re: Looking for champion - std.lang.d.lex

2010-10-25 Thread Walter Bright
Nick Sabalausky wrote: Walter Bright newshou...@digitalmars.com wrote in message news:ia3c3r$14k...@digitalmars.com... Does Goldie's lexer not convert numeric literals to integer values? Are all tokens returned as strings? Goldie's lexer (and parser) are based on the GOLD system (

Re: Looking for champion - std.lang.d.lex

2010-10-25 Thread Nick Sabalausky
Walter Bright newshou...@digitalmars.com wrote in message news:ia59si$1r0...@digitalmars.com... Consider a string literal, say abc\def. With Goldie's method, I infer this string has to be scanned twice. Once to find its limits, and the second to convert it to the actual string. Yea, that

Re: Looking for champion - std.lang.d.lex

2010-10-25 Thread Walter Bright
Nick Sabalausky wrote: Walter Bright newshou...@digitalmars.com wrote in message news:ia59si$1r0...@digitalmars.com... Consider a string literal, say abc\def. With Goldie's method, I infer this string has to be scanned twice. Once to find its limits, and the second to convert it to the actual

Re: Looking for champion - std.lang.d.lex

2010-10-24 Thread Nick Sabalausky
Walter Bright newshou...@digitalmars.com wrote in message news:ia0cfv$22k...@digitalmars.com... Nick Sabalausky wrote: Would Walter co be interested in this? If not, I won't bother, but if so, then I may give it a shot. The problem is I never have used parser/lexer generators, so I am not

Re: Looking for champion - std.lang.d.lex

2010-10-24 Thread Walter Bright
Nick Sabalausky wrote: If anyone's interested, further details are here(1): http://www.devincook.com/goldparser/ It looks nice, but in clicking around on FAQ, documentation, getting started, etc., I can't find any example code.

Re: Looking for champion - std.lang.d.lex

2010-10-24 Thread Denis Koroskin
On Sun, 24 Oct 2010 06:55:22 +0400, Nick Sabalausky a...@a.a wrote: bearophile bearophileh...@lycos.com wrote in message news:ia0410$1lj...@digitalmars.com... Nick Sabalausky: But that's all if you want generalized lexing or parsing though. If you just want lexing D code/parsing D code, then

Re: Looking for champion - std.lang.d.lex

2010-10-24 Thread Nick Sabalausky
Nick Sabalausky a...@a.a wrote in message news:ia0v9p$11...@digitalmars.com... Denis Koroskin 2kor...@gmail.com wrote in message news:op.vk2na9bpo7c...@korden-pc... On Sun, 24 Oct 2010 06:55:22 +0400, Nick Sabalausky a...@a.a wrote: bearophile bearophileh...@lycos.com wrote in message

Re: Looking for champion - std.lang.d.lex

2010-10-24 Thread Nick Sabalausky
Denis Koroskin 2kor...@gmail.com wrote in message news:op.vk2na9bpo7c...@korden-pc... On Sun, 24 Oct 2010 06:55:22 +0400, Nick Sabalausky a...@a.a wrote: bearophile bearophileh...@lycos.com wrote in message news:ia0410$1lj...@digitalmars.com... Nick Sabalausky: But that's all if you want

Re: Looking for champion - std.lang.d.lex

2010-10-24 Thread Nick Sabalausky
Walter Bright newshou...@digitalmars.com wrote in message news:ia0pce$2pb...@digitalmars.com... Nick Sabalausky wrote: If anyone's interested, further details are here(1): http://www.devincook.com/goldparser/ It looks nice, but in clicking around on FAQ, documentation, getting started,

Re: Looking for champion - std.lang.d.lex

2010-10-24 Thread Jacob Carlborg
On 2010-10-24 04:55, Nick Sabalausky wrote: bearophilebearophileh...@lycos.com wrote in message news:ia0410$1lj...@digitalmars.com... Nick Sabalausky: But that's all if you want generalized lexing or parsing though. If you just want lexing D code/parsing D code, then IMO anything other than

Re: Looking for champion - std.lang.d.lex

2010-10-24 Thread Walter Bright
Nick Sabalausky wrote: That does surprise me though, since I'm pretty sure Phobos is Boost License. Anyone know why the difference? Phobos is Boost licensed to enable maximum usage for any purpose. The dmd front end is GPL licensed in order to ensure it stays open source and to discourage

Re: Looking for champion - std.lang.d.lex

2010-10-24 Thread Walter Bright
It looks like a solid engine, and a nice tool. Does it belong as part of Phobos? I don't know. What do other D users think?

Re: Looking for champion - std.lang.d.lex

2010-10-24 Thread Walter Bright
Nick Sabalausky wrote: http://www.semitwist.com/goldiedocs/current/Docs/APIOver/StatVsDyn/ One question I have is how does it compare with Spirit? That would be its main counterpart in the C++ space.

Re: Looking for champion - std.lang.d.lex

2010-10-24 Thread div0
On 24/10/2010 18:19, Walter Bright wrote: Nick Sabalausky wrote: http://www.semitwist.com/goldiedocs/current/Docs/APIOver/StatVsDyn/ One question I have is how does it compare with Spirit? That would be its main counterpart in the C++ space. Spirit is a LL parser, so it's not really

Re: Looking for champion - std.lang.d.lex

2010-10-24 Thread Nick Sabalausky
Walter Bright newshou...@digitalmars.com wrote in message news:ia1ps7$1fq...@digitalmars.com... Nick Sabalausky wrote: http://www.semitwist.com/goldiedocs/current/Docs/APIOver/StatVsDyn/ One question I have is how does it compare with Spirit? That would be its main counterpart in the

Re: Looking for champion - std.lang.d.lex

2010-10-24 Thread Walter Bright
Nick Sabalausky wrote: Can't say I'm really familiar with Spirit. From a brief lookover, these are my impresions of the differences: Spirit: Grammar is embedded into your source code as actual C++ code. Goldie: Grammar is defined in a domain-specfic language. But either one could probably have

Re: Looking for champion - std.lang.d.lex

2010-10-24 Thread Nick Sabalausky
Walter Bright newshou...@digitalmars.com wrote in message news:ia2duj$2j7...@digitalmars.com... Nick Sabalausky wrote: Can't say I'm really familiar with Spirit. From a brief lookover, these are my impresions of the differences: Spirit: Grammar is embedded into your source code as actual

Re: Looking for champion - std.lang.d.lex

2010-10-24 Thread Walter Bright
Nick Sabalausky wrote: Walter Bright newshou...@digitalmars.com wrote in message Does Goldie have (like Spirit) a set of canned routines for things like numeric literals? No, but such things can easily be provided in the docs for simple copy-paste. For instance: DecimalLiteral = {Number}

Re: Looking for champion - std.lang.d.lex

2010-10-23 Thread Jacob Carlborg
On 2010-10-22 22:42, Nick Sabalausky wrote: Jacob Carlborgd...@me.com wrote in message news:i9spln$lb...@digitalmars.com... On 2010-10-22 17:37, BLS wrote: Why not creating a DLL/so based Lexer/Parser based on the existing DMD front end.? It could be always up to date. Necessary Steps.

Re: Looking for champion - std.lang.d.lex

2010-10-23 Thread Sean Kelly
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 10/22/10 16:28 CDT, Sean Kelly wrote: Andrei Alexandrescu Wrote: I have in mind the entire implementation of a simple design, but never had the time to execute on it. The tokenizer would work like this: alias Lexer!( +,

Re: Looking for champion - std.lang.d.lex

2010-10-23 Thread Sean Kelly
Sean Kelly s...@invisibleduck.org wrote: Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 10/22/10 16:28 CDT, Sean Kelly wrote: Andrei Alexandrescu Wrote: I have in mind the entire implementation of a simple design, but never had the time to execute on it. The tokenizer would

Re: Looking for champion - std.lang.d.lex

2010-10-23 Thread Andrei Alexandrescu
On 10/23/10 11:44 CDT, Sean Kelly wrote: Andrei Alexandrescuseewebsiteforem...@erdani.org wrote: On 10/22/10 16:28 CDT, Sean Kelly wrote: Andrei Alexandrescu Wrote: I have in mind the entire implementation of a simple design, but never had the time to execute on it. The tokenizer would work

Re: Looking for champion - std.lang.d.lex

2010-10-23 Thread Walter Bright
Andrei Alexandrescu wrote: During compilation, such non-tokens are recognized as code by the lexer generator and called appropriately. A comprehensive library of such routines completes a useful library. I agree, a set of canned and heavily optimized lexing functions for common things like

Re: Looking for champion - std.lang.d.lex

2010-10-23 Thread Andrei Alexandrescu
On 10/23/10 13:41 CDT, Walter Bright wrote: Andrei Alexandrescu wrote: During compilation, such non-tokens are recognized as code by the lexer generator and called appropriately. A comprehensive library of such routines completes a useful library. I agree, a set of canned and heavily

Re: Looking for champion - std.lang.d.lex

2010-10-23 Thread Walter Bright
Andrei Alexandrescu wrote: I don't see these two in tension. General does not need entail unsuitable for subtle particularities. It is more difficult, but not impossible. Again, a general parser that takes care of the 90% of the drudgework and gives enough hooks to do the remaining 10%, all as

Re: Looking for champion - std.lang.d.lex

2010-10-23 Thread Sean Kelly
Sean Kelly s...@invisibleduck.org wrote: Sean Kelly s...@invisibleduck.org wrote: Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 10/22/10 16:28 CDT, Sean Kelly wrote: Andrei Alexandrescu Wrote: I have in mind the entire implementation of a simple design, but never had the

Re: Looking for champion - std.lang.d.lex

2010-10-23 Thread Sean Kelly
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 10/23/10 11:44 CDT, Sean Kelly wrote: Andrei Alexandrescuseewebsiteforem...@erdani.org wrote: On 10/22/10 16:28 CDT, Sean Kelly wrote: Andrei Alexandrescu Wrote: I have in mind the entire implementation of a simple design, but

Re: Looking for champion - std.lang.d.lex

2010-10-23 Thread Nick Sabalausky
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message news:i9v8vq$2gv...@digitalmars.com... On 10/23/10 11:44 CDT, Sean Kelly wrote: Andrei Alexandrescuseewebsiteforem...@erdani.org wrote: On 10/22/10 16:28 CDT, Sean Kelly wrote: Andrei Alexandrescu Wrote: I have in mind the

Re: Looking for champion - std.lang.d.lex

2010-10-23 Thread Andrei Alexandrescu
On 10/23/10 16:39 CDT, Nick Sabalausky wrote: Andrei Alexandrescuseewebsiteforem...@erdani.org wrote in message news:i9v8vq$2gv...@digitalmars.com... What's wrong with regexes? That's pretty typical for lexers. I mentioned that using regexes is possible but would make it much more difficult

Re: Looking for champion - std.lang.d.lex

2010-10-23 Thread Nick Sabalausky
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message news:i9vlep$8a...@digitalmars.com... On 10/23/10 16:39 CDT, Nick Sabalausky wrote: Andrei Alexandrescuseewebsiteforem...@erdani.org wrote in message news:i9v8vq$2gv...@digitalmars.com... What's wrong with regexes? That's

Re: Looking for champion - std.lang.d.lex

2010-10-23 Thread Walter Bright
Nick Sabalausky wrote: What's wrong with regexes? They don't handle recursion.

Re: Looking for champion - std.lang.d.lex

2010-10-23 Thread bearophile
Walter: As we all know, tool support is important for D's success. Making tools easier to build will help with that. To that end, I think we need a lexer for the standard library - std.lang.d.lex. It would be helpful in writing color syntax highlighting filters, pretty printers,

  1   2   >