header = '''# Created by bbtogap.py from %s from the Atlas web page
%s :=
function(arg)
local vars,els,G; if Length(arg) > 0 and IsList(arg[1]) then arg := arg[1]; fi;
els := ShallowCopy(arg);
vars := rec();
G := Group(arg); '''
footer = '''end; '''
def num(st): if len(st) == 1 and st >= 'A'and st <= 'Z': return'vars.'+st else: return st
def doif(ifstmt,args):
pos = args.index('then')
st = ifstmt+' '+num(args[0]) if args[1] == 'eq':
st += ' = '+num(args[2])+' then' elif args[1] == 'noteq':
st += ' <> '+num(args[2])+' then' elif args[1] == 'in': # find 'then':
li = map(int,args[2:pos])
st += ' in '+str(li)+' then' elif args[1] == 'notin': # find 'then':
li = map(int,args[2:pos])
st = ifstmt+' not('+num(args[0])+' in '+str(li)+') then' elif args[1] == 'lt':
st += ' < '+num(args[2])+' then' elif args[1] == 'leq':
st += ' <= '+num(args[2])+' then' elif args[1] == 'gt':
st += ' > '+num(args[2])+' then' elif args[1] == 'geq':
st += ' >= '+num(args[2])+' then' return (st,pos)
while 1:
line = i.readline() while line[-2:] == '&\n':
line = line[:-2] + i.readline() ifnot(line): break
curline += 1
line = line.strip()
newline = rewriteline(line)
newlines = newline.split('\n') for li in newlines:
o.write(' '*curindent + li + "\n") #print ' '*curindent + '# was '+line
curindent = newindent
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.