Comparison of parser generators


This is a list of notable lexer generators and parser generators for various language classes.

Regular languages

s are a category of languages which can be matched by a state machine constructed from a regular expression. In particular, a regular language can match constructs like "A follows B", "Either A or B", "A, followed by zero or more instances of B", but cannot match constructs which require consistency between non-adjacent elements, such as "some instances of A followed by the same number of instances of B", and also cannot express the concept of recursive "nesting". A classic example of a problem which a regular grammar cannot handle is the question of whether a given string contains correctly-nested parentheses.
NameLexer algorithmOutput languagesGrammar, codeDevelopment platformLicense
AlexDFAHaskell, BSD
AnnoFlexDFAJava, BSD
AustenXDFAJava, BSD
Booze-toolsDFAstate machine is runtime-generated or saved as JSON, public domain
C# FlexDFAC#, GNU GPL
C# LexDFAC#?
CookCCDFAJava, Apache 2.0
DFAlexDFAno code generation requiredJava, Apache 2.0
DolphinDFAC++
FlexDFA table drivenC, C++, BSD
gelexDFAEiffel, MIT
golexDFAGo, BSD-style
gplexDFAC#, BSD-like
JFlexDFAJava, BSD
JLexDFAJava, BSD-like
lexDFAC, proprietary, CDDL
lexertlDFAC++?, GNU LGPL
QuexDFA direct codeC, C++, GNU LGPL
RagelDFAC, C++, assembly, GNU GPL, MITComparison of parser generators#cite%20note-1|
RE/flexDFA direct code, DFA table driven, and NFA regex librariesC++, BSD
re2cDFA direct codeC, public domain

Deterministic context-free languages

s are a category of languages which can be matched by a sequence of replacement rules, each of which essentially maps each non-terminal element to a sequence of terminal elements and/or other nonterminal elements. Grammars of this type can match anything that can be matched by a regular grammar, and furthermore, can handle the concept of recursive "nesting", such as the question of whether a given string contains correctly-nested parentheses. The rules of Context-free grammars are purely local, however, and therefore cannot handle questions that require non-local analysis such as "Does a declaration exist for every variable that is used in a function?". To do so technically would require a more sophisticated grammar, like a Chomsky Type 1 grammar, also termed a context-sensitive grammar. However, parser generators for context-free grammars often support the ability for user-written code to introduce limited amounts of context-sensitivity.
The deterministic context-free languages are a proper subset of the context-free languages which can be efficiently parsed by deterministic pushdown automata.
NameParsing algorithmInput grammar notationOutput languagesGrammar, codeLexerDevelopment platformIDELicense
AGLGLREBNFGenerated at runtimenoneAny Kotlin target platform, Apache 2.0
ANTLR4ALLEBNFC#, Java, Python, JavaScript, C++, Swift, Go, PHPgenerated, BSD
ANTLR3LLEBNFActionScript, Ada95, C, C++, C#, Java, JavaScript, Objective-C, Perl, Python, Rubygenerated, BSD
APGRecursive descent, backtrackingABNFC, C++, JavaScript, Javanone, GNU GPL
AXERecursive descentAXE/C++C++17, C++11none, Boost
BeaverLALREBNFJavaexternal, BSD
BelrRecursive descentABNFC++17, C++11included, GNU GPL, proprietary
BisonLALR, LR, IELR, GLRYaccC, C++, Javaexternal, GNU GPL with exception
Bison++LALR?C++external, GNU GPL
Bisonc++LALR?C++external, GNU GPL
Booze-toolsLALR or LR canonical or minimalBNF with macros in place of EBNFState machine can be runtime-generated or saved as JSON, separableincluded, public domain
BtYaccBacktracking Bottom-up?C++external, public domain
byaccLALRYaccCexternal, public domain
BYACC/JLALRYaccC, Javaexternal, public domain
CL-YaccLALRLispCommon Lispexternal, MIT
Coco/RLLEBNFC, C++, C#, F#, Java, Ada, Object Pascal, Delphi, Modula-2, Oberon, Ruby, Swift, Unicon, Visual Basic.NETgenerated, GNU GPL
CookCCLALRJava annotationsJavagenerated, Apache 2.0
CppCCLL?C++generated, GNU GPL
CSPLR?C++generated, Apache 2.0
CUPLALR?Javaexternal, BSD-like
DragonLR, LALR?C++, Javagenerated, GNU GPL
eliLALR?Cgenerated, GNU GPL, GNU LGPL
EssenceLR?Scheme 48external, BSD
Eto.ParseLLBNF, EBNF or C#N/A internal, MIT
eyappLALR?Perlexternal or generated, Artistic
FrownLALR?Haskell 98external, GNU GPL
geyaccLALR?Eiffelexternal, MIT
GOLDLALRBNFx86 assembly language, ANSI C, C#, D, Java, Pascal, Object Pascal, Python, Visual Basic 6, Visual Basic.NET, Visual C++generated, zlib modified
GPPGLALRYaccC#external, BSD
GrammaticaLLBNF dialectC#, Javagenerated, BSD
HiLexedLLEBNF or JavaJavainternal, GNU LGPL
Hime Parser GeneratorLALR, GLRBNF dialectC#, Java, Rustgenerated, GNU LGPL
HyaccLR, LALR, LRYaccCexternal, GNU GPL
IronyLALRC#N/A internal, MIT
iyaccLALRYaccIconexternal, GNU LGPL
jaccLALR?Javaexternal, BSD
JavaCCLLEBNFJava, C++, JavaScript generated, BSD
jayLALRYaccC#, Javanone, BSD
JFLAPLL, LALR?Java???
JetPAGLL?C++generated, GNU GPL
JS/CCLALREBNFJavaScript, JScript, ECMAScriptinternal, BSD
KDevelop-PG-QtLL, backtracking, shunting-yard?C++generated or external, GNU LGPL
KelbtBacktracking LALR?C++generated, GNU GPL
kmyaccLALR?C, Java, Perl, JavaScriptexternal, GNU GPL
LapgLALR?C, C++, C#, Java, JavaScriptgenerated, GNU GPL
LarkLALR, Earley, CYKEBNFPython none, MIT
LemonLALR?Cexternal, public domain
LEPLRecursive descentPythonPython none, MPL, GNU LGPL
LimeLALR?PHPexternal, GNU GPL
LISALR, LL, LALR, SLR?Javagenerated, public domain
LLgenLL?Cexternal, BSD
LLnextgenLL?Cexternal, GNU GPL
LLLPGLL + syntactic and semantic predicatesANTLR-likeC#generated , GNU LGPL
LPGBacktracking LALR?Javagenerated, EPL
LRX
parser generator
LALR, LRYACC, ANTLR, EBNFC++separatedgeneratedWindowsBSD
MenhirLR?OCamlgenerated, QPL
ML-YaccLALR?MLexternal?
MonkeyLR?Javagenerated, GNU GPL
MstaLALR, LRYACC, EBNFC, C++external or generated, GNU GPL
MTP LL?Javagenerated, GNU GPL
MyParserLLMarkdownC++11internal, MIT
NLTGLRC#/BNF-likeC#mixed, MIT
ocamlyaccLALR?OCamlexternal, QPL
olexLL?C++generated, GNU GPL
parglareScannerless LALR/SLR/GLRBNF-like, PythonN/A none, MIT
ParsecLL, backtrackingHaskellHaskellnone, BSD
Parse::YappLALR?Perlexternal, GNU GPL
Parser ObjectsLL?Java?, zlib
PCCTSLL?C, C++???
PLYLALRBNFPythongenerated, MIT
PlyPlusLALREBNFPythongenerated, MIT
PRECCLL?Cgenerated, GNU GPL
QLALRLALR?C++external, GNU GPL
RPATKRecursive descent, backtrackingBNFC none, GNU GPL
SableCCLALR?C, C++, C#, Java, OCaml, Pythongenerated, GNU LGPL
SLKLL LR LALREBNFC, C++, C#, Java, JavaScriptexternalSLK
SP Recursive descentPythonPythongenerated, GNU LGPL
SpiritRecursive descent?C++internal, Boost
SpracheLL, backtrackingC#interpretedinternal, MIT
StyxLALR?C, C++generated, GNU LGPL
Sweet ParserLALR?C++generated, zlib
TapLL?C++generated, GNU GPL
TextTransformerLL?C++generated
TinyPGLL?C#, Visual Basic??, CPOL 1.0
Toy Parser GeneratorRecursive descent?Pythongenerated, GNU LGPL
TP YaccLALR?Turbo Pascalexternal, GNU GPL
Tunnel Grammar StudioRecursive descent, backtrackingABNFC++generated
UltraGramLALR, LR, GLRBNFC++, Java, C#, Visual Basic.NETexternal, public domain
UniCCLALREBNFC, C++, Python, JavaScript, JSON, XMLgenerated, BSD
UrchinCCLL?Java?generated?
WhaleLR, some conjunctive stuff, see Whale Calf?C++external
wisentLALR?C++, Javaexternal, GNU GPL
Yacc AT&T/SunLALRYaccCexternal, CPL & CDDL
Yacc++LR, LALRYaccC++, C#generated or external
YappsLL?Pythongenerated, MIT
yeccLALR?Erlanggenerated, Apache 2.0
Visual BNFLR, LALR?C#generated
YooParseLR, LALR?C++external, MIT
LRBNF in C++ types??none, MIT
GGLLLLGraphJavagenerated, MIT
ProductParsing algorithmInput grammar notationOutput languagesGrammar, codeLexerDevelopment platformIDELicense

Parsing expression grammars, deterministic boolean grammars

This table compares parser generators with parsing expression grammars, deterministic boolean grammars.
NameParsing algorithmOutput languagesGrammar, codeDevelopment platformLicense
ArpeggioPEG parser interpreter, PackratPython , MIT
AustenXPackrat Java, BSD
AurochsPackratC, OCaml, Java, GNU GPL
BNFliteRecursive descentC++, MIT
CanopyPackratJava, JavaScript, Python, Ruby, GNU GPL
CL-pegPackratCommon Lisp, MIT
Drat!PackratD, GNU GPL
FrisbyPackratHaskell, BSD
grammar::pegPackratTcl, BSD
GrakoPackrat + Cut + Left RecursionPython, C++ , BSD
IronMetaPackratC#, BSD
KatahdinPackrat, mutating interpreterC#, public domain
Laja2-phase scannerless top-down backtracking + runtime supportJava, GNU GPL
lars::ParserPackrat C++Identical, BSD
LPegParsing machineLua, MIT
lugParsing machineC++17, MIT
MouseRecursive descentJava, Apache 2.0
NarwhalPackratC, BSD
NearleyEarleyJavaScript, MIT
Nemerle.PegRecursive descent + PrattNemerle, BSD
neotomaPackratErlang, MIT
NPEGRecursive descentC#, MIT
OMetaPackrat JavaScript, Squeak, Python, MIT
PackCCPackrat C, MIT
PackratPackratScheme, MIT
PappyPackratHaskell, BSD
parboiledRecursive descentJava, Scala, Apache 2.0
Lambda PEGRecursive descentJava, Apache 2.0
parseppRecursive descentC++, public domain
ParsnipPackratC++, GNU GPL
pegRecursive descentC, MIT
PEG.jsPackrat JavaScript, MIT
peg-parserPEG parser interpreterDylan?
PegasusRecursive descent, Packrat C#, MIT
pegcRecursive descentC, public domain
pestRecursive descentRust, MPL
PetitParserPackratSmalltalk, Java, Dart, MIT
PEGTLRecursive descentC++11, MIT
Parser Grammar Engine Hybrid recursive descent / operator precedenceParrot bytecode, Artistic 2.0
PyPy rlibPackratPython, MIT
pyPEGPEG parser interpreter, PackratPython, GNU GPL
Rats!PackratJava, GNU LGPL
Spirit2Recursive descentC++, Boost
TatSuPEG parser interpreter, PackratPython?
textXPEG parser interpreter, PackratPython , MIT
TreetopRecursive descentRuby, MIT
YardRecursive descentC++, MIT or public domain
WaxeyeParsing machineC, Java, JavaScript, Python, Racket, Ruby, MIT
PHP PEGPEG Parser?PHP, BSD

General context-free, conjunctive, or boolean languages

This table compares parser generator languages with a general context-free grammar, a conjunctive grammar, or a boolean grammar.
NameParsing algorithmInput grammar notationOutput languagesGrammar, codeLexerDevelopment platformIDELicense
ACCENTEarleyYacc variantCexternal, GNU GPL
APaGeDGLR, LALR, LL?Dgenerated, Artistic
BisonLALR, LR, IELR, GLRYaccC, C++, Java, XML, except XMLexternal, GNU GPL
DMS Software Reengineering ToolkitGLR?Parlansegenerated
DParserScannerless GLR?Cscannerless, BSD
DypgenRuntime-extensible GLR?OCamlgenerated, CeCILL-B
E3Earley?OCamlexternal, or scannerless?
ElkhoundGLR?C++, OCamlexternal, BSD
eu.h8me.ParsingGLR?N/A external, BSD
GDKLALR, GLR?C, Lex, Haskell, HTML, Java, Object Pascal, Yaccgenerated, MIT
HappyLALR, GLR?Haskellexternal, BSD
Hime Parser GeneratorGLR?C#, Java, Rustgenerated, GNU LGPL
IronText LibraryLALR, GLRC#C#generated or external, Apache 2.0
JisonLALR, LR, SLRYaccJavaScript, C#, PHPgenerated, MIT
SyntaxLALR, LR, SLR CLR LLJSON/YaccJavaScript, Python, PHP, Ruby, C#, Rust, Javagenerated, MIT
LajaScannerless, two phaseLajaJavascannerless, GNU GPL
ModelCCEarleyAnnotated class modelJavaGeneratedgenerated, BSD
parglareScannerless LR/GLRBNF-likePython interpreted, automata run-time generatedscannerless, MIT
P1CombinatorsBNF-likeOCamlexternal, or scannerless?
P3Earley–combinatorsBNF-likeOCamlexternal, or scannerless?
P4Earley–combinators, infinitary CFGsBNF-likeOCamlexternal, or scannerless?
Scannerless Boolean ParserScannerless GLR ?Haskell, Javascannerless, BSD
SDF/SGLRScannerless GLRSDFC, Javascannerless, BSD
SmaCCGLR, LALR, LR?Smalltalkinternal, MIT
SPARKEarley?Pythonexternal, MIT
TomGLR?CGeneratednone, "No licensing or copyright restrictions"
UltraGramLALR, LR, GLR?C++, C#, Java, Visual Basic.NETgenerated
WormholePruning, LR, GLR, Scannerless GLR?C, Pythonscannerless, MIT
Whale CalfGeneral tabular, SLL, Linear normal form, LR, Binary normal form ?C++external
yaepEarleyYacc-likeCexternal, GNU LGPL
ZeccRecursive pattern matchingZecc/ZaccLinkable libraryScannerless

Context-sensitive grammars

This table compares parser generators with context-sensitive grammars.
NameParsing algorithmInput grammar notationBoolean grammar abilitiesDevelopment platformLicense
LuZcdelta chainmodularConjunctive, not complimentary
Recursive descent simple BNF grammar, output is xml?Beta, and not a full EBNF parser, GNU GPL