Skip to content
Low-level programming · Higher-level thinking
Login Register
Forum / General Discussion

plugin detecting question

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

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

plugin detecting question

Hi Mr Colin,

i was playing with a dummy plugin , so that i want to detect a term 'program' .

so i have wrote event function to handle it , but i found out that ziron did not

detect it?

any help please.

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

Replies

Colin admin
Posts
928
Threads
49
Location
Bulgaria

plugins will only detected keywords after the default "program" keyword, else you still should be able to detect it further down in source.

can you show the source for the test plugin?

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

ok, the point here is to detect the first term 'program' not the keyword after it.

the trick here is with the plugin we can navigate the source code from the start.

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

Colin admin
Posts
928
Threads
49
Location
Bulgaria

Why would you want to do that? Ziron is a programming language not a compiler "kit"

if you want to add a custom type, this will be possible anyways without detecting program, new types will be possible to add such as WIN32OBJ and so on.

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

do you mean that , make event handler for 'WIN32OBJ' term and register it as a keyword?

also , by scanning the source code from plugin from that start will give the plugin more facility, take an example.

function event_prg()
{
@loop:
    extract a line
   
    check it and made the needed modification
 
    let ziron execute it
    
    if we reach to end of source code then exit function
    goto @loop;

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

Colin admin
Posts
928
Threads
49
Location
Bulgaria

you can do that without keyword detection, you do that with FileEntry event, and about WIN32OBJ - not exactly, i was working on a set of pf functions for developing new file formats, such as linux bin files and so on, but right now i'm concentrating on other areas.

However, i will try to get back around to adding the rest of the functions.

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt
you can do that without keyword detection, you do that with FileEntry event

does that mean i can use Ziron_Execute pf function from inside FileEntry event?

but right now i'm concentrating on other areas.

i know and good luck , also thanks for starting adding of SSE instruction.

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

Colin admin
Posts
928
Threads
49
Location
Bulgaria

the buffer would be rewritten from FileEntry, program etc etc is actually not code so it would not be possible to use as inside Ziron_Execute anyways.