all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 additions and 0 deletions
|
|
@ -0,0 +1,11 @@
|
|||
stripcomment(A,B) :- stripcomment(A,B,a).
|
||||
stripcomment([A|AL],[A|BL],a) :- \+ A=0';, \+ A=0'# , \+ A=10, \+ A=13 , stripcomment(AL,BL,a).
|
||||
stripcomment([A|AL], BL ,a) :- ( A=0';; A=0'#), \+ A=10, \+ A=13 , stripcomment(AL,BL,b).
|
||||
stripcomment([A|AL], BL ,b) :- \+ A=10, \+ A=13 , stripcomment(AL,BL,b).
|
||||
stripcomment([A|AL],[A|BL],_M):- ( A=10; A=13), stripcomment(AL,BL,a).
|
||||
stripcomment([],[],_M).
|
||||
start :-
|
||||
In = "apples, pears ; and bananas
|
||||
apples, pears # and bananas",
|
||||
stripcomment(In,Out),
|
||||
format("~s~n",[Out]).
|
||||
|
|
@ -0,0 +1 @@
|
|||
strip_1comment(A,D) :- ((S1=0'#;S1=0';),append(B,[S1|C],A)), \+ ((S2=0'#;S2=0';),append(_X,[S2|_Y],B)) -> B=D; A=D.
|
||||
Loading…
Add table
Add a link
Reference in a new issue