Emil_halim
member
Posts
639
Threads
104
Location
Alex, Egypt
Post #499
2011-11-09 14:58:50 UTC
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
Post #501
2011-11-09 15:03:35 UTC
yes you can chack ( ident colon = if false, not pascal proc
Emil_halim
member
Posts
639
Threads
104
Location
Alex, Egypt
Post #503
2011-11-09 15:05:48 UTC
oh sorry i do not get you well?
http://www.freewebs.com/ogremagic/index.htm
Colin
admin
Posts
928
Threads
49
Location
Bulgaria
Post #505
2011-11-09 16:22:30 UTC
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
Post #507
2011-11-09 17:11:30 UTC
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
Post #508
2011-11-09 17:14:36 UTC
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 {
}