1
?- consult('dicts.pro').
3
test :- dict(X,_), check(X), fail; true.
4
test1 :- findall(A,head(A,_),R), sort(R,Res), print(Res), nl, fail.
6
check([_,head]) :- !. /* TITLE */
7
check([_,emus]) :- !. /* List Word */
8
check([_,dflt]) :- !. /* List NumberOrWord */
9
check([_,sect]) :- !. /* List Word // Dotted Name */
10
check([_,code]) :- !. /* [ TYP, ("Char"/none/Numb), [arg, ...] ] */
11
check([_,text]) :- !. /* [ String/nl/ref(Sym) ... ] */
13
check([_,table,'XPS']) :- !. /* interpretation */
15
/*Other (type) tables */
16
/*check([_,table,_]) :- !, print(X), nl.*/
18
check(X) :- !, print(X), nl.
21
/* State: We're closer to make up a proper data model.
23
- put the type/value definitions listed in 'test'
24
to a more appropriate place.
25
- clearify section material.
26
- make a model and a consistency checker.
27
- make a report generator.
28
- integrate 'TEScreen.C' functions
32
head(Name,Title) :- dict([Name,head],Title).
33
emus(Name,Emus) :- dict([Name,emus],Emus).
34
dflt(Name,Defaults) :- dict([Name,dflt],Defaults).
35
sect(Name,DottedSect) :- dict([Name,sect],DottedSect).
36
code(Name,Code) :- dict([Name,code],Desc), tcode(Desc,Code).
37
text(Name,Text) :- dict([Name,text],Text).
39
tcode(['PRN',none,[]],prn) :- !.
40
tcode(['DEL',none,[]],ctl(127)) :- !.
41
tcode(['CTL',Num,[]],ctl(Num)) :- !.
42
tcode(['ESC',Chr,[]],esc(Chr)) :- !.
43
tcode(['HSH',Chr,[]],esc(Chr)) :- !.
44
tcode(['CSI',Chr,[P,'...']],csi(Chr,list(P))) :- !.
45
tcode(['CSI',Chr,Parm],csi(Chr,Parm)) :- !.
46
tcode(['PRI',Chr,[P,'...']],pri(Chr,list(P))) :- !.
47
tcode(['PRI',Chr,Parm],pri(Chr,Parm)) :- !.
48
tcode(['SCS',none,[A,B]],scs([A,B])) :- !.
49
tcode(['VT5',none,[X,Y]],vt5([X,Y])) :- !.
50
tcode(P,P) :- writef("\n - fail\n %t \n\n",[P]).
54
writef("%w - %s\n",[N,T]),
59
writef("%w - %t\n",[N,P]),