Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r77750:bf714a418f74 Date: 2015-06-02 10:25 +0200 http://bitbucket.org/pypy/pypy/changeset/bf714a418f74/
Log: Quickly mention rsre, and note that the `parsing' module's regexps are different. diff --git a/rpython/doc/rlib.rst b/rpython/doc/rlib.rst --- a/rpython/doc/rlib.rst +++ b/rpython/doc/rlib.rst @@ -157,6 +157,20 @@ produce a loop in the resulting flow graph but will unroll the loop instead. +rsre +---- + +The implementation of regular expressions we use for PyPy. Note that it +is hard to reuse in other languages: in Python, regular expressions are +first compiled into a bytecode format by pure Python code from the +standard library. This lower-level module only understands this +bytecode format. Without a complete Python interpreter you can't +translate the regexp syntax to the bytecode format. (There are hacks +for limited use cases where you have only static regexps: they can be +precompiled during translation. Alternatively, you could imagine +executing a Python subprocess just to translate a regexp at runtime...) + + parsing ------- @@ -177,7 +191,8 @@ ------------------- The regular expression syntax is mostly a subset of the syntax of the `re`_ -module. By default, non-special characters match themselves. If you concatenate +module. *Note: this is different from rlib.rsre.* +By default, non-special characters match themselves. If you concatenate regular expressions the result will match the concatenation of strings matched by the single regular expressions. _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit