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

  • Home
  • SEARCH
  • 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 5843233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:07:34+00:00 2026-05-22T12:07:34+00:00

Is it theoretically up to the task? Can it be done practically and would

  • 0

Is it theoretically up to the task?

Can it be done practically and would the resulting parser be used with sufficient performance and output (say, LLVM IR or GCC’s gimple) to be integrated in a competing compiler?

  • 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-22T12:07:34+00:00Added an answer on May 22, 2026 at 12:07 pm

    No. C++ is too hard to parse for most automatic tools, and in practice usually is parsed by hand written parsers.
    [Edit 1-Mar-2015: Added ‘most’ and ‘usually’.]

    Among the hard problems are:

    • A * B; which could be either the definition of a variable B with type A* or just the multiplication of two variables A and B.
    • A < B > C > D Where does the template A<> end? The usual ‘max-munch’ rules for parsing expressions will not work here.
    • vector<shared_ptr<int>> where the >> ends two templates, which is hard to do with only one token (and a space in between is allowed). But in 1>>15 no space is allowed.

    And I bet that this list is far from complete.

    Addition: The grammar is available, but is ambiguous and thus not valid as input to tools like Spirit.

    Update 1-Mar-2015: As Ira Baxter, a well known expert in this field, points out in the comments, there are some parser generators that can generate a parser that will generate the full parser forest. As far as I know, selecting the right parse still requires a semantic phase. I’m not aware of any non-commercial parser generators that can do so for C++’s grammar. For more information, see this answer.

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

Sidebar

Related Questions

Theoretically I can say that free(ptr); free(ptr); is a memory corruption since we are
Which of the following would theoretically be better with performance and / or memory?
Theoretically does hashing a unique value yield a unique value? Let's say I have
Theoretically, I think that I can define Brushes and Colors etc. in an xaml
I'm wondering how long a (theoretically) desktop-app can consume the full 4GB limitation of
Theoretically this seems possible to me. So can Any one confirm this to me,
Theoretically, can one define a protocol where one machine does some remote calls on
Is there any limit theoretically on the size of file that can be uploaded
Theoretically you can derive from a Form, but is it something you should not
Theoretically both IOS and ANDROID will play h.264 files, but I can't figure out

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.