mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-26 06:48:04 +02:00
added more examples for MPI and Scala
This commit is contained in:
parent
6987dc28ab
commit
2c4f3e97bf
6 changed files with 68 additions and 5 deletions
16
documents/Programmierparadigmen/scripts/prolog/regex.pl
Normal file
16
documents/Programmierparadigmen/scripts/prolog/regex.pl
Normal file
|
@ -0,0 +1,16 @@
|
|||
matches(\varepsilon, []).
|
||||
|
||||
matches(C, [C]) :- atom(C), !.
|
||||
|
||||
matches(\cup(A, _), S) :- matches(A, S).
|
||||
matches(\cup(_, B), S) :- matches(B, S).
|
||||
|
||||
matches(\cdot(A, B), S) :- append(S1, S2, S),
|
||||
matches(A, S1),
|
||||
matches(B, S2).
|
||||
|
||||
matches(*(_), []).
|
||||
matches(*(A), S) :- append(S1, S2, S),
|
||||
not(S1=[]),
|
||||
matches(A, S1),
|
||||
matches(*(A), S2).
|
Loading…
Add table
Add a link
Reference in a new issue