Nintendo shutting down 3DS + Wii U online services, see our post

C Struct Interpreter

Root / Submissions / [.]

An interpreter that translates C struct code implemented into SB source code. The purpose of this interpreter was to allow programmers to group their variables under an identifier. I am sure that this interpreter will have bugs that I haven't encountered during my testing phase. If you do have issues and bugs please leave a comment below. I've been studying parsing and interpreters for 3 months now. So this is a test to see what I've learned so far. I'm not sure when I'll be updating this project. But, I give permission to edit the code and try adding new features or even try making an entirely new language with this.


Using this interpreter is very simple. Just edit the file QB_TEST, then start up INTERP. To see what the interpreted code looks like open file NEW_QB. The parser for this interpreter has issues with chars that get attached before and after the words as they are extracted from the source code. To avoid this. Surround your sentences with spaces. eg: " int foo; " to access variables from within the struct you simply write the struct name followed by a period then the variable name. eg. STRUCT FOO{ INT EX; } FOO.EX = 1 PRINT FOO.EX The ";" and the "INT" are vital when declaring the variables within the struct as it allows the interpreter to initiate the variables as it passes through the parser. At the moment only two data types are supported. INT and STRING. FLOAT and ARRAY will be added later. VERY IMPORTANT: Your last line of code must have a space. Or the very last word at the last line of the code will not be passed into the parser. Also, the string variables require you to add the "$" at the end of the variable name.

No posts yet (will you be the first?)