Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LDI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Grant Weddell
LDI
Commits
d6b263fc
Commit
d6b263fc
authored
5 years ago
by
w328li
Browse files
Options
Downloads
Patches
Plain Diff
fix create_and_operator error
parent
d00a16cc
No related branches found
No related tags found
1 merge request
!5
Dev Merge into Master
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
SQLPParser_new
+0
-0
0 additions, 0 deletions
SQLPParser_new
util_new.c
+5
-2
5 additions, 2 deletions
util_new.c
with
5 additions
and
2 deletions
SQLPParser_new
+
0
−
0
View file @
d6b263fc
No preview for this file type
This diff is collapsed.
Click to expand it.
util_new.c
+
5
−
2
View file @
d6b263fc
...
...
@@ -85,6 +85,7 @@ cons_cell* create_op(char *op) {
// todo: why need ra
cons_cell
*
create_comp_operator
(
cons_cell
*
op
,
cons_cell
*
term1
,
cons_cell
*
term2
,
cons_cell
*
ra
)
{
cons_cell
*
ra_cons
=
create_cons_cell
(
ra
,
NULL
);
cons_cell
*
term2_cons
=
create_cons_cell
(
term2
,
ra_cons
);
cons_cell
*
term1_cons
=
create_cons_cell
(
term1
,
term2_cons
);
...
...
@@ -103,7 +104,6 @@ cons_cell* create_atom_operator(cons_cell* table, cons_cell* var) {
return
operator_cons
;
}
// todo: why pass NULL
cons_cell
*
create_union_all_operator
(
cons_cell
*
ra1
,
cons_cell
*
ra2
)
{
cons_cell
*
ra2_cons
=
create_cons_cell
(
ra2
,
NULL
);
cons_cell
*
ra1_cons
=
create_cons_cell
(
ra1
,
ra2_cons
);
...
...
@@ -121,6 +121,7 @@ cons_cell* create_union_operator(cons_cell* ra1, cons_cell* ra2) {
}
cons_cell
*
create_and_operator
(
cons_cell
*
ra1
,
cons_cell
*
ra2
)
{
printf
(
"create_and_operator called
\n
"
);
cons_cell
*
ra2_cons
=
create_cons_cell
(
ra2
,
NULL
);
cons_cell
*
ra1_cons
=
create_cons_cell
(
ra1
,
ra2_cons
);
char
operator
[
4
]
=
"AND
\0
"
;
...
...
@@ -219,10 +220,12 @@ void print_cons_tree_helper(cons_cell *root, int indent) {
}
printf
(
"%s"
,
((
atom
*
)
root
->
car
)
->
val
);
printf
(
"
\n
"
);
// printf("one\n");
print_cons_tree_helper
(
root
->
cdr
,
indent
+
1
);
}
else
{
// printf("two\n");
print_cons_tree_helper
((
cons_cell
*
)
root
->
car
,
indent
);
// printf("three\n");
print_cons_tree_helper
(
root
->
cdr
,
indent
);
}
}
...
...
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