The problem is, that in syntax there are often many symbols that are no longer needed once the string is parsed so I want to get rid of them.

For example imagine a string representation of an JSON array:

'[ 1, 2, 3 ]'

Once the string is parsed, the brackets are no longer needed so I can get rid of them with a block

MyJsonParser>>array
    ^ ($[ asParser, arrayElements, $] asParser) ==> [ :nodes | nodes second ]

This way the result of the array will not contain those $[ $] symbols because I am not interested in them after the parsing.

So, I would prefer to explicitly state that I am not interested in certain parser after it has done its job.

MyJsonParser>>array
    ^ $[ asParser ignore, arrayElements, $] asParser ignore

(or the other alternative mentioned in the first post)

Is what I am trying to accomplish clearer?

Peter