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

Regular languages

Regular languages are a category of languages (sometimes termed Chomsky Type 3) which can be matched by a state machine (more specifically, by a deterministic finite automaton or a nondeterministic finite automaton) 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" ("every A is eventually followed by a matching B"). A classic example of a problem which a regular grammar cannot handle is the question of whether a given string contains correctly nested parentheses. (This is typically handled by a Chomsky Type 2 grammar, also termed a context-free grammar.)

More information Name, Lexer algorithm ...
NameLexer algorithmOutput languagesGrammar, codeDevelopment platformLicense
AlexDFAHaskellMixedAllFree, BSD
AnnoFlexDFAJavaMixedJava virtual machineFree, BSD
AstirDFA table driven, with branchingC++Only grammar (actioned)AllFree, MIT
AustenXDFAJavaSeparateAllFree, BSD
C# FlexDFAC#Mixed.NET CLRFree, GNU GPL
C# LexDFAC#Mixed.NET CLR ?
CookCCDFAJavaMixedJava virtual machineFree, Apache 2.0
DFADFA compressed matrixC, C++SeparateWindows, Visual StudioBSD
DolphinDFAC++SeparateAllProprietary
FlexDFA table drivenC, C++MixedAllFree, BSD
gelexDFAEiffelMixedEiffelFree, MIT
golexDFAGoMixedGoFree, BSD-style
gplexDFAC#Mixed.NET CLRFree, BSD-like
JFlexDFAJavaMixedJava virtual machineFree, BSD
JLexDFAJavaMixedJava virtual machineFree, BSD-like
lexDFACMixedPOSIXPartial, proprietary, CDDL
lexertlDFAC++ ?AllFree, GNU LGPL
QuexDFA direct codeC, C++MixedAllFree, GNU LGPL
RagelDFAGo, C, C++, Java, assemblyMixedAllFree, GNU GPL, MIT[1][2]
RE/flexDFA direct code, DFA table driven, and NFA regex librariesC++MixedAllFree, BSD
re2cDFA direct codeC, C++, Go, RustMixedAllFree, public domain
Close

Deterministic context-free languages

Context-free languages are a category of languages (sometimes termed Chomsky Type 2) 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" ("every A is eventually followed by a matching B"), 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. (For example, upon encountering a variable declaration, user-written code could save the name and type of the variable into an external data structure, so that these could be checked against later variable references detected by the parser.)

The deterministic context-free languages are a proper subset of the context-free languages which can be efficiently parsed by deterministic pushdown automata.

More information Name, Parsing algorithm ...
NameParsing algorithmInput grammar notationOutput languagesGrammar, codeLexerDevelopment platformIDELicense
ANTLR4Adaptive LL(*)[3]EBNFC#, Java, Python, JavaScript, C++, Swift, Go, PHPSeparategeneratedJava virtual machineYesFree, BSD
ANTLR3LL(*)EBNFActionScript, Ada95, C, C++, C#, Java, JavaScript, Objective-C, Perl, Python, RubyMixedgeneratedJava virtual machineYesFree, BSD
APG[4]Recursive descent, backtrackingABNFPython, JavaScript, C, JavaSeparatenoneAllNoFree, BSD
Beaver[5][6]LALR(1)EBNFJavaMixedexternalJava virtual machineNoFree, BSD
BisonLALR(1), LR(1), IELR(1), GLRYaccC, C++, JavaMixedexternalAllNoFree, GNU GPL with exception
BtYaccBacktracking Bottom-up ?C++MixedexternalAllNoFree, public domain
byaccLALR(1)YaccCMixedexternalAllNoFree, public domain
CL-Yacc[7][8]LALR(1)LispCommon LispMixedexternalAllNoFree, MIT
Coco/RLL(1) + semantic predicatesEBNFC, C++, C#, F#, Java, Ada, Object Pascal, Delphi, Modula-2, Oberon, Ruby, Swift, Unicon, Visual Basic .NETMixedgeneratedJava virtual machine, .NET framework, Windows, POSIX (depends on output language)NoFree, GNU GPL
CppCC[9][10]LL(k) ?C++MixedgeneratedPOSIXNoFree, GNU GPL
CUP[11][12]LALR(1) ?JavaMixedexternalJava virtual machineNoFree, BSD-like
Eli[13][14]LALR(1) ?CMixedgeneratedPOSIXNoFree, GNU GPL, GNU LGPL
Essence[15]LR(?) ?Scheme 48MixedexternalAllNoFree, BSD
eyapp[16]LALR(1) ?PerlMixedexternal or generatedAllNoFree, Artistic
GOLD[17]LALR(1)BNFx86 assembly language, ANSI C, C#, D, Java, Pascal, Object Pascal, Python, Visual Basic 6, Visual Basic .NET, Visual C++SeparategeneratedWindowsYesFree, zlib modified
Hime Parser Generator[18]LALR(1), GLRBNF dialectC#, Java, RustSeparategenerated.NET framework, Java virtual machineNoFree, GNU LGPL
Hyacc[19]LR(1), LALR(1), LR(0)YaccCMixedexternalAllNoFree, GNU GPL
JavaCC[20][21]LL(k)EBNFJava, C++, JavaScript (via GWT compiler)[22]MixedgeneratedJava virtual machineYesFree, BSD
JFLAPLL(1), LALR(1) ?Java ? ?Java virtual machineYes ?
JetPAGLL(k) ?C++MixedgeneratedAllNoFree, GNU GPL
JS/CCLALR(1)EBNFJavaScript, JScript, ECMAScriptMixedinternalAllYesFree, BSD
KDevelop-PG-QtLL(1), backtracking, shunting-yard ?C++Mixedgenerated or externalAll, KDENoFree, GNU LGPL
KelbtBacktracking LALR(1) ?C++MixedgeneratedPOSIXNoFree, GNU GPL
kmyaccLALR(1) ?C, Java, Perl, JavaScriptMixedexternalAllNoFree, GNU GPL
LapgLALR(1) ?C, C++, C#, Java, JavaScriptMixedgeneratedJava virtual machineNoFree, GNU GPL
LarkLALR(1), Earley (SPPF)EBNFPython, JavaScriptMixedgeneratedAllYesFree, MIT
LemonLALR(1)BNF dialect[23]CMixedexternalAllNoFree, public domain
Lezer[24][25][26]LR(1), GLREBNF dialectJavaScriptSeparategeneratedNode.js, JavaScriptNoFree, MIT
LimeLALR(1) ?PHPMixedexternalAllNoFree, GNU GPL
LISALR(?), LL(?), LALR(?), SLR(?) ?JavaMixedgeneratedJava virtual machineYesFree, public domain
LLgenLL(1) ?CMixedexternalPOSIXNoFree, BSD
LLnextgenLL(1) ?CMixedexternalAllNoFree, GNU GPL
LLLPGLL(k) + syntactic and semantic predicatesANTLR-likeC#Mixedgenerated (?).NET framework, MonoVisual StudioFree, GNU LGPL
LPGBacktracking LALR(k) ?JavaMixedgeneratedJava virtual machineNoFree, EPL
LRSTAR[27]LALR(1), LALR(*)YACC, ANTLR, EBNFC++SeparategeneratedWindowsVisual StudioFree, BSD
MenhirLR(1) ?OCamlMixedgeneratedAllNoFree, QPL
ML-YaccLALR(1) ?MLMixedexternalAllNo ?
MonkeyLR(1) ?JavaSeparategeneratedJava virtual machineNoFree, GNU GPL
MstaLALR(k), LR(k)YACC, EBNFC, C++Mixedexternal or generatedPOSIX, CygwinNoFree, GNU GPL
MTP (More Than Parsing)LL(1) ?JavaSeparategeneratedJava virtual machineNoFree, GNU GPL
MyParserLL(*)MarkdownC++11SeparateinternalAny with standard C++11 compilerNoFree, MIT
NLTGLRC#/BNF-likeC#Mixedmixed.NET frameworkNoFree, MIT
ocamlyaccLALR(1) ?OCamlMixedexternalAllNoFree, QPL
olexLL(1) ?C++MixedgeneratedAllNoFree, GNU GPL
ParsecLL, backtrackingHaskellHaskellMixednoneAllNoFree, BSD
yapp[16]LALR(1) ?PerlMixedexternalAllNoFree, GNU GPL
Parser ObjectsLL(k) ?JavaMixed ?Java virtual machineNoFree, zlib
PCCTSLL ?C, C++ ? ?AllNo ?
PLYLALR(1)BNFPythonMixedgeneratedAllNoFree, MIT
PlyPlusLALR(1)EBNFPythonSeparategeneratedAllNoFree, MIT
PRECCLL(k) ?CSeparategeneratedDOS, POSIXNoFree, GNU GPL
racc[28] LALR(1) BNF-like, yacc-like[29] Ruby Mixed  ? Windows, Linux, macOS, FreeBSD, NetBSD No LGPL
QLALRLALR(1) ?C++MixedexternalAllNoFree, GNU GPL
SableCCLALR(1) ?C, C++, C#, Java, OCaml, PythonSeparategeneratedJava virtual machineNoFree, GNU LGPL
SLK[30]LL(k) LR(k) LALR(k)EBNFC, C++, C#, Java, JavaScriptSeparateexternalAllNoSLK[31]
SLY[32]LALR(1)BNFPythonMixedgeneratedAllNoFree, MIT
SP (Simple Parser)Recursive descentPythonPythonSeparategeneratedAllNoFree, GNU LGPL
SpiritRecursive descent ?C++MixedinternalAllNoFree, Boost
StyxLALR(1) ?C, C++SeparategeneratedAllNoFree, GNU LGPL
Sweet ParserLALR(1) ?C++SeparategeneratedWindowsNoFree, zlib
TapLL(1) ?C++MixedgeneratedAllNoFree, GNU GPL
TextTransformerLL(k) ?C++MixedgeneratedWindowsYesProprietary
TinyPGLL(1) ?C#, Visual Basic ? ?WindowsYesPartial, CPOL 1.0
Toy Parser GeneratorRecursive descent ?PythonMixedgeneratedAllNoFree, GNU LGPL
TP YaccLALR(1) ?Turbo PascalMixedexternalAllYesFree, GNU GPL
Tree-Sitter[33]LR(1), GLRJavaScript DSL, JSONC, bindings (Rust, WebAssembly, JavaScript, Python, many other)Separategenerated + externalAllNeovim, Helix, GNU Emacs, Lapce, ZedFree, MIT
Tunnel Grammar StudioTunnel ParsingABNFC++SeparategeneratedWindowsYesProprietary
UltraGramLALR(1), LR(1), GLRBNFC++, Java, C#, Visual Basic .NETSeparateexternalWindowsYesFree, public domain
UniCCLALR(1)EBNFC, C++, Python, JavaScript, JSON, XMLMixedgeneratedPOSIXNoFree, BSD
UrchinCCLL(1) ?Java ?generatedJava virtual machineNo ?
Yacc AT&T/SunLALR(1)YaccCMixedexternalPOSIXNoFree, CPL & CDDL
Yacc++LR(1), LALR(1)YaccC++, C#Mixedgenerated or externalAllNoProprietary
YappsLL(1) ?PythonMixedgeneratedAllNoFree, MIT
yeccLALR(1) ?ErlangSeparategeneratedAllNoFree, Apache 2.0
Visual BNFLR(1), LALR(1) ?C#Separategenerated.NET frameworkYesProprietary
YooParseLR(1), LALR(1) ?C++MixedexternalAllNoFree, MIT
Parse[34]LR(1)BNF in C++ types ? ?noneC++11 standard compilerNoFree, MIT
GGLLLL(1)GraphJavaMixedgeneratedWindowsYesFree, MIT
ProductParsing algorithmInput grammar notationOutput languagesGrammar, codeLexerDevelopment platformIDELicense
Close

Parsing expression grammars, deterministic boolean grammars

This table compares parser generators with parsing expression grammars, deterministic boolean grammars.

More information Name, Parsing algorithm ...
NameParsing algorithmOutput languagesGrammar, codeDevelopment platformLicense
AustenXPackrat (modified)JavaSeparateAllFree, BSD
AurochsPackratC, OCaml, JavaMixedAllFree, GNU GPL
BNFliteRecursive descentC++MixedAllFree, MIT
CanopyPackratJava, JavaScript, Python, RubySeparateAllFree, GNU GPL
CL-pegPackratCommon LispMixedAllFree, MIT
Drat!PackratDMixedAllFree, GNU GPL
FrisbyPackratHaskellMixedAllFree, BSD
grammar::pegPackratTclMixedAllFree, BSD
GrakoPackrat + Cut + Left RecursionPython, C++ (beta)SeparateAllFree, BSD
IronMetaPackratC#MixedWindowsFree, BSD
Laja2-phase scannerless top-down backtracking + runtime supportJavaSeparateAllFree, GNU GPL
lars::ParserPackrat (supporting left-recursion and grammar ambiguity)C++IdenticalAllFree, BSD
LPegParsing machineLuaMixedAllFree, MIT
lugParsing machineC++17MixedAllFree, MIT
MouseRecursive descent (modified, limited memoization and left-recursion)JavaSeparateJava virtual machineFree, Apache 2.0
NarwhalPackratCMixedPOSIX, WindowsFree, BSD
NearleyEarleyJavaScriptMixedAllFree, MIT
Nemerle.PegRecursive descent + PrattNemerleSeparateAllFree, BSD
neotomaPackratErlangSeparateAllFree, MIT
NPEGRecursive descentC#MixedAllFree, MIT
OMetaPackrat (modified, partial memoization)JavaScript, Squeak, PythonMixedAllFree, MIT
PackCCPackrat (modified, left-recursion support)CMixedAllFree, MIT
PackratPackratSchemeMixedAllFree, MIT
PappyPackratHaskellMixedAllFree, BSD
parboiledRecursive descentJava, ScalaMixedJava virtual machineFree, Apache 2.0
Lambda PEGRecursive descentJavaMixedJava virtual machineFree, Apache 2.0
parseppRecursive descentC++MixedAllFree, public domain
ParsnipPackratC++MixedWindowsFree, GNU GPL
PatternsParsing machineSwiftIdenticalAllFree, MIT
pegRecursive descentCMixedAllFree, MIT
PEG.jsPackrat (partial memoization)JavaScriptMixedAllFree, MIT
Peggy[35]Packrat (partial memoization)JavaScriptMixedAllFree, MIT
PegasusRecursive descent, Packrat (selectively)C#MixedWindowsFree, MIT
pegcRecursive descentCMixedAllFree, public domain
pestRecursive descentRustSeparateAllFree, MIT, Apache 2.0
PetitParserPackratSmalltalk, Java, DartMixedAllFree, MIT
PEGTL[36]Recursive descentC++11, C++17MixedAllFree, Boost
Parser Grammar Engine (PGE)Hybrid recursive descent / operator precedence[37]Parrot bytecodeMixedParrot virtual machineFree, Artistic 2.0
PyPy rlibPackratPythonMixedAllFree, MIT
Rats!PackratJavaMixedJava virtual machineFree, GNU LGPL
Spirit2Recursive descentC++MixedAllFree, Boost
TreetopRecursive descentRubyMixedAllFree, MIT
YardRecursive descentC++MixedAllFree, MIT or public domain
WaxeyeParsing machineC, Java, JavaScript, Python, Racket, RubySeparateAllFree, MIT
PHP PEGPEG Parser?PHPMixedAllFree, BSD
Close

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.

More information Name, Parsing algorithm ...
NameParsing algorithmInput grammar notationOutput languagesGrammar, codeLexerDevelopment platformIDELicense
ACCENTEarleyYacc variantCMixedexternalAllNoFree, GNU GPL
APaGeDGLR, LALR(1), LL(k) ?DMixedgeneratedAllNoFree, Artistic
BisonLALR(1), LR(1), IELR(1), GLRYaccC, C++, D,[38] Java, XMLMixed, except XMLexternalAllNoFree, GNU GPL
DMS Software Reengineering ToolkitGLR ?ParlanseMixedgeneratedWindowsNoProprietary
DParserScannerless GLR ?CMixedscannerlessPOSIXNoFree, BSD
DypgenRuntime-extensible GLR ?OCamlMixedgeneratedAllNoFree, CeCILL-B
E3Earley ?OCamlMixedexternal, or scannerlessAllNo ?
ElkhoundGLR ?C++, OCamlMixedexternalAllNoFree, BSD
GDKLALR(1), GLR ?C, Lex, Haskell, HTML, Java, Object Pascal, YaccMixedgeneratedPOSIXNoFree, MIT
HappyLALR, GLR ?HaskellMixedexternalAllNoFree, BSD
Hime Parser GeneratorGLR ?C#, Java, RustSeparategenerated.NET framework, Java virtual machineNoFree, GNU LGPL
IronText LibraryLALR(1), GLRC#C#Mixedgenerated or external.NET frameworkNoFree, Apache 2.0
JisonLALR(1), LR(0), SLR(1)YaccJavaScript, C#, PHPMixedgeneratedAllNoFree, MIT
SyntaxLALR(1), LR(0), SLR(1) CLR(1) LL(1)JSON/YaccJavaScript, Python, PHP, Ruby, C++, C#, Rust, JavaMixedgeneratedAllNoFree, MIT
LajaScannerless, two phaseLajaJavaSeparatescannerlessAllNoFree, GNU GPL
ModelCCEarleyAnnotated class modelJavaGeneratedgeneratedAllNoFree, BSD
P3Earley–combinatorsBNF-likeOCamlMixedexternal, or scannerlessAllNo ?
P4Earley–combinators, infinitary CFGsBNF-likeOCamlMixedexternal, or scannerlessAllNo ?
Scannerless Boolean ParserScannerless GLR (Boolean grammars) ?Haskell, JavaSeparatescannerlessJava virtual machineNoFree, BSD
SDF/SGLRScannerless GLRSDFC, JavaSeparatescannerlessAllYesFree, BSD
SmaCCGLR(1), LALR(1), LR(1) ?SmalltalkMixedinternalAllYesFree, MIT
SPARKEarley ?PythonMixedexternalAllNoFree, MIT
TomGLR ?CGeneratednoneAllNoFree, "No licensing or copyright restrictions"
UltraGramLALR, LR, GLR ?C++, C#, Java, Visual Basic .NETSeparategeneratedWindowsYesProprietary
WormholePruning, LR, GLR, Scannerless GLR ?C, PythonMixedscannerlessWindowsNoFree, MIT
Whale CalfGeneral tabular, SLL(k), Linear normal form (conjunctive grammars), LR, Binary normal form (Boolean grammars) ?C++SeparateexternalAllNoProprietary
yaepEarleyYacc-likeCMixedexternalAllNoFree, GNU LGPL
Close

Context-sensitive grammars

This table compares parser generators with context-sensitive grammars.

More information Name, Parsing algorithm ...
NameParsing algorithmInput grammar notationBoolean grammar abilitiesDevelopment platformLicense
bnf2xmlRecursive descent (is a text filter output is xml)simple BNF[clarification needed] grammar (input matching), output is xml ?Beta, and not a full EBNF parserFree, GNU GPL
Close

See also

Notes

    References

    Wikiwand in your browser!

    Seamless Wikipedia browsing. On steroids.

    Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.

    Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.