Skip to content
Low-level programming · Higher-level thinking
Login Register
Forum / Source Help

Pascal plugIn

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

Replies

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt
else for params you check for token ( - zirOpenParen

oh , i was asking about how plugIn can know if the function is a pascal function or

a Ziron one.

i have found out that , pascal may contain ':' in parameters , so i searched in parameters

for ":" to know it is a pascal one , the problem here is , if pascal function have no parameters term , how can i solve that ?

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

Colin admin
Posts
928
Threads
49
Location
Bulgaria

yes you can chack ( ident colon = if false, not pascal proc

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

oh sorry i do not get you well?

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

Colin admin
Posts
928
Threads
49
Location
Bulgaria

pseudo code:

Ziron_ExpectNextToken(zirOpenParen);
if (eax ...

Ziron_ExpectNextToken(zirIdent);
if (eax ...

Ziron_ExpectNextToken(zirColon);
if (eax == zirUnexpected) {
    //not a pascal type function
}

//else we need next to expect a datatype
Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

ok , paresing line to see if it has a ':' or not is not the problem here.

suppose you have a pascal function that has no parameters at all , when paresing it to find

':' you will not find it so you consider it as a non pascal function and that is not true.

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

Colin admin
Posts
928
Threads
49
Location
Bulgaria

without parameters it does not need to be converted to a pascal procedure since it is the same as a ziron procedure, so i do not see the problem...

pascal proc:

procedure MyProcedure;
begin
   //code
end;

ziron proc:

procedure MyProcedure {

}
Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

oh , it's ok now.

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