package abstrasy;
import abstrasy.pcfx.PCFx;
import abstrasy.pcfx.PCFx_TEMP;
import abstrasy.pcfx.PCFx_abort;
import abstrasy.pcfx.PCFx_abs;
import abstrasy.pcfx.PCFx_abstract;
import abstrasy.pcfx.PCFx_acos;
import abstrasy.pcfx.PCFx_actor;
import abstrasy.pcfx.PCFx_actors;
import abstrasy.pcfx.PCFx_adapt;
import abstrasy.pcfx.PCFx_add;
import abstrasy.pcfx.PCFx_and;
import abstrasy.pcfx.PCFx_append_static;
import abstrasy.pcfx.PCFx_args;
import abstrasy.pcfx.PCFx_asin;
import abstrasy.pcfx.PCFx_assert;
import abstrasy.pcfx.PCFx_atan;
import abstrasy.pcfx.PCFx_atomic;
import abstrasy.pcfx.PCFx_atomic_add_static;
import abstrasy.pcfx.PCFx_atomic_and_static;
import abstrasy.pcfx.PCFx_atomic_decr_static;
import abstrasy.pcfx.PCFx_atomic_div_static;
import abstrasy.pcfx.PCFx_atomic_false_static;
import abstrasy.pcfx.PCFx_atomic_fetch_and_add_static;
import abstrasy.pcfx.PCFx_atomic_fetch_and_and_static;
import abstrasy.pcfx.PCFx_atomic_fetch_and_decr_static;
import abstrasy.pcfx.PCFx_atomic_fetch_and_div_static;
import abstrasy.pcfx.PCFx_atomic_fetch_and_false_static;
import abstrasy.pcfx.PCFx_atomic_fetch_and_incr_static;
import abstrasy.pcfx.PCFx_atomic_fetch_and_mul_static;
import abstrasy.pcfx.PCFx_atomic_fetch_and_not_static;
import abstrasy.pcfx.PCFx_atomic_fetch_and_or_static;
import abstrasy.pcfx.PCFx_atomic_fetch_and_setn_static;
import abstrasy.pcfx.PCFx_atomic_fetch_and_shiftl_static;
import abstrasy.pcfx.PCFx_atomic_fetch_and_shiftr_static;
import abstrasy.pcfx.PCFx_atomic_fetch_and_sub_static;
import abstrasy.pcfx.PCFx_atomic_fetch_and_true_static;
import abstrasy.pcfx.PCFx_atomic_fetch_and_xor_static;
import abstrasy.pcfx.PCFx_atomic_incr_static;
import abstrasy.pcfx.PCFx_atomic_mul_static;
import abstrasy.pcfx.PCFx_atomic_not_static;
import abstrasy.pcfx.PCFx_atomic_or_static;
import abstrasy.pcfx.PCFx_atomic_setn_static;
import abstrasy.pcfx.PCFx_atomic_shiftl_static;
import abstrasy.pcfx.PCFx_atomic_shiftr_static;
import abstrasy.pcfx.PCFx_atomic_sub_static;
import abstrasy.pcfx.PCFx_atomic_true_static;
import abstrasy.pcfx.PCFx_atomic_xor_static;
import abstrasy.pcfx.PCFx_bin_string;
import abstrasy.pcfx.PCFx_break_loop;
import abstrasy.pcfx.PCFx_bytes;
import abstrasy.pcfx.PCFx_ceil;
import abstrasy.pcfx.PCFx_chr;
import abstrasy.pcfx.PCFx_clone;
import abstrasy.pcfx.PCFx_compact;
import abstrasy.pcfx.PCFx_compile;
import abstrasy.pcfx.PCFx_complete_loop;
import abstrasy.pcfx.PCFx_continue;
import abstrasy.pcfx.PCFx_cos;
import abstrasy.pcfx.PCFx_count;
import abstrasy.pcfx.PCFx_crossover_cx;
import abstrasy.pcfx.PCFx_crossover_erx;
import abstrasy.pcfx.PCFx_crossover_ox;
import abstrasy.pcfx.PCFx_crossover_pmx;
import abstrasy.pcfx.PCFx_crossover_px;
import abstrasy.pcfx.PCFx_default_args;
import abstrasy.pcfx.PCFx_define;
import abstrasy.pcfx.PCFx_delegate;
import abstrasy.pcfx.PCFx_dequeue_static;
import abstrasy.pcfx.PCFx_deref;
import abstrasy.pcfx.PCFx_diff;
import abstrasy.pcfx.PCFx_digits10;
import abstrasy.pcfx.PCFx_display;
import abstrasy.pcfx.PCFx_display_clr;
import abstrasy.pcfx.PCFx_display_noline;
import abstrasy.pcfx.PCFx_div;
import abstrasy.pcfx.PCFx_do;
import abstrasy.pcfx.PCFx_dump_heap;
import abstrasy.pcfx.PCFx_ensure;
import abstrasy.pcfx.PCFx_eval;
import abstrasy.pcfx.PCFx_exit;
import abstrasy.pcfx.PCFx_exp;
import abstrasy.pcfx.PCFx_expand;
import abstrasy.pcfx.PCFx_extcall;
import abstrasy.pcfx.PCFx_extend;
import abstrasy.pcfx.PCFx_external;
import abstrasy.pcfx.PCFx_extract;
import abstrasy.pcfx.PCFx_f_and;
import abstrasy.pcfx.PCFx_f_degree_of;
import abstrasy.pcfx.PCFx_f_member_of;
import abstrasy.pcfx.PCFx_f_not;
import abstrasy.pcfx.PCFx_f_or;
import abstrasy.pcfx.PCFx_filling_string;
import abstrasy.pcfx.PCFx_find;
import abstrasy.pcfx.PCFx_find_regex;
import abstrasy.pcfx.PCFx_flatten;
import abstrasy.pcfx.PCFx_floor;
import abstrasy.pcfx.PCFx_foreach;
import abstrasy.pcfx.PCFx_foreach_all_different;
import abstrasy.pcfx.PCFx_foreach_circ;
import abstrasy.pcfx.PCFx_foreach_col;
import abstrasy.pcfx.PCFx_foreach_combin;
import abstrasy.pcfx.PCFx_foreach_diag;
import abstrasy.pcfx.PCFx_foreach_part;
import abstrasy.pcfx.PCFx_foreach_perm;
import abstrasy.pcfx.PCFx_foreach_product;
import abstrasy.pcfx.PCFx_foreach_row;
import abstrasy.pcfx.PCFx_foreach_sum;
import abstrasy.pcfx.PCFx_forever;
import abstrasy.pcfx.PCFx_forward;
import abstrasy.pcfx.PCFx_fractional;
import abstrasy.pcfx.PCFx_function;
import abstrasy.pcfx.PCFx_hash;
import abstrasy.pcfx.PCFx_hex_string;
import abstrasy.pcfx.PCFx_if;
import abstrasy.pcfx.PCFx_immediate_quote;
import abstrasy.pcfx.PCFx_immediate_return;
import abstrasy.pcfx.PCFx_import;
import abstrasy.pcfx.PCFx_include;
import abstrasy.pcfx.PCFx_infer;
import abstrasy.pcfx.PCFx_insert_static;
import abstrasy.pcfx.PCFx_interface;
import abstrasy.pcfx.PCFx_invoke;
import abstrasy.pcfx.PCFx_is__Complete_loop;
import abstrasy.pcfx.PCFx_is__Decimal;
import abstrasy.pcfx.PCFx_is__EquIdentity;
import abstrasy.pcfx.PCFx_is__Equals;
import abstrasy.pcfx.PCFx_is__Even;
import abstrasy.pcfx.PCFx_is__Final;
import abstrasy.pcfx.PCFx_is__Function;
import abstrasy.pcfx.PCFx_is__GT;
import abstrasy.pcfx.PCFx_is__GTE;
import abstrasy.pcfx.PCFx_is__Immuable;
import abstrasy.pcfx.PCFx_is__Immutable;
import abstrasy.pcfx.PCFx_is__Int;
import abstrasy.pcfx.PCFx_is__Integer;
import abstrasy.pcfx.PCFx_is__LT;
import abstrasy.pcfx.PCFx_is__LTE;
import abstrasy.pcfx.PCFx_is__Like_string;
import abstrasy.pcfx.PCFx_is__Match_regex;
import abstrasy.pcfx.PCFx_is__Messages;
import abstrasy.pcfx.PCFx_is__Mutable;
import abstrasy.pcfx.PCFx_is__NEquals;
import abstrasy.pcfx.PCFx_is__Negative;
import abstrasy.pcfx.PCFx_is__Odd;
import abstrasy.pcfx.PCFx_is__Pending;
import abstrasy.pcfx.PCFx_is__Positive;
import abstrasy.pcfx.PCFx_is__Postponed;
import abstrasy.pcfx.PCFx_is__Real;
import abstrasy.pcfx.PCFx_is__Something;
import abstrasy.pcfx.PCFx_is__Suspended;
import abstrasy.pcfx.PCFx_is__Zero;
import abstrasy.pcfx.PCFx_is__args;
import abstrasy.pcfx.PCFx_is__bytes;
import abstrasy.pcfx.PCFx_is__defined;
import abstrasy.pcfx.PCFx_is__external;
import abstrasy.pcfx.PCFx_is__hash;
import abstrasy.pcfx.PCFx_is__implementation;
import abstrasy.pcfx.PCFx_is__interface;
import abstrasy.pcfx.PCFx_is__key;
import abstrasy.pcfx.PCFx_is__lazy;
import abstrasy.pcfx.PCFx_is__list;
import abstrasy.pcfx.PCFx_is__locked;
import abstrasy.pcfx.PCFx_is__match;
import abstrasy.pcfx.PCFx_is__mutex;
import abstrasy.pcfx.PCFx_is__namespace;
import abstrasy.pcfx.PCFx_is__no_key;
import abstrasy.pcfx.PCFx_is__nothing;
import abstrasy.pcfx.PCFx_is__number;
import abstrasy.pcfx.PCFx_is__operator;
import abstrasy.pcfx.PCFx_is__pattern;
import abstrasy.pcfx.PCFx_is__quotable;
import abstrasy.pcfx.PCFx_is__quoted;
import abstrasy.pcfx.PCFx_is__quoted_expr;
import abstrasy.pcfx.PCFx_is__quoted_lazy;
import abstrasy.pcfx.PCFx_is__quoted_list;
import abstrasy.pcfx.PCFx_is__quoted_number;
import abstrasy.pcfx.PCFx_is__quoted_operator;
import abstrasy.pcfx.PCFx_is__quoted_string;
import abstrasy.pcfx.PCFx_is__quoted_symbol;
import abstrasy.pcfx.PCFx_is__register;
import abstrasy.pcfx.PCFx_is__scope;
import abstrasy.pcfx.PCFx_is__slot;
import abstrasy.pcfx.PCFx_is__string;
import abstrasy.pcfx.PCFx_is__undefined;
import abstrasy.pcfx.PCFx_is__value;
import abstrasy.pcfx.PCFx_join;
import abstrasy.pcfx.PCFx_keys;
import abstrasy.pcfx.PCFx_kill;
import abstrasy.pcfx.PCFx_label;
import abstrasy.pcfx.PCFx_lazy;
import abstrasy.pcfx.PCFx_length;
import abstrasy.pcfx.PCFx_let_static;
import abstrasy.pcfx.PCFx_library;
import abstrasy.pcfx.PCFx_list;
import abstrasy.pcfx.PCFx_list_regex;
import abstrasy.pcfx.PCFx_lock;
import abstrasy.pcfx.PCFx_log;
import abstrasy.pcfx.PCFx_log10;
import abstrasy.pcfx.PCFx_lower_string;
import abstrasy.pcfx.PCFx_map;
import abstrasy.pcfx.PCFx_max;
import abstrasy.pcfx.PCFx_merge;
import abstrasy.pcfx.PCFx_merge_static;
import abstrasy.pcfx.PCFx_meta;
import abstrasy.pcfx.PCFx_min;
import abstrasy.pcfx.PCFx_mixin;
import abstrasy.pcfx.PCFx_mod;
import abstrasy.pcfx.PCFx_mul;
import abstrasy.pcfx.PCFx_mutate;
import abstrasy.pcfx.PCFx_mutate_random;
import abstrasy.pcfx.PCFx_mutex;
import abstrasy.pcfx.PCFx_my_actor_id;
import abstrasy.pcfx.PCFx_namespace;
import abstrasy.pcfx.PCFx_new;
import abstrasy.pcfx.PCFx_not;
import abstrasy.pcfx.PCFx_nothing;
import abstrasy.pcfx.PCFx_number;
import abstrasy.pcfx.PCFx_oct_string;
import abstrasy.pcfx.PCFx_operator;
import abstrasy.pcfx.PCFx_optional;
import abstrasy.pcfx.PCFx_or;
import abstrasy.pcfx.PCFx_ord;
import abstrasy.pcfx.PCFx_p_and;
import abstrasy.pcfx.PCFx_p_or;
import abstrasy.pcfx.PCFx_parent;
import abstrasy.pcfx.PCFx_pattern;
import abstrasy.pcfx.PCFx_peek;
import abstrasy.pcfx.PCFx_peek_bytes;
import abstrasy.pcfx.PCFx_peek_double;
import abstrasy.pcfx.PCFx_peek_float;
import abstrasy.pcfx.PCFx_peek_int;
import abstrasy.pcfx.PCFx_peek_long;
import abstrasy.pcfx.PCFx_peek_short;
import abstrasy.pcfx.PCFx_peek_ushort;
import abstrasy.pcfx.PCFx_pending;
import abstrasy.pcfx.PCFx_perform;
import abstrasy.pcfx.PCFx_poke_bytes_static;
import abstrasy.pcfx.PCFx_poke_double_static;
import abstrasy.pcfx.PCFx_poke_float_static;
import abstrasy.pcfx.PCFx_poke_int_static;
import abstrasy.pcfx.PCFx_poke_long_static;
import abstrasy.pcfx.PCFx_poke_short_static;
import abstrasy.pcfx.PCFx_poke_static;
import abstrasy.pcfx.PCFx_poke_ushort_static;
import abstrasy.pcfx.PCFx_pop_static;
import abstrasy.pcfx.PCFx_populate_random;
import abstrasy.pcfx.PCFx_postpone;
import abstrasy.pcfx.PCFx_pow;
import abstrasy.pcfx.PCFx_quote;
import abstrasy.pcfx.PCFx_quote_dec;
import abstrasy.pcfx.PCFx_quote_enc;
import abstrasy.pcfx.PCFx_quoted_expr;
import abstrasy.pcfx.PCFx_quoted_lazy;
import abstrasy.pcfx.PCFx_quoted_list;
import abstrasy.pcfx.PCFx_quoted_operator;
import abstrasy.pcfx.PCFx_quoted_symbol;
import abstrasy.pcfx.PCFx_raise;
import abstrasy.pcfx.PCFx_random;
import abstrasy.pcfx.PCFx_range;
import abstrasy.pcfx.PCFx_raw_input;
import abstrasy.pcfx.PCFx_raw_string;
import abstrasy.pcfx.PCFx_receive;
import abstrasy.pcfx.PCFx_reduce;
import abstrasy.pcfx.PCFx_ref;
import abstrasy.pcfx.PCFx_register;
import abstrasy.pcfx.PCFx_remove_static;
import abstrasy.pcfx.PCFx_replace_regex;
import abstrasy.pcfx.PCFx_replace_static;
import abstrasy.pcfx.PCFx_resource;
import abstrasy.pcfx.PCFx_restart;
import abstrasy.pcfx.PCFx_resume;
import abstrasy.pcfx.PCFx_retry;
import abstrasy.pcfx.PCFx_return;
import abstrasy.pcfx.PCFx_reverse;
import abstrasy.pcfx.PCFx_root;
import abstrasy.pcfx.PCFx_round;
import abstrasy.pcfx.PCFx_scope;
import abstrasy.pcfx.PCFx_select;
import abstrasy.pcfx.PCFx_select_first;
import abstrasy.pcfx.PCFx_select_head;
import abstrasy.pcfx.PCFx_select_max;
import abstrasy.pcfx.PCFx_select_min;
import abstrasy.pcfx.PCFx_select_rest;
import abstrasy.pcfx.PCFx_select_tail;
import abstrasy.pcfx.PCFx_self;
import abstrasy.pcfx.PCFx_send;
import abstrasy.pcfx.PCFx_set_static;
import abstrasy.pcfx.PCFx_sgn;
import abstrasy.pcfx.PCFx_share;
import abstrasy.pcfx.PCFx_shiftl;
import abstrasy.pcfx.PCFx_shiftr;
import abstrasy.pcfx.PCFx_sin;
import abstrasy.pcfx.PCFx_skip_loop;
import abstrasy.pcfx.PCFx_sleep;
import abstrasy.pcfx.PCFx_slot;
import abstrasy.pcfx.PCFx_slots;
import abstrasy.pcfx.PCFx_sort_static;
import abstrasy.pcfx.PCFx_split;
import abstrasy.pcfx.PCFx_split_regex;
import abstrasy.pcfx.PCFx_sqrt;
import abstrasy.pcfx.PCFx_store_static;
import abstrasy.pcfx.PCFx_string;
import abstrasy.pcfx.PCFx_sub;
import abstrasy.pcfx.PCFx_substitute;
import abstrasy.pcfx.PCFx_super;
import abstrasy.pcfx.PCFx_supervisor_id;
import abstrasy.pcfx.PCFx_suspend;
import abstrasy.pcfx.PCFx_swap_static;
import abstrasy.pcfx.PCFx_switch;
import abstrasy.pcfx.PCFx_symbol;
import abstrasy.pcfx.PCFx_sync;
import abstrasy.pcfx.PCFx_tan;
import abstrasy.pcfx.PCFx_test_pc;
import abstrasy.pcfx.PCFx_this;
import abstrasy.pcfx.PCFx_timed;
import abstrasy.pcfx.PCFx_todegrees;
import abstrasy.pcfx.PCFx_toradians;
import abstrasy.pcfx.PCFx_trim_string;
import abstrasy.pcfx.PCFx_truncate;
import abstrasy.pcfx.PCFx_try;
import abstrasy.pcfx.PCFx_type_of;
import abstrasy.pcfx.PCFx_unify;
import abstrasy.pcfx.PCFx_unquote;
import abstrasy.pcfx.PCFx_unregister;
import abstrasy.pcfx.PCFx_until;
import abstrasy.pcfx.PCFx_upper_string;
import abstrasy.pcfx.PCFx_using;
import abstrasy.pcfx.PCFx_values;
import abstrasy.pcfx.PCFx_void;
import abstrasy.pcfx.PCFx_while;
import abstrasy.pcfx.PCFx_wrapper;
import abstrasy.pcfx.PCFx_xor;
import java.util.ArrayList;
import java.util.Hashtable;
/**
* Abstrasy Interpreter
*
* Copyright : Copyright (c) 2006-2012, Luc Bruninx.
*
* Concédée sous licence EUPL, version 1.1 uniquement (la «Licence»).
*
* Vous ne pouvez utiliser la présente oeuvre que conformément à la Licence.
* Vous pouvez obtenir une copie de la Licence à l’adresse suivante:
*
* http://www.osor.eu/eupl
*
* Sauf obligation légale ou contractuelle écrite, le logiciel distribué sous
* la Licence est distribué "en l’état", SANS GARANTIES OU CONDITIONS QUELLES
* QU’ELLES SOIENT, expresses ou implicites.
*
* Consultez la Licence pour les autorisations et les restrictions
* linguistiques spécifiques relevant de la Licence.
*
*
* @author Luc Bruninx
* @version 1.0
*/
public class PCoder {
/**
* Program Coder...
*
* Note:
* -----
* 'pcode' est le nom qui avait été donné initialement aux opérateurs intégrés au langage.
* Depuis mars 2010, les pcodes ont été rebaptisés operators. Toutefois, pour des raisons
* de compatibilité, le nom interne reste inchangé.
*
*/
/**
* séparateur de symboles
*/
public static final char SEP = ':';
public static final String SEP_str = ":";
/**
* listes d'arguments
*/
public static final String ARGV = "argv";
/**
* identifiant de registre interne (masqué)
*/
public static final char REG = '®';
public static final String REG_str = "®";
public static final String REG_RETURN = REG + "RETURN";
/**
* caractères syntaxiques réservés:
* -------------------------------
*/
public static final char COMMENT = '#';
public static final char COMMENT_BLOCK_1 = '/';
public static final char COMMENT_BLOCK_2 = '*';
/**
* symboles réservés
*/
public static final String IMPORTS_PATH = "imports-path";
public static final String IMPORTS_BASE_URL = "imports-base-url";
public static final String IMPORTS_RELPATH = "imports";
public static final String LIBRARIES_PATH = "libraries-path";
public static final String LIBRARIES_BASE_URL = "libraries-base-url";
public static final String LIBRARIES_RELPATH = "libraries";
public static final String LIBRARY_PROPERTIES = "library.properties";
public static final String RESOURCES_PATH = "resources-path";
public static final String RESOURCES_BASE_URL = "resources-base-url";
public static final String RESOURCES_RELPATH = "resources";
//
//
public static final String REGISTRY = "REGISTRY";
/**
* constantes
*/
public static final String TRUE = "TRUE";
public static final String FALSE = "FALSE";
public static final String PI = "PI";
public static final String NAPIER = "NAPIER";
public static final String EULER = "EULER";
public static final String MAIN = "MAIN";
public static final String INTERPRETER_REVISION = "INTERPRETER_REVISION";
/**
* Liste des pcodes...
*/
static final private ArrayList<PCode> PCodes = new ArrayList<PCode>();
static final private Hashtable<String, PCode> PCODES_HASH = new Hashtable<String, PCode>();
static final private int op(String reserved, PCFx pcfx, String method) {
PCode pc = new PCode(reserved, pcfx, method);
PCodes.add(pc);
PCODES_HASH.put(pc.getReserved(), pc);
return pc.getCode();
}
static final private int op(String reserved, PCFx pcfx) {
return op(reserved, pcfx, null);
}
/**
* Code d'erreur et registre interne...
*/
public static final int PC_ERR = op("", new PCFx_TEMP(), null);
//
public static final int PC_BYTES = op("bytes", new PCFx_bytes(), "bytes");
public static final int PC_isBYTES = op("bytes?", new PCFx_is__bytes());
public static final int PC_POKE_BYTE = op("poke!", new PCFx_poke_static());
public static final int PC_PEEK_BYTE = op("peek", new PCFx_peek());
public static final int PC_POKE_SHORT = op("poke-short!", new PCFx_poke_short_static());
public static final int PC_PEEK_SHORT = op("peek-short", new PCFx_peek_short());
public static final int PC_POKE_USHORT = op("poke-ushort!", new PCFx_poke_ushort_static());
public static final int PC_PEEK_USHORT = op("peek-ushort", new PCFx_peek_ushort());
public static final int PC_POKE_INT = op("poke-int!", new PCFx_poke_int_static());
public static final int PC_PEEK_INT = op("peek-int", new PCFx_peek_int());
public static final int PC_POKE_LONG = op("poke-long!", new PCFx_poke_long_static());
public static final int PC_PEEK_LONG = op("peek-long", new PCFx_peek_long());
public static final int PC_POKE_FLOAT = op("poke-float!", new PCFx_poke_float_static());
public static final int PC_PEEK_FLOAT = op("peek-float", new PCFx_peek_float());
public static final int PC_POKE_DOUBLE = op("poke-double!", new PCFx_poke_double_static());
public static final int PC_PEEK_DOUBLE = op("peek-double", new PCFx_peek_double());
public static final int PC_POKE_BYTES = op("poke-bytes!", new PCFx_poke_bytes_static());
public static final int PC_PEEK_BYTES = op("peek-bytes", new PCFx_peek_bytes());
//
public static final int PC_NOTHING = op("nothing", new PCFx_nothing());
public static final int PC_isNOTHING = op("nothing?", new PCFx_is__nothing());
//
public static final int PC_NUMBER = op("number", new PCFx_number(), "number");
public static final int PC_isNUMBER = op("number?", new PCFx_is__number());
public static final int PC_isQUOTED_NUMBER = op("quoted-number?", new PCFx_is__quoted_number());
//
public static final int PC_STRING = op("string", new PCFx_string(), "string");
public static final int PC_isSTRING = op("string?", new PCFx_is__string());
public static final int PC_isQUOTED_STRING = op("quoted-string?", new PCFx_is__quoted_string());
//
public static final int PC_EXTERNAL = op("external", new PCFx_external(), null);
public static final int PC_isEXTERNAL = op("external?", new PCFx_is__external(), null);
//
public static final int PC_OPERATOR = op("operator", new PCFx_operator());
public static final int PC_isOPERATOR = op("operator?", new PCFx_is__operator());
public static final int PC_QUOTED_OPERATOR = op("quoted-operator", new PCFx_quoted_operator());
public static final int PC_isQUOTED_OPERATOR = op("quoted-operator?", new PCFx_is__quoted_operator());
//
public static final int PC_SYMBOL = op("symbol", new PCFx_symbol());
public static final int PC_QUOTED_SYMBOL = op("quoted-symbol", new PCFx_quoted_symbol());
public static final int PC_isQUOTED_SYMBOL = op("quoted-symbol?", new PCFx_is__quoted_symbol());
//
public static final int PC_QUOTED_EXPR = op("quoted-expr", new PCFx_quoted_expr());
public static final int PC_isQUOTED_EXPR = op("quoted-expr?", new PCFx_is__quoted_expr());
//
public static final int PC_LAZY = op("lazy", new PCFx_lazy());
public static final int PC_isLAZY = op("lazy?", new PCFx_is__lazy());
public static final int PC_QUOTED_LAZY = op("quoted-lazy", new PCFx_quoted_lazy());
public static final int PC_isQUOTED_LAZY = op("quoted-lazy?", new PCFx_is__quoted_lazy());
//
public static final int PC_LIST = op("list", new PCFx_list(),"list");
public static final int PC_isLIST = op("list?", new PCFx_is__list());
public static final int PC_QUOTED_LIST = op("quoted-list", new PCFx_quoted_list());
public static final int PC_isQUOTED_LIST = op("quoted-list?", new PCFx_is__quoted_list());
//
public static final int PC_FUNCTION = op("function", new PCFx_function());
public static final int PC_isFUNCTION = op("function?", new PCFx_is__Function());
public static final int PC_HASH = op("hash", new PCFx_hash());
public static final int PC_isHASH = op("hash?", new PCFx_is__hash());
public static final int PC_SCOPE = op("scope", new PCFx_scope());
public static final int PC_isSCOPE = op("scope?", new PCFx_is__scope());
public static final int PC_NAMESPACE = op("namespace", new PCFx_namespace());
public static final int PC_isNAMESPACE = op("namespace?", new PCFx_is__namespace());
public static final int PC_PATTERN = op("pattern", new PCFx_pattern());
public static final int PC_isPATTERN = op("pattern?", new PCFx_is__pattern());
public static final int PC_INTERFACE = op("interface", new PCFx_interface());
public static final int PC_isINTERFACE = op("interface?", new PCFx_is__interface());
public static final int PC_QUOTE = op("quote", new PCFx_quote(),"quote");
public static final int PC_UNQUOTE = op("unquote", new PCFx_unquote());
public static final int PC_IMMEDIATE_QUOTE = op("!quote", new PCFx_immediate_quote());
public static final int PC_isQUOTED = op("quoted?", new PCFx_is__quoted());
public static final int PC_QUOTE_ENC = op("quote-enc", new PCFx_quote_enc());
public static final int PC_QUOTE_DEC = op("quote-dec", new PCFx_quote_dec());
public static final int PC_COMPILE = op("compile", new PCFx_compile());
public static final int PC_EVAL = op("eval", new PCFx_eval());
public static final int PC_EVALsucre = op("~", new PCFx_eval());
public static final int PC_META_PROCESS = op("meta", new PCFx_meta());
public static final int PC_EXPAND_PROCESS = op("expand", new PCFx_expand());
public static final int PC_SUBSTITUTE = op("substitute", new PCFx_substitute());
public static final int PC_EXTRACT_PROCESS = op("extract", new PCFx_extract());
public static final int PC_UNIFY = op("unify", new PCFx_unify());
public static final int PC_isMATCH = op("match?", new PCFx_is__match());
/**
* pcodes mathématiques
*/
public static final int PC_ADD = op("+", new PCFx_add(),"add");
public static final int PC_SUB = op("-", new PCFx_sub(),"sub");
public static final int PC_MUL = op("*", new PCFx_mul(),"mul");
public static final int PC_DIV = op("/", new PCFx_div(),"div");
public static final int PC_MOD = op("mod", new PCFx_mod(),"mod");
/**
* fonctions trigonométriques
*/
public static final int PC_SIN = op("sin", new PCFx_sin(),"sin");
public static final int PC_COS = op("cos", new PCFx_cos(),"cos");
public static final int PC_TAN = op("tan", new PCFx_tan(),"tan");
public static final int PC_ROUND = op("round", new PCFx_round(),"round");
public static final int PC_POW = op("pow", new PCFx_pow(),"pow");
public static final int PC_SQRT = op("sqrt", new PCFx_sqrt(),"sqrt");
public static final int PC_ABS = op("abs", new PCFx_abs(),"abs");
public static final int PC_LOG = op("log", new PCFx_log(),"log");
public static final int PC_LOG10 = op("log10", new PCFx_log10(),"log10");
public static final int PC_DIGITS10 = op("digits10", new PCFx_digits10(),"digits10");
public static final int PC_EXP = op("exp", new PCFx_exp(),"exp");
public static final int PC_ASIN = op("asin", new PCFx_asin(),"asin");
public static final int PC_ACOS = op("acos", new PCFx_acos(),"acos");
public static final int PC_ATAN = op("atan", new PCFx_atan(),"atan");
public static final int PC_TORADIANS = op("toradians", new PCFx_toradians(),"toradians");
public static final int PC_TODEGREES = op("todegrees", new PCFx_todegrees(),"todegrees");
public static final int PC_RANDOM = op("random", new PCFx_random());
public static final int PC_FLOOR = op("floor", new PCFx_floor(),"floor");
public static final int PC_CEIL = op("ceil", new PCFx_ceil(),"ceil");
public static final int PC_TRUNCATE = op("truncate", new PCFx_truncate(),"truncate");
public static final int PC_SGN = op("sgn", new PCFx_sgn(),"sgn");
public static final int PC_FRACTIONAL = op("fractional", new PCFx_fractional(),"fractional");
/**
* opérateurs de logique
*/
public static final int PC_NOT = op("not", new PCFx_not(),"not");
public static final int PC_CAND = op("and", new PCFx_and(),"and");
public static final int PC_COR = op("or", new PCFx_or(),"or");
public static final int PC_XOR = op("xor", new PCFx_xor(),"xor");
public static final int PC_SHIFTL = op("lshift", new PCFx_shiftl(),"lshift");
public static final int PC_SHIFTR = op("rshift", new PCFx_shiftr(),"rshift");
/**
* opérateurs de logique floue
*/
public static final int PC_FUZZY_NOT = op("f-not", new PCFx_f_not());
public static final int PC_FUZZY_AND = op("f-and", new PCFx_f_and());
public static final int PC_FUZZY_OR = op("f-or", new PCFx_f_or());
public static final int PC_FUZZY_PROBABILITY_AND = op("p-and", new PCFx_p_and());
public static final int PC_FUZZY_PROBABILITY_OR = op("p-or", new PCFx_p_or());
public static final int PC_FUZZY_DEGREE_OF = op("degree-of", new PCFx_f_degree_of());
public static final int PC_FUZZY_MEMBER_OF = op("member-of", new PCFx_f_member_of());
public static final int PC_INCREASING_TO = op("increasing-to", new PCFx_TEMP());
public static final int PC_DECREASING_TO = op("decreasing-to", new PCFx_TEMP());
//
public static final int PC_EQUIDENTITY = op("==?", new PCFx_is__EquIdentity());
public static final int PC_EQUALS = op("=?", new PCFx_is__Equals(),"equ?");
public static final int PC_GT_DEFAULT_COMPARE = op(">?", new PCFx_is__GT(),"compare");
public static final int PC_LT = op("<?", new PCFx_is__LT(),"compare");
public static final int PC_NEQUALS = op("<>?", new PCFx_is__NEquals(),"equ?");
public static final int PC_GTE = op(">=?", new PCFx_is__GTE(),"compare");
public static final int PC_LTE = op("<=?", new PCFx_is__LTE(),"compare");
//
public static final int PC_isINT = op("int?", new PCFx_is__Int());
public static final int PC_isINTEGER = op("integer?", new PCFx_is__Integer(),"integer?");
public static final int PC_isREAL = op("real?", new PCFx_is__Real());
public static final int PC_isDECIMAL = op("decimal?", new PCFx_is__Decimal(),"decimal?");
public static final int PC_isZERO = op("zero?", new PCFx_is__Zero(),"zero?");
public static final int PC_isPOSITIVE = op("positive?", new PCFx_is__Positive(),"positive?");
public static final int PC_isNEGATIVE = op("negative?", new PCFx_is__Negative(),"negative?");
public static final int PC_isEVEN = op("even?", new PCFx_is__Even(),"even?");
public static final int PC_isODD = op("odd?", new PCFx_is__Odd(),"odd?");
public static final int PC_isSOMETHING = op("something?", new PCFx_is__Something());
public static final int PC_isVALUE = op("value?", new PCFx_is__value(),"value?");
public static final int PC_isNO_VALUE = op("no-value?", new PCFx_is__value(),"no-value?");
public static final int PC_isQUOTABLE = op("quotable?", new PCFx_is__quotable());
/**
* paires associatives
*/
public static final int PC_isKEY = op("key?", new PCFx_is__key(),"key?");
public static final int PC_isNO_KEY = op("no-key?", new PCFx_is__no_key(),"no-key?");
/**
* Symboles & variables
*/
public static final int PC_isDEFINED = op("defined?", new PCFx_is__defined());
public static final int PC_isUNDEFINED = op("undefined?", new PCFx_is__undefined());
public static final int PC_isFINAL = op("final?", new PCFx_is__Final());
public static final int PC_isMUTABLE = op("mutable?", new PCFx_is__Mutable());
public static final int PC_isIMMUTABLE = op("immutable?", new PCFx_is__Immutable());
public static final int PC_isIMMUABLE = op("immuable?", new PCFx_is__Immuable());
//
public static final int PC_isLIKE_STRING = op("like-string?", new PCFx_is__Like_string());
public static final int PC_isMATCH_REGEX = op("match-regex?", new PCFx_is__Match_regex());
public static final int PC_SPLIT_REGEX = op("split-regex", new PCFx_split_regex());
public static final int PC_FIND_REGEX = op("find-regex", new PCFx_find_regex());
public static final int PC_LIST_REGEX = op("list-regex", new PCFx_list_regex());
public static final int PC_REPLACE_REGEX = op("replace-regex", new PCFx_replace_regex());
/**
* Contrôle du flux d'évaluation...
*/
public static final int PC_IF = op("if", new PCFx_if());
public static final int PC_THEN = op("then", new PCFx_TEMP());
public static final int PC_ELSE = op("else", new PCFx_TEMP());
public static final int PC_ELIF = op("elif", new PCFx_TEMP());
public static final int PC_INFER = op("infer", new PCFx_infer());
public static final int PC_EACH_TIME = op("each-time", new PCFx_TEMP());
public static final int PC_ONCE = op("once", new PCFx_TEMP());
public static final int PC_SWITCH = op("switch", new PCFx_switch());
public static final int PC_CASE = op("case", new PCFx_TEMP());
public static final int PC_INVOKE = op("invoke", new PCFx_invoke());
public static final int PC_WHILE = op("while", new PCFx_while());
public static final int PC_UNTIL = op("until", new PCFx_until());
public static final int PC_FOREVER = op("forever", new PCFx_forever());
public static final int PC_FOREACH = op("foreach", new PCFx_foreach());
public static final int PC_FOREACH_PERM = op("foreach-perm", new PCFx_foreach_perm());
public static final int PC_FOREACH_COMBIN = op("foreach-combin", new PCFx_foreach_combin());
public static final int PC_FOREACH_PART = op("foreach-part", new PCFx_foreach_part());
public static final int PC_FOREACH_CIRC = op("foreach-circ", new PCFx_foreach_circ());
public static final int PC_FOREACH_ROW = op("foreach-row", new PCFx_foreach_row());
public static final int PC_FOREACH_COL = op("foreach-col", new PCFx_foreach_col());
public static final int PC_FOREACH_DIAG = op("foreach-diag", new PCFx_foreach_diag());
public static final int PC_FOREACH_PRODUCT = op("foreach-product", new PCFx_foreach_product());
public static final int PC_FOREACH_SUM = op("foreach-sum", new PCFx_foreach_sum());
public static final int PC_FOREACH_ALL_DIFFERENT = op("foreach-all-different", new PCFx_foreach_all_different());
public static final int PC_DO = op("do", new PCFx_do());
public static final int PC_COMPLETE_LOOP = op("complete-loop", new PCFx_complete_loop());
public static final int PC_isCOMPLETE_LOOP = op("complete-loop?", new PCFx_is__Complete_loop());
public static final int PC_BREAK_LOOP = op("break-loop", new PCFx_break_loop());
public static final int PC_SKIP_LOOP = op("skip-loop", new PCFx_skip_loop());
//
public static final int PC_MAP = op("map", new PCFx_map());
public static final int PC_REDUCE = op("reduce", new PCFx_reduce());
/**
* contrôle et structure de programme
*/
public static final int PC_PERFORM = op("perform", new PCFx_perform());
public static final int PC_RESTART = op("restart", new PCFx_restart());
public static final int PC_VOID = op("void", new PCFx_void());
public static final int PC_EXIT = op("exit", new PCFx_exit());
public static final int PC_TIMED = op("timed", new PCFx_timed());
/**
* Gestion des exceptions et controle des erreurs
*/
public static final int PC_TRY = op("try", new PCFx_try());
public static final int PC_RETRY = op("retry", new PCFx_retry());
public static final int PC_ABORT = op("abort", new PCFx_abort());
public static final int PC_CATCH = op("catch", new PCFx_TEMP());
public static final int PC_RAISE = op("raise", new PCFx_raise());
public static final int PC_ASSERT = op("assert", new PCFx_assert());
/**
* Gestion des hooks
*/
public static final int PC_ENSURE = op("ensure", new PCFx_ensure());
public static final int PC_TERMINATION = op("termination", new PCFx_TEMP());
public static final int PC_DEFINE = op("define", new PCFx_define());
public static final int PC_LABEL = op("label", new PCFx_label());
public static final int PC_SET = op("set!", new PCFx_set_static());
public static final int PC_LET = op("let!", new PCFx_let_static());
public static final int PC_REF = op("ref", new PCFx_ref(),"ref");
public static final int PC_REFsucre = op("@", new PCFx_ref(),"ref");
public static final int PC_DEREF = op("deref", new PCFx_deref());
public static final int PC_DEREFsucre = op(",", new PCFx_deref());
public static final int PC_SWAP = op("swap!", new PCFx_swap_static());
public static final int PC_CLONE = op("clone", new PCFx_clone());
public static final int PC_CLONEsucre = op(";", new PCFx_clone());
/**
* fonction
*/
public static final int PC_ARGS = op("args", new PCFx_args());
public static final int PC_DEFAULT_ARGS = op("default-args", new PCFx_default_args());
public static final int PC_THIS = op("this", new PCFx_this());
public static final int PC_SUPER = op("super", new PCFx_super());
public static final int PC_WRAPPER = op("wrapper", new PCFx_wrapper());
//=op("memoize", PC_MEMOIZE, new PCFx_memoize()),
public static final int PC_INLINE = op("inline", new PCFx_TEMP());
public static final int PC_OVERRIDE = op("override", new PCFx_TEMP());
//=op("memoize?", PC_isMEMOIZE, new PCFx_is__memoize()),
//=op("memoizable?", PC_isMEMOIZABLE, new PCFx_is__memoizable()),
//=op("memoize-dump", PC_MEMOIZE_DUMP, new PCFx_memoize_dump()),
public static final int PC_isARGS = op("args?", new PCFx_is__args());
public static final int PC_RETURN = op("return", new PCFx_return());
public static final int PC_IMMEDIATE_RETURN = op("!return", new PCFx_immediate_return());
public static final int PC_CONTINUE = op("continue", new PCFx_continue());
public static final int PC_FORWARD = op("forward", new PCFx_forward());
public static final int PC_DELEGATE = op("delegate", new PCFx_delegate());
public static final int PC_OPTIONAL = op("optional", new PCFx_optional());
/**
* Contrat
*/
//=op("require", PC_REQUIRE, new PCFx_require()),
//=op("contract", PC_CONTRACT, new PCFx_contract()),
//=op("precond", PC_PRECOND, new PCFx_TEMP(PC_PRECOND)),
//=op("postcond", PC_POSTCOND, new PCFx_TEMP(PC_POSTCOND)),
//=op("contracts?", PC_isCONTRACTS, new PCFx_is__Contracts()),
//=op("use-contracts", PC_USE_CONTRACTS, new PCFx_use_contracts()),
//=op("supplier", PC_SUPPLIER, new PCFx_TEMP(PC_SUPPLIER)),
//=op("result", PC_RESULT, new PCFx_result()),
/**
*
*/
public static final int PC_NEW = op("new", new PCFx_new(),"new");
public static final int PC_MIXIN = op("mixin", new PCFx_mixin());
public static final int PC_ADAPT = op("adapt", new PCFx_adapt());
public static final int PC_EXTEND = op("extend", new PCFx_extend());
public static final int PC_USING = op("using", new PCFx_using());
public static final int PC_SLOTS = op("slots", new PCFx_slots());
public static final int PC_SLOT = op("slot", new PCFx_slot());
public static final int PC_isSLOT = op("slot?", new PCFx_is__slot());
public static final int PC_TYPE_OF = op("type-of", new PCFx_type_of(),"type-of");
/**
* Pattern & objets
*/
public static final int PC_isIMPLEMENTATION = op("implementation?", new PCFx_is__implementation());
public static final int PC_ABSTRACT = op("abstract", new PCFx_abstract());
//=op("class-id", PC_CLASSID, new PCFx_class_id()),
// =op("transform!", PC_TRANSFORM_STATIC, new PCFx_transform_static()),
public static final int PC_FINAL = op("final", new PCFx_TEMP());
public static final int PC_SELF = op("self", new PCFx_self());
public static final int PC_ROOT = op("root", new PCFx_root());
public static final int PC_PARENT = op("parent", new PCFx_parent());
// =op("is-a", PC_IS_A, new PCFx_is_a()),
// =op("has-a", PC_HAS_A, new PCFx_has_a()),
// =op("is-a?", PC_isIS_A, new PCFx_is__is_a()),
// =op("has-a?", PC_isHAS_A, new PCFx_is__has_a()),
// =op("implementation?", PC_isIMPLEMENTATION_OF, new PCFx_is__implementation()),
//
public static final int PC_FROM = op("from", new PCFx_TEMP());
public static final int PC_ALL = op("all", new PCFx_TEMP());
public static final int PC_OTHERS = op("...", new PCFx_TEMP());
public static final int PC_ALIAS = op("alias", new PCFx_TEMP());
public static final int PC_OF = op("of", new PCFx_TEMP());
public static final int PC_IN = op("in", new PCFx_TEMP());
public static final int PC_TO = op("to", new PCFx_TEMP());
public static final int PC_AT = op("at", new PCFx_TEMP());
public static final int PC_BY = op("by", new PCFx_TEMP());
public static final int PC_FOR = op("for", new PCFx_TEMP());
public static final int PC_WITH = op("with", new PCFx_TEMP());
public static final int PC_YIELD = op("yield", new PCFx_TEMP());
/**
* Composants...
*/
public static final int PC_LIBRARY = op("library", new PCFx_library());
public static final int PC_REGISTER = op("register", new PCFx_register());
public static final int PC_isREGISTER = op("register?", new PCFx_is__register());
public static final int PC_UNREGISTER = op("unregister", new PCFx_unregister());
public static final int PC_RESOURCE = op("resource", new PCFx_resource());
public static final int PC_IMPORT = op("import", new PCFx_import());
public static final int PC_PROVIDE = op("provide", new PCFx_TEMP());
public static final int PC_INCLUDE = op("include", new PCFx_include());
public static final int PC_EXTCALL = op("extcall", new PCFx_extcall());
/**
* fonctions concurrentes
*/
public static final int PC_ACTOR = op("actor", new PCFx_actor());
public static final int PC_MUTEX = op("mutex", new PCFx_mutex());
public static final int PC_isMUTEX = op("mutex?", new PCFx_is__mutex());
public static final int PC_ATOMIC = op("atomic", new PCFx_atomic());
public static final int PC_SYNC = op("sync", new PCFx_sync());
public static final int PC_SHARE = op("share", new PCFx_share());
public static final int PC_LOCK = op("lock", new PCFx_lock());
public static final int PC_isLOCKED = op("locked?", new PCFx_is__locked());
public static final int PC_SUSPEND = op("suspend", new PCFx_suspend());
public static final int PC_RESUME = op("resume", new PCFx_resume());
public static final int PC_KILL = op("kill", new PCFx_kill());
public static final int PC_isSUSPENDED = op("suspended?", new PCFx_is__Suspended());
public static final int PC_ACTORS = op("actors", new PCFx_actors());
public static final int PC_MY_ACTOR_ID = op("my-actor-id", new PCFx_my_actor_id());
public static final int PC_SUPERVISOR_ID = op("supervisor-id", new PCFx_supervisor_id());
public static final int PC_SLEEP = op("sleep", new PCFx_sleep());
public static final int PC_SEND = op("send", new PCFx_send());
public static final int PC_RECEIVE = op("receive", new PCFx_receive());
public static final int PC_isMESSAGES = op("has-message?", new PCFx_is__Messages());
public static final int PC_PENDING = op("pending", new PCFx_pending());
public static final int PC_POSTPONE = op("postpone", new PCFx_postpone());
public static final int PC_isPENDING = op("pending?", new PCFx_is__Pending());
public static final int PC_isPOSTPONED = op("postponed?", new PCFx_is__Postponed());
//
//=op("atomic+!", PC_ATOMIC_ADD, new PCFx_atomic_add_static()),
/**
* entrés/sorties console..
*/
public static final int PC_DISPLAY = op("display", new PCFx_display());
public static final int PC_DISPLAY_NOLINE = op("display..", new PCFx_display_noline());
public static final int PC_DISPLAY_CLR = op("display-clr", new PCFx_display_clr());
public static final int PC_RAW_INPUT = op("raw-input", new PCFx_raw_input());
/**
* opérateurs atomic/static
*/
public static final int PC_ATOMIC_TRUE_STATIC = op("true!", new PCFx_atomic_true_static());
public static final int PC_ATOMIC_FALSE_STATIC = op("false!", new PCFx_atomic_false_static());
public static final int PC_ATOMIC_SETN_STATIC = op("setn!", new PCFx_atomic_setn_static());
//
public static final int PC_ATOMIC_ADD_STATIC = op("+!", new PCFx_atomic_add_static(),"add!");
public static final int PC_ATOMIC_SUB_STATIC = op("-!", new PCFx_atomic_sub_static(),"sub!");
public static final int PC_ATOMIC_MUL_STATIC = op("*!", new PCFx_atomic_mul_static(),"mul!");
public static final int PC_ATOMIC_DIV_STATIC = op("/!", new PCFx_atomic_div_static(),"div!");
//
public static final int PC_ATOMIC_INCR_STATIC = op("incr!", new PCFx_atomic_incr_static(),"incr!");
public static final int PC_ATOMIC_DECR_STATIC = op("decr!", new PCFx_atomic_decr_static(),"decr!");
//
public static final int PC_ATOMIC_OR_STATIC = op("or!", new PCFx_atomic_or_static(),"or!");
public static final int PC_ATOMIC_AND_STATIC = op("and!", new PCFx_atomic_and_static(),"and!");
public static final int PC_ATOMIC_NOT_STATIC = op("not!", new PCFx_atomic_not_static(),"not!");
public static final int PC_ATOMIC_XOR_STATIC = op("xor!", new PCFx_atomic_xor_static(),"xor!");
public static final int PC_ATOMIC_SHIFTL_STATIC = op("lshift!", new PCFx_atomic_shiftl_static(),"lshift!");
public static final int PC_ATOMIC_SHIFTR_STATIC = op("rshift!", new PCFx_atomic_shiftr_static(),"rshift!");
/**
* fetch&...
*/
public static final int PC_ATOMIC_FETCH_AND_INCR_STATIC = op("fetch&incr!", new PCFx_atomic_fetch_and_incr_static(),"fetch-and-incr!");
public static final int PC_ATOMIC_FETCH_AND_DECR_STATIC = op("fetch&decr!", new PCFx_atomic_fetch_and_decr_static(),"fetch-and-decr!");
//
public static final int PC_ATOMIC_FETCH_AND_ADD_STATIC = op("fetch&+!", new PCFx_atomic_fetch_and_add_static(),"fetch-and-add!");
public static final int PC_ATOMIC_FETCH_AND_SUB_STATIC = op("fetch&-!", new PCFx_atomic_fetch_and_sub_static(),"fetch-and-sub!");
public static final int PC_ATOMIC_FETCH_AND_MUL_STATIC = op("fetch&*!", new PCFx_atomic_fetch_and_mul_static(),"fetch-and-mul!");
public static final int PC_ATOMIC_FETCH_AND_DIV_STATIC = op("fetch&/!", new PCFx_atomic_fetch_and_div_static(),"fetch-and-div!");
//
public static final int PC_ATOMIC_FETCH_AND_TRUE_STATIC = op("fetch&true!", new PCFx_atomic_fetch_and_true_static());
public static final int PC_ATOMIC_FETCH_AND_FALSE_STATIC = op("fetch&false!", new PCFx_atomic_fetch_and_false_static());
public static final int PC_ATOMIC_FETCH_AND_SETN_STATIC = op("fetch&setn!", new PCFx_atomic_fetch_and_setn_static());
//
public static final int PC_ATOMIC_FETCH_AND_OR_STATIC = op("fetch&or!", new PCFx_atomic_fetch_and_or_static(),"fetch-and-or!");
public static final int PC_ATOMIC_FETCH_AND_AND_STATIC = op("fetch&and!", new PCFx_atomic_fetch_and_and_static(),"fetch-and-and!");
public static final int PC_ATOMIC_FETCH_AND_NOT_STATIC = op("fetch¬!", new PCFx_atomic_fetch_and_not_static(),"fetch-and-not!");
public static final int PC_ATOMIC_FETCH_AND_XOR_STATIC = op("fetch&xor!", new PCFx_atomic_fetch_and_xor_static(),"fetch-and-xor!");
public static final int PC_ATOMIC_FETCH_AND_SHIFTL_STATIC = op("fetch&lshift!", new PCFx_atomic_fetch_and_shiftl_static(),"fetch-and-lshift!");
public static final int PC_ATOMIC_FETCH_AND_SHIFTR_STATIC = op("fetch&rshift!", new PCFx_atomic_fetch_and_shiftr_static(),"fetch-and-rshift!");
//
public static final int PC_SELECT_FIRST = op("select-first", new PCFx_select_first());
public static final int PC_SELECT_REST = op("select-rest", new PCFx_select_rest());
public static final int PC_SELECT_HEAD = op("select-head", new PCFx_select_head());
public static final int PC_SELECT_TAIL = op("select-tail", new PCFx_select_tail());
public static final int PC_SELECT = op("select", new PCFx_select());
public static final int PC_SELECT_MIN = op("select-min", new PCFx_select_min(),"select-min");
public static final int PC_SELECT_MAX = op("select-max", new PCFx_select_max(),"select-max");
//
public static final int PC_CROSSOVER_PMX = op("crossover-pmx", new PCFx_crossover_pmx());
public static final int PC_CROSSOVER_PX = op("crossover-px", new PCFx_crossover_px());
public static final int PC_CROSSOVER_CX = op("crossover-cx", new PCFx_crossover_cx());
public static final int PC_CROSSOVER_OX = op("crossover-ox", new PCFx_crossover_ox());
public static final int PC_CROSSOVER_ERX = op("crossover-erx", new PCFx_crossover_erx());
public static final int PC_POPULATE_RANDOM = op("populate-random", new PCFx_populate_random());
public static final int PC_MUTATE_RANDOM = op("mutate-random", new PCFx_mutate_random());
public static final int PC_MUTATE = op("mutate", new PCFx_mutate());
//
public static final int PC_STORE_STATIC = op("store!", new PCFx_store_static(),"store!");
public static final int PC_APPEND_STATIC = op("append!", new PCFx_append_static(),"append!");
public static final int PC_INSERT_STATIC = op("insert!", new PCFx_insert_static(),"insert!");
public static final int PC_REPLACE_STATIC = op("replace!", new PCFx_replace_static(),"replace!");
public static final int PC_REMOVE_STATIC = op("remove!", new PCFx_remove_static(),"remove!");
public static final int PC_MERGE = op("merge", new PCFx_merge(),"merge");
public static final int PC_MERGE_STATIC = op("merge!", new PCFx_merge_static(),"merge!");
public static final int PC_FLATTEN = op("flatten", new PCFx_flatten(),"flatten");
public static final int PC_COMPACT = op("compact", new PCFx_compact(),"compact");
public static final int PC_REVERSE = op("reverse", new PCFx_reverse(),"reverse");
public static final int PC_LENGTH = op("length", new PCFx_length(),"length");
public static final int PC_FIND = op("find", new PCFx_find(),"find");
public static final int PC_COUNT = op("count", new PCFx_count(),"count");
public static final int PC_POP_STATIC = op("pop!", new PCFx_pop_static());
public static final int PC_DEQUEUE_STATIC = op("dequeue!", new PCFx_dequeue_static());
public static final int PC_RANGE = op("range", new PCFx_range());
public static final int PC_KEYS = op("keys", new PCFx_keys());
public static final int PC_VALUES = op("values", new PCFx_values());
public static final int PC_DIFF = op("diff", new PCFx_diff());
//
public static final int PC_HEX_STRING = op("hex-string", new PCFx_hex_string(),"hex-string");
public static final int PC_BIN_STRING = op("bin-string", new PCFx_bin_string(),"bin-string");
public static final int PC_OCT_STRING = op("oct-string", new PCFx_oct_string(),"oct-string");
public static final int PC_RAW_STRING = op("raw-string", new PCFx_raw_string());
public static final int PC_MAX = op("max", new PCFx_max());
public static final int PC_MIN = op("min", new PCFx_min());
public static final int PC_UPPER_STRING = op("upper-string", new PCFx_upper_string());
public static final int PC_LOWER_STRING = op("lower-string", new PCFx_lower_string());
public static final int PC_ORD = op("ord", new PCFx_ord());
public static final int PC_CHR = op("chr", new PCFx_chr());
public static final int PC_TRIM_STRING = op("trim-string", new PCFx_trim_string());
public static final int PC_FILLING_STRING = op("filling-string", new PCFx_filling_string());
//
public static final int PC_SPLIT = op("split", new PCFx_split());
public static final int PC_JOIN = op("join", new PCFx_join());
//
public static final int PC_SORT_STATIC = op("sort!", new PCFx_sort_static(), "sort!");
//
public static final int PC_DUMP_HEAP = op("DUMP", new PCFx_dump_heap(), null);
// réservé pour un opérateur de test...
public static final int PC_TESTPC = op("TESTPC", new PCFx_test_pc(), null);
//
public PCoder() {
}
public static int getCode(String key) {
int rpc = PC_ERR;
PCode tmp = PCODES_HASH.get(key);
if (tmp != null)
rpc = tmp.getCode();
return rpc;
}
public static PCFx getPcfx(String key) {
PCFx rpc = null;
PCode tmp = PCODES_HASH.get(key);
if (tmp != null)
rpc = tmp.getPcfx().factory();
return rpc;
}
public static String getReserved(int rpc) {
if (rpc < PCodes.size())
return PCodes.get(rpc).getReserved();
else
return null;
}
public static String getMethod(int rpc) {
if (rpc < PCodes.size())
return PCodes.get(rpc).getMethod();
else
return null;
}
/**
* "Selfier" un symbole
*
* @param symbol
* @return symbole "selfié"...
*/
public static String selfing(String symbol) {
if (symbol.startsWith(":"))
return symbol;
return SEP + symbol;
}
/**
* "Déselfier" un symbole
*
* @param symbol
* @return symbole "déselfié"...
*/
public static String unselfing(String symbol) {
if (symbol.startsWith(":"))
return symbol.substring(1);
return symbol;
}
}