2009-08-21

(mis)use of Programmers Notepad (PN2) as BASCOM IDE (Part 1: Scheme)

After some years now time came to do a bigger project with Bascom. It was required to split the source into multiple files, which is in general not a big problem (but a smaller one! those issues of using a c-style scheme of programming with a header file for each code file may be discussed on another article).
As you might know the Bascom IDE is not that comfortable if you have more files to handle as there is space on the tab bar. Therefore I gave PN2 a testdrive as I know it's quite capable of handling multiple files and also has some support for project management.

Some investigation of how PN2 does syntax colouring showed: a scheme file needs to be written.

The originally supplied scheme for vbscript was my inspiration as it nearly fitted for my purposes.

After pasting in all the bascom keywords and changing styles and colors (I like much colour ;) the result was close to my wish.

Still a little problem remains with some directives (see the difference with $regfile and $crystal) but apart from that I started working with it and had fun :)

The remaining issues of syntax coloring can only be resolved by writing a specific lexer but I feel that is not really needed as the misused vb-lexer works well enough.


You can download my scheme file - feel free to use and edit it. Simply put it into the scheme folder below your PN2 installation folder.

If you got something forward please share it and or leave a comment.

This was the first step of misusing PN2 for Bascom purposes. Hope it may be of use for somebody.

There is a second and maybe third part to come about "integrating the bascom compiler" and ""integrate the programmers to PN2". The second story turned out to be more complex as it should be because the bascom command line compiler is somehow tricky and dumb ... (some motivation needed to make it round) ;)