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 761669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T15:51:57+00:00 2026-05-14T15:51:57+00:00

I’m doing some small projects which involve having different syntaxes for something, however sometimes

  • 0

I’m doing some small projects which involve having different syntaxes for something, however sometimes these syntaxes are so easy that using a parser generator might be overkill.

Now, when should I use a hand-made parser, and when should I use a parser generator?

Thanks,

William van Doorn

  • 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-14T15:51:57+00:00Added an answer on May 14, 2026 at 3:51 pm

    It’s worth coding the parser by hand if, and only if, you’re super-keen to have it be extremely fast even on a machine of very modest speed. For example, in this article on the history of Turbo Pascal from before it got its name, you can see how and why the prototype impressed the small (then Danish) firm “Borland” to hire the prototype’s author (Anders Hejlsberg), fully develop the compiler, and launch it as its main product, and I quote…:

    with no great expectations I hit the
    compile key – AND THEN I WAS
    COMPLETELY FLOORED! My test program,
    that took minutes to compile and link
    using Digital Research’s Pascal MT+,
    was compiled and running before I
    could blink an eye! That was a great
    WOW moment!

    Turbo Pascal’s amazing compile speed — coming first and foremost from a carefully hand-coded and highly tuned recursive descent parser coded in assembly language — allowed it to use a very different strategy from most compilers: no separate compilation pass generating object files and libraries, and then a linker to put them together, rather, Turbo Pascal 1.0 was a single-pass compiler that directly turned source code into a single executable binary.

    I remember just the same amazing experience on the tiny personal computers of that era (when a Z80, 64K or RAM, and two floppies was a lot😉 — Turbo Pascal, with its amazing parser and the IDE and everything else, fit comfortably in memory together with a substantial program in both source and compiled form — no floppies were needed, which meant many orders of magnitude of difference in program turnaround time.

    If Hejlsberg had stuck to what was already the traditional wisdom at the time — always use parser generators — Turbo Pascal would probably never have emerged as a commercial product, and definitely not achieved the dominance in the Pascal world it enjoyed for years.

    Of course, on a typical PC of today, such extreme parsing speed would not be needed for most compilers. Possible exceptions include compilers that must run seamlessly as part of an “interpreter-like” environment (the simple compilers for languages such as Perl and Python are typically hand-coded, to substantial extents, for that reason — that was an implementation choice that made them viable in the ’90s, although today it’s not clear it’s still needed), or compilers that run on very limited hardware resources, such as smartphones or low-end netbooks.

    In the vast majority of cases in which you’ll be writing a compiler, none of these performance considerations probably apply, and you’ll be happier with a parser generator.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 374k
  • Answers 374k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Even though it looks like an instance method, it operates… May 14, 2026 at 7:57 pm
  • Editorial Team
    Editorial Team added an answer Are you targeting the client profile rather than the full… May 14, 2026 at 7:57 pm
  • Editorial Team
    Editorial Team added an answer Theres one of two ways. To see how a table… May 14, 2026 at 7:57 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.