Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WCCL
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Analysers
WCCL
Commits
47a70582
Commit
47a70582
authored
14 years ago
by
Adam Wardynski
Browse files
Options
Downloads
Patches
Plain Diff
to_string for llook now writes right pos first.
parent
0b8578f7
Branches
Branches containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libwccl/ops/functions/bool/iterations/leftlook.cpp
+20
-0
20 additions, 0 deletions
libwccl/ops/functions/bool/iterations/leftlook.cpp
libwccl/ops/functions/bool/iterations/leftlook.h
+15
-0
15 additions, 0 deletions
libwccl/ops/functions/bool/iterations/leftlook.h
with
35 additions
and
0 deletions
libwccl/ops/functions/bool/iterations/leftlook.cpp
+
20
−
0
View file @
47a70582
...
@@ -17,4 +17,24 @@ bool LeftLook::iterate(
...
@@ -17,4 +17,24 @@ bool LeftLook::iterate(
return
false
;
return
false
;
}
}
std
::
string
LeftLook
::
to_string
(
const
Corpus2
::
Tagset
&
tagset
)
const
{
std
::
ostringstream
ss
;
ss
<<
name
(
tagset
)
<<
"("
<<
right_pos_expr_
->
to_string
(
tagset
)
<<
", "
<<
left_pos_expr_
->
to_string
(
tagset
)
<<
", "
<<
Position
::
var_repr
(
iter_var_acc_
.
get_name
())
<<
", "
<<
evaluating_expr_
->
to_string
(
tagset
)
<<
")"
;
return
ss
.
str
();
}
std
::
ostream
&
LeftLook
::
write_to
(
std
::
ostream
&
os
)
const
{
return
os
<<
raw_name
()
<<
"("
<<
*
right_pos_expr_
<<
", "
<<
*
left_pos_expr_
<<
", "
<<
Position
::
var_repr
(
iter_var_acc_
.
get_name
())
<<
", "
<<
*
evaluating_expr_
<<
")"
;
}
}
/* end ns Wccl */
}
/* end ns Wccl */
This diff is collapsed.
Click to expand it.
libwccl/ops/functions/bool/iterations/leftlook.h
+
15
−
0
View file @
47a70582
...
@@ -29,6 +29,12 @@ public:
...
@@ -29,6 +29,12 @@ public:
return
"llook"
;
return
"llook"
;
}
}
/**
* @returns String reperesentation of LeftLook Operator:
* llook(right_pos_expr, left_pos_expr, variable, eval_expr, min_matches)
*/
std
::
string
to_string
(
const
Corpus2
::
Tagset
&
tagset
)
const
;
protected
:
protected
:
/**
/**
* @returns True if, when scanning right-to-left,
* @returns True if, when scanning right-to-left,
...
@@ -46,6 +52,15 @@ protected:
...
@@ -46,6 +52,15 @@ protected:
int
right
,
int
right
,
Position
&
p
,
Position
&
p
,
const
FunExecContext
&
context
)
const
;
const
FunExecContext
&
context
)
const
;
/**
* Writes raw string reperesentation of LeftLook operator, in form of
* llook(raw_right_p_expr, raw_left_p_expr, var, raw_eval_expr, min_matches)
* @note This version doesn't require a Tagset, but may
* be incomplete and/or contain internal info.
* @returns Stream written to.
*/
std
::
ostream
&
write_to
(
std
::
ostream
&
ostream
)
const
;
};
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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