not sure what is the probleme exactly.

if you don't put any semantic action "==> [....]"

then the parser does not produce anything, no?

nicolas


On 22/06/2015 10:42, Peter Uhnák wrote:
Hi,

is it possible to add such a parser that would consume input, but wouldn't return anything?

Right now I do things like...

MyParser>>rule
    ^ ($[ asParser, anotherRule, $] asParser) ==> [ :nodes | nodes second ]

Of course when the rules are more complex, so is the block; however it seems that this is how it's done in the example parsers...

So, would it be possible to add some kind of Null/Void/Ignore/Throwaway parser, that would consume the input, but would be omitted from the result?

so the above method could be written as

MyParser>>rule
    ^ $[ asNullPaser, anotherRule, $] asNullParser

or

MyParser>>rule
    ^ $[ asParser ignore, anotherRule, $[ asParser ignore

or something else.

Thanks,
Peter


_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev