Access the NEW Basecamp Support Portal

Comparison of parser generators

« Back to Glossary Index

Regular languages
– Regular languages can be matched by a state machine constructed from a regular expression.
– Regular languages can express constructs like A follows B, Either A or B, A followed by zero or more instances of B.
– Regular languages cannot express constructs that require consistency between non-adjacent elements or recursive nesting.
– Regular languages cannot handle problems like checking correctly-nested parentheses.
– Examples of regular language parser generators include .NET CLR, Free, GNU GPL, C# Lex, DFA, Mixed.

Context-free languages
– Context-free languages can be matched by a sequence of replacement rules.
– Context-free languages can handle the concept of recursive nesting.
– Context-free grammars are purely local and cannot handle non-local analysis.
– Context-free grammars can be extended with limited context-sensitivity using user-written code.
– Examples of context-free language parser generators include .NET CLR, Free, Apache 2.0, CookCC, DFA, Java.

Deterministic context-free languages
– Deterministic context-free languages are a subset of context-free languages.
– Deterministic context-free languages can be efficiently parsed by deterministic pushdown automata.
– Examples of programming languages that support deterministic context-free languages include C, C++, C#, F#, Java, Ada, Object Pascal, Delphi, Modula-2, Oberon, Ruby, Swift, Unicon, Visual Basic .NET.
– Parser generators for deterministic context-free languages include LR(?), LL(?), LALR(?), SLR(?).
– The generated parsers can be used for partial parsing and follow CPOL 1.0 license.

General context-free, conjunctive, or boolean languages
– General context-free, conjunctive, or boolean languages are compared in a table.
– Parser generators for these languages are free and use licenses like Apache 2.0.
– Examples of programming languages supported by these parser generators include C++, C#, Java, Visual Basic .NET.
– These parser generators are compared with context-sensitive grammars.
– Ragel State Machine Compiler is mentioned as a related tool.

Other parser generator tools
– Other parser generator tools are mentioned in various references.
– These tools include Drat!, Narwhal, POSIX, Windows, Nearley, Earley, JavaScript, Nemerle.Peg, Lambda PEG, PyPy rlib, Rats!, Rekex, PEG Parser?, PHP, and more.
– These tools support different programming languages and use various licenses like MIT, BSD, GNU LGPL, and Apache 2.0.
– Some tools are specifically designed for packrat parsing.
– References and sources are provided for further reading.

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

« Back to Glossary Index

Request an article

Please let us know what you were looking for and our team will not only create the article but we'll also email you to let you know as soon as it's been published.
Most articles take 1-2 business days to research, write, and publish.
Content/Article Request Form

Submit your RFP

We can't wait to read about your project. Use the form below to submit your RFP!
Request for Proposal

Contact and Business Information

Provide details about how we can contact you and your business.


Quote Request Details

Provide some information about why you'd like a quote.