Next / Previous / Contents / Shipman's homepage

4.2. Structuring with results names

For parsers that appear only once at a specific level, consider using .setResultsName() to associate a results name with that parser. This allows you to retrieve the matched text by treating the returned ParseResults instance as a dictionary, and the results name as the key.

Design rules for this option: