Files
harbour-core/harbour/samples/cccppc/maltrset.prg
1999-11-09 01:37:27 +00:00

58 lines
1.3 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
* $Id$
*/
//*******************************************************************
// maltrset.prg: a MALTRSET oszt ly implement ci¢ja.
// 1999, Csisz r Levente
//*******************************************************************
#include "ctoken.ch"
//*******************************************************************
#include "objgen.ch"
#define _MALTRSET_PRG_
#define _IMPLEMENT_ONEW_
#include "maltrset.och"
//*******************************************************************
implement oinit(id,str,file,line,pos)
super:oinit(id,str,file,line,pos)
this:alterset :={}
return this
//*******************************************************************
implement addAlter(tokenList)
aadd(this:alterset,tokenList)
return nil
//*******************************************************************
implement getStr()
local str,i,j,alter
if (!this:id==TKID_MALTERSET)
return super:getStr()
endif
str:=""
for i:=1 to len(this:alterset)
str+="["
alter:=this:alterset[i]
for j:=1 to len(alter)
str+=TOKEN.(alter[j]):getStr()
end for
str+="]"
end for
if (this:isError())
str+=", Error: "+this:errorStr()+guessedEol()
endif
return str
//*******************************************************************