Różnice

Różnice między wybraną wersją a wersją aktualną.

Odnośnik do tego porównania

pl:prolog:pllib:abc_language_recognition [2019/06/27 15:50] (aktualna)
Linia 1: Linia 1:
 +====== Abc language recognition ======
 +{{tag>​language rules}}
 +===== Description =====
 +Recognizing the language a^Nb^Nc^N
 +
 +**Source**: ​ The Art of Prolog
 +===== Download =====
 +Program source code: {{prolog:​pllib:​abc_language_recognition.pl}}
 +===== Listing =====
 +<code prolog>
 +        s(N) --> a(N), b(N), c(N).
 +
 +        a(N) --> [a], a(N1), {N is N1+1}.
 +        a(0) --> [ ].
 +
 +        b(N) --> [b], b(N1), {N is N1+1}.
 +        b(0) --> [ ].
 +
 +        c(N) --> [c], c(N1), {N is N1+1}.
 +        c(0) --> [ ].
 +
 +%      Program 19.2:  Recognizing the language a^Nb^Nc^N
 +</​code>​
 +===== Comments =====
  
pl/prolog/pllib/abc_language_recognition.txt · ostatnio zmienione: 2019/06/27 15:50 (edycja zewnętrzna)
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0