-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
60 additions
and
40 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 |
---|---|---|
|
@@ -4,4 +4,4 @@ b-field.in | |
t | ||
x | ||
bench | ||
|
||
.old |
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
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
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
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,50 +1,69 @@ | ||
time ( | ||
echo --------------------------------------------------------- | ||
echo "" | scc -v 1 && | ||
echo -e "\n1" | ||
echo --------------------------------------------------------- | ||
echo "" | scc -v 'vector<int> V{1,2}; V' && | ||
echo -e "\n{1, 2}" | ||
echo --------------------------------------------------------- | ||
echo "" | scc -v 'int A[2] = {1,2}; A' && | ||
echo -e "\n{1, 2}" | ||
echo --------------------------------------------------------- | ||
echo -e '1 2\n11 22\n111 222' | scc -v -p 'F(1)=9;' && | ||
echo -e '\n1 9\n11 9\n111 9' | ||
echo --------------------------------------------------------- | ||
echo \ | ||
'1 - | ||
2 | ||
3 none | ||
4 abc' | scc -v -p 'F(1)=RR(F(1),R("^(none|-)?$"),"n/a");' && | ||
echo 'scc 1' | ||
scc 1 && | ||
echo 1 | ||
|
||
echo -e '\n1 n/a\n2 n/a\n3 n/a\n4 abc' | ||
echo --------------------------------------------------------- | ||
echo -e 'aaa bbb\nccc ddd' | scc -v -p 'F.push_front(NR+1);' && | ||
echo -e '\n1 aaa bbb\n2 ccc ddd' | ||
echo --------------------------------------------------------- | ||
echo -e 'aaa bbb\nccc ddd' | scc -v -p 'field(NR+1)+" "' && | ||
echo -e '\n1 aaa bbb\n2 ccc ddd' | ||
echo "scc 'vector<int> V{1,2}; V'" | ||
scc 'vector<int> V{1,2}; V' && | ||
echo -e "{1, 2}" | ||
|
||
echo --------------------------------------------------------- | ||
echo -e "AA\nBB\nCC" | scc -v 'WRL if (RS(line, R(argv[1]))) cout << line << endl;' 'A|B' && | ||
echo -e "\nAA\nBB" | ||
echo "scc 'int A[2] = {1,2}; A'" | ||
scc 'int A[2] = {1,2}; A' && | ||
echo -e "{1, 2}" | ||
|
||
#echo --------------------------------------------------------- | ||
#echo "echo -e '1 2\n11 22\n111 222' | scc -p 'F(1)=9;'" | ||
# echo -e '1 2\n11 22\n111 222' | scc -p 'F(1)=9;' && | ||
#echo -e '\n1 9\n11 9\n111 9' | ||
|
||
#echo --------------------------------------------------------- | ||
#echo "echo -e \"1 -\n2\n3 none\n4 abc\" | scc -p 'F(1)=RR(F(1),R(\"^(none|-)?$\"),"n/a");'" | ||
# echo -e "1 -\n2\n3 none\n4 abc" | scc -p 'F(1)=RR(F(1),R( "^(none|-)?$" ),"n/a");' && | ||
#echo -e '\n1 n/a\n2 n/a\n3 n/a\n4 abc' | ||
|
||
#echo --------------------------------------------------------- | ||
#echo "echo -e 'aaa bbb\nccc ddd' | scc -p 'F.push_front(NR+1);'" | ||
# echo -e 'aaa bbb\nccc ddd' | scc -p 'F.push_front(NR+1);' && | ||
#echo -e '\n1 aaa bbb\n2 ccc ddd' | ||
|
||
#echo --------------------------------------------------------- | ||
#echo -e 'aaa bbb\nccc ddd' | scc -p 'field(NR+1)+" "' && | ||
#echo -e 'aaa bbb\nccc ddd' | scc -p 'field(NR+1)+" "' && | ||
#echo -e '\n1 aaa bbb\n2 ccc ddd' | ||
|
||
#echo --------------------------------------------------------- | ||
#echo -e "AA\nBB\nCC" | scc 'WRL if (RS(line, R(argv[1]))) cout << line << endl;' 'A|B' && | ||
#echo -e "\nAA\nBB" | ||
|
||
echo --------------------------------------------------------- | ||
echo aaa bbb aaa | scc -v 'str w; map<str,int> m; while(cin>>w) m[w]++; m' && | ||
echo "echo aaa bbb aaa | scc 'str w; map<str,int> m; while(cin>>w) m[w]++; m'" | ||
echo aaa bbb aaa | scc 'str w; map<str,int> m; while(cin>>w) m[w]++; m' && | ||
echo -e "\n{⟨aaa,2⟩, ⟨bbb,1⟩}" | ||
|
||
echo --------------------------------------------------------- | ||
command df | scc -v 'WRL n+=F2; n' && | ||
echo "df | scc 'WRL n+=F2; n'" | ||
command df | scc 'WRL n+=F2; n' && | ||
echo "" && | ||
command df | awk '{n+=$3;}; END{print n}' | ||
|
||
#echo --------------------------------------------------------- | ||
#scc 'str s="aa bb"; RR(s, R("(\\w+)"),"*\\1*")' && | ||
#echo -e "\n*aa* *bb*" | ||
|
||
#echo --------------------------------------------------------- | ||
#echo '"aa", "bb\"-, bb", "cc"' | scc 'IFS=CSV ; WRL for (str f:F) cout << f << endl;' && | ||
#echo -e "\naa\nbb\"-, bb\ncc" | ||
|
||
#echo --------------------------------------------------------- | ||
#echo 1:2:3 | scc -i: -o '","' -p | ||
#echo 1 2 3 | scc -I '"(\\S+)(\\s+|$)"' -o '","' -p | ||
|
||
echo --------------------------------------------------------- | ||
echo "AAA BBB CCC" | scc -v 'int t=0; str s; while(cin>>s) t++; t' && | ||
echo -e "\n3" | ||
echo --------------------------------------------------------- | ||
scc -v 'str s="aa bb"; RR(s, R("(\\w+)"),"*\\1*")' && | ||
echo -e "\n*aa* *bb*" | ||
echo --------------------------------------------------------- | ||
echo '"aa", "bb\"-, bb", "cc"' | scc -v 'IFS=CSV ; WRL for (str f:F) cout << f << endl;' && | ||
echo -e "\naa\nbb\"-, bb\ncc" | ||
echo 'vint A{1,2,3}; copy(A.bb, A.ee, outi); str S("ABC"); copy(S.bb, S.ee, outi); cout<<endl;' | ||
scc 'vint A{1,2,3}; copy(A.bb, A.ee, outi); str S("ABC"); copy(S.bb, S.ee, outi); cout<<endl;' | ||
echo 1 2 3 A B C | ||
|
||
echo 1:2:3 | scc -i: -o '","' -p | ||
echo 1 2 3 | scc -I '"(\\S+)(\\s+|$)"' -o '","' -p | ||
) |