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

464 lines
24 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.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// NPARSER.och oszt ly implement ci¢.
// Gener lva: 1999.06.10, 14:39:57, OBJCCC v2.2.03
// Meta oszt ly defin¡ci¢: Van
#ifndef CA_PARSER_N
#ifdef _STRICT_PARENT_
#ifdef _CA_CM_ONLY_
#include "PARSER.och"
#else // _CA_CM_ONLY_
#define _CA_CM_ONLY_
#include "PARSER.och"
#undef _CA_CM_ONLY_
#endif // _CA_CM_ONLY_
#else
#include "PARSER.och"
#endif // _STRICT_PARENT_
#endif // CA_PARSER_N
#ifndef _CA_CM_ONLY_
#ifndef _NPARSER_OCH_
#define _NPARSER_OCH_
#xtranslate NPARSER.<obj>:name => <obj>\[CA_OBJECT_N+1\]
#xtranslate NPARSER.<obj>:errorstream => <obj>\[CA_OBJECT_N+2\]
#xtranslate NPARSER.<obj>:tbuffer => <obj>\[CA_OBJECT_N+3\]
#xtranslate NPARSER.<obj>:inputreader => <obj>\[CA_READER_N+1\]
#xtranslate NPARSER.<obj>:item => <obj>\[CA_TREADER_N+1\]
#xtranslate NPARSER.<obj>:parserbuffer => <obj>\[CA_TREADER_N+2\]
#xtranslate NPARSER.<obj>:oinit => (OBJGEN.(<obj>):(4))
#xtranslate NPARSER.<obj>:getclass => (OBJGEN.(<obj>):(5))
#xtranslate NPARSER.<obj>:isclass => (OBJGEN.(<obj>):(6))
#xtranslate NPARSER.<obj>:getattrib => (OBJGEN.(<obj>):(7))
#xtranslate NPARSER.<obj>:setattrib => (OBJGEN.(<obj>):(8))
#xtranslate NPARSER.<obj>:read => (OBJGEN.(<obj>):(CM_OBJECT_N+1))
#xtranslate NPARSER.<obj>:unread => (OBJGEN.(<obj>):(CM_OBJECT_N+2))
#xtranslate NPARSER.<obj>:readtbuffer => (OBJGEN.(<obj>):(CM_OBJECT_N+3))
#xtranslate NPARSER.<obj>:arraytbuffer => (OBJGEN.(<obj>):(CM_OBJECT_N+4))
#xtranslate NPARSER.<obj>:readitem => (OBJGEN.(<obj>):(CM_OBJECT_N+5))
#xtranslate NPARSER.<obj>:iserror => (OBJGEN.(<obj>):(CM_OBJECT_N+6))
#xtranslate NPARSER.<obj>:adderror => (OBJGEN.(<obj>):(CM_OBJECT_N+7))
#xtranslate NPARSER.<obj>:destruct => (OBJGEN.(<obj>):(CM_OBJECT_N+8))
#xtranslate NPARSER.<obj>:readinput => (OBJGEN.(<obj>):(CM_READER_N+1))
#xtranslate NPARSER.<obj>:unreadinput => (OBJGEN.(<obj>):(CM_READER_N+2))
#xtranslate NPARSER.<obj>:addinputreader => (OBJGEN.(<obj>):(CM_READER_N+3))
#xtranslate NPARSER.<obj>:putparserbuffer => (OBJGEN.(<obj>):(CM_TREADER_N+1))
#xtranslate NPARSER.<obj>:getparserbuffer => (OBJGEN.(<obj>):(CM_TREADER_N+2))
#xtranslate NPARSER.<obj>:unputparserbuffer => (OBJGEN.(<obj>):(CM_TREADER_N+3))
#xtranslate NPARSER.<obj>:ungetparserbuffer => (OBJGEN.(<obj>):(CM_TREADER_N+4))
#xtranslate NPARSER.<obj>:clearparserbuffer => (OBJGEN.(<obj>):(CM_TREADER_N+5))
#xtranslate NPARSER.<obj>:rds => (OBJGEN.(<obj>):(CM_TREADER_N+6))
#xtranslate NPARSER.<obj>:unrds => (OBJGEN.(<obj>):(CM_TREADER_N+7))
#xtranslate NPARSER.<obj>:strparserbuffer => (OBJGEN.(<obj>):(CM_TREADER_N+8))
#xtranslate NPARSER.<obj>:arrayparserbuffer => (OBJGEN.(<obj>):(CM_TREADER_N+9))
#xtranslate NPARSER.<obj>:soreleje => <obj>\[CA_PARSER_N+1\]
#xtranslate NPARSER.<obj>:tokenpos => <obj>\[CA_PARSER_N+2\]
// ™r”k”lve: readitem()
// Specifik lva: streolparserbuffer()
// Specifik lva: maketoken(tkId,str)
// Specifik lva: maketokenst(tkId,stArray)
// Specifik lva: maketokenlst(tkId,stArray)
// Specifik lva: makeerrtoken(tkId,str,errCode)
// Specifik lva: parsetptree()
// Specifik lva: parse()
// Specifik lva: parselinecomment(tkId)
// Specifik lva: parsepccomment()
// Specifik lva: parsestring(hatarolo)
// Specifik lva: parsename()
// Specifik lva: parsenumberarray()
// ™r”k”lve: oinit(inputReader,name,errorStream)
// ™r”k”lve: readitem()
#xtranslate NPARSER.<obj>:streolparserbuffer => (OBJGEN.(<obj>):(CM_PARSER_N+1))
#xtranslate NPARSER.<obj>:maketoken => (OBJGEN.(<obj>):(CM_PARSER_N+2))
#xtranslate NPARSER.<obj>:maketokenst => (OBJGEN.(<obj>):(CM_PARSER_N+3))
#xtranslate NPARSER.<obj>:maketokenlst => (OBJGEN.(<obj>):(CM_PARSER_N+4))
#xtranslate NPARSER.<obj>:makeerrtoken => (OBJGEN.(<obj>):(CM_PARSER_N+5))
#xtranslate NPARSER.<obj>:parsetptree => (OBJGEN.(<obj>):(CM_PARSER_N+6))
#xtranslate NPARSER.<obj>:parse => (OBJGEN.(<obj>):(CM_PARSER_N+7))
#xtranslate NPARSER.<obj>:parselinecomment => (OBJGEN.(<obj>):(CM_PARSER_N+8))
#xtranslate NPARSER.<obj>:parsepccomment => (OBJGEN.(<obj>):(CM_PARSER_N+9))
#xtranslate NPARSER.<obj>:parsestring => (OBJGEN.(<obj>):(CM_PARSER_N+10))
#xtranslate NPARSER.<obj>:parsename => (OBJGEN.(<obj>):(CM_PARSER_N+11))
#xtranslate NPARSER.<obj>:parsenumberarray => (OBJGEN.(<obj>):(CM_PARSER_N+12))
// ™r”k”lve: oinit(inputReader,name,errorStream)
#endif // _NPARSER_OCH_
#endif // _CA_CM_ONLY_
#ifndef CA_NPARSER_N
#define CA_NPARSER_N CA_PARSER_N+2
#define CM_NPARSER_N CM_PARSER_N+12
#endif // CA_NPARSER_N
#ifndef _CA_CM_ONLY_
#ifndef _NPARSERCLASS_OCH_
#define _NPARSERCLASS_OCH_
**********************************************************************
#xtranslate C.NPARSER:<m> => (NPARSERCLASS.clNPARSER():<m>)
#xtranslate C.NPARSER:self() => (clNPARSER())
#xtranslate NPARSERCLASS.<obj>:parent => <obj>\[CA_OBJECT_N+1\]
#xtranslate NPARSERCLASS.<obj>:name => <obj>\[CA_OBJECT_N+2\]
#xtranslate NPARSERCLASS.<obj>:objsize => <obj>\[CA_OBJECT_N+3\]
#xtranslate NPARSERCLASS.<obj>:attribs => <obj>\[CA_OBJECT_N+4\]
#xtranslate NPARSERCLASS.<obj>:methods => <obj>\[CA_OBJECT_N+5\]
#xtranslate NPARSERCLASS.<obj>:classid => <obj>\[CA_OBJECT_N+6\]
#xtranslate NPARSERCLASS.<obj>:parentclassids => <obj>\[CA_OBJECT_N+7\]
#xtranslate NPARSERCLASS.<obj>:amblock => <obj>\[CA_OBJECT_N+8\]
#xtranslate NPARSERCLASS.<obj>:methodsblock => <obj>\[CA_OBJECT_N+9\]
#xtranslate NPARSERCLASS.<obj>:objmethodsimplement => <obj>\[CA_OBJECT_N+10\]
#xtranslate NPARSERCLASS.<obj>:oinit => (OBJGEN.(<obj>):(4))
#xtranslate NPARSERCLASS.<obj>:getclass => (OBJGEN.(<obj>):(5))
#xtranslate NPARSERCLASS.<obj>:isclass => (OBJGEN.(<obj>):(6))
#xtranslate NPARSERCLASS.<obj>:getattrib => (OBJGEN.(<obj>):(7))
#xtranslate NPARSERCLASS.<obj>:setattrib => (OBJGEN.(<obj>):(8))
#xtranslate NPARSERCLASS.<obj>:onew => (OBJGEN.(<obj>):(CM_OBJECT_N+1))
#xtranslate NPARSERCLASS.<obj>:ocreate => (OBJGEN.(<obj>):(CM_OBJECT_N+2))
#xtranslate NPARSERCLASS.<obj>:rawoinit => (OBJGEN.(<obj>):(CM_OBJECT_N+3))
#xtranslate NPARSERCLASS.<obj>:oinitclass => (OBJGEN.(<obj>):(CM_OBJECT_N+4))
#xtranslate NPARSERCLASS.<obj>:getmethodsimplement => (OBJGEN.(<obj>):(CM_OBJECT_N+5))
#xtranslate NPARSERCLASS.<obj>:attribidx => (OBJGEN.(<obj>):(CM_OBJECT_N+6))
#xtranslate NPARSERCLASS.<obj>:needclassid => (OBJGEN.(<obj>):(CM_OBJECT_N+7))
#xtranslate NPARSERCLASS.<obj>:isinheritfrom => (OBJGEN.(<obj>):(CM_OBJECT_N+8))
#xtranslate NPARSERCLASS.<obj>:whitespacechar => <obj>\[CA_PARSERCLASS_N+1\]
#xtranslate NPARSERCLASS.<obj>:startnamechar => <obj>\[CA_PARSERCLASS_N+2\]
#xtranslate NPARSERCLASS.<obj>:numberchar => <obj>\[CA_PARSERCLASS_N+3\]
#xtranslate NPARSERCLASS.<obj>:namechar => <obj>\[CA_PARSERCLASS_N+4\]
#xtranslate NPARSERCLASS.<obj>:tokens => <obj>\[CA_PARSERCLASS_N+5\]
#xtranslate NPARSERCLASS.<obj>:tokenptree => <obj>\[CA_PARSERCLASS_N+6\]
// ™r”k”lve: onew(inputReader,name,errorStream)
// ™r”k”lve: oinitclass()
// Specifik lva: iswhitespacechar(c)
// Specifik lva: isstartnamechar(c)
// Specifik lva: isnumberchar(c)
// Specifik lva: isnamechar(c)
// Specifik lva: settokens()
// Specifik lva: calctokenptree()
// ™r”k”lve: onew(inputReader,name,errorStream)
// ™r”k”lve: oinitclass()
#xtranslate NPARSERCLASS.<obj>:iswhitespacechar => (OBJGEN.(<obj>):(CM_PARSERCLASS_N+1))
#xtranslate NPARSERCLASS.<obj>:isstartnamechar => (OBJGEN.(<obj>):(CM_PARSERCLASS_N+2))
#xtranslate NPARSERCLASS.<obj>:isnumberchar => (OBJGEN.(<obj>):(CM_PARSERCLASS_N+3))
#xtranslate NPARSERCLASS.<obj>:isnamechar => (OBJGEN.(<obj>):(CM_PARSERCLASS_N+4))
#xtranslate NPARSERCLASS.<obj>:settokens => (OBJGEN.(<obj>):(CM_PARSERCLASS_N+5))
#xtranslate NPARSERCLASS.<obj>:calctokenptree => (OBJGEN.(<obj>):(CM_PARSERCLASS_N+6))
#endif // _NPARSERCLASS_OCH_
#endif // _CA_CM_ONLY_
#ifndef CA_NPARSERCLASS_N
#define CA_NPARSERCLASS_N CA_PARSERCLASS_N+6
#define CM_NPARSERCLASS_N CM_PARSERCLASS_N+6
#endif // CA_NPARSERCLASS_N
**********************************************************************
#ifdef _NPARSER_PRG_
#ifndef _NPARSER_PRG_OCH_
#define _NPARSER_PRG_OCH_
**********************************************************************
#xtranslate othis:<m> => NPARSER.(othis):<m>
#xtranslate thisclass:<m> => NPARSERCLASS.(this:getClass()):<m>
#define CTHIS NPARSER
**********************************************************************
#xtranslate this:<m> => NPARSER.(this):<m>
#xcommand implement readitem() => static function readitem(this)
#xcommand implement streolparserbuffer() => ;
static function streolparserbuffer(this)
#xcommand implement maketoken(tkId,str) => ;
static function maketoken(this,tkId,str)
#xcommand implement maketokenst(tkId,stArray) => ;
static function maketokenst(this,tkId,stArray)
#xcommand implement maketokenlst(tkId,stArray) => ;
static function maketokenlst(this,tkId,stArray)
#xcommand implement makeerrtoken(tkId,str,errCode) => ;
static function makeerrtoken(this,tkId,str,errCode)
#xcommand implement parsetptree() => static function parsetptree(this)
#xcommand implement parse() => static function parse(this)
#xcommand implement parselinecomment(tkId) => ;
static function parselinecomment(this,tkId)
#xcommand implement parsepccomment() => ;
static function parsepccomment(this)
#xcommand implement parsestring(hatarolo) => ;
static function parsestring(this,hatarolo)
#xcommand implement parsename() => static function parsename(this)
#xcommand implement parsenumberarray() => ;
static function parsenumberarray(this)
#xcommand implement oinit(inputReader,name,errorStream) => ;
static function oinit(this,inputReader,name,errorStream)
#ifdef _IMPLEMENT_EXPORT_
#xcommand implement export readitem() => function readitem(this)
#xcommand implement export streolparserbuffer() => ;
function streolparserbuffer(this)
#xcommand implement export maketoken(tkId,str) => ;
function maketoken(this,tkId,str)
#xcommand implement export maketokenst(tkId,stArray) => ;
function maketokenst(this,tkId,stArray)
#xcommand implement export maketokenlst(tkId,stArray) => ;
function maketokenlst(this,tkId,stArray)
#xcommand implement export makeerrtoken(tkId,str,errCode) => ;
function makeerrtoken(this,tkId,str,errCode)
#xcommand implement export parsetptree() => function parsetptree(this)
#xcommand implement export parse() => function parse(this)
#xcommand implement export parselinecomment(tkId) => ;
function parselinecomment(this,tkId)
#xcommand implement export parsepccomment() => ;
function parsepccomment(this)
#xcommand implement export parsestring(hatarolo) => ;
function parsestring(this,hatarolo)
#xcommand implement export parsename() => function parsename(this)
#xcommand implement export parsenumberarray() => ;
function parsenumberarray(this)
#xcommand implement export oinit(inputReader,name,errorStream) => ;
function oinit(this,inputReader,name,errorStream)
#endif // _IMPLEMENT_EXPORT_
#xtranslate super:oinit => (OBJGENM.(eval(BEHAVIOR.clPARSER():objmethodsimplement)).(this):(4))
#xtranslate super:getclass => (OBJGENM.(eval(BEHAVIOR.clPARSER():objmethodsimplement)).(this):(5))
#xtranslate super:isclass => (OBJGENM.(eval(BEHAVIOR.clPARSER():objmethodsimplement)).(this):(6))
#xtranslate super:getattrib => (OBJGENM.(eval(BEHAVIOR.clPARSER():objmethodsimplement)).(this):(7))
#xtranslate super:setattrib => (OBJGENM.(eval(BEHAVIOR.clPARSER():objmethodsimplement)).(this):(8))
#xtranslate super:read => (OBJGENM.(eval(BEHAVIOR.clPARSER():objmethodsimplement)).(this):(CM_OBJECT_N+1))
#xtranslate super:unread => (OBJGENM.(eval(BEHAVIOR.clPARSER():objmethodsimplement)).(this):(CM_OBJECT_N+2))
#xtranslate super:readtbuffer => (OBJGENM.(eval(BEHAVIOR.clPARSER():objmethodsimplement)).(this):(CM_OBJECT_N+3))
#xtranslate super:arraytbuffer => (OBJGENM.(eval(BEHAVIOR.clPARSER():objmethodsimplement)).(this):(CM_OBJECT_N+4))
#xtranslate super:readitem => (OBJGENM.(eval(BEHAVIOR.clPARSER():objmethodsimplement)).(this):(CM_OBJECT_N+5))
#xtranslate super:iserror => (OBJGENM.(eval(BEHAVIOR.clPARSER():objmethodsimplement)).(this):(CM_OBJECT_N+6))
#xtranslate super:adderror => (OBJGENM.(eval(BEHAVIOR.clPARSER():objmethodsimplement)).(this):(CM_OBJECT_N+7))
#xtranslate super:destruct => (OBJGENM.(eval(BEHAVIOR.clPARSER():objmethodsimplement)).(this):(CM_OBJECT_N+8))
#xtranslate super:readinput => (OBJGENM.(eval(BEHAVIOR.clPARSER():objmethodsimplement)).(this):(CM_READER_N+1))
#xtranslate super:unreadinput => (OBJGENM.(eval(BEHAVIOR.clPARSER():objmethodsimplement)).(this):(CM_READER_N+2))
#xtranslate super:addinputreader => (OBJGENM.(eval(BEHAVIOR.clPARSER():objmethodsimplement)).(this):(CM_READER_N+3))
#xtranslate super:putparserbuffer => (OBJGENM.(eval(BEHAVIOR.clPARSER():objmethodsimplement)).(this):(CM_TREADER_N+1))
#xtranslate super:getparserbuffer => (OBJGENM.(eval(BEHAVIOR.clPARSER():objmethodsimplement)).(this):(CM_TREADER_N+2))
#xtranslate super:unputparserbuffer => (OBJGENM.(eval(BEHAVIOR.clPARSER():objmethodsimplement)).(this):(CM_TREADER_N+3))
#xtranslate super:ungetparserbuffer => (OBJGENM.(eval(BEHAVIOR.clPARSER():objmethodsimplement)).(this):(CM_TREADER_N+4))
#xtranslate super:clearparserbuffer => (OBJGENM.(eval(BEHAVIOR.clPARSER():objmethodsimplement)).(this):(CM_TREADER_N+5))
#xtranslate super:rds => (OBJGENM.(eval(BEHAVIOR.clPARSER():objmethodsimplement)).(this):(CM_TREADER_N+6))
#xtranslate super:unrds => (OBJGENM.(eval(BEHAVIOR.clPARSER():objmethodsimplement)).(this):(CM_TREADER_N+7))
#xtranslate super:strparserbuffer => (OBJGENM.(eval(BEHAVIOR.clPARSER():objmethodsimplement)).(this):(CM_TREADER_N+8))
#xtranslate super:arrayparserbuffer => (OBJGENM.(eval(BEHAVIOR.clPARSER():objmethodsimplement)).(this):(CM_TREADER_N+9))
**********************************************************************
static function setCMethods(pOsztaly)
// Egy t”mb”t felt”lt az oszt ly mveleti blokkjaival.
pOsztaly[(CM_OBJECT_N+5)]:={|this| readitem(this)}
pOsztaly[(CM_PARSER_N+1)]:={|this| streolparserbuffer(this)}
pOsztaly[(CM_PARSER_N+2)]:={|this,tkId,str| maketoken(this,tkId,str)}
pOsztaly[(CM_PARSER_N+3)]:={|this,tkId,stArray| maketokenst(this,tkId,stArray)}
pOsztaly[(CM_PARSER_N+4)]:={|this,tkId,stArray| maketokenlst(this,tkId,stArray)}
pOsztaly[(CM_PARSER_N+5)]:={|this,tkId,str,errCode| makeerrtoken(this,tkId,str,errCode)}
pOsztaly[(CM_PARSER_N+6)]:={|this| parsetptree(this)}
pOsztaly[(CM_PARSER_N+7)]:={|this| parse(this)}
pOsztaly[(CM_PARSER_N+8)]:={|this,tkId| parselinecomment(this,tkId)}
pOsztaly[(CM_PARSER_N+9)]:={|this| parsepccomment(this)}
pOsztaly[(CM_PARSER_N+10)]:={|this,hatarolo| parsestring(this,hatarolo)}
pOsztaly[(CM_PARSER_N+11)]:={|this| parsename(this)}
pOsztaly[(CM_PARSER_N+12)]:={|this| parsenumberarray(this)}
pOsztaly[(4)]:={|this,inputReader,name,errorStream| oinit(this,inputReader,name,errorStream)}
return pOsztaly
**********************************************************************
static function setCams(ta,tm)
// Egy t”mb”t felt”lt az oszt ly  ltal def. objektumok attrib£tumaival s mveleteivel.
ta[CA_PARSER_N+1-CA_NIL_N] := {CA_PARSER_N+1,'soreleje',nil}
ta[CA_PARSER_N+2-CA_NIL_N] := {CA_PARSER_N+2,'tokenpos', }
tm[(CM_OBJECT_N+5)-CM_NIL_N] := {(CM_OBJECT_N+5),'readitem','',nil}
tm[(CM_PARSER_N+1)-CM_NIL_N] := {(CM_PARSER_N+1),'streolparserbuffer','',nil}
tm[(CM_PARSER_N+2)-CM_NIL_N] := {(CM_PARSER_N+2),'maketoken','tkId,str',nil}
tm[(CM_PARSER_N+3)-CM_NIL_N] := {(CM_PARSER_N+3),'maketokenst','tkId,stArray',nil}
tm[(CM_PARSER_N+4)-CM_NIL_N] := {(CM_PARSER_N+4),'maketokenlst','tkId,stArray',nil}
tm[(CM_PARSER_N+5)-CM_NIL_N] := {(CM_PARSER_N+5),'makeerrtoken','tkId,str,errCode',nil}
tm[(CM_PARSER_N+6)-CM_NIL_N] := {(CM_PARSER_N+6),'parsetptree','',nil}
tm[(CM_PARSER_N+7)-CM_NIL_N] := {(CM_PARSER_N+7),'parse','',nil}
tm[(CM_PARSER_N+8)-CM_NIL_N] := {(CM_PARSER_N+8),'parselinecomment','tkId',nil}
tm[(CM_PARSER_N+9)-CM_NIL_N] := {(CM_PARSER_N+9),'parsepccomment','',nil}
tm[(CM_PARSER_N+10)-CM_NIL_N] := {(CM_PARSER_N+10),'parsestring','hatarolo',nil}
tm[(CM_PARSER_N+11)-CM_NIL_N] := {(CM_PARSER_N+11),'parsename','',nil}
tm[(CM_PARSER_N+12)-CM_NIL_N] := {(CM_PARSER_N+12),'parsenumberarray','',nil}
tm[(4)-CM_NIL_N] := {(4),'oinit','inputReader,name,errorStream',nil}
return nil
#ifndef _NO_CLNPARSER_
#ifdef _STRICT_PARENT_
#ifdef _CA_CM_ONLY_
#include "meta.och"
#else // _CA_CM_ONLY_
#define _CA_CM_ONLY_
#include "meta.och"
#undef _CA_CM_ONLY_
#endif // _CA_CM_ONLY_
#else
#include "meta.och"
#endif // _STRICT_PARENT_
**********************************************************************
function clNPARSER()
// El“szedi az oszt lyt. (class)
static osztaly
if (osztaly==nil)
osztaly:=META.mcNPARSERCLASS():onew(;
clPARSER(),;
"NPARSER",;
CA_NPARSER_N,;
CM_NPARSER_N,;
{|ta,tm|setCams(ta,tm)},;
{|t|setCMethods(t)})
endif
return osztaly
#endif // _NO_CLNPARSER_
#ifndef _NO_NPARSERCLASS_
**********************************************************************
#xtranslate class:<m> => NPARSERCLASS.(class):<m>
#xcommand cimplement onew(inputReader,name,errorStream) => ;
static function onew(class,inputReader,name,errorStream)
#xcommand cimplement oinitclass() => static function oinitclass(class)
#xcommand cimplement iswhitespacechar(c) => ;
static function iswhitespacechar(class,c)
#xcommand cimplement isstartnamechar(c) => ;
static function isstartnamechar(class,c)
#xcommand cimplement isnumberchar(c) => ;
static function isnumberchar(class,c)
#xcommand cimplement isnamechar(c) => static function isnamechar(class,c)
#xcommand cimplement settokens() => static function settokens(class)
#xcommand cimplement calctokenptree() => ;
static function calctokenptree(class)
#ifdef _IMPLEMENT_EXPORT_
#xcommand cimplement export onew(inputReader,name,errorStream) => ;
function onew(class,inputReader,name,errorStream)
#xcommand cimplement export oinitclass() => function oinitclass(class)
#xcommand cimplement export iswhitespacechar(c) => ;
function iswhitespacechar(class,c)
#xcommand cimplement export isstartnamechar(c) => ;
function isstartnamechar(class,c)
#xcommand cimplement export isnumberchar(c) => ;
function isnumberchar(class,c)
#xcommand cimplement export isnamechar(c) => function isnamechar(class,c)
#xcommand cimplement export settokens() => function settokens(class)
#xcommand cimplement export calctokenptree() => ;
function calctokenptree(class)
#endif // _IMPLEMENT_EXPORT_
#xtranslate superclass:oinit => (OBJGENM.(eval(BEHAVIOR.mcPARSERCLASS():objmethodsimplement)).(class):(4))
#xtranslate superclass:getclass => (OBJGENM.(eval(BEHAVIOR.mcPARSERCLASS():objmethodsimplement)).(class):(5))
#xtranslate superclass:isclass => (OBJGENM.(eval(BEHAVIOR.mcPARSERCLASS():objmethodsimplement)).(class):(6))
#xtranslate superclass:getattrib => (OBJGENM.(eval(BEHAVIOR.mcPARSERCLASS():objmethodsimplement)).(class):(7))
#xtranslate superclass:setattrib => (OBJGENM.(eval(BEHAVIOR.mcPARSERCLASS():objmethodsimplement)).(class):(8))
#xtranslate superclass:onew => (OBJGENM.(eval(BEHAVIOR.mcPARSERCLASS():objmethodsimplement)).(class):(CM_OBJECT_N+1))
#xtranslate superclass:ocreate => (OBJGENM.(eval(BEHAVIOR.mcPARSERCLASS():objmethodsimplement)).(class):(CM_OBJECT_N+2))
#xtranslate superclass:rawoinit => (OBJGENM.(eval(BEHAVIOR.mcPARSERCLASS():objmethodsimplement)).(class):(CM_OBJECT_N+3))
#xtranslate superclass:oinitclass => (OBJGENM.(eval(BEHAVIOR.mcPARSERCLASS():objmethodsimplement)).(class):(CM_OBJECT_N+4))
#xtranslate superclass:getmethodsimplement => (OBJGENM.(eval(BEHAVIOR.mcPARSERCLASS():objmethodsimplement)).(class):(CM_OBJECT_N+5))
#xtranslate superclass:attribidx => (OBJGENM.(eval(BEHAVIOR.mcPARSERCLASS():objmethodsimplement)).(class):(CM_OBJECT_N+6))
#xtranslate superclass:needclassid => (OBJGENM.(eval(BEHAVIOR.mcPARSERCLASS():objmethodsimplement)).(class):(CM_OBJECT_N+7))
#xtranslate superclass:isinheritfrom => (OBJGENM.(eval(BEHAVIOR.mcPARSERCLASS():objmethodsimplement)).(class):(CM_OBJECT_N+8))
**********************************************************************
static function setMCMethods(pOsztaly)
// Egy t”mb”t felt”lt a metaoszt ly mveleti blokkjaival.
pOsztaly[(CM_OBJECT_N+1)]:={|class,inputReader,name,errorStream| onew(class,inputReader,name,errorStream)}
pOsztaly[(CM_OBJECT_N+4)]:={|class| oinitclass(class)}
pOsztaly[(CM_PARSERCLASS_N+1)]:={|class,c| iswhitespacechar(class,c)}
pOsztaly[(CM_PARSERCLASS_N+2)]:={|class,c| isstartnamechar(class,c)}
pOsztaly[(CM_PARSERCLASS_N+3)]:={|class,c| isnumberchar(class,c)}
pOsztaly[(CM_PARSERCLASS_N+4)]:={|class,c| isnamechar(class,c)}
pOsztaly[(CM_PARSERCLASS_N+5)]:={|class| settokens(class)}
pOsztaly[(CM_PARSERCLASS_N+6)]:={|class| calctokenptree(class)}
return pOsztaly
**********************************************************************
static function setMCams(ta,tm)
// Egy t”mb”t felt”lt a metaoszt ly  ltal def. objektumok attrib£tumaival s mveleteivel.
ta[CA_PARSERCLASS_N+1-CA_NIL_N] := {CA_PARSERCLASS_N+1,'whitespacechar',nil}
ta[CA_PARSERCLASS_N+2-CA_NIL_N] := {CA_PARSERCLASS_N+2,'startnamechar',nil}
ta[CA_PARSERCLASS_N+3-CA_NIL_N] := {CA_PARSERCLASS_N+3,'numberchar',nil}
ta[CA_PARSERCLASS_N+4-CA_NIL_N] := {CA_PARSERCLASS_N+4,'namechar',nil}
ta[CA_PARSERCLASS_N+5-CA_NIL_N] := {CA_PARSERCLASS_N+5,'tokens',nil}
ta[CA_PARSERCLASS_N+6-CA_NIL_N] := {CA_PARSERCLASS_N+6,'tokenptree',nil}
tm[(CM_OBJECT_N+1)-CM_NIL_N] := {(CM_OBJECT_N+1),'onew','inputReader,name,errorStream',nil}
tm[(CM_OBJECT_N+4)-CM_NIL_N] := {(CM_OBJECT_N+4),'oinitclass','',nil}
tm[(CM_PARSERCLASS_N+1)-CM_NIL_N] := {(CM_PARSERCLASS_N+1),'iswhitespacechar','c',nil}
tm[(CM_PARSERCLASS_N+2)-CM_NIL_N] := {(CM_PARSERCLASS_N+2),'isstartnamechar','c',nil}
tm[(CM_PARSERCLASS_N+3)-CM_NIL_N] := {(CM_PARSERCLASS_N+3),'isnumberchar','c',nil}
tm[(CM_PARSERCLASS_N+4)-CM_NIL_N] := {(CM_PARSERCLASS_N+4),'isnamechar','c',nil}
tm[(CM_PARSERCLASS_N+5)-CM_NIL_N] := {(CM_PARSERCLASS_N+5),'settokens','',nil}
tm[(CM_PARSERCLASS_N+6)-CM_NIL_N] := {(CM_PARSERCLASS_N+6),'calctokenptree','',nil}
return nil
**********************************************************************
#ifndef _NO_MCNPARSERCLASS_
#ifdef _STRICT_PARENT_
#ifdef _CA_CM_ONLY_
#include "meta.och" // "metaclas.och"
#else // _CA_CM_ONLY_
#define _CA_CM_ONLY_
#include "meta.och" // "metaclas.och"
#undef _CA_CM_ONLY_
#endif // _CA_CM_ONLY_
#else
#include "meta.och" // "metaclas.och"
#endif // _STRICT_PARENT_
function mcNPARSERCLASS()
// El“szedi az oszt ly metaoszt ly t. (metaclass)
static metaOsztaly
if (metaOsztaly==nil)
metaOsztaly:=META.clMETA():onew(;
mcPARSERCLASS(),;
"NPARSERCLASS",;
CA_NPARSERCLASS_N,;
CM_NPARSERCLASS_N,;
{|ta,tm|setMCams(ta,tm)},;
{|t|setMCMethods(t)})
endif
return metaOsztaly
#endif // _NO_MCNPARSERCLASS_
#endif // _NO_NPARSERCLASS_
#ifdef _IMPLEMENT_ONEW_
**********************************************************************
cimplement onew(inputReader,name,errorStream)
local o:=class:ocreate()
NPARSER.o:oinit(inputReader,name,errorStream)
return o
#endif // _IMPLEMENT_ONEW_
**********************************************************************
#ifdef _IMPLEMENT_OINIT_
implement oinit(inputReader,name,errorStream)
super:oinit()
return this
#endif // _IMPLEMENT_OINIT_
**********************************************************************
**********************************************************************
#endif // _NPARSER_PRG_OCH_
#endif // _NPARSER_PRG_