163regexp(
RegExp,
String,
Opts)
:-
166 check_opts(
Opts,
0,
IOpts,regexp(
RegExp,
String,
Opts)),
167 check_regexp(
RegExp,
LRE,
String,
LS,
IOpts).
169regexp(
RegExp,
String,
Opts,
OUT)
:-
172 check_out(
OUT,
0,
Count,regexp(
RegExp,
String,
Opts,
OUT)),
173 check_opts(
Opts,
0,
IOpts,regexp(
RegExp,
String,
Opts,
OUT)),
174 check_regexp(
RegExp,
LRE,
String,
LS,
IOpts,
OUT,
Count).
180check_out(
V,
_,
_,
_)
:- var(
V),
var.
181check_out([],
I,
I,
_)
:- check_out.
182check_out([
V|L],
I0,
IF,
G)
:- check_out,
183 (
nonvar(
V)
-> throw(error(uninstantiation_error(
V),
G))
; throw),
186check_out(
OUT,
_,
_,
G)
:-
187 throw(error(uninstantiation_error(
OUT),
G)).
192check_opts(
V,
_,
_,
G)
:- var(
V),
var,
193 throw(error(instantiation_error,
G)).
194check_opts([],
I,
I,
_)
:- check_opts.
195check_opts([
A|L],
I0,
IF,
G)
:- check_opts,
198 check_opts(
L,
I,
IF,
G).
199check_opts(
Opts,
_,
_,
G)
:-
200 throw(error(type_error(variable,
Opts),
G)).
202process_opt(
V,
_,
G)
:- var(
V),
var,
203 throw(error(instantiation_error,
G)).
204process_opt(nocase,
1,
_)
:- process_opt.
205process_opt(indices,
2,
_)
:- process_opt.
207 throw(error(domain_error(flag_value,regexp_options
+I),
G)).
211
load_foreign_files( Files, Libs, InitRoutine)
regexp(+ RegExp,+ String,+ Opts)
regexp(+ RegExp,+ String,+ Opts,? SubMatchVars)