248
249
type(code, soft_purge, 1, Xs) ->
249
250
type(code, delete, 1, Xs);
250
type(code, stick_dir, 1, Xs) ->
251
strict(arg_types(code, stick_dir, 1), Xs,
252
fun (_) -> t_sup(t_atom('ok'), t_atom('error')) end);
253
251
type(code, stick_mod, 1, Xs) ->
254
252
strict(arg_types(code, stick_mod, 1), Xs, fun (_) -> t_atom('true') end);
255
type(code, stop, 0, _) -> t_none();
256
type(code, unstick_dir, 1, Xs) ->
257
type(code, stick_dir, 1, Xs);
258
253
type(code, unstick_mod, 1, Xs) ->
259
254
type(code, stick_mod, 1, Xs);
260
255
type(code, which, 1, Xs) ->
691
686
type(erlang, bitsize, 1, Xs) -> % XXX: TAKE OUT
692
687
type(erlang, bit_size, 1, Xs);
693
688
type(erlang, bit_size, 1, Xs) ->
694
strict(arg_types(erlang, bit_size, 1), Xs, fun (_) -> t_non_neg_integer() end);
689
strict(arg_types(erlang, bit_size, 1), Xs,
690
fun (_) -> t_non_neg_integer() end);
695
691
type(erlang, bitstr_to_list, 1, Xs) -> % XXX: TAKE OUT
696
692
type(erlang, bitstring_to_list, 1, Xs);
697
693
type(erlang, bitstring_to_list, 1, Xs) ->
701
697
strict(arg_types(erlang, bump_reductions, 1), Xs,
702
698
fun (_) -> t_atom('true') end);
703
699
type(erlang, byte_size, 1, Xs) ->
704
strict(arg_types(erlang, byte_size, 1), Xs, fun (_) -> t_non_neg_integer() end);
700
strict(arg_types(erlang, byte_size, 1), Xs,
701
fun (_) -> t_non_neg_integer() end);
705
702
type(erlang, cancel_timer, 1, Xs) ->
706
703
strict(arg_types(erlang, cancel_timer, 1), Xs,
707
704
fun (_) -> t_sup(t_integer(), t_atom('false')) end);
705
type(erlang, characters_to_list, 2, Xs) ->
706
strict(arg_types(erlang, characters_to_list, 2), Xs,
707
fun (_) -> t_string() end);
708
type(erlang, characters_to_utf8, 2, Xs) ->
709
strict(arg_types(erlang, characters_to_list, 2), Xs,
710
fun (_) -> t_binary() end);
708
711
type(erlang, check_process_code, 2, Xs) ->
709
712
strict(arg_types(erlang, check_process_code, 2), Xs,
710
713
fun (_) -> t_bool() end);
712
715
strict(arg_types(erlang, concat_binary, 1), Xs, fun (_) -> t_binary() end);
713
716
type(erlang, date, 0, _) ->
718
type(erlang, decode_packet, 3, Xs) ->
719
strict(arg_types(erlang, decode_packet, 3), Xs,
721
t_sup([t_tuple([t_atom('ok'), t_packet(), t_binary()]),
722
t_tuple([t_atom('more'), t_sup([t_non_neg_integer(),
723
t_atom('undefined')])]),
724
t_tuple([t_atom('error'), t_any()])])
715
726
type(erlang, delete_module, 1, Xs) ->
716
727
strict(arg_types(erlang, delete_module, 1), Xs,
717
728
fun (_) -> t_sup(t_atom('true'), t_atom('undefined')) end);
1080
1091
type(erlang, monitor_node, 3, Xs) ->
1081
1092
strict(arg_types(erlang, monitor_node, 3), Xs,
1082
1093
fun (_) -> t_atom('true') end);
1083
type(erlang, node, 0, _) -> t_atom();
1094
type(erlang, node, 0, _) -> t_node();
1084
1095
type(erlang, node, 1, Xs) ->
1085
strict(arg_types(erlang, node, 1), Xs, fun (_) -> t_atom() end);
1086
type(erlang, nodes, 0, _) -> t_list(t_atom());
1096
strict(arg_types(erlang, node, 1), Xs, fun (_) -> t_node() end);
1097
type(erlang, nodes, 0, _) -> t_list(t_node());
1087
1098
type(erlang, nodes, 1, Xs) ->
1088
strict(arg_types(erlang, nodes, 1), Xs, fun (_) -> t_list(t_atom()) end);
1099
strict(arg_types(erlang, nodes, 1), Xs, fun (_) -> t_list(t_node()) end);
1089
1100
type(erlang, now, 0, _) ->
1091
1102
type(erlang, open_port, 2, Xs) ->
1306
1317
type(erlang, seq_trace_print, 2, Xs) ->
1307
1318
strict(arg_types(erlang, seq_trace_print, 2), Xs, fun (_) -> t_bool() end);
1308
1319
type(erlang, set_cookie, 2, Xs) ->
1309
strict(arg_types(erlang, set_cookie, 2), Xs,
1310
fun (_) -> t_atom('true') end);
1320
strict(arg_types(erlang, set_cookie, 2), Xs, fun (_) -> t_atom('true') end);
1311
1321
type(erlang, setelement, 3, Xs) ->
1312
1322
strict(arg_types(erlang, setelement, 3), Xs,
1313
1323
fun ([X1, X2, X3]) ->
2555
2565
type(os, getpid, 0, _) -> t_string();
2556
2566
type(os, putenv, 2, Xs) ->
2557
2567
strict(arg_types(os, putenv, 2), Xs, fun (_) -> t_atom('true') end);
2568
%%-- re -----------------------------------------------------------------------
2569
type(re, run, 2, Xs) ->
2570
strict(arg_types(re, run, 2), Xs,
2572
t_sup([t_tuple([t_atom('match'), t_re_Captured()]),
2574
t_tuple([t_atom('error'),
2575
t_tuple([t_string(), t_non_neg_integer()])])])
2577
type(re, run, 3, Xs) ->
2578
strict(arg_types(re, run, 3), Xs,
2580
t_sup([t_tuple([t_atom('match'), t_re_Captured()]),
2583
t_tuple([t_atom('error'),
2584
t_tuple([t_string(), t_non_neg_integer()])])])
2558
2586
%%-- string -------------------------------------------------------------------
2559
2587
type(string, chars, 2, Xs) -> % NOTE: added to avoid loss of information
2560
2588
strict(arg_types(string, chars, 2), Xs, fun (_) -> t_string() end);
2995
%% =====================================================================
2997
%% function arg_types returns a list of the demanded argument types for
2998
%% a bif to succeed.
3000
arg_types({M, F, A}) ->
3003
[t_number(), t_number()];
3005
[t_number(), t_number()];
3007
[t_number(), t_number()];
3009
[t_number(), t_number()];
3011
[t_integer(), t_integer()];
3013
[t_integer(), t_integer()];
3014
arg_types('band') ->
3015
[t_integer(), t_integer()];
3017
[t_integer(), t_integer()];
3018
arg_types('bxor') ->
3019
[t_integer(), t_integer()];
3021
[t_integer(), t_integer()];
3023
[t_integer(), t_integer()];
3024
arg_types('bnot') ->
3026
%% arg_types(redtest) ->
3028
arg_types(#element{}) ->
3029
[t_pos_fixnum(), t_tuple()];
3030
%% arg_types({unsafe_element, N}) ->
3033
%% io:format("~w\n", [_BIF]),
3034
any. % safe approximation for all bifs.
3037
3022
%%------- code ----------------------------------------------------------------
3038
3023
arg_types(code, add_path, 1) ->
3040
3025
arg_types(code, add_patha, 1) ->
3041
3026
arg_types(code, add_path, 1);
3042
3027
arg_types(code, add_paths, 1) ->
3028
[t_list(t_string())];
3044
3029
arg_types(code, add_pathsa, 1) ->
3045
3030
arg_types(code, add_paths, 1);
3046
3031
arg_types(code, add_pathsz, 1) ->
3060
3045
arg_types(code, get_chunk, 2) ->
3061
3046
[t_binary(), t_string()];
3062
3047
arg_types(code, get_object_code, 1) ->
3063
[t_any()]; % OBS: currently code:get_object_code(42) returns 'error'
3064
3049
arg_types(code, get_path, 0) ->
3066
3051
arg_types(code, is_loaded, 1) ->
3067
[t_any()]; % OBS: not t_atom(); currently code:is_loaded(42) returns 'false'
3068
3053
arg_types(code, is_sticky, 1) ->
3070
3055
arg_types(code, is_module_native, 1) ->
3100
3085
arg_types(code, root_dir, 0) ->
3102
3087
arg_types(code, set_path, 1) ->
3103
[t_any()]; % OBS: currently code:set_path(42) returns {'error','bad_path'}
3104
3089
arg_types(code, soft_purge, 1) ->
3105
3090
arg_types(code, delete, 1);
3106
arg_types(code, stick_dir, 1) ->
3107
[t_any()]; % OBS: currently code:stick_dir(42) returns 'error'
3108
3091
arg_types(code, stick_mod, 1) ->
3110
arg_types(code, stop, 0) ->
3112
arg_types(code, unstick_dir, 1) ->
3113
arg_types(code, stick_dir, 1);
3114
3093
arg_types(code, unstick_mod, 1) ->
3115
3094
arg_types(code, stick_mod, 1);
3116
3095
arg_types(code, which, 1) ->
3182
3161
arg_types(erlang, '+', 1) ->
3184
3163
arg_types(erlang, '+', 2) ->
3164
[t_number(), t_number()];
3186
3165
arg_types(erlang, '++', 2) ->
3187
3166
[t_list(), t_any()];
3188
3167
arg_types(erlang, '-', 1) ->
3190
3169
arg_types(erlang, '-', 2) ->
3170
[t_number(), t_number()];
3192
3171
arg_types(erlang, '--', 2) ->
3193
3172
[t_list(), t_list()];
3194
3173
arg_types(erlang, '*', 2) ->
3174
[t_number(), t_number()];
3196
3175
arg_types(erlang, '/', 2) ->
3176
[t_number(), t_number()];
3198
3177
arg_types(erlang, 'div', 2) ->
3178
[t_integer(), t_integer()];
3200
3179
arg_types(erlang, 'rem', 2) ->
3201
3180
[t_integer(), t_integer()];
3202
3181
arg_types(erlang, 'and', 2) ->
3254
3233
arg_types(erlang, cancel_timer, 1) ->
3235
arg_types(erlang, characters_to_list, 2) ->
3236
[t_ML(), t_encoding()];
3237
arg_types(erlang, characters_to_utf8, 2) ->
3238
[t_ML(), t_encoding()];
3256
3239
arg_types(erlang, check_process_code, 2) ->
3257
3240
[t_pid(), t_atom()];
3258
3241
arg_types(erlang, concat_binary, 1) ->
3259
3242
[t_list(t_binary())];
3260
3243
arg_types(erlang, date, 0) ->
3245
arg_types(erlang, decode_packet, 3) ->
3246
[t_decode_packet_type(), t_binary(), t_list(t_decode_packet_option())];
3262
3247
arg_types(erlang, delete_module, 1) ->
3264
3249
arg_types(erlang, demonitor, 1) ->
3266
3251
arg_types(erlang, disconnect_node, 1) ->
3268
3253
arg_types(erlang, display, 1) ->
3270
3255
arg_types(erlang, dist_exit, 3) ->
3437
3422
arg_types(erlang, module_loaded, 1) ->
3439
3424
arg_types(erlang, monitor, 2) ->
3440
[t_atom(), t_sup([t_pid(), t_atom(), t_tuple([t_atom(), t_atom()])])];
3425
[t_atom(), t_sup([t_pid(), t_atom(), t_tuple([t_atom(), t_node()])])];
3441
3426
arg_types(erlang, monitor_node, 2) ->
3442
[t_atom(), t_bool()];
3427
[t_node(), t_bool()];
3443
3428
arg_types(erlang, monitor_node, 3) ->
3444
[t_atom(), t_bool(), t_list(t_atom('allow_passive_connect'))];
3429
[t_node(), t_bool(), t_list(t_atom('allow_passive_connect'))];
3445
3430
arg_types(erlang, node, 0) ->
3447
3432
arg_types(erlang, node, 1) ->
3565
3551
arg_types(erlang, spawn, 1) -> %% TODO: Tuple?
3567
3553
arg_types(erlang, spawn, 2) -> %% TODO: Tuple?
3568
[t_atom(), t_fun()];
3554
[t_node(), t_fun()];
3569
3555
arg_types(erlang, spawn, 3) -> %% TODO: Tuple?
3570
3556
[t_atom(), t_atom(), t_list()];
3571
3557
arg_types(erlang, spawn, 4) -> %% TODO: Tuple?
3572
[t_atom(), t_atom(), t_atom(), t_list()];
3558
[t_node(), t_atom(), t_atom(), t_list()];
3573
3559
arg_types(erlang, spawn_link, 1) ->
3574
3560
arg_types(erlang, spawn, 1); % same
3575
3561
arg_types(erlang, spawn_link, 2) ->
3585
3571
arg_types(erlang, spawn_opt, 3) ->
3586
3572
[t_atom(), t_fun(), t_list(t_spawn_options())];
3587
3573
arg_types(erlang, spawn_opt, 4) ->
3588
[t_atom(), t_atom(), t_list(), t_list(t_spawn_options())];
3574
[t_node(), t_atom(), t_list(), t_list(t_spawn_options())];
3589
3575
arg_types(erlang, split_binary, 2) ->
3590
3576
[t_binary(), t_non_neg_integer()];
3591
3577
arg_types(erlang, start_timer, 3) ->
3831
3817
arg_types(gen_tcp, recv, 3) ->
3832
3818
arg_types(gen_tcp, recv, 2) ++ [t_timeout()];
3833
3819
arg_types(gen_tcp, send, 2) ->
3834
[t_socket(), t_gen_tcp_packet()];
3820
[t_socket(), t_packet()];
3835
3821
arg_types(gen_tcp, shutdown, 2) ->
3836
3822
[t_socket(), t_sup([t_atom('read'), t_atom('write'), t_atom('read_write')])];
3837
3823
%%------- gen_udp -------------------------------------------------------------
3844
3830
arg_types(gen_udp, recv, 3) ->
3845
3831
arg_types(gen_tcp, recv, 3);
3846
3832
arg_types(gen_udp, send, 4) ->
3847
[t_socket(), t_gen_tcp_address(), t_gen_tcp_port(), t_gen_tcp_packet()];
3833
[t_socket(), t_gen_tcp_address(), t_gen_tcp_port(), t_packet()];
3848
3834
%%------- hipe_bifs -----------------------------------------------------------
3849
3835
arg_types(hipe_bifs, add_ref, 2) ->
3850
3836
[t_mfa(), t_tuple([t_mfa(),
4186
4174
T_int16, T_int16, T_int16, T_int16])).
4188
4176
%% =====================================================================
4177
%% Some basic types used in various parts of the system
4178
%% =====================================================================
4181
t_tuple([t_pos_fixnum(), t_pos_fixnum(), t_pos_fixnum()]).
4184
t_tuple([t_non_neg_fixnum(), t_non_neg_fixnum(), t_non_neg_fixnum()]).
4187
t_sup([t_binary(), t_iolist(), t_httppacket()]).
4190
t_sup([t_HttpRequest(), t_HttpResponse(),
4191
t_HttpHeader(), t_atom('http_eoh'), t_HttpError()]).
4193
%% =====================================================================
4194
%% HTTP types documented in R12B-4
4195
%% =====================================================================
4198
t_tuple([t_atom('http_request'), t_HttpMethod(), t_HttpUri(), t_HttpVersion()]).
4201
t_tuple([t_atom('http_response'), t_HttpVersion(), t_integer(), t_string()]).
4204
t_tuple([t_atom('http_header'), t_integer(), t_HttpField(), t_any(), t_string()]).
4207
t_tuple([t_atom('http_error'), t_string()]).
4210
t_sup(t_HttpMethodAtom(), t_string()).
4212
t_HttpMethodAtom() ->
4213
t_atoms(['OPTIONS', 'GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'TRACE']).
4217
t_tuple([t_atom('absoluteURI'),
4218
t_sup(t_atom('http'), t_atom('https')),
4220
t_sup(t_non_neg_integer(), t_atom('undefined')),
4222
t_tuple([t_atom('scheme'), t_string(), t_string()]),
4223
t_tuple([t_atom('abs_path'), t_string()]),
4227
t_tuple([t_non_neg_integer(), t_non_neg_integer()]).
4230
t_sup(t_HttpFieldAtom(), t_string()).
4232
t_HttpFieldAtom() ->
4233
t_atoms(['Cache-Control', 'Connection', 'Date', 'Pragma', 'Transfer-Encoding',
4234
'Upgrade', 'Via', 'Accept', 'Accept-Charset', 'Accept-Encoding',
4235
'Accept-Language', 'Authorization', 'From', 'Host',
4236
'If-Modified-Since', 'If-Match', 'If-None-Match', 'If-Range',
4237
'If-Unmodified-Since', 'Max-Forwards', 'Proxy-Authorization',
4238
'Range', 'Referer', 'User-Agent', 'Age', 'Location',
4239
'Proxy-Authenticate', 'Public', 'Retry-After', 'Server', 'Vary',
4240
'Warning', 'Www-Authenticate', 'Allow', 'Content-Base',
4241
'Content-Encoding', 'Content-Language', 'Content-Length',
4242
'Content-Location', 'Content-Md5', 'Content-Range', 'Content-Type',
4243
'Etag', 'Expires', 'Last-Modified', 'Accept-Ranges',
4244
'Set-Cookie', 'Set-Cookie2', 'X-Forwarded-For', 'Cookie',
4245
'Keep-Alive', 'Proxy-Connection']).
4247
%% =====================================================================
4189
4248
%% These are used for the built-in functions of 'code'
4190
4249
%% =====================================================================
4207
4266
%% These are used for the built-in functions of 'erlang'
4208
4267
%% =====================================================================
4269
t_ML() -> %% a possibly deep list of integers or binaries
4270
t_list([t_integer(), t_binary(), t_list()]).
4272
t_decode_packet_option() ->
4273
t_sup([t_tuple([t_atom('packet_size'), t_non_neg_integer()]),
4274
t_tuple([t_atom('line_length'), t_non_neg_integer()])]).
4276
t_decode_packet_type() ->
4277
t_sup(t_inet_setoption_packettype(), t_atom('httph')).
4280
t_sup([t_atom('kill'), t_atom('noconnection'), t_atom('normal')]).
4283
t_sup([t_atom('latin1'), t_atom('unicode')]).
4285
t_match_spec_test_errors() ->
4286
t_list(t_sup(t_tuple([t_atom('error'), t_string()]),
4287
t_tuple([t_atom('warning'), t_string()]))).
4289
t_module_info_2() ->
4290
t_sup([t_atom('module'),
4293
t_atom('functions'),
4294
t_atom('attributes'),
4296
t_atom('native_addresses')]).
4211
4299
t_sup([t_pinfo_item(), t_list(t_pinfo_item())]).
4354
4426
t_atom('type')]).
4356
4428
%% =====================================================================
4357
%% These are used for the built-in functions of 'inet'
4358
%% =====================================================================
4360
t_inet_setoption() ->
4361
t_sup([%% first the 2-tuple options
4362
t_tuple([t_atom('active'), t_sup(t_bool(), t_atom('once'))]),
4363
t_tuple([t_atom('broadcast'), t_bool()]),
4364
t_tuple([t_atom('delay_send'), t_bool()]),
4365
t_tuple([t_atom('dontroute'), t_bool()]),
4366
t_tuple([t_atom('exit_on_close'), t_bool()]),
4367
t_tuple([t_atom('header'), t_non_neg_integer()]),
4368
t_tuple([t_atom('keepalive'), t_bool()]),
4369
t_tuple([t_atom('nodelay'), t_bool()]),
4370
t_tuple([t_atom('packet'), t_inet_setoption_packettype()]),
4371
t_tuple([t_atom('packet_size'), t_non_neg_integer()]),
4372
t_tuple([t_atom('read_packets'), t_non_neg_integer()]),
4373
t_tuple([t_atom('recbuf'), t_non_neg_integer()]),
4374
t_tuple([t_atom('reuseaddr'), t_bool()]),
4375
t_tuple([t_atom('send_timeout'), t_non_neg_integer()]),
4376
t_tuple([t_atom('sndbuf'), t_non_neg_integer()]),
4377
t_tuple([t_atom('priority'), t_non_neg_integer()]),
4378
t_tuple([t_atom('tos'), t_non_neg_integer()]),
4379
%% and a 4-tuple option
4380
t_tuple([t_atom('raw'),
4381
t_non_neg_integer(), % protocol level
4382
t_non_neg_integer(), % option number
4383
t_binary()])]). % actual option value
4385
t_inet_setoption_packettype() ->
4386
t_sup([t_atom('raw'),
4387
t_integers([0,1,2,4]),
4388
t_atom('asn1'), t_atom('cdr'), t_atom('sunrm'),
4389
t_atom('fcgi'), t_atom('tpkt'), t_atom('line')]).
4391
t_inet_posix_error() ->
4392
t_atom(). %% XXX: Very underspecified
4394
%% =====================================================================
4395
4429
%% These are used for the built-in functions of 'file'
4396
4430
%% =====================================================================
4398
4432
t_file_io_data() ->
4400
%% IoList() = [char() | binary() | IoList()] -- approximation below
4402
t_maybe_improper_list()]).
4433
t_sup([t_binary(), t_iolist()]).
4404
4435
t_file_io_device() ->
4405
t_sup(t_pid(), t_tuple([t_atom('file_descriptor'), t_any(), t_any()])).
4436
t_sup(t_pid(), t_tuple([t_atom('file_descriptor'), t_atom(), t_any()])).
4407
4438
t_file_name() ->
4408
4439
t_sup([t_atom(),
4565
4586
t_atom('closure')]).
4567
4588
%% =====================================================================
4589
%% These are used for the built-in functions of 'inet'
4590
%% =====================================================================
4592
t_inet_setoption() ->
4593
t_sup([%% first the 2-tuple options
4594
t_tuple([t_atom('active'), t_sup(t_bool(), t_atom('once'))]),
4595
t_tuple([t_atom('broadcast'), t_bool()]),
4596
t_tuple([t_atom('delay_send'), t_bool()]),
4597
t_tuple([t_atom('dontroute'), t_bool()]),
4598
t_tuple([t_atom('exit_on_close'), t_bool()]),
4599
t_tuple([t_atom('header'), t_non_neg_integer()]),
4600
t_tuple([t_atom('keepalive'), t_bool()]),
4601
t_tuple([t_atom('nodelay'), t_bool()]),
4602
t_tuple([t_atom('packet'), t_inet_setoption_packettype()]),
4603
t_tuple([t_atom('packet_size'), t_non_neg_integer()]),
4604
t_tuple([t_atom('read_packets'), t_non_neg_integer()]),
4605
t_tuple([t_atom('recbuf'), t_non_neg_integer()]),
4606
t_tuple([t_atom('reuseaddr'), t_bool()]),
4607
t_tuple([t_atom('send_timeout'), t_non_neg_integer()]),
4608
t_tuple([t_atom('sndbuf'), t_non_neg_integer()]),
4609
t_tuple([t_atom('priority'), t_non_neg_integer()]),
4610
t_tuple([t_atom('tos'), t_non_neg_integer()]),
4611
%% and a 4-tuple option
4612
t_tuple([t_atom('raw'),
4613
t_non_neg_integer(), % protocol level
4614
t_non_neg_integer(), % option number
4615
t_binary()])]). % actual option value
4617
t_inet_setoption_packettype() ->
4618
t_sup([t_atom('raw'),
4619
t_integers([0,1,2,4]),
4620
t_atom('asn1'), t_atom('cdr'), t_atom('sunrm'),
4621
t_atom('fcgi'), t_atom('tpkt'), t_atom('line'),
4622
t_atom('http')]). %% but t_atom('httph') is not needed
4624
t_inet_posix_error() ->
4625
t_atom(). %% XXX: Very underspecified
4627
%% =====================================================================
4568
4628
%% These are used for the built-in functions of 'io'
4569
4629
%% =====================================================================
4578
4638
t_sup([t_atom(), t_list(), t_binary()]).
4580
4640
%% =====================================================================
4641
%% These are used for the built-in functions of 're'; the functions
4642
%% whose last name component starts with a capital letter are types
4643
%% =====================================================================
4645
t_re_MP() -> %% it's supposed to be an opaque data type
4646
t_tuple([t_atom('re_pattern'), t_integer(), t_integer(), t_binary()]).
4649
t_sup(t_re_MP(), t_file_io_data()).
4651
t_re_compile_option() ->
4652
t_sup([t_atoms(['anchored', 'caseless', 'dollar_endonly', 'dotall',
4653
'extended', 'firstline', 'multiline', 'no_auto_capture',
4654
'dupnames', 'ungreedy']),
4655
t_tuple([t_atom('newline'), t_re_NLSpec()])]).
4657
t_re_run_option() ->
4658
t_sup([t_atoms(['anchored', 'global', 'notbol', 'noteol', 'notempty']),
4659
t_tuple([t_atom('offset'), t_integer()]),
4660
t_tuple([t_atom('newline'), t_re_NLSpec()]),
4661
t_tuple([t_atom('capture'), t_re_ValueSpec()]),
4662
t_tuple([t_atom('capture'), t_re_ValueSpec(), t_re_Type()]),
4663
t_re_compile_option()]).
4666
t_atoms(['index', 'list', 'binary']).
4669
t_atoms(['cr', 'crlf', 'lf', 'anycrlf']).
4672
t_sup(t_atoms(['all', 'all_but_first', 'first']), t_re_ValueList()).
4675
t_list(t_sup([t_integer(), t_string(), t_atom()])).
4678
t_list(t_sup(t_re_CapturedData(), t_list(t_re_CapturedData()))).
4680
t_re_CapturedData() ->
4681
t_sup([t_tuple([t_integer(), t_integer()]), t_string(), t_binary()]).
4684
%% =====================================================================
4581
4685
%% Some testing code for ranges below
4582
4686
%% =====================================================================