def main(p, m=m): p['package']['fioiV'] = '' p['help']['fioiV'] = m """ p is architecture array """ # set up class in sy-fioC using filename on datastack # all Pverbs come off class import fioiClass PFN = p['sy']['pop']() # file name on stack p['sy']['fioC'] = fioiClass.fio(PFN) p['help']['fioC'] = "fioiClass.fio(PFN)" # need facades for all class bound verbs # fioiV:main 4 # sections mark p['sy']['fioi'] = fioiP p['help']['fioi'] = "(,,c(iox)) from file PFN" p['sy']['fioo'] = fiooP p['help']['fioo'] = "(,,) PFN iox is decremented" p['sy']['fpword'] = fpwordP p['help']['fpword'] = "(,,word) from PFN at iox" p['sy']['ftlc'] = ftlP p['help'][ 'ftlc'] = "fctl file-till-char (CHX,,stringTillCHX) from PFN at iox" #fioxSet(self,pos) p['sy']['fback'] = fback p['help']['fback'] = "fback (,,) resets fiox from last pword at fiox" p['sy']['fctillor'] = Vfctillor p['help']['fctillor'] = "(stringOfTargets,,) collects till one of target" p['sy']['fwhite'] = Vwhite p['help']['fwhite'] = "(,,) skips space line tabs and comments in file" p['sy']['f0'] = fzero p['help']['f0'] = "(,,) rewind file" p['sy']['fiox@'] = fioxAt p['help']['fiox@'] = "(,,fiox) get current file position" return (p)
def main(filename): global sec sec = {} sec['manifest'] = {} # manifest of verbs sec['sy'] = {} # symbol table sec['input'] = filename """ old code fh = open(filename,'r') """ import fioiClass sec['sy']['fio'] = fioiClass.fio(filename) sec['outfile'] = VWord() """ sec['outfile']= VWord() """ prepSec() ffo = open(sec['outfile'], 'w') ffo.write(sec['hx0']) #file header sec['mx3'] = '' paragraph(ffo) ffo.write(sec['hx2'] + sec['mx3'] + sec['hx4']) ffo.write(sec['hx1']) ffo.close() # fh.close() # write mainfest ffm = open(sec['outfile'] + '.manifest.txt', 'w') for xm in sec['manifest'].keys(): ffm.write(xm + '\n') #end for ffm.close
def main(filename): global sec sec = {} sec['manifest'] = {} # manifest of verbs sec['sy'] = {} # symbol table sec['M'] = {} # external routine table sec['streamRtns'] = '' # code list sec['input'] = filename """ old code fh = open(filename,'r') """ import fioiClass sec['sy']['fio'] = fioiClass.fio(filename) sec['outfile'] = VWord() print('outfile =(' + sec['outfile'] + ")") sec['M'] = {} # external rtns symbol table import SQSQ sec['sy']['SQSQ'] = SQSQ prepSec() ffo = open(sec['outfile'], 'w') ffo.write(sec['hx0']) #file header sec['mx3'] = '' paragraph(ffo) ffo.write(sec['hx2'] + sec['mx3'] + sec['hx4']) ffo.write(sec['hx1']) ffo.close() # fh.close() # write mainfest ffm = open(sec['outfile'] + '.manifest.txt', 'w') for xm in sec['manifest'].keys(): ffm.write(xm + '\n') #end for ffm.close
def main2(fina): global rec rec = {} versionn = "PD v.2012.10.17" print("PD1 version: " , versionn) # tell me the version rec['fina'] = fina # save file name fh = open(fina,'r') import fioiClass k = fioiClass.fio(fina) # read till <project> c = 0 while (c == 0): m = getword(k) if (m.upper() == '<PROJECT>'): c = -1 #endif print('point loop1.a ') #wend pjna = getword(k) rec['project'] = pjna # read till </project> c = 0 while (c == 0): m = getword(k) if (m.upper() == '</PROJECT>'): c = -1 #endif print('point loop1.b ' + pjna ) #wend loop1(k) print("point 1 ") return(rec)
def init(fn, trace=''): global pkg, nds print('initilizing') nds['trace'] = trace nds['file'] = fn import useLib import gennV pkg['genX'] = gennV import fioiClass pkg['fioi'] = fioiClass.fio(fn) import useOnto import SQSQ # encryption for protection pkg['SQin'] = SQSQ.SQin pkg['SQout'] = SQSQ.SQout import OntologyClass pkg['ontology'] = OntologyClass.Ontology(fn + '.onto', str(nds['trace'])) #preset modes nds['sequenceMode'] = 0 nds['chooseMode'] = 0 #pickup position nds['pu'] = 0 nds['prevPu'] = 0 # parent list nds['parent'] = [] # logical parent list nds['parent'].append(0) #attr nds['attr'] = {} #first nds['first'] = '' return (2)
def init(): global nds, pkg import useLib # open input file with fio import fioiClass pkg['in'] = fioiClass.fio(nds['inFile']) nds['register'] = 2 #all nodes start at 2
def jadT(): #[[ 1 ]] init global nds logg('begin jadT') nds = {} nds['tn'] = {} nds['tix'] = 0 nds['kix'] = 0 import fioiClass global fi filename = ask('filename') fi = fioiClass.fio(filename) fi.fwhite() jadT2 return(nds)
def main(objj,trace): local = {} # local architecture ; dies with action local['ds'] = [] local['nds'] = {} if(trace == 1): xx = raw_input("begin v_initfioi") retbox = [0,objj,trace] # init by type # set status to retbox[0] = 0 ok -1 ng or # retbox[0] = 0 # default is ok # process work goes here j = objj['ds'].pop() # filename import fioiClass objj['c']['fioi'] = fioiClass.fio(j) objj['v']['ioi'] = objj['c']['fioi'].fioi objj['v']['ioo'] = objj['c']['fioi'].fioo
def main(filename,trace='off'): global nds nds = {} nds['trace'] = trace logg('trace = ((' + trace + "))") import fioiClass global fi fi = fioiClass.fio(filename) global sec sec = {} sec['input'] = filename sec['outfile']= pword() prepSec() ffo = open(sec['outfile'],'w') ffo.write(sec['hx0']) #file header sec['mx3'] = '' paragraph(ffo) ffo.write(sec['hx2'] + sec['mx3'] + sec['hx4']) ffo.write(sec['hx1']) ffo.close()