Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
3e51ae49
Commit
3e51ae49
authored
15 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Fix some comments that got mangled by pgindent.
parent
85d67ccd
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/backend/regex/regcomp.c
+21
-11
21 additions, 11 deletions
src/backend/regex/regcomp.c
with
21 additions
and
11 deletions
src/backend/regex/regcomp.c
+
21
−
11
View file @
3e51ae49
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
* $PostgreSQL: pgsql/src/backend/regex/regcomp.c,v 1.4
6
20
08/02/14 17:33:37
tgl Exp $
* $PostgreSQL: pgsql/src/backend/regex/regcomp.c,v 1.4
7
20
10/01/30 04:18:00
tgl Exp $
*
*
*/
*/
...
@@ -1012,8 +1012,10 @@ parseqatom(struct vars * v,
...
@@ -1012,8 +1012,10 @@ parseqatom(struct vars * v,
}
}
/*
/*
* hard part: something messy That is, capturing parens, back reference,
* hard part: something messy
* short/long clash, or an atom with substructure containing one of those.
*
* That is, capturing parens, back reference, short/long clash, or an atom
* with substructure containing one of those.
*/
*/
/* now we'll need a subre for the contents even if they're boring */
/* now we'll need a subre for the contents even if they're boring */
...
@@ -1023,13 +1025,15 @@ parseqatom(struct vars * v,
...
@@ -1023,13 +1025,15 @@ parseqatom(struct vars * v,
NOERR
();
NOERR
();
}
}
/*
/*
----------
*
p
repare a general-purpose state skeleton
*
P
repare a general-purpose state skeleton
.
*
*
* ---> [s] ---prefix---> [begin] ---atom---> [end] ----rest---> [rp] / /
* ---> [s] ---prefix---> [begin] ---atom---> [end] ----rest---> [rp]
* / /
* [lp] ----> [s2] ----bypass---------------------
* [lp] ----> [s2] ----bypass---------------------
*
*
* where bypass is an empty, and prefix is some repetitions of atom
* where bypass is an empty, and prefix is some repetitions of atom
*----------
*/
*/
s
=
newstate
(
v
->
nfa
);
/* first, new endpoints for the atom */
s
=
newstate
(
v
->
nfa
);
/* first, new endpoints for the atom */
s2
=
newstate
(
v
->
nfa
);
s2
=
newstate
(
v
->
nfa
);
...
@@ -1050,6 +1054,7 @@ parseqatom(struct vars * v,
...
@@ -1050,6 +1054,7 @@ parseqatom(struct vars * v,
t
=
subre
(
v
,
'.'
,
COMBINE
(
qprefer
,
atom
->
flags
),
lp
,
rp
);
t
=
subre
(
v
,
'.'
,
COMBINE
(
qprefer
,
atom
->
flags
),
lp
,
rp
);
t
->
left
=
atom
;
t
->
left
=
atom
;
atomp
=
&
t
->
left
;
atomp
=
&
t
->
left
;
/* here we should recurse... but we must postpone that to the end */
/* here we should recurse... but we must postpone that to the end */
/* split top into prefix and remaining */
/* split top into prefix and remaining */
...
@@ -1064,9 +1069,12 @@ parseqatom(struct vars * v,
...
@@ -1064,9 +1069,12 @@ parseqatom(struct vars * v,
assert
(
atom
->
begin
->
nouts
==
1
);
/* just the EMPTY */
assert
(
atom
->
begin
->
nouts
==
1
);
/* just the EMPTY */
delsub
(
v
->
nfa
,
atom
->
begin
,
atom
->
end
);
delsub
(
v
->
nfa
,
atom
->
begin
,
atom
->
end
);
assert
(
v
->
subs
[
subno
]
!=
NULL
);
assert
(
v
->
subs
[
subno
]
!=
NULL
);
/* and here's why the recursion got postponed: it must */
/* wait until the skeleton is filled in, because it may */
/*
/* hit a backref that wants to copy the filled-in skeleton */
* And here's why the recursion got postponed: it must wait until the
* skeleton is filled in, because it may hit a backref that wants to
* copy the filled-in skeleton.
*/
dupnfa
(
v
->
nfa
,
v
->
subs
[
subno
]
->
begin
,
v
->
subs
[
subno
]
->
end
,
dupnfa
(
v
->
nfa
,
v
->
subs
[
subno
]
->
begin
,
v
->
subs
[
subno
]
->
end
,
atom
->
begin
,
atom
->
end
);
atom
->
begin
,
atom
->
end
);
NOERR
();
NOERR
();
...
@@ -1108,8 +1116,10 @@ parseqatom(struct vars * v,
...
@@ -1108,8 +1116,10 @@ parseqatom(struct vars * v,
}
}
else
else
{
{
/* turn x{m,n} into x{m-1,n-1}x, with capturing */
/*
/* parens in only second x */
* Turn x{m,n} into x{m-1,n-1}x, with capturing parens in only the
* second x
*/
dupnfa
(
v
->
nfa
,
atom
->
begin
,
atom
->
end
,
s
,
atom
->
begin
);
dupnfa
(
v
->
nfa
,
atom
->
begin
,
atom
->
end
,
s
,
atom
->
begin
);
assert
(
m
>=
1
&&
m
!=
INFINITY
&&
n
>=
1
);
assert
(
m
>=
1
&&
m
!=
INFINITY
&&
n
>=
1
);
repeat
(
v
,
s
,
atom
->
begin
,
m
-
1
,
(
n
==
INFINITY
)
?
n
:
n
-
1
);
repeat
(
v
,
s
,
atom
->
begin
,
m
-
1
,
(
n
==
INFINITY
)
?
n
:
n
-
1
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment