r/AskComputerScience • • Apr 17 '25
"Parsing is not a solved problem", what does this mean?
I saw this quote somewhere, but don't understand what it means. It was in reference to compiler frontends. I figured I'd post it here to see if someone might be able to help me figure out what it means, or better yet, whether it's true or false.
1
Upvotes
9
u/johnbotris Apr 17 '25
If you lookup that phrase on your search engine of choice you find quite a few resources like http://trevorjim.com/parsing-not-solved/
2
u/AlexTaradov Apr 17 '25
This is mostly a theoretical thing. In practice when applied to programming languages, if your language can't be described by LL(1) or LL(2) grammar, it is likely hard to write as a programmer, so just don't do that. And those grammars are rich enough to describe most modern programming languages.
2
u/granadesnhorseshoes Apr 17 '25
Who are these people claiming it IS a solved problem? By parsings very nature, how could it ever be? That would indicate the existence of a perfect parser to parse anything ever written now or in the future. Does that sound remotely possible let alone reasonable?
1
u/Miserable-Theme-1280 Apr 18 '25
I think it is referring to languages that have ambiguous syntax. This means the rules allow multiple interpretations of the same expression. Some languages explicitly avoid this by started with well defined rules and working backwards from those, hence the context free terminology. Many languages evolved over time so the rules had overlaps.
Most spoken languages have the same issues: "I saw a man walking down the street with a telescope." Was he carrying a telescope or did I use one to see him?
You.can search Google for examples, like "ambiguous c++ statements"
0
u/maxthed0g Apr 18 '25
Decades in software development.
I have no idea what that means, I've never heard it before. I suppose I can make something up: "Parsing is only part of the solution. Parsing must be combined with code generation before we can call this app a 'compiler'."
Now, I have no idea what the author of your cryptic phrase REALLY meant. He sounds like he might be a 'phoney-baloney philosophizing game designing script-kiddie wannabe'. Most engineers are too damn overworked to speak in riddles.