I talked to Lukas two years ago about parsing the longest match [1]. He committed it to PetitBeta back then. Now I need it and I had a look at the current parsers but didnât find one that can do the same. Is there a parser that can do longest match? If not I would propose adding that to the default petit parser package. Lukasâ proposal back then was LongestChoiceParser>>parseOn: aStream | start element longestEnd longestElement | start := aStream position. 1 to: parsers size do: [ :index | element := (parsers at: index) parseOn: aStream. (longestEnd isNil or: [ longestEnd < aStream position ]) ifTrue: [ longestEnd := aStream position. longestElement := element ]. aStream position: start ]. aStream position: longestEnd. ^ longestElement Norbert [1] http://www.iam.unibe.ch/pipermail/moose-dev/2011-July/009365.html