Thursday 9 June 2016

Initial thoughts about SIM grammar

A lot had been done in SIM, parsing wise before the project was left in abeyance due to other things. When I re took the project during training, I thought it would be easier if I could simply shift on a tool for scanning and parsing. And still I stick by the this believe that a tool is indeed a better way to go. Following are the reasons why:

1) A tool would come with a huge amount guidance and help from Internet communities and forums.
2) A tool would have inbuilt functions and/or objects to do  stuff that would other wise require much thought and effort to do by my own self.
3) A tool would make maintenance of the project much easier as less and less esoteric brand of code will be used.
4) And lastly, using a tool would require me to learn one. And learning new things is kind of like the whole point of this training period. 

While most of the points mentioned above still hold good and strong, some of them have started to turn on me. For instance, the tool I choose to use: flex and bison, does not have a very intense text support online. Simply put, there aren't many books and tutorials on these. And whatever is available is either the same stuff everywhere or it is too complex to make much sense to a beginner like me. There really should be a better book for learning flex and bison.

And secondly, there are a few issues with compilation as well. Compiling the files with a C compiler is easy as pie, but the same can't be said about a C++ compiler. 

Technical issues apart, the logical construction of the whole parsing process is also not as intuitive as I thought. Either I am being naive in the approach that I am taking or bison is not as simple as the text book describes it to be.  

No comments:

Post a Comment