-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from greymd/pr/19
Pr/19-update
- Loading branch information
Showing
35 changed files
with
1,428 additions
and
1,469 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,21 @@ | ||
#!/usr/bin/env egison | ||
(load-file "../lib/egzact/utils.egi") | ||
(load-file "../lib/egzact/filters.egi") | ||
-- | ||
-- This file has been auto-generated by egison-translator. | ||
-- | ||
|
||
(define $main | ||
(match-lambda (list string) | ||
{ | ||
[(args-check-opts-str $opts $arg) | ||
(execution print-each-line filter-plain opts arg (append stdin {arg}))] | ||
[_ usage] | ||
})) | ||
loadFile "../lib/egzact/utils.egi" | ||
|
||
(define $usage | ||
(do { | ||
(print "Usage: addb [OPTIONS] string") | ||
option-usage | ||
(print "tldr:") | ||
(print " $ echo abc | addb ABC") | ||
(print " abc") | ||
(print " ABC") | ||
} | ||
)) | ||
loadFile "../lib/egzact/filters.egi" | ||
|
||
main := | ||
\match as list string with | ||
| argsCheckOptsStr $opts $arg -> | ||
execution printEachLine filterPlain opts arg (stdin ++ [arg]) | ||
| _ -> usage | ||
|
||
usage := | ||
do print "Usage: addb [OPTIONS] string" | ||
optionUsage | ||
print "tldr:" | ||
print " $ echo abc | addb ABC" | ||
print " abc" | ||
print " ABC" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,20 @@ | ||
#!/usr/bin/env egison | ||
(load-file "../lib/egzact/utils.egi") | ||
(load-file "../lib/egzact/filters.egi") | ||
-- | ||
-- This file has been auto-generated by egison-translator. | ||
-- | ||
|
||
(define $main | ||
(match-lambda (list string) | ||
{ | ||
[(args-check-opts-str $opts $arg) | ||
(execution print-each-line filter-addl (append {"ifs=" "ofs="} opts) arg stdin)] | ||
[_ usage] | ||
})) | ||
loadFile "../lib/egzact/utils.egi" | ||
|
||
(define $usage | ||
(do { | ||
(print "Usage: addl [OPTIONS] string") | ||
option-usage2 | ||
(print "tldr:") | ||
(print " $ echo abc | addl ABC") | ||
(print " ABCabc") | ||
} | ||
)) | ||
loadFile "../lib/egzact/filters.egi" | ||
|
||
main := | ||
\match as list string with | ||
| argsCheckOptsStr $opts $arg -> | ||
execution printEachLine filterAddl (["ifs=", "ofs="] ++ opts) arg stdin | ||
| _ -> usage | ||
|
||
usage := | ||
do print "Usage: addl [OPTIONS] string" | ||
optionUsage2 | ||
print "tldr:" | ||
print " $ echo abc | addl ABC" | ||
print " ABCabc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,20 @@ | ||
#!/usr/bin/env egison | ||
(load-file "../lib/egzact/utils.egi") | ||
(load-file "../lib/egzact/filters.egi") | ||
-- | ||
-- This file has been auto-generated by egison-translator. | ||
-- | ||
|
||
(define $main | ||
(match-lambda (list string) | ||
{ | ||
[(args-check-opts-str $opts $arg) | ||
(execution print-each-line filter-addr (append {"ifs=" "ofs="} opts) arg stdin)] | ||
[_ usage] | ||
})) | ||
loadFile "../lib/egzact/utils.egi" | ||
|
||
(define $usage | ||
(do { | ||
(print "Usage: addr [OPTIONS] string") | ||
option-usage2 | ||
(print "tldr:") | ||
(print " $ echo abc | addr ABC") | ||
(print " abcABC") | ||
} | ||
)) | ||
loadFile "../lib/egzact/filters.egi" | ||
|
||
main := | ||
\match as list string with | ||
| argsCheckOptsStr $opts $arg -> | ||
execution printEachLine filterAddr (["ifs=", "ofs="] ++ opts) arg stdin | ||
| _ -> usage | ||
|
||
usage := | ||
do print "Usage: addr [OPTIONS] string" | ||
optionUsage2 | ||
print "tldr:" | ||
print " $ echo abc | addr ABC" | ||
print " abcABC" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,21 @@ | ||
#!/usr/bin/env egison | ||
(load-file "../lib/egzact/utils.egi") | ||
(load-file "../lib/egzact/filters.egi") | ||
-- | ||
-- This file has been auto-generated by egison-translator. | ||
-- | ||
|
||
(define $main | ||
(match-lambda (list string) | ||
{ | ||
[(args-check-opts-str $opts $arg) | ||
(execution print-each-line filter-plain opts arg (append {arg} stdin))] | ||
[_ usage] | ||
})) | ||
loadFile "../lib/egzact/utils.egi" | ||
|
||
(define $usage | ||
(do { | ||
(print "Usage: addt [OPTIONS] string") | ||
option-usage | ||
(print "tldr:") | ||
(print " $ echo abc | addt ABC") | ||
(print " ABC") | ||
(print " abc") | ||
} | ||
)) | ||
loadFile "../lib/egzact/filters.egi" | ||
|
||
main := | ||
\match as list string with | ||
| argsCheckOptsStr $opts $arg -> | ||
execution printEachLine filterPlain opts arg ([arg] ++ stdin) | ||
| _ -> usage | ||
|
||
usage := | ||
do print "Usage: addt [OPTIONS] string" | ||
optionUsage | ||
print "tldr:" | ||
print " $ echo abc | addt ABC" | ||
print " ABC" | ||
print " abc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,25 @@ | ||
#!/usr/bin/env egison | ||
(load-file "../lib/egzact/utils.egi") | ||
(load-file "../lib/egzact/filters.egi") | ||
-- | ||
-- This file has been auto-generated by egison-translator. | ||
-- | ||
|
||
(define $main | ||
(match-lambda (list string) | ||
{ | ||
[(args-check-opts-num $opts $num) | ||
(execution print-each-line filter-comb opts (read num) stdin)] | ||
[_ usage] | ||
})) | ||
loadFile "../lib/egzact/utils.egi" | ||
|
||
(define $usage | ||
(do { | ||
(print "Usage: comb [OPTIONS] number") | ||
option-usage | ||
(print "tldr:") | ||
(print " $ echo A B C D | comb 2") | ||
(print " A B") | ||
(print " A C") | ||
(print " B C") | ||
(print " A D") | ||
(print " B D") | ||
(print " C D") | ||
} | ||
)) | ||
loadFile "../lib/egzact/filters.egi" | ||
|
||
main := | ||
\match as list string with | ||
| argsCheckOptsNum $opts $num -> | ||
execution printEachLine filterComb opts (read num) stdin | ||
| _ -> usage | ||
|
||
usage := | ||
do print "Usage: comb [OPTIONS] number" | ||
optionUsage | ||
print "tldr:" | ||
print " $ echo A B C D | comb 2" | ||
print " A B" | ||
print " A C" | ||
print " B C" | ||
print " A D" | ||
print " B D" | ||
print " C D" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,32 @@ | ||
#!/usr/bin/env egison | ||
(load-file "../lib/egzact/utils.egi") | ||
(load-file "../lib/egzact/filters.egi") | ||
-- | ||
-- This file has been auto-generated by egison-translator. | ||
-- | ||
|
||
(define $main | ||
(match-lambda (list string) { | ||
; each line mode | ||
[<cons ,"each" (args-check-opts-num $opts $arg)> | ||
(execution print-each-line filter-conv-each opts (num-validation arg) stdin)] | ||
[<cons ,"each" (args-check-opts $opts)> | ||
(execution print-each-line filter-conv-each opts 1 stdin)] | ||
loadFile "../lib/egzact/utils.egi" | ||
|
||
; stream mode | ||
[(args-check-opts-num $opts $arg) | ||
(execution print-whole-input filter-conv opts (num-validation arg) stdin)] | ||
[(args-check-opts $opts) | ||
(execution print-whole-input filter-conv opts 1 stdin)] | ||
loadFile "../lib/egzact/filters.egi" | ||
|
||
[_ usage] | ||
})) | ||
main := | ||
\match as list string with | ||
| #"each" :: argsCheckOptsNum $opts $arg -> | ||
execution printEachLine filterConvEach opts (numValidation arg) stdin | ||
| #"each" :: argsCheckOpts $opts -> | ||
execution printEachLine filterConvEach opts 1 stdin | ||
| argsCheckOptsNum $opts $arg -> | ||
execution printWholeInput filterConv opts (numValidation arg) stdin | ||
| argsCheckOpts $opts -> execution printWholeInput filterConv opts 1 stdin | ||
| _ -> usage | ||
|
||
(define $usage | ||
(do { | ||
(print "Usage: conv [OPTIONS] [number]") | ||
(print " conv each [OPTIONS] [number]") | ||
(print "Description:") | ||
(print " With `each`, it reads & prints results for each line.") | ||
option-usage | ||
(print "") | ||
(print "tldr:") | ||
(print " $ echo A B C D E | conv 2") | ||
(print " A B") | ||
(print " B C") | ||
(print " C D") | ||
(print " D E") | ||
} | ||
)) | ||
usage := | ||
do print "Usage: conv [OPTIONS] [number]" | ||
print " conv each [OPTIONS] [number]" | ||
print "Description:" | ||
print " With `each`, it reads & prints results for each line." | ||
optionUsage | ||
print "" | ||
print "tldr:" | ||
print " $ echo A B C D E | conv 2" | ||
print " A B" | ||
print " B C" | ||
print " C D" | ||
print " D E" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,32 @@ | ||
#!/usr/bin/env egison | ||
(load-file "../lib/egzact/utils.egi") | ||
(load-file "../lib/egzact/filters.egi") | ||
-- | ||
-- This file has been auto-generated by egison-translator. | ||
-- | ||
|
||
(define $main | ||
(match-lambda (list string) | ||
{ | ||
[(args-check-opts-str $opts $arg) | ||
(execution print-each-line filter-crops (append {"ifs=" "ofs="} opts) arg stdin)] | ||
[_ usage] | ||
})) | ||
loadFile "../lib/egzact/utils.egi" | ||
|
||
(define $usage | ||
(do { | ||
(print "Usage: crops [OPTIONS] string") | ||
option-usage2 | ||
(print "tldr:") | ||
(print " $ echo 1110100110 | crops \"1.*1\"") | ||
(print " 11") | ||
(print " 111") | ||
(print " 11101") | ||
(print " 1101") | ||
(print " 101") | ||
(print " 11101001") | ||
(print " 1101001") | ||
(print " 101001") | ||
(print " 1001") | ||
(print " 111010011") | ||
(print " 11010011") | ||
(print " 1010011") | ||
(print " 10011") | ||
} | ||
)) | ||
loadFile "../lib/egzact/filters.egi" | ||
|
||
main := | ||
\match as list string with | ||
| argsCheckOptsStr $opts $arg -> | ||
execution printEachLine filterCrops (["ifs=", "ofs="] ++ opts) arg stdin | ||
| _ -> usage | ||
|
||
usage := | ||
do print "Usage: crops [OPTIONS] string" | ||
optionUsage2 | ||
print "tldr:" | ||
print " $ echo 1110100110 | crops \"1.*1\"" | ||
print " 11" | ||
print " 111" | ||
print " 11101" | ||
print " 1101" | ||
print " 101" | ||
print " 11101001" | ||
print " 1101001" | ||
print " 101001" | ||
print " 1001" | ||
print " 111010011" | ||
print " 11010011" | ||
print " 1010011" | ||
print " 10011" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,23 @@ | ||
#!/usr/bin/env egison | ||
(load-file "../lib/egzact/utils.egi") | ||
(load-file "../lib/egzact/filters.egi") | ||
-- | ||
-- This file has been auto-generated by egison-translator. | ||
-- | ||
|
||
(define $main | ||
(match-lambda (list string) | ||
{ | ||
[(args-check-opts $opts) | ||
(execution print-each-line filter-cycle opts [] stdin)] | ||
[_ usage] | ||
})) | ||
loadFile "../lib/egzact/utils.egi" | ||
|
||
(define $usage | ||
(do { | ||
(print "Usage: cycle [OPTIONS]") | ||
option-usage | ||
(print "tldr:") | ||
(print " $ echo A B C D E | cycle") | ||
(print " A B C D E") | ||
(print " B C D E A") | ||
(print " C D E A B") | ||
(print " D E A B C") | ||
(print " E A B C D") | ||
} | ||
)) | ||
loadFile "../lib/egzact/filters.egi" | ||
|
||
main := | ||
\match as list string with | ||
| argsCheckOpts $opts -> execution printEachLine filterCycle opts () stdin | ||
| _ -> usage | ||
|
||
usage := | ||
do print "Usage: cycle [OPTIONS]" | ||
optionUsage | ||
print "tldr:" | ||
print " $ echo A B C D E | cycle" | ||
print " A B C D E" | ||
print " B C D E A" | ||
print " C D E A B" | ||
print " D E A B C" | ||
print " E A B C D" |
Oops, something went wrong.