Re: *** GMX Spamverdacht *** RegEx for a simple Lexer

2014-05-15 Thread Tim Holzschuh via Digitalmars-d-learn
Am 13.05.2014 21:53, schrieb Tim Holzschuh via Digitalmars-d-learn: [...] Thank you for all your interesing links and tips, I'll check these out! Tim

Re: RegEx for a simple Lexer

2014-05-14 Thread Kagamin via Digitalmars-d-learn
On Tuesday, 13 May 2014 at 20:02:59 UTC, Tim Holzschuh via Digitalmars-d-learn wrote: Still: Would it be very difficult to write a suitable parser from scratch? See http://forum.dlang.org/post/lbnheh$2ssm$1...@digitalmars.com with duscussion about parsers on reddit.

Re: RegEx for a simple Lexer

2014-05-13 Thread Ary Borenszweig via Digitalmars-d-learn
On 5/13/14, 5:43 PM, anonymous wrote: On Tuesday, 13 May 2014 at 19:53:17 UTC, Tim Holzschuh via Digitalmars-d-learn wrote: If I also want to create a RegEx to filter string-expressions a la " xyz ", how would I do this? At least match( src, r"^\" (.*) $\" " ); doesn't seem to work and I couldn

Re: RegEx for a simple Lexer

2014-05-13 Thread Brian Schott via Digitalmars-d-learn
On Tuesday, 13 May 2014 at 19:53:17 UTC, Tim Holzschuh via Digitalmars-d-learn wrote: Hi there, I read a book about an introduction to creating programming languages (really basic). The sample code is written in Ruby, but I want to rewrite the examples in D. However, the Lexer uses Ruby's r

Re: RegEx for a simple Lexer

2014-05-13 Thread anonymous via Digitalmars-d-learn
On Tuesday, 13 May 2014 at 19:53:17 UTC, Tim Holzschuh via Digitalmars-d-learn wrote: If I also want to create a RegEx to filter string-expressions a la " xyz ", how would I do this? At least match( src, r"^\" (.*) $\" " ); doesn't seem to work and I couldn't find in the Library Reference how

Re: *** GMX Spamverdacht *** RegEx for a simple Lexer

2014-05-13 Thread Tim Holzschuh via Digitalmars-d-learn
Am 13.05.2014 21:53, schrieb Tim Holzschuh via Digitalmars-d-learn: In the book a parser generator like Yacc is used to create a suitable parser. Is there an equivalent for D? Or if not: is it really that hard to create a parser that is able to parse sth. like this: Ah, found pegged [1], than

RegEx for a simple Lexer

2014-05-13 Thread Tim Holzschuh via Digitalmars-d-learn
Hi there, I read a book about an introduction to creating programming languages (really basic). The sample code is written in Ruby, but I want to rewrite the examples in D. However, the Lexer uses Ruby's regex features to scan the code. I'm not very familiar with D's RegEx system (nor with an