I wrote a HLL compiler, at http://www1.webng.com/blackoil

Programming, for all ages and all languages.
blackoil
Member
Member
Posts: 146
Joined: Mon Feb 12, 2007 4:45 am

I wrote a HLL compiler, at http://www1.webng.com/blackoil

Post 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!
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post by Brynet-Inc »

Hmm, For Windows users only and it's closed source? Interesting..

Good luck with that.....:roll:

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 :D
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
blackoil
Member
Member
Posts: 146
Joined: Mon Feb 12, 2007 4:45 am

Post by blackoil »

no... :wink: 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
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post by Brynet-Inc »

Alright alright.. I was only speculating...:P Good luck.
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Post 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...
blackoil
Member
Member
Posts: 146
Joined: Mon Feb 12, 2007 4:45 am

Post 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.
User avatar
Kevin McGuire
Member
Member
Posts: 843
Joined: Tue Nov 09, 2004 12:00 am
Location: United States
Contact:

Post 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?
blackoil
Member
Member
Posts: 146
Joined: Mon Feb 12, 2007 4:45 am

Post 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.
blackoil
Member
Member
Posts: 146
Joined: Mon Feb 12, 2007 4:45 am

Post 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?
User avatar
Kevin McGuire
Member
Member
Posts: 843
Joined: Tue Nov 09, 2004 12:00 am
Location: United States
Contact:

Post 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]
blackoil
Member
Member
Posts: 146
Joined: Mon Feb 12, 2007 4:45 am

Post by blackoil »

Done. Integer number constant is type dependant within expression evaluation.

int a;
unsigned int b;

a+100;
b+200;
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post 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 :D
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).
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Post 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 :D
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...
Last edited by Alboin on Thu May 17, 2007 7:21 pm, edited 1 time in total.
C8H10N4O2 | #446691 | Trust the nodes.
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post by pcmattman »

Nondeterministic finite automata
How can that be your favourite word, that's 3 words... Phrase on the other hand...
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Post 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". :wink:
C8H10N4O2 | #446691 | Trust the nodes.
Post Reply