Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 650833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:05:45+00:00 2026-05-13T22:05:45+00:00

Most of the posts that I read pertaining to these utilities usually suggest using

  • 0

Most of the posts that I read pertaining to these utilities usually suggest using some other method to obtain the same effect. For example, questions mentioning these tools usual have at least one answer containing some of the following:

  • Use the boost library (insert appropriate boost library here)
  • Don’t create a DSL use (insert favorite scripting language here)
  • Antlr is better

Assuming the developer …

  • … is comfortable with the C language
  • … does know at least one scripting
    language (e.g., Python, Perl, etc.)
  • … must write some parsing code in almost
    every project worked on

So my questions are:

  • What are appropriate situations which
    are well suited for these utilities?
  • Are there any (reasonable) situations
    where there is not a better
    alternative to a problem than yacc
    and lex (or derivatives)?
  • How often in actual parsing problems
    can one expect to run into any short
    comings in yacc and lex which are
    better addressed by more recent
    solutions?
  • For a developer which is not already
    familiar with these tools is it worth
    it for them to invest time in
    learning their syntax/idioms? How do
    these compare with other solutions?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T22:05:46+00:00Added an answer on May 13, 2026 at 10:05 pm

    The reasons why lex/yacc and derivatives seem so ubiquitous today are that they have been around for much longer than other tools, that they have far more coverage in the literature and that they traditionally came with Unix operating systems. It has very little to do with how they compare to other lexer and parser generator tools.

    No matter which tool you pick, there is always going to be a significant learning curve. So once you have used a given tool a few times and become relatively comfortable in its use, you are unlikely to want to incur the extra effort of learning another tool. That’s only natural.

    Also, in the late 1960s and early 1970s when lex/yacc were created, hardware limitations posed a serious challenge to parsing. The table driven LR parsing method used by Yacc was the most suitable at the time because it could be implemented with a small memory footprint by using a relatively small general program logic and by keeping state in files on tape or disk. Code driven parsing methods such as LL had a larger minimum memory footprint because the parser program’s code itself represents the grammar and therefore it needs to fit entirely into RAM to execute and it keeps state on the stack in RAM.

    When memory became more plentiful a lot more research went into different parsing methods such as LL and PEG and how to build tools using those methods. This means that many of the alternative tools that have been created after the lex/yacc family use different types of grammars. However, switching grammar types also incurs a significant learning curve. Once you are familiar with one type of grammar, for example LR or LALR grammars, you are less likely to want to switch to a tool that uses a different type of grammar, for example LL grammars.

    Overall, the lex/yacc family of tools is generally more rudimentary than more recent arrivals which often have sophisticated user interfaces to graphically visualise grammars and grammar conflicts or even resolve conflicts through automatic refactoring.

    So, if you have no prior experience with any parser tools, if you have to learn a new tool anyway, then you should probably look at other factors such as graphical visualisation of grammars and conflicts, auto-refactoring, availability of good documentation, languages in which the generated lexers/parsers can be output etc etc. Don’t pick any tool simply because “this is what everybody else seems to be using”.

    Here are some reasons I could think of for using lex/yacc or flex/bison :

    • the developer is already familiar with lex/yacc or flex/bison
    • the developer is most familiar and comfortable with LR/LALR grammars
    • the developer has plenty of books covering lex/yacc but no books covering others
    • the developer has a prospective job offer coming up and has been told that lex/yacc skills would increase his chances to get hired
    • the developer could not get buy-in from project members/stake holders for the use of other tools
    • the environment has lex/yacc installed and for some reason it is not feasible to install other tools
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've read most of the posts regarding this matter but I find nothing that
Most posts I have read regarding implementation of copy constructor is that you must
I have read most of the WCF REST 404 posts but none that helped
There are quite a few other posts on stackoverflow that ask nearly the same
I have read most of the posts on here regarding floating point, and I
OK I have read many posts regarding Dual Licensing using MIT and GPL licenses.
So we know from many other posts that we should use sp rather than
I've read so many blog posts and articles that my eyes are getting blurry.
I have read the other posts about the notorious _imaging C module error when
I have read the other window leak posts and have tried what what suggested

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.