Parslet: subtrees merged without warning?

Hi,

I miss subtrees which I wanted to be generated by certain ".as"'s and I
get _no_ "subtrees merged without warning".

When I add additional ".as" at higher level rules, I get these missed
subtrees, that's OK.

Is there a way to get a warning or notice every time an ".as" is not
routed to the result?

I want to avoid loosing results without notice.

Or, in which cases results are lost/merged silently?

Kind regards,
Axel

Using:
* ruby 1.9.3p327 (2012-11-10) [i386-mingw32]
* parslet (1.5.0)

···

--
Posted via http://www.ruby-forum.com/.

There was an error in my previous post. I corrected the message text
which I do _not_ get. It is:

"Duplicate subtrees while merging result of...only the values of the
latter will be kept"

Sorry about this,
Axel

···

--
Posted via http://www.ruby-forum.com/.

Or, in which cases results are lost/merged silently?

Only in one case: When merging a subtree containing .as(...) with another subtree that doesn't. The solution is in most cases to add more annotations (.as).

regards,
kaspar

Hallo Kaspar,

thank you for your answer and thank you for Parslet!

Could I easily add some extension code to get a message in this case,
too? If yes, where is/might be the "start point"?

Kind regards,
Axel

Kaspar Schiess wrote in post #1114730:

···

Or, in which cases results are lost/merged silently?

Only in one case: When merging a subtree containing .as(...) with
another subtree that doesn't. The solution is in most cases to add more
annotations (.as).

--
Posted via http://www.ruby-forum.com/\.

Could I easily add some extension code to get a message in this case,
too? If yes, where is/might be the "start point"?

Probably

https://github.com/kschiess/parslet/blob/master/lib/parslet/atoms/can_flatten.rb#L87

Such a feature would be quite the opposite of what result flattening is about - and would probably not make it into parslet, unless done cleverly. As is, for example, the case with error reporters that can be swapped out.

cheers
kaspar

Probably

Thank you for pointing to this.

Such a feature would be quite the opposite of what result flattening is
about ...

I think, I haven't understood the "philosophy" of Parslet yet. There are
one or two more issues, where I haven't understood why Parslet is
"thinking" the way it does. But I must admit, Parslet is the first
Parser I use (and it is the first time, I use Parslet) and I'm not a
professional programmer. I think, I will have to work with it quite a
lot more.

Regards,
Axel

···

--
Posted via http://www.ruby-forum.com/\.

I think, I haven't understood the "philosophy" of Parslet yet. There are
one or two more issues, where I haven't understood why Parslet is
"thinking" the way it does. But I must admit, Parslet is the first
Parser I use (and it is the first time, I use Parslet) and I'm not a
professional programmer. I think, I will have to work with it quite a
lot more.

The parslet mailing list has a bunch of friendly people that don't mind helping out. Welcome over there!

kaspar

The parslet mailing list has a bunch of friendly people that don't mind
helping out. Welcome over there!

Is that right?:
http://news.gmane.org/gmane.comp.lang.ruby.parslet

I ask, because I see only 2 messages there for 2013.

Axel

···

--
Posted via http://www.ruby-forum.com/\.

I ask, because I see only 2 messages there for 2013.

Yeah, gmane has a problem lateley. Here: parslet - Contribute

k

Yeah, gmane has a problem lateley. Here:
parslet - Contribute

Ah, that's the problem (gmane). On
http://librelist.com/browser/ruby.parslet/
I see a lot more discussions on Parslet. I'll read through the archive
and see if I find helpful things.

Thank you
Axel

···

--
Posted via http://www.ruby-forum.com/\.