Page 1 of 2
I wrote a HLL compiler, at http://www1.webng.com/blackoil
Posted: Fri May 11, 2007 2:40 am
by blackoil
The syntax is showed as pictures there. You have not to register it. If you do, I am happy.
Any feedbacks are welcome!
Posted: Fri May 11, 2007 2:54 am
by Brynet-Inc
Hmm, For Windows users only and it's closed source? Interesting..
Good luck with that.....
EDIT: Haha this is just funny.. The mysterious l.com is a Token Lexer.. This was probably written in some funky BASIC compiler for Windows
Posted: Fri May 11, 2007 3:54 am
by blackoil
no...
they're all made in assembly, and it's .COM file, not a Win32 app.
cmdline:
l sourcefile.src sourcefile.tok
cg32/cg64 sourcefile.tok output.asm
Posted: Fri May 11, 2007 5:02 am
by Brynet-Inc
Alright alright.. I was only speculating...
Good luck.
Posted: Sat May 12, 2007 10:29 pm
by earlz
I would really like to see more info on this before trying it out..
believe it or not, most people can't look at short examples and instantly know the language enough to right anything useful...
Posted: Sun May 13, 2007 12:53 am
by blackoil
ok. I updated some manual in the website. The type system is designed to be simple, with SIMD, multi-dimension array support. customed defined type and array can be transfered as parameter direclty, no pointer involved needed.
Posted: Wed May 16, 2007 6:34 am
by Kevin McGuire
I would imagine that making the basic type default to signed instead of unsigned would help reduce the number of bugs that could be introduced by a programmer used to using C/C++.
I do not know if this is some sort of internal limitation or just a preference you have for default to unsigned, but it might help it to become adopted for usage by someone if that was not such a inversion - unless you had a reason?
Posted: Wed May 16, 2007 10:41 am
by blackoil
ok, i changed the default integer type to signed now. I don't know C/C++ integer sign setting before. So the signed keyword has changed to unsigned.
Posted: Wed May 16, 2007 11:15 am
by blackoil
It may be a reason, integer has to be specified a signed or unsigned type, because for array operation, like:
array[ 2 ][ 3 ] = 100;
subscripts has to be unsigned integer type. I use a bit strict type checking, so it's boring to write:
array[ (unsigned) 2 ][ (unsigned) 3 ] = 100;
if integer number is specified as signed type.
Any advice?
Posted: Wed May 16, 2007 12:18 pm
by Kevin McGuire
...subscripts has to be unsigned integer type.. .
You should be able to handle a signed integer for subscripts naturally on a 80386 and compatible, but I do not know about other processors.
mov ebp, ARRAY
mov ecx, ARRAY_INDEX
mov eax, dword [ebp+ecx*ARRAY_ITEM_SIZE]
Posted: Thu May 17, 2007 7:24 am
by blackoil
Done. Integer number constant is type dependant within expression evaluation.
int a;
unsigned int b;
a+100;
b+200;
Posted: Thu May 17, 2007 6:58 pm
by pcmattman
Brynet-Inc wrote:EDIT: Haha this is just funny.. The mysterious l.com is a Token Lexer.. This was probably written in some funky BASIC compiler for Windows
Is there anything wrong with a token lexer? I've written one in C++ to 'compile' (tokenise) TI-BASIC programs to the 8XP file format for transferring to the calculator. You can view my source at
http://www.sf.net/projects/tibasic (it's not done yet, but it works).
Posted: Thu May 17, 2007 7:17 pm
by Alboin
pcmattman wrote:Brynet-Inc wrote:EDIT: Haha this is just funny.. The mysterious l.com is a Token Lexer.. This was probably written in some funky BASIC compiler for Windows
Is there anything wrong with a token lexer? I've written one in C++ to 'compile' (tokenise) TI-BASIC programs to the 8XP file format for transferring to the calculator. You can view my source at
http://www.sf.net/projects/tibasic (it's not done yet, but it works).
That reminds me of my favorite word: Nondeterministic finite automata.
Albeit, DFA's are better used, after being converted from the NFA's themselves, and all.
I really love state machines...
Posted: Thu May 17, 2007 7:20 pm
by pcmattman
Nondeterministic finite automata
How can that be your favourite
word, that's 3 words... Phrase on the other hand...
Posted: Thu May 17, 2007 7:21 pm
by Alboin
pcmattman wrote:
Nondeterministic finite automata
How can that be your favourite
word, that's 3 words... Phrase on the other hand...
Ahem, I stand corrected. Unless, of course, you use underscores: "Nondeterministic_finite_automata".