diff options
author | gbrandl <devnull@localhost> | 2006-12-06 17:18:29 +0100 |
---|---|---|
committer | gbrandl <devnull@localhost> | 2006-12-06 17:18:29 +0100 |
commit | 81cda8afbbec34f3e42461bdb4e57763797666f2 (patch) | |
tree | 1effcd341b1ca1dde89e6c15a50434eff369820c /docs | |
parent | df7babfb407364329c891878c73fa1d9c0e390ef (diff) | |
download | pygments-81cda8afbbec34f3e42461bdb4e57763797666f2.tar.gz |
[svn] Little grammar restructuring.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/src/lexerdevelopment.txt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/src/lexerdevelopment.txt b/docs/src/lexerdevelopment.txt index cffb4dd0..d7ab3923 100644 --- a/docs/src/lexerdevelopment.txt +++ b/docs/src/lexerdevelopment.txt @@ -135,10 +135,11 @@ group (a ``(...)``), and there must not be any nested capturing groups. If you nevertheless need a group, use a non-capturing group defined using this syntax: ``r'(?:some|words|here)'`` (note the ``?:`` after the beginning parenthesis). -Sometimes it could be that you need a position group inside the regex which +If you find yourself needing a capturing group inside the regex which shouldn't be part of the output but is used in the regular expressions for -matching the group twice (eg: ``r'(<(foo|bar)>)(.*?)(</\2>)'``). In such a -case you can pass `None` to the bygroups function and it will skip that match. +backreferencing (eg: ``r'(<(foo|bar)>)(.*?)(</\2>)'``), you can pass `None` +to the bygroups function and it will skip that group will be skipped in the +output. Changing states |