Skip to content
Low-level programming · Higher-level thinking
Login Register
Forum / Requests and Feedback

ZirToken

A community discussion post from the original code:zIRON forum.

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

ZirToken

Hi

sometimes , the user need to put his own ZirToken that was not in enum ZirToken.

foe example i want my basic plugin pares this code correctly

DIM Name$;

because '$' is not included as a ZirToken , Ziron remove it.

the good solution may be adding Ziron_RegisterToken just like Ziron_RegisterKeyword to allow

the user to make his own Tokens.

what do you think ?

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

Replies

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

also i need this Ziron_UnRegisterToken.

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

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

also , how can i check the end of the line ?

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

Colin admin
Posts
928
Threads
49
Location
Bulgaria

OK i have made it possible to detect $, however new lines are not detectable since they are not classified as a identifiers, i wil think about an alternative method for the plugin system.

Colin admin
Posts
928
Threads
49
Location
Bulgaria

OK, i've added 2 new pf functions

Ziron_IsNextLineBreak

this function will return true if a line break is found before the next valid token.

and

UnregisterKeyword

Unregisters any of your registered keywords.

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

thank you very much.

but i was talking about Tokens no keyword , also register a token give the user the freedum

to add his desired Token.

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

Colin admin
Posts
928
Threads
49
Location
Bulgaria

Tokens will not be possible to register, because tokens are inbuilt into the assembler for high speed comparison, none valid tokens are detected as zirIdent, so it is possible to write a function to check your own custom tokens.

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt
so it is possible to write a function to check your own custom tokens.

ok , could you please give small code that demonstrate that.

BTW Dim KeyWord can pares this

Dim Var as int32;

//DIM Name$;

DIM a AS int32, b AS Dword, c AS char;

dim k%;  // integer

i will do those ,but when i know how to pares ! #

Dim fVal!; // single  variable
Dim dVal;  // double  variable

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