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.)
Name Lexer algorithm Output languages Grammar, code Runtime License Alex DFA Haskell , BSD AnnoFlex DFA Java , BSD Astir DFA table driven, with branching C++ , MIT AustenX DFA Java , BSD C# Flex DFA C# , GNU GPL C# Lex DFA C# ? CookCC DFA Java , Apache 2.0 DFA DFA compressed matrix C, C++ Windows, Visual Studio BSD Dolphin DFA C++ Flex DFA table driven C, C++ , BSD gelex DFA Eiffel , MIT golex DFA Go , BSD-style gplex DFA C# , BSD-like JFlex DFA Java , BSD JLex DFA Java , BSD-like lex DFA C , proprietary, CDDL lexertl DFA C++ ? , GNU LGPL Quex DFA direct code C, C++ , GNU LGPL Ragel DFA Go, C, C++, Java, assembly , GNU GPL, MIThttp://www.colm.net/open-source/ragel/ RE/flex DFA direct code, DFA table driven,and NFA regex libraries C++ , BSD re2c DFA direct code C, C++, Go, Rust , public domain
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. Name Parsing algorithm Input grammar notation Output languages Grammar, code Lexer Runtime IDE License ANTLR4 Adaptive EBNF C#, Java, Python, JavaScript, C++, Swift, Go, PHP generated , BSD ANTLR3 EBNF ActionScript, Ada95, C, C++, C#, Java, JavaScript, Objective-C, Perl, Python, Ruby generated , BSD APG Recursive descent, backtracking ABNF Python, JavaScript, C, Java , BSD Beaver EBNF Java external , BSD Bison , , , GLR Yacc C, C++, D, Java external , GNU GPL with exception BtYacc Backtracking Bottom-up C++ external , public domain byacc Yacc C external , public domain CL-Yacc Lisp Common Lisp external , MIT Coco/R + semantic predicates EBNF C, C++, C#, F#, Java, Ada, Object Pascal, Delphi, Modula-2, Oberon, Ruby, Swift, Unicon, Visual Basic .NET generated , GNU GPL CppCC C++ generated , GNU GPL CUP Java external , BSD-like Eli C generated , GNU GPL, GNU LGPL Essence Scheme 48 external , BSD eyapp Perl external or generated , Artistic GOLD BNF x86 assembly language, ANSI C, C#, D, Java, Pascal, Object Pascal, Python, Visual Basic 6, Visual Basic .NET, Visual C++ generated , zlib modified Hime Parser Generator , GLR BNF dialect C#, Java, Rust generated , GNU LGPL Hyacc Yacc C external , GNU GPL JavaCC EBNF Java, C++, JavaScript (via GWT compiler) generated , BSD JFLAP , Java JetPAG C++ generated , GNU GPL JS/CC EBNF JavaScript, JScript, ECMAScript internal , BSD KDevelop-PG-Qt , backtracking, shunting-yard C++ generated or external , GNU LGPL Kelbt Backtracking C++ generated , GNU GPL kmyacc C, Java, Perl, JavaScript external , GNU GPL Lapg C, C++, C#, Java, JavaScript generated , GNU GPL Lark , Earley (SPPF) EBNF derivative Python, JavaScript generated , MIT Lemon BNF dialect C external , public domain Lezer , GLR EBNF dialect JavaScript generated Node.js, JavaScript , MIT Lime PHP external , GNU GPL LISA , , , Java generated , public domain LLgen C external , BSD LLnextgen C external , GNU GPL LLLPG + syntactic and semantic predicates ANTLR-like C# generated (?) , GNU LGPL LPG Backtracking Java generated , EPL LRSTAR , LALR(*) YACC, ANTLR, EBNF C++ generated , BSD Menhir OCaml generated , QPL ML-Yacc ML external Monkey Java generated , GNU GPL Msta , LR(k) YACC, EBNF C, C++ external or generated , GNU GPL MTP (More Than Parsing) Java generated , GNU GPL MyParser Markdown C++11 internal , MIT NLT GLR C#/BNF-like C# mixed , MIT ocamlyacc OCaml external , QPL olex C++ generated , GNU GPL Parsec LL, backtracking Haskell Haskell , BSD yapp Perl external , GNU GPL Parser Objects Java , zlib PCCTS LL C, C++ PLY BNF Python generated , MIT PlyPlus EBNF Python generated , MIT PRECC C generated , GNU GPL QLALR C++ external , GNU GPLraccBNF-like, yacc-likeRuby ? REX GLR PEG DFA Context-dependent lexing EBNF C++, C#, Java, JavaScript, Go, Haxe, Python, Scala, TypeScript, XQuery, XSLT generated , Apache License 2.0 SableCC C, C++, C#, Java, OCaml, Python generated , GNU LGPL SLK EBNF C, C++, C#, Java, JavaScript external SLK SLY BNF Python generated , BSD SP (Simple Parser) Recursive descent Python Python generated , GNU LGPL Spirit Recursive descent C++ internal , Boost Styx C, C++ generated , GNU LGPL Sweet Parser C++ generated , zlib Tap C++ generated , GNU GPL TextTransformer C++ generated TinyPG C#, Visual Basic , CPOL 1.0 Toy Parser Generator Recursive descent Python generated , GNU LGPL TP Yacc Turbo Pascal external , GNU GPL Tree-Sitter , GLR JavaScript DSL, JSON C, bindings (Rust, WebAssembly, JavaScript, Python, many other) generated + external , MIT Tunnel Grammar Studio Tunnel Parsing ABNF C++ generated UltraGram , , GLR BNF C++, Java, C#, Visual Basic .NET external , public domain UniCC EBNF C, C++, Python, JavaScript, JSON, XML generated , BSD UrchinCC Java generated Yacc AT&T/Sun Yacc C external , CPL & CDDL Yacc++ , Yacc C++, C# generated or external Yapps Python generated , MIT yecc Erlang generated , Apache 2.0 Visual BNF , C# generated YooParse , C++ external , MIT Parse BNF in C++ types , MIT GGLL Graph Java generated , MIT Product Parsing algorithm Input grammar notation Output languages Grammar, code Lexer Runtime IDE License
Parsing expression grammars, deterministic Boolean grammars
This table compares parser generators with parsing expression grammars, deterministic Boolean grammars.
Name Parsing algorithm Output languages Grammar, code Runtime License AustenX Packrat (modified) Java , BSD Aurochs Packrat C, OCaml, Java , GNU GPL BNFlite Recursive descent C++ , MIT Canopy Packrat Java, JavaScript, Python, Ruby , GNU GPL CL-peg Packrat Common Lisp , MIT Drat! Packrat D , GNU GPL Frisby Packrat Haskell , BSD grammar::peg Packrat Tcl , BSD Grako Packrat + Cut + Left Recursion Python, C++ (beta) , BSD IronMeta Packrat C# , BSD Laja 2-phase scannerless top-down backtracking + runtime support Java , GNU GPL lars::Parser Packrat (supporting left-recursion and grammar ambiguity) C++ Identical , BSD LPeg Parsing machine Lua , MIT lug Parsing machine C++17 , MIT Mouse Recursive descent (modified, limited memoization and left-recursion) Java , Apache 2.0 Narwhal Packrat C , BSD Nearley Earley JavaScript , MIT Nemerle.Peg Recursive descent + Pratt Nemerle , BSD neotoma Packrat Erlang , MIT nez Parsing machine Java, C , BSD NPEG Recursive descent C# , MIT OMeta Packrat (modified, partial memoization) JavaScript, Squeak, Python , MIT PackCC Packrat (modified, left-recursion support) C , MIT Packrat Packrat Scheme , MIT Pappy Packrat Haskell , BSD parboiled Recursive descent Java, Scala , Apache 2.0 Lambda PEG Recursive descent Java , Apache 2.0 parsepp Recursive descent C++ , public domain Parsnip Packrat C++ , GNU GPL Patterns Parsing machine Swift Identical , MIT peg Recursive descent C , MIT PEG.js Packrat (partial memoization) JavaScript , MIT PeggyMaintained fork of PEG.js Packrat (partial memoization) JavaScript , MIT Pegasus Recursive descent, Packrat (selectively) C# , MIT pegc Recursive descent C , public domain pest Recursive descent Rust , MIT, Apache 2.0 PetitParser Packrat Smalltalk, Java, Dart , MIT PEGTL Recursive descent C++11, C++17 , Boost Parser Grammar Engine (PGE) Hybrid recursive descent / operator precedence Parrot bytecode , Artistic 2.0 PyPy rlib Packrat Python , MIT Rats! Packrat Java , GNU LGPL Spirit2 Recursive descent C++ , Boost Treetop Recursive descent Ruby , MIT Yard Recursive descent C++ , MIT or public domain Waxeye Parsing machine C, Java, JavaScript, Python, Racket, Ruby , MIT PHP PEG PEG 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.
Name Parsing algorithm Input grammar notation Output languages Grammar, code Lexer Runtime IDE License ACCENT Earley Yacc variant C external , GNU GPL APaGeD GLR, , D generated , Artistic Bison , , , GLR Yacc C, C++, D, Java, XML , except XML external , GNU GPL DMS Software Reengineering Toolkit GLR Parlanse generated DParser Scannerless GLR C scannerless , BSD Dypgen Runtime-extensible GLR OCaml generated , CeCILL-B E3 Earley OCaml external, or scannerless Elkhound GLR C++, OCaml external , BSD GDK , GLR C, Lex, Haskell, HTML, Java, Object Pascal, Yacc generated , MIT Happy LALR, GLR Haskell external , BSD Hime Parser Generator GLR C#, Java, Rust generated , GNU LGPL IronText Library , GLR C# C# generated or external , Apache 2.0 Jison , LR(0), SLR(1) Yacc JavaScript, C#, PHP generated , MIT Syntax , LR(0), SLR(1) CLR(1) JSON/Yacc JavaScript, Python, PHP, Ruby, C++, C#, Rust, Java generated , MIT Laja Scannerless, two phase Laja Java scannerless , GNU GPL ModelCC Earley Annotated class model Java Generated generated , BSD P3 Earley–combinators BNF-like OCaml external, or scannerless P4 Earley–combinators, infinitary CFGs BNF-like OCaml external, or scannerless Scannerless Boolean Parser Scannerless GLR (Boolean grammars) Haskell, Java scannerless , BSD SDF/SGLR Scannerless GLR SDF C, Java scannerless , BSD SmaCC GLR(1), , Smalltalk internal , MIT SPARK Earley Python external , MIT Tom GLR C Generated , "No licensing or copyright restrictions" UltraGram LALR, LR, GLR C++, C#, Java, Visual Basic .NET generated Wormhole Pruning, LR, GLR, Scannerless GLR C, Python scannerless , MIT Whale Calf General tabular, SLL(k), Linear normal form (conjunctive grammars), LR, Binary normal form (Boolean grammars) C++ external yaep Earley Yacc-like C external , GNU LGPL
Context-sensitive grammars
This table compares parser generators with context-sensitive grammars.