Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

replacement project for existing school assignment

I have a school assignment which consists of programming a scanner/lexical analyzer for a specified simple language. The scanner has to be programmed in C++.

This type of assignment has been used since the 90's and, although still a valid excersise, I consider it to be a little antiquated and a little boring.

I have gotten permission to come up with a new programming assignment. It has to be of equal difficulty and it can be in C++, Objective C or Java.

What direction should I go that has the same level of difficulty but is a little bit more modern and applicable to modern CS/life.

Thanks

like image 665
bing Avatar asked Jul 01 '26 04:07

bing


2 Answers

This type of assignment... is considered to be a little antiquated and a little boring.

I'm curious: who considers this antiquated? Your professor? Somebody notable in the parsing community? Or you?

Scanners and parsers are still relevant to professional software development and, more importantly, relevant to the science of computation. If you wish to understand computers, then you should understand scanners and parsers.

Still, if you are convinced that you should do some other assignment, why not write a tool to generate a scanner in C++? You could supply, as input, a set of regular expressions that define the tokens of the grammar, and it would produce a C++ program that would recognize the input tokens. Then, you will never need to write a scanner ever again!

like image 80
Daniel Yankowsky Avatar answered Jul 03 '26 20:07

Daniel Yankowsky


Why do you think that Lexers / Parsers are not relevant anymore? I find that I write something along those lines at least once a year.

like image 37
Stephen C Avatar answered Jul 03 '26 18:07

Stephen C



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!