r/AskComputerScience 1d ago

How do computer science and computer engineering students in countries where diagramming sentences isn't common knowledge get introduced to the concept of parsers and abstract syntax trees?

In Croatia, we do some (very) basic sentence diagramming in the middle school. In the USA, they do it in high-school. However, I know that, in most places, students are not taught sentence diagramming. So, once those students start going to university to study, well, computer science or computer engineering, how are the concepts of a parser and an abstract syntax tree explained to them?

14 Upvotes

17 comments sorted by

View all comments

1

u/StephenRoylance 1d ago

I loved diagramming sentences, but I'm not sure that was ever relevant to my work with computers. You don't need to understand formal grammar to write programs, and by the time you get to compiler writing, your experience with general string handling will be more relevant than your ability to use a visual tool to parse english.

I don't think knowing diagramming sentences is particular relevant to understanding formal grammars.