documenetation .

This commit is contained in:
Vítor Santos Costa
2014-05-14 10:01:11 +01:00
parent 503b2b93f9
commit 596768a56b
8 changed files with 434 additions and 355 deletions

View File

@@ -10,7 +10,7 @@
:- initialization(main).
:- dynamic val/2, item/2, last_node/2, indent/1.
:- dynamic val/2, item/2, last_node/2, indent/1, pred/4.
get_arg( Inp, Out ) :-
unix( argv( [Inp, Out] ) ), !.
@@ -69,7 +69,8 @@ scan_file( Inp ) :-
item( Item0 , ItLines ),
atom_string(A2, Item0),
cvt_slash( Pred, Key ),
assert_static( pred( A1, Key, A2, Inp:ItLines ) ),
\+ pred(_, Key, _, _ ),
assert( pred( A1, Key, A2, Inp:ItLines ) ),
fail
;
% look for predicates
@@ -601,8 +602,8 @@ simplify( [0'q,0'Q|L]) --> "=", !,
simplify(L).
simplify( [0'q,0'U|L]) --> "?", !,
simplify(L).
simplify( [] ) --> "/", !.
% simplify(L).
simplify( [] ) --> "/",
number, !.
simplify( [0's,0'S|L]) --> "<", !,
simplify(L).
simplify( [0'u,0'U|L]) --> "\v", !,
@@ -627,6 +628,11 @@ simplify( L) --> [_], !,
simplify(L).
simplify( []) --> [].
number --> [].
number --> [C],
{ C >= "0" , C =< "9" },
number.
first_word(Line, Word, Rest) :-
jmp_blanks( Line, Line2 ),