Re: [Pharo-users] Help Petit Parse
Thank you both, Pau -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Re: [Pharo-users] Help Petit Parse
That is indeed the solution. Doru > On Mar 13, 2018, at 6:16 AM, Holger Freytherwrote: > > > >> On 12. Mar 2018, at 23:07, Pau Guillot wrote: >> >> (#word asParser , #digit asParser plus flatten ==> [:node | node second]) >> star parse: 'A123A123'. >> -> #('123' '123') > > (((#word asParser , #digit asParser plus flatten ==> [:node | node second]) > plus) ==> [ :node | '' join: node]) parse: 'a123a123' > => '123123' > > probably there is a nicer way. ;) -- www.tudorgirba.com www.feenk.com “Live like you mean it."
Re: [Pharo-users] Help Petit Parse
> On 12. Mar 2018, at 23:07, Pau Guillotwrote: > > (#word asParser , #digit asParser plus flatten ==> [:node | node second]) > star parse: 'A123A123'. > -> #('123' '123') (((#word asParser , #digit asParser plus flatten ==> [:node | node second]) plus) ==> [ :node | '' join: node]) parse: 'a123a123' => '123123' probably there is a nicer way. ;)
[Pharo-users] Help Petit Parse
Hello, I can not manage this syntax that seems to be simple. MyParser parse: 'A123A123' -> '123123' not: #('123' '123') (#word asParser , #digit asParser plus flatten ==> [:node | node second]) star parse: 'A123A123'. -> #('123' '123') (#word asParser , #digit asParser plus flatten ==> [:node | node second]) star flatten parse: 'A123A123'. -> 'A123A123' Thank you. -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html