This is an automated archive made by the Lemmit Bot.

The original was posted on /r/programminglanguages by /u/Rehtori on 2024-08-10 06:16:27+00:00.


So, how hard is it to write a compiler for a language that I don’t have the source code for? Or when I have absolutely zero experience in writing compilers? My coding experience is also pretty much only in Python, although I do have interest in learning other languages also.

I’m hoping to start dabbling with writing a compiler for CRBasic which is a language used to create programs for Campbell Scientifics CR1000X loggers. They are widely used in different environmental monitoring applications, due to robustness and ease of use. I have the questionable privilige of making programs for them quite regularly.

Currently the only way (That I know of) to compile these is using the CRBasic Editor which Campbell provides in their software package. This software only works on Windows operating systems and via Wine. It’s a graphical tool and it does the job, most people seem happy enough with it as these programs are never very complex. Regardless, I’d like to try this as a learning project.

As a starting point, there’s plenty of compilers for different BASIC versions out there out of which at least some will already be highly compatible with CRBasic.