PackageTrack
Sign in Get early access

petitparser

A dynamic parser framework to build efficient grammars and parsers quickly.

7.0.2 1000K downloads/mo #73 most downloaded on pub.dev petitparser/dart-petitparser

What this package is like to depend on

Last release 6 months ago

14 Feb 2026

Release timing varies

gaps range from 2 weeks to 1.1 years

Some releases are documented

notes for 42 of 90 stable releases

Nothing withdrawn

no release was ever pulled

14 years old

92 releases · first in 2012

1 release in the last 12 months

see the full history below

Release timeline

92 releases · Oct 2012 to Feb 2026
2013 2015 2017 2019 2021 2023 2025
Release Pre-release

Releases

latest 60 of 92
  1. 7.0.2 14 Feb 2026
    Release notes

    Ready for PetitParser 7.0.2

    Open source →
    Release notes
    • Numerous fixes and improvements to documentation and examples.
    • Add a constant parser Parser.constant(Object value) that can be used to return a constant value.
    • Add a linter rule to detect duplicate parsers.
    Open source →
  2. 7.0.1 16 Aug 2025
    Release notes

    Update CHANGELOG.md for 7.0.1

    Open source →
    Release notes
    • Dart and Flutter 3.9 compatibility.
    • Minor optimization to repeating character parsers.
    • Assertion on looping trim parser.
    Open source →
  3. 7.0.0 15 Jun 2025
    Release notes
    • Dart 3.8 requirement.
    • Support for unicode character parsing in all relevant character parsers.
    • Most character parser constructors now uniformly support the following named arguments (breaking-change):
      • message: to customize the default error message;
      • ignoreCase: to accept lower- and upper-case variations; and
      • unicode: to decode surrogate pairs and instead of UTF-16 only.
    • For consistency and better flexibility in the future, replaced optional arguments to a named ones in various other constructors: Parser.flatten({String message}), Parser.not({String message}), Parser.neg({String message}), Parser.end({String message}), Parser.starString([String? message]), Parser.plusString({String? message}), Parser.timesString(int count, {String? message}), Parser.repeatString(int min, int max, {String? message}), failure({String message}), newline({String message}), undefined({String message}) (breaking-change).
    • Cleanup, simplifications, and optimizations to the codebase.
    • Removal of long deprecated code.
    Open source →
  4. 6.1.0 12 Jan 2025
    Release notes

    replaceAll is now also supported in dart2js

    Open source →
    Release notes
    • Improve documentation and fix broken links.
    • Prevent infinite recursion in repeating parsers.
    • Improve performance of case-insensitive string matching and the permutation parser.
    • Make the loopback variable in the expression builder public (thanks to joranmulderij).
    • Fix various bugs in equality testing of character predicates (thanks to North101).
    Open source →
  5. 6.0.2 30 Nov 2023

    Nothing published for this version

  6. 6.0.1 20 Aug 2023
    Release notes

    Relax SDK constraint, ready for 6.0.1

    Open source →
  7. 6.0.0 17 Aug 2023
    Release notes
    • Dart 3.0 requirement.
    • Use Dart Records for typed sequences:
      • Add convenience converter: (char('a'), char('b')).toSequenceParser()
      • And extension methods to emulate the old Sequence classes, deprecate old accessors.
    • Make Result a sealed class to be able to pattern match Success and Failure.
      • Removed the unused generic type of Failure, which is of type Result<Never> now.
      • Deprecated isSuccess and isFailure, instead use the more efficient is Success and is Failure operators.
    • Reintroduce hasSideEffect in MapParser and consider callbacks to be side-effect free by default.
    • The above changes give typical parser speed improvements between 10% and 30%.
    Open source →
  8. 5.4.0 24 Apr 2023
    Release notes

    Fix linter rule for UnnecessaryFlatten

    Open source →
    Release notes
    • Dart 2.19 requirement, enabled strict casts and type inference.
    • Introduce repeating character parser starString, plusString, timesString and repeatString for extra fast reading of strings.
    • Renamed AnyParser to AnyCharacterParser, and CharacterParser to SingleCharacterParser for consistency.
    • Add support for optional expression groups in the ExpressionBuilder.
    • Optimize, cleanup, and improve code and documentation.
    • Add optimize to in-place optimize parser graphs.
    Open source →
  9. 5.3.0 05 Mar 2023
    Release notes
    • Maintenance release deprecating some old code in anticipation of the upcoming major release.
    • Deprecate the old way of defining primitive parsers and move the functionality directly to ExpressionBuilder.
    • Deprecate GrammarDefinition.build(Function, List<Object?>), use buildFrom(Parser) for a strongly typed parser instead.
    • Replace various uses of exception throwing with assertions, which yields code the compiler can optimize better.
    Open source →
  10. 5.2.0 19 Feb 2023
    Release notes
    • Add @useResult to parser constructors to avoid bugs when using the old parser instance.
    • Add a linter rule to detect unoptimized flatten parsers.
    Open source →
  11. 5.1.0 23 Oct 2022
    Release notes
    • Dart 2.18 requirement.
    • Add seq2, seq3, ... combinator functions returning strongly typed sequences of Sequence2<R1, R2>, Sequence3<R1, R2, R3>, ...
    • Add Parser.starSeparated, Parser.plusSeparated, Parser.timesSeparated, and Parser.repeatSeparated returning SeparatedList with the strongly typed elements and separators. Deprecate the dynamically typed Parser.separatedBy.
    • Add Parser.matchesAll that creates a lazy iterable over the (overlapping or non-overlapping) successful parse results. Deprecate matches and matchesSkipping.
    • Add a native platform independent newline parser.
    • Add a section on debugging to the tutorial.
    • Remove the deprecated ref0, ref1, ... instance methods, these methods are globally defined since 4.2.0.
    • Make GrammarDefinition and GrammarDefinition.start() optionally typed.
    Open source →
  12. 5.0.0 11 Mar 2022
    Release notes
    • Dart 2.16 requirement.
    • Moved PetitParser examples to a separate Git repository: https://github.com/petitparser/dart-petitparser-examples.
    • Add a skip helper that silently consumes input before and/or after another parser.
    • Make the ExpressionBuilder<T> statically typed. This requires existing code to specify the desired result type, and provide all reduction actions.
    • Deprecate hasSideEffect in MapParser by considering all callbacks to have side-effects, the benefit of the added complications is negligible.
    • Add charIgnoringCase, and provide better standard error messages for character parsers.
    • Add initial support for indentation based grammars.
    Open source →
  13. 4.4.0 16 Oct 2021
    Release notes
    • Dart 2.15 requirement.
    • Add a PatternParser that allows to use any Dart Pattern as a parser.
    • Greatly improve the test coverage of all code to 98%.
    Open source →
  14. 4.3.0 10 Sep 2021
    Release notes
    • Dart 2.14 requirement.
    • Add a labeled parser, that allows to add a debug label to the parser graph.
    • Extract Predicate<T> and Callback<T> function types to shared file.
    • Change debug functions to named arguments, and generate output events with first class objects instead of strings.
    • Various improvements to the Analyzer:
      • Compute all deeply referenced children.
      • Compute all paths or the shortest path between parsers.
    • Fix inaccuracies in character parser documentation and tutorial.
    • Add more grammar linter rules that detect common bugs.
    Open source →
  15. 4.2.0 05 Jun 2021
    Release notes
    • Dart 2.13 requirement.
    • ref0, ref1, ref2, ... is now also usable outside of GrammarDefinition.
      • Use resolve to inline all the referenced parsers, which now also works with SettableParser.
      • Deprecated removeSettables, that is superseded by the more powerful resolve operation.
    • Add the possibility to join multiple Token and transform their values.
    • Add Analyzer to compute nullability, as well as first-, follow-, and cycle-sets of parsers.
    • Add a linter that performs a series of checks on grammar graphs.
    • Expand the tutorial with a section on testing.
    Open source →
  16. 4.1.0 05 Apr 2021
    Release notes
    • Add the option to select the failure join strategy on ChoiceParser parsers:
      • selectLast is the default strategy, reporting the failure of the last parser tried.
      • selectFarthest reports the parser failure the farthest down in the input string, preferring later failures to earlier ones.
      • selectFarthestJoined is the same as above, but joins error messages that happen at the same position.
    • Properly type all delegate parsers in choice, sequence, repeat, action, ...
      • Fix typing in transformParser and its users (debug tools, optimizers). To fix type your transformation function.
      • Fix typing of GrammarDefinition and reference parsers. To take advantage replace uses of ref with ref0, ref1, ...
      • Deprecate GrammarParser, a no longer needed wrapper around GrammarDefinition. Call build() on the definition to get the parser.
    • Improve documentation and add a tutorial section on GrammarDefinition.
    Open source →
  17. 4.0.2 19 Feb 2021

    Nothing published for this version

  18. 4.0.1 19 Feb 2021

    Nothing published for this version

  19. 4.0.0 17 Feb 2021
    Release notes
    • Dart 2.12 requirement and null-safety.
    • Success.message throws an UnsupportedError exception, instead of returning null.
    • DelegateParser has been made abstract to avoid a concrete class in-between abstract classes.
    • Parser.delegate() has been removed, use Parser.settable() as an equivalent replacement.
    • Parser.optional() is now returning Parser<T?>, to provide a non-null default value use Parser.optionalWith(T value).
    • Parser.not() is now returning the failure Parser<Failure> as success value, instead of null.
    • epsilon() is now returning Parser<void>, to provide a non-null default value use epsilonWith(T value).
    • Removed const constructor from Parser hierarchy, as most parsers are inherently mutable and having some constant makes things inconsistent and more complicated than necessary.
    Open source →
  20. 4.0.0-nullsafety.1 21 Nov 2020 pre-release

    Nothing published for this version

  21. 4.0.0-nullsafety 07 Sep 2020 pre-release

    Nothing published for this version

  22. 3.1.0 18 Jul 2020
    Release notes
    • Fix missing type information on eof and failure parser.
    • Optimize character predicates by using lookup tables.
    • Improvements to documentation and examples.
    Open source →
  23. 3.0.4 30 May 2020

    Nothing published for this version

  24. 3.0.3 30 May 2020

    Nothing published for this version

  25. 3.0.2 30 Mar 2020

    Nothing published for this version

  26. 3.0.1 12 Feb 2020

    Nothing published for this version

  27. 3.0.0 01 Jan 2020
    Release notes
    • Dart 2.7 compatibility and requirement (extension methods).
    • New features:
      • String.toParser() enables creating efficient string and character parsers more easily.
      • Iterable.toChoiceParser() and Iterable.toSequenceParser() enables creating parsers from collections more easily.
      • Parser.callCC(Function) enables capturing a parse continuation more easily.
    • Restructure the internal code to be more modular:
      • The Parser class now only defines a few core methods, everything else is an extension method.
      • As long as you continue to import package:petitparser/petitparser.dart none of the changes should affect existing code.
      • Parser implementations have been moved to package:petitparser/parser.dart.
      • Helpers to parse and extract data has been moved to package:petitparser/matcher.dart.
      • The expression builder has been moved to package:petitparser/expression.dart.
      • The grammar builder has been moved topackage:petitparser/definition.dart.
    • Breaking changes:
      • Parser is no longer a Pattern, but can be converted to one with toPattern.
      • anyIn has been removed in favor of the already existing and equivalent anyOf parser.
      • pick and permute are defined on Parser<List>, thus they won't be available on the more generic Parser<dynamic> any longer. Prefix the operators with a castList operator.
    Open source →
  28. 2.4.0 28 Jun 2019
    Release notes
    • Dart 2.4 compatibility and requirement.
    • More tight typing, more strict linter rules.
    • Documentation improvements.
    Open source →
  29. 2.3.0 10 May 2019
    Release notes
    • Dart 2.3 compatibility and requirement.
    • The expression builder supports building expression with parenthesis.
    • Improved the documentation on greedy and lazy parsers.
    • Add a prolog parser and interpreter example.
    • Numerous optimizations and improvements.
    Open source →
  30. 2.2.1 07 Mar 2019

    Nothing published for this version

  31. 2.2.0 27 Feb 2019
    Release notes
    • Dart 2.2 compatibility and requirement.
    • Parser implements the Pattern interface.
    • Add an example of the expression builder to the tutorial.
    • Introduce a fast-parse mode that avoids unnecessary memory allocations during parsing.
    Open source →
  32. 2.1.1 24 Jan 2019

    Nothing published for this version

  33. 2.1.0 07 Jan 2019
    Release notes
    • Rename ParserError to ParserException, and make it an Exception.
    • Simplify the EndOfInputParser and the ListParser.
    • Add a PositionParser that produces the current input position.
    • Constructor assertions across the stack.
    Open source →
  34. 2.0.2 27 Sep 2018

    Nothing published for this version

  35. 2.0.1 15 Sep 2018

    Nothing published for this version

  36. 2.0.0 01 Aug 2018
    Release notes
    • Make parsers fully typed, where it makes sense.
      • In most cases this should have no effect on existing code, but sometimes can point out actual bugs.
      • In rare cases, it might be necessary to insert cast<R> or castList<R> at the appropriate places.
    • Move examples into their own example package.
    Open source →
  37. 1.7.7 21 Jul 2018

    Nothing published for this version

  38. 1.7.6 15 Mar 2018
    Release notes
    • More Dart 2 strong mode fixes.
    Open source →
  39. 1.7.5 09 Mar 2018
    Release notes
    • Dart 2.0 strong mode compatibility.
    • Removed deprecated code, and empty beta package.
    • Reformatted all code using dartfmt.
    Open source →
  40. 1.7.4 09 Mar 2018

    Nothing published for this version

  41. 1.7.3 08 Mar 2018

    Nothing published for this version

  42. 1.7.2 08 Mar 2018

    Nothing published for this version

  43. 1.7.1 08 Mar 2018

    Nothing published for this version

  44. 1.7.0 19 Dec 2017
    Release notes
    • Dart 2.0 compatibility.
    • Fixed numerous analyzer warnings.
    • Generate better default error messages.
    • Moved example grammars to examples.
    Open source →
  45. 1.6.1 31 Aug 2017
    Release notes
    • Fix bug with duplicated package name.
    • Update documentation.
    Open source →
  46. 1.6.0 04 Aug 2017
    Release notes
    • Migrate to micro libraries.
    • Move Smalltalk, Json, Dart and Lisp grammars to examples.
    Open source →
  47. 1.5.5 04 Jul 2017
    Release notes
    • Strict typing fixes.
    Open source →
  48. 1.5.4 17 Oct 2016
    Release notes
    • Fix analyzer warnings.
    • Fix package dependencies.
    Open source →
  49. 1.5.3 05 Apr 2016
    Release notes
    • Dev compiler support.
    Open source →
  50. 1.5.2 05 Apr 2016
    Release notes
    • Enable strong mode.
    Open source →
  51. 1.5.1 17 Jan 2016
    Release notes
    • Improve the Dart parser and add more tests.
    Open source →
  52. 1.5.0 06 Oct 2015
    Release notes
    • Update documentation to match the style guide.
    • Change library names.
    • Add optimizations and tests for the Dart language grammar.
    • Improve comments.
    • Better error-handling and primitives for Lisp command line app.
    • Fix unicode parsing in the JSON parser.
    • Add browser back to dev_dependencies.
    Open source →
  53. 1.4.3 17 May 2015
    Release notes
    • Restore the CompositeParser class.
    • Add more references to open source projects using PetitParser.
    Open source →
  54. 1.4.2 17 May 2015
    Release notes
    • Integrate the tutorial into the README.
    • Improve formatting of README code blocks.
    Open source →
  55. 1.4.1 15 May 2015
    Release notes
    • Improve test coverage.
    • Bump minimum SDK to 1.8.0.
    • Remove deprecated CompositeParser class.
    Open source →
  56. 1.4.0 15 May 2015
    Release notes
    • Migrate from unittest to test.
    • Setup Travis.
    • Allow for const GrammarDefinitions.
    • Fix typo in docs.
    • Clean up the JSON grammar.
    • Format the benchmarks.
    Open source →
  57. 1.3.7 27 Feb 2015
    Release notes
    • Cleanup dependencies:
      • browser is now >=0.10.0 <0.11.0.
      • unittest is now >=0.11.0 <0.12.0.
      • Remove explicit dependency on matcher package.
    • Make the JSON parser twice as fast.
    • Reformat tests.
    Open source →
  58. 1.3.6 11 Feb 2015
    Release notes
    • Add a benchmark for JSON native vs PetitParser.
    Open source →
  59. 1.3.4 23 Jan 2015
    Release notes
    • Format source code.
    • Add missing documentation.
    Open source →
  60. 1.3.3 27 Dec 2014
    Release notes
    • Performance optimizations
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive