Changeset 12473
- Timestamp:
- 02/14/10 14:19:08 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/StringFunctions.java
r12431 r12473 40 40 // ### %string= 41 41 // Case sensitive. 42 private static final Primitive _STRING_EQUAL = 43 new Primitive("%string=", PACKAGE_SYS, false) 44 { 42 private static final Primitive _STRING_EQUAL = new pf__string_equal(); 43 private static final class pf__string_equal extends Primitive { 44 pf__string_equal() 45 { 46 super("%string=", PACKAGE_SYS, false); 47 } 48 45 49 @Override 46 50 public LispObject execute(LispObject first, LispObject second, … … 83 87 // ### %%string= 84 88 // Case sensitive. 85 private static final Primitive __STRING_EQUAL = 86 new Primitive("%%string=", PACKAGE_SYS, false) 87 { 89 private static final Primitive __STRING_EQUAL = new pf___string_equal(); 90 private static final class pf___string_equal extends Primitive { 91 pf___string_equal() 92 { 93 super("%%string=", PACKAGE_SYS, false); 94 } 95 88 96 @Override 89 97 public LispObject execute(LispObject first, LispObject second) … … 104 112 // ### %string/= 105 113 // Case sensitive. 106 private static final Primitive _STRING_NOT_EQUAL = 107 new Primitive("%string/=", PACKAGE_SYS, true) 108 { 114 private static final Primitive _STRING_NOT_EQUAL = new pf__string_not_equal(); 115 private static final class pf__string_not_equal extends Primitive { 116 pf__string_not_equal() 117 { 118 super("%string/=", PACKAGE_SYS, true); 119 } 120 109 121 @Override 110 122 public LispObject execute(LispObject[] args) … … 141 153 // ### %string-equal 142 154 // Case insensitive. 143 private static final Primitive _STRING_EQUAL_IGNORE_CASE = 144 new Primitive("%string-equal", PACKAGE_SYS, true) 145 { 155 private static final Primitive _STRING_EQUAL_IGNORE_CASE = new pf__string_equal_ignore_case(); 156 private static final class pf__string_equal_ignore_case extends Primitive { 157 pf__string_equal_ignore_case() 158 { 159 super("%string-equal", PACKAGE_SYS, true); 160 } 161 146 162 @Override 147 163 public LispObject execute(LispObject first, LispObject second, … … 176 192 // ### %string-not-equal 177 193 // Case sensitive. 178 private static final Primitive _STRING_NOT_EQUAL_IGNORE_CASE = 179 new Primitive("%string-not-equal", PACKAGE_SYS, true) 180 { 194 private static final Primitive _STRING_NOT_EQUAL_IGNORE_CASE = new pf__string_not_equal_ignore_case(); 195 private static final class pf__string_not_equal_ignore_case extends Primitive { 196 pf__string_not_equal_ignore_case() 197 { 198 super("%string-not-equal", PACKAGE_SYS, true); 199 } 200 181 201 @Override 182 202 public LispObject execute(LispObject[] args) … … 220 240 // ### %string< 221 241 // Case sensitive. 222 private static final Primitive _STRING_LESS_THAN = 223 new Primitive("%string<", PACKAGE_SYS, true) 224 { 242 private static final Primitive _STRING_LESS_THAN = new pf__string_less_than(); 243 private static final class pf__string_less_than extends Primitive { 244 pf__string_less_than() 245 { 246 super("%string<", PACKAGE_SYS, true); 247 } 248 225 249 @Override 226 250 public LispObject execute(LispObject[] args) … … 264 288 // ### %string<= 265 289 // Case sensitive. 266 private static final Primitive _STRING_GREATER_THAN = 267 new Primitive("%string>", PACKAGE_SYS, true) 268 { 290 private static final Primitive _STRING_GREATER_THAN = new pf__string_greater_than(); 291 private static final class pf__string_greater_than extends Primitive { 292 pf__string_greater_than() 293 { 294 super("%string>", PACKAGE_SYS, true); 295 } 296 269 297 @Override 270 298 public LispObject execute(LispObject[] args) … … 306 334 // ### %string<= 307 335 // Case sensitive. 308 private static final Primitive _STRING_LE = 309 new Primitive("%string<=", PACKAGE_SYS, true) 310 { 336 private static final Primitive _STRING_LE = new pf__string_le(); 337 private static final class pf__string_le extends Primitive { 338 pf__string_le() 339 { 340 super("%string<=", PACKAGE_SYS, true); 341 } 342 311 343 @Override 312 344 public LispObject execute(LispObject[] args) … … 348 380 // ### %string<= 349 381 // Case sensitive. 350 private static final Primitive _STRING_GE = 351 new Primitive("%string>=", PACKAGE_SYS, true) 352 { 382 private static final Primitive _STRING_GE = new pf__string_ge(); 383 private static final class pf__string_ge extends Primitive { 384 pf__string_ge() 385 { 386 super("%string>=", PACKAGE_SYS, true); 387 } 388 353 389 @Override 354 390 public LispObject execute(LispObject[] args) … … 392 428 // ### %string-lessp 393 429 // Case insensitive. 394 private static final Primitive _STRING_LESSP = 395 new Primitive("%string-lessp", PACKAGE_SYS, true) 396 { 430 private static final Primitive _STRING_LESSP = new pf__string_lessp(); 431 private static final class pf__string_lessp extends Primitive { 432 pf__string_lessp() 433 { 434 super("%string-lessp", PACKAGE_SYS, true); 435 } 436 397 437 @Override 398 438 public LispObject execute(LispObject[] args) … … 436 476 // ### %string-greaterp 437 477 // Case insensitive. 438 private static final Primitive _STRING_GREATERP = 439 new Primitive("%string-greaterp", PACKAGE_SYS, true) 440 { 478 private static final Primitive _STRING_GREATERP = new pf__string_greaterp(); 479 private static final class pf__string_greaterp extends Primitive { 480 pf__string_greaterp() 481 { 482 super("%string-greaterp", PACKAGE_SYS, true); 483 } 484 441 485 @Override 442 486 public LispObject execute(LispObject[] args) … … 478 522 // ### %string-not-lessp 479 523 // Case insensitive. 480 private static final Primitive _STRING_NOT_LESSP = 481 new Primitive("%string-not-lessp", PACKAGE_SYS, true) 482 { 524 private static final Primitive _STRING_NOT_LESSP = new pf__string_not_lessp(); 525 private static final class pf__string_not_lessp extends Primitive { 526 pf__string_not_lessp() 527 { 528 super("%string-not-lessp", PACKAGE_SYS, true); 529 } 530 483 531 @Override 484 532 public LispObject execute(LispObject[] args) … … 522 570 // ### %string-not-greaterp 523 571 // Case insensitive. 524 private static final Primitive _STRING_NOT_GREATERP = 525 new Primitive("%string-not-greaterp", PACKAGE_SYS, true) 526 { 572 private static final Primitive _STRING_NOT_GREATERP = new pf__string_not_greaterp(); 573 private static final class pf__string_not_greaterp extends Primitive { 574 pf__string_not_greaterp() 575 { 576 super("%string-not-greaterp", PACKAGE_SYS, true); 577 } 578 527 579 @Override 528 580 public LispObject execute(LispObject[] args) … … 563 615 564 616 // ### %string-upcase 565 private static final Primitive _STRING_UPCASE = 566 new Primitive("%string-upcase", PACKAGE_SYS, true) 567 { 617 private static final Primitive _STRING_UPCASE = new pf__string_upcase(); 618 private static final class pf__string_upcase extends Primitive { 619 pf__string_upcase() 620 { 621 super("%string-upcase", PACKAGE_SYS, true); 622 } 623 568 624 @Override 569 625 public LispObject execute(LispObject first, LispObject second, … … 599 655 600 656 // ### %string-downcase 601 private static final Primitive _STRING_DOWNCASE = 602 new Primitive("%string-downcase", PACKAGE_SYS, true) 603 { 657 private static final Primitive _STRING_DOWNCASE = new pf__string_downcase(); 658 private static final class pf__string_downcase extends Primitive { 659 pf__string_downcase() 660 { 661 super("%string-downcase", PACKAGE_SYS, true); 662 } 663 604 664 @Override 605 665 public LispObject execute(LispObject first, LispObject second, … … 634 694 635 695 // ### %string-capitalize 636 private static final Primitive _STRING_CAPITALIZE= 637 new Primitive("%string-capitalize", PACKAGE_SYS, true) 638 { 696 private static final Primitive _STRING_CAPITALIZE = new pf__string_capitalize(); 697 private static final class pf__string_capitalize extends Primitive { 698 pf__string_capitalize() 699 { 700 super("%string-capitalize", PACKAGE_SYS, true); 701 } 702 639 703 @Override 640 704 public LispObject execute(LispObject first, LispObject second, … … 682 746 683 747 // ### %nstring-upcase 684 private static final Primitive _NSTRING_UPCASE = 685 new Primitive("%nstring-upcase", PACKAGE_SYS, true) 686 { 748 private static final Primitive _NSTRING_UPCASE = new pf__nstring_upcase(); 749 private static final class pf__nstring_upcase extends Primitive { 750 pf__nstring_upcase() 751 { 752 super("%nstring-upcase", PACKAGE_SYS, true); 753 } 754 687 755 @Override 688 756 public LispObject execute(LispObject first, LispObject second, … … 711 779 712 780 // ### %nstring-downcase 713 private static final Primitive _NSTRING_DOWNCASE = 714 new Primitive("%nstring-downcase", PACKAGE_SYS, true) 715 { 781 private static final Primitive _NSTRING_DOWNCASE = new pf__nstring_downcase(); 782 private static final class pf__nstring_downcase extends Primitive { 783 pf__nstring_downcase() 784 { 785 super("%nstring-downcase", PACKAGE_SYS, true); 786 } 787 716 788 @Override 717 789 public LispObject execute(LispObject first, LispObject second, … … 740 812 741 813 // ### %nstring-capitalize 742 private static final Primitive _NSTRING_CAPITALIZE = 743 new Primitive("%nstring-capitalize", PACKAGE_SYS, true) 744 { 814 private static final Primitive _NSTRING_CAPITALIZE = new pf__nstring_capitalize(); 815 private static final class pf__nstring_capitalize extends Primitive { 816 pf__nstring_capitalize() 817 { 818 super("%nstring-capitalize", PACKAGE_SYS, true); 819 } 820 745 821 @Override 746 822 public LispObject execute(LispObject first, LispObject second, … … 781 857 782 858 // ### stringp 783 public static final Primitive STRINGP = new Primitive("stringp", "object") 784 { 859 public static final Primitive STRINGP = new pf_stringp(); 860 private static final class pf_stringp extends Primitive { 861 pf_stringp() 862 { 863 super("stringp", "object"); 864 } 865 785 866 @Override 786 867 public LispObject execute(LispObject arg) … … 791 872 792 873 // ### simple-string-p 793 public static final Primitive SIMPLE_STRING_P = 794 new Primitive("simple-string-p", "object") 795 { 874 public static final Primitive SIMPLE_STRING_P = new pf_simple_string_p(); 875 private static final class pf_simple_string_p extends Primitive { 876 pf_simple_string_p() 877 { 878 super("simple-string-p", "object"); 879 } 880 796 881 @Override 797 882 public LispObject execute(LispObject arg) … … 804 889 // %make-string size initial-element element-type => string 805 890 // Returns a simple string. 806 private static final Primitive _MAKE_STRING = 807 new Primitive("%make-string", PACKAGE_SYS, false) 808 { 891 private static final Primitive _MAKE_STRING = new pf__make_string(); 892 private static final class pf__make_string extends Primitive { 893 pf__make_string() 894 { 895 super("%make-string", PACKAGE_SYS, false); 896 } 897 809 898 @Override 810 899 public LispObject execute(LispObject size, LispObject initialElement, … … 838 927 839 928 // ### char 840 private static final Primitive CHAR = 841 new Primitive(Symbol.CHAR, "string index") 842 { 929 private static final Primitive CHAR = new pf_char(); 930 private static final class pf_char extends Primitive { 931 pf_char() 932 { 933 super(Symbol.CHAR, "string index"); 934 } 935 843 936 @Override 844 937 public LispObject execute(LispObject first, LispObject second) … … 850 943 851 944 // ### schar 852 private static final Primitive SCHAR = 853 new Primitive(Symbol.SCHAR, "string index") 854 { 945 private static final Primitive SCHAR = new pf_schar(); 946 private static final class pf_schar extends Primitive { 947 pf_schar() 948 { 949 super(Symbol.SCHAR, "string index"); 950 } 951 855 952 @Override 856 953 public LispObject execute(LispObject first, LispObject second) … … 862 959 863 960 // ### set-char 864 private static final Primitive SET_CHAR = 865 new Primitive(Symbol.SET_CHAR, "string index character") 866 { 961 private static final Primitive SET_CHAR = new pf_set_char(); 962 private static final class pf_set_char extends Primitive { 963 pf_set_char() 964 { 965 super(Symbol.SET_CHAR, "string index character"); 966 } 967 867 968 @Override 868 969 public LispObject execute(LispObject first, LispObject second, … … 877 978 878 979 // ### set-schar 879 private static final Primitive SET_SCHAR = 880 new Primitive(Symbol.SET_SCHAR, "string index character") 881 { 980 private static final Primitive SET_SCHAR = new pf_set_schar(); 981 private static final class pf_set_schar extends Primitive { 982 pf_set_schar() 983 { 984 super(Symbol.SET_SCHAR, "string index character"); 985 } 986 882 987 @Override 883 988 public LispObject execute(LispObject first, LispObject second, … … 895 1000 896 1001 // ### string-position 897 private static final Primitive STRING_POSITION = 898 new Primitive("string-position", PACKAGE_EXT, true) 899 { 1002 private static final Primitive STRING_POSITION = new pf_string_position(); 1003 private static final class pf_string_position extends Primitive { 1004 pf_string_position() 1005 { 1006 super("string-position", PACKAGE_EXT, true); 1007 } 1008 900 1009 @Override 901 1010 public LispObject execute(LispObject first, LispObject second, … … 915 1024 916 1025 // ### string-find 917 private static final Primitive STRING_FIND = 918 new Primitive("string-find", PACKAGE_EXT, true, "char string") 919 { 1026 private static final Primitive STRING_FIND = new pf_string_find(); 1027 private static final class pf_string_find extends Primitive { 1028 pf_string_find() 1029 { 1030 super("string-find", PACKAGE_EXT, true, "char string"); 1031 } 1032 920 1033 @Override 921 1034 public LispObject execute(LispObject first, LispObject second) … … 937 1050 // ### simple-string-search pattern string => position 938 1051 // Searches string for a substring that matches pattern. 939 private static final Primitive SIMPLE_STRING_SEARCH = 940 new Primitive("simple-string-search", PACKAGE_EXT, true) 941 { 1052 private static final Primitive SIMPLE_STRING_SEARCH = new pf_simple_string_search(); 1053 private static final class pf_simple_string_search extends Primitive { 1054 pf_simple_string_search() 1055 { 1056 super("simple-string-search", PACKAGE_EXT, true); 1057 } 1058 942 1059 @Override 943 1060 public LispObject execute(LispObject first, LispObject second) … … 951 1068 952 1069 // ### simple-string-fill string character => string 953 private static final Primitive STRING_FILL = 954 new Primitive("simple-string-fill", PACKAGE_EXT, true) 955 { 1070 private static final Primitive STRING_FILL = new pf_string_fill(); 1071 private static final class pf_string_fill extends Primitive { 1072 pf_string_fill() 1073 { 1074 super("simple-string-fill", PACKAGE_EXT, true); 1075 } 1076 956 1077 @Override 957 1078 public LispObject execute(LispObject first, LispObject second)
Note: See TracChangeset
for help on using the changeset viewer.