Re: [Pharo-dev] Code generation for ASTs with syntax errors

2015-05-21 Thread Marcus Denker
Yes, we should fix it… > On 21 May 2015, at 09:22, Denis Kudriashov wrote: > > But statement after error is parsed and ast node exists for them. > Is it not correct to make end of error equal to start of next ast node? > > 19 мая 2015 г. 11:22 пользователь "Marcus Denker"

Re: [Pharo-dev] Code generation for ASTs with syntax errors

2015-05-21 Thread Denis Kudriashov
But statement after error is parsed and ast node exists for them. Is it not correct to make end of error equal to start of next ast node? 19 мая 2015 г. 11:22 пользователь "Marcus Denker" написал: > > On 19 May 2015, at 10:32, Thierry Goubier > wrote: > > > > 2015-05-19 10:27 GMT+02:00 Marcus De

Re: [Pharo-dev] Code generation for ASTs with syntax errors

2015-05-21 Thread Denis Kudriashov
Perfect! 19 мая 2015 г. 7:49 пользователь "Marcus Denker" написал: > > On 13 May 2015, at 11:21, Denis Kudriashov wrote: > > Thanks's Marcus. It is beautiful thing. > > Is parsing locate errors by "dot"s? I mean how it will parse "3+. 1+2"? It > will be super cool if we have only "3+." as error

Re: [Pharo-dev] Code generation for ASTs with syntax errors

2015-05-19 Thread Thierry Goubier
2015-05-19 11:22 GMT+02:00 Marcus Denker : > > On 19 May 2015, at 10:32, Thierry Goubier > wrote: > > > > 2015-05-19 10:27 GMT+02:00 Marcus Denker : > >> >> >>> >> And that view get the selection wrong ;) >> >> >> No, the ErrorNode has "all the rest" as it's extend for Shout so it can >> color th

Re: [Pharo-dev] Code generation for ASTs with syntax errors

2015-05-19 Thread Damien Pollet
On 18 May 2015 at 21:33, Marcus Denker wrote: > As for finding them: the nice property of syntax errors is that they are > trivial to detect statically… so e.g. we can add that people never can > commit code like that NOPE. The problem I had was that NBExternalStructure was changed from a vari

Re: [Pharo-dev] Code generation for ASTs with syntax errors

2015-05-19 Thread Marcus Denker
> On 19 May 2015, at 10:32, Thierry Goubier wrote: > > > > 2015-05-19 10:27 GMT+02:00 Marcus Denker >: > >> >> And that view get the selection wrong ;) >> > > No, the ErrorNode has “all the rest” as it’s extend for Shout so it can color > the error just th

Re: [Pharo-dev] Code generation for ASTs with syntax errors

2015-05-19 Thread Thierry Goubier
2015-05-19 10:27 GMT+02:00 Marcus Denker : > > >> > And that view get the selection wrong ;) > > > No, the ErrorNode has "all the rest" as it's extend for Shout so it can > color the error just the same as people are used to. > Ok. But I'd really like Shout not to color red the rest of the code

Re: [Pharo-dev] Code generation for ASTs with syntax errors

2015-05-19 Thread Marcus Denker
> > And that view get the selection wrong ;) > No, the ErrorNode has “all the rest” as it’s extend for Shout so it can color the error just the same as people are used to. Marcus

Re: [Pharo-dev] Code generation for ASTs with syntax errors

2015-05-19 Thread Thierry Goubier
2015-05-19 7:49 GMT+02:00 Marcus Denker : > > On 13 May 2015, at 11:21, Denis Kudriashov wrote: > > Thanks's Marcus. It is beautiful thing. > > Is parsing locate errors by "dot"s? I mean how it will parse "3+. 1+2"? It > will be super cool if we have only "3+." as error but remains code as good >

Re: [Pharo-dev] Code generation for ASTs with syntax errors

2015-05-18 Thread Marcus Denker
> On 13 May 2015, at 11:21, Denis Kudriashov wrote: > > Thanks's Marcus. It is beautiful thing. > > Is parsing locate errors by "dot"s? I mean how it will parse "3+. 1+2"? It > will be super cool if we have only "3+." as error but remains code as good one > You can just look at OpalCompile

Re: [Pharo-dev] Code generation for ASTs with syntax errors

2015-05-18 Thread Marcus Denker
> On 19 May 2015, at 01:51, Ben Coman wrote: > > > On Wed, May 13, 2015 at 4:41 PM, Damien Pollet > wrote: > On 13 May 2015 at 08:35, Marcus Denker > wrote: > Only three methods are needed to allow generating executable methods fr

Re: [Pharo-dev] Code generation for ASTs with syntax errors

2015-05-18 Thread Ben Coman
On Wed, May 13, 2015 at 4:41 PM, Damien Pollet wrote: > On 13 May 2015 at 08:35, Marcus Denker wrote: > >> Only three methods are needed to allow generating executable methods from >> such an AST: the SyntaxErrorNotification >> is raised at runtime instead of compile time. >> > > What is the ad

Re: [Pharo-dev] Code generation for ASTs with syntax errors

2015-05-18 Thread Marcus Denker
> On 13 May 2015, at 10:41, Damien Pollet wrote: > > On 13 May 2015 at 08:35, Marcus Denker > wrote: > Only three methods are needed to allow generating executable methods from > such an AST: the SyntaxErrorNotification > is raised at runtime instead of compile

Re: [Pharo-dev] Code generation for ASTs with syntax errors

2015-05-13 Thread Denis Kudriashov
Thanks's Marcus. It is beautiful thing. Is parsing locate errors by "dot"s? I mean how it will parse "3+. 1+2"? It will be super cool if we have only "3+." as error but remains code as good one Best regards, Denis 2015-05-13 9:35 GMT+03:00 Marcus Denker : > We can parse code with syntax errors:

Re: [Pharo-dev] Code generation for ASTs with syntax errors

2015-05-13 Thread Damien Pollet
On 13 May 2015 at 08:35, Marcus Denker wrote: > Only three methods are needed to allow generating executable methods from > such an AST: the SyntaxErrorNotification > is raised at runtime instead of compile time. > I can hear the noise of eyebrows raising in the compiler community :) Syntax er

[Pharo-dev] Code generation for ASTs with syntax errors

2015-05-12 Thread Marcus Denker
We can parse code with syntax errors: it generates partial ASTs with the faulty part of the input as a RBParseErrorNode. Only three methods are needed to allow generating executable methods from such an AST: the SyntaxErrorNotification is raised at runtime instead of compile time. testEvalSimp