Register | Login
Forum Index > Requests and Feedback > ZirToken
Author Message
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[350] - posted: 2011-11-05 16:10:12
% 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, // $

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[351] - posted: 2011-11-05 16:13:09

ok i will test that , thanks.

http://www.freewebs.com/ogremagic/index.htm
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[352] - posted: 2011-11-05 16:21:16

one more thing
i am using this to pares Dim
Code:
   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
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[353] - posted: 2011-11-05 16:29:16
how do you mean a none token value? if you mean something that is not inside your case select then you can use default

Code:
case ...

default:
  Fatal_Error('Unexpected token');
  return true;
}


Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[354] - posted: 2011-11-05 16:34:11

on , i ment something is not in enum ZirToken such as '!'

also BTW this didnot compile
Code:
if(Ziron_IsNextLineBreak())
   {
      break;      // check end of line so we end without semicolon
   } 


http://www.freewebs.com/ogremagic/index.htm
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[355] - posted: 2011-11-05 16:36:33
Ziron does not support function calls inside of block statements (for now)

Code:
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

Code:
state zirIdent:
  eax = Ziron_GetStringValue();
  eax = myCustomIdentFunc(eax);

  if (eax == ci_Etc) ....


however i will add ! as a value token for update.

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[356] - posted: 2011-11-05 16:45:55

very good and thank you.

i hope to semulate basic Dim keyWord 100%

so this code work prefectly
Code:
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
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[357] - posted: 2011-11-05 16:50:02
Code:
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

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
create new reply


Quick reply:

Message:



Currently Active Users:
There are currently 11 user(s) online. 0 member(s) and 11 guest(s)
Most users ever online was 1046, January 28, 2022, 2:08 pm.


Statistics:
Threads: 225 | Posts: 1848 | Members: 51 | Active Members: 51
Welcome to our newest member, yecate
const Copyright = '2011-2024 © OverHertz Ltd. All rights reserved.';
Web development by OverHertz Ltd