Parslet: subtrees merged without warning?

Hi,

I miss subtrees which I wanted to be generated by certain “.as”'s and I
get no “Duplicate subtrees while merging result…”-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)

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

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 S. 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).

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

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

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

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

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

Yeah, gmane has a problem lateley. Here:
http://kschiess.github.io/parslet/contribute.html

k

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

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