% is zirModSym
! is zirIdent
is zirHash
i forgot to update the framework file also, if you find zirModSym and below place this line
zirDollarSym = 68, // $
A community discussion post from the original code:zIRON forum.
% is zirModSym
! is zirIdent
i forgot to update the framework file also, if you find zirModSym and below place this line
zirDollarSym = 68, // $
one more thing
i am using this to pares Dim
eax = Ziron_GetNextToken();
case (eax)
{
/********* Dim Var as int32; **************/
state zirAs:
.......
.......
break;
/********* dim k%; **************/
state zirModSym:
.......
.......
break;
state zirModSym:
/********* dim k$; **************/
snd so on......
so how can i pares a non Token value for example !
http://www.freewebs.com/ogremagic/index.htm
how do you mean a none token value? if you mean something that is not inside your case select then you can use default
case ...
default:
Fatal_Error('Unexpected token');
return true;
}
on , i ment something is not in enum ZirToken such as '!'
also BTW this didnot compile
if(Ziron_IsNextLineBreak())
{
break; // check end of line so we end without semicolon
}
http://www.freewebs.com/ogremagic/index.htm
Ziron does not support function calls inside of block statements (for now)
eax = Ziron_IsNextLineBreak();
if(eax)
{
break; // check end of line so we end without semicolon
}
as for something that is not in zirTokens, you can check from zirIdent
state zirIdent:
eax = Ziron_GetStringValue();
eax = myCustomIdentFunc(eax);
if (eax == ci_Etc) ....
however i will add ! as a value token for update.
very good and thank you.
i hope to semulate basic Dim keyWord 100%
so this code work prefectly
program WIN32CUI 'Basic Syntax test';
#include 'console.zir';
function H_strcpy(Dword dst,src)
{
Eax = dst;
Edx = src;
push Eax;
BL = [Edx];
while ( BL != 0)
{
[Eax] = BL;
Eax++; Edx++;
BL = [Edx];
}
[Eax] = 0;
pop Eax;
}
eax = 1;
print('eax = ', eax:int, '\r\n');
Dim Var as int32 // not well , in basic there is no semicolon at end of file
DIM Name$;
DIM a AS int32, b AS Dword, c AS char;
dim k%;
Var = 1000;
a = -10;
b = 150;
c = ord('A');
k = -2000;
H_strcpy(@Name , 'Emil');
print('Var = ', Var, '\r\n');
print('a = ', a, '\r\n');
print('b = ', b, '\r\n');
print('c = ');
WriteLnEx(@c,1);
print('k = ', k, '\r\n');
WriteLnEx(@Name,4);
wait_key(nil);
ExitProcess(0);
http://www.freewebs.com/ogremagic/index.htm
Dim Var as int32 // not well , in basic there is no semicolon at end of file
you do not need to check for a semi colon which means this would be valid