On 13 August 2011 15:06, Lukas Renggli <[email protected]> wrote:
> Can you give a real-world example that shows what you want to do? Do
> you just want to customize the error message if elementParser fails?
I want to parse arrays of strings, while also parsing each element
depending on where the array parse goes, e.g:
#('command' '--option' '123')
With a parser defined roughly like:
(PPElementParser on: (#word asParser plus token end)) ,
(PPElementParser on: ('--' asParser , #word asParser plus token
end ==> [:nodes | Option named: nodes second]) ,
(PPElementParser on: (#digit asParser plus token end ==> [:token |
token value asNumber])
--
Damien Pollet
type less, do more [ | ] http://people.untyped.org/damien.pollet