From mantoniotti@common-lisp.net Sat Dec 29 15:54:21 2012 From: CVS User mantoniotti To: cl-unification-cvs@common-lisp.net Subject: [cl-unification-cvs] CVS cl-unification/docs/html Date: Sat, 29 Dec 2012 15:54:21 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8971141483086176739==" --===============8971141483086176739== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Update of /project/cl-unification/cvsroot/cl-unification/docs/html In directory tiger.common-lisp.net:/tmp/cvs-serv23922/docs/html Added Files: regular-expression-template.html=20 Log Message: File added. --- /project/cl-unification/cvsroot/cl-unification/docs/html/regular-expressi= on-template.html 2012/12/29 23:54:21 NONE +++ /project/cl-unification/cvsroot/cl-unification/docs/html/regular-expressi= on-template.html 2012/12/29 23:54:21 1.1 CL Unification: Class REGULAR-EXPRESSION-TEMPLATE =09 =20 =20 =20 =20
CL Unification: Class REGULAR-EXPRESSION-TEMPLATE<= /strong>
 
=09

Class REGULAR-EXPRESSION-TEMPLATE

Package:

COMMON-LISP.EXTENSIONS.DATA-AND-CONTROL-FLOW.UNIFICATION

Class Precedence List:

REGULAR-EXPRESSION-TEMPLATE, STRING-TEMPLATE, VECTOR-TEMPLATE, SEQUENCE-TEMPLATE, ARRAY-TEMPLATE, TYPE-TEMPLATE, TEMPLATE, STANDARD-OBJECT, T.

Known Subclasses:

None.

Slots:

None documented.

Description:

The REGULAR-EXPRESSION-TEMPLATE class denotes regular expressions (the CL-PPCRE regular expressions) that are used to unify against a STRING.

Template Syntax:

The spec syntax for a REGULAR-EXPRESSION-TEMPLATE is the following:

  #T(regular-expression REGEXP &optional unification-var=
s &rest keys)
  #T(regexp REGEXP &optional unification-vars &r=
est keys)
    
where
  REGEXP           ::=3D <a CL-PPCRE regexp string or tree>
  unification-vars ::=3D '(' variable* ')'
  keys             ::=3D <CL-PPCRE (constant) keys to be pas=
sed to CL-PPCRE:CREATE-SCANNER>
    

regular-expression and regexp are interchangeable. The unification-vars, if present, are unified (i.e., associated) with each group returned by the scanner created by CL-PPCRE:CREATE-SCANNER. The scanner is called by the appropriate UNIFY metho= d.

Examples:

  cl-prompt> (unify "abcbca" #T(regexp "a(bc)*a"))
  #<ENVIRONMENT xxx>
 =20
  cl-prompt> (unify #T(regexp "a(cb)*a" (?foo)) "acbcba")
  #<ENVIRONMENT xyz>

  cl-prompt> (find-variable-value '?foo *)
  "cb"
  T
  

Affected By:

None.

Exceptional Situations:

Unifying an REGULAR-EXPRESSION-TEMPLATE against a non-STRING object resu= lts in an UNIFICATION-FAILURE error being signaled.

See Also:

UNIFY

Notes:

The underlying implementation uses CL-PPCRE.

 
=09
 
© 2003-2013, Marco Antoniotti, all rights reserved.
--===============8971141483086176739==--