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
37faf56d
Commit
37faf56d
authored
14 years ago
by
Paweł Kędzia
Browse files
Options
Downloads
Patches
Plain Diff
Added Constant<Match> rule
parent
aed34fdf
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libwccl/parser/grammar.g
+16
-3
16 additions, 3 deletions
libwccl/parser/grammar.g
with
16 additions
and
3 deletions
libwccl/parser/grammar.g
+
16
−
3
View file @
37faf56d
...
...
@@ -78,6 +78,7 @@ header {
#include <libwccl/ops/match/conditions/optionalmatch.h>
#include <libwccl/ops/match/conditions/repeatedmatch.h>
#include <libwccl/ops/match/conditions/conjconditions.h>
#include <libwccl/ops/match/actions/markmatch.h>
// Unicode String
#include <unicode/uniset.h>
...
...
@@ -417,6 +418,18 @@ match_value
}
;
// Constant match value
// Returns boost::shared_ptr<Constant<Match> >
match_value_const
returns [boost::shared_ptr<Constant<Match> > val]
{
boost::shared_ptr<Match> m;
}
: m = match_value {
val.reset(new Constant<Match>(*m));
}
;
// ----------------------------------------------------------------------------
// Value used into match operator such as TOK[position] and ANN[position, name]
// Returns boost::shared_ptr<MatchData>
...
...
@@ -434,7 +447,7 @@ token_match_value
{
boost::shared_ptr<Position> p;
}
: "TOK"LBRACKET p = position_literal RBRACKET {
: "TOK"
LBRACKET p = position_literal RBRACKET {
val.reset(new TokenMatch(*p));
}
;
...
...
@@ -1927,10 +1940,10 @@ match_action
;
// Match mark action
// Returns
???
// Returns
match_mark_action
[const Corpus2::Tagset& tagset, Variables& vars]
returns [boost::shared_ptr<Ma
tchAction
> m_act]
returns [boost::shared_ptr<Ma
rkMatch
> m_act]
: "mark" LPAREN /* TODO */ RPAREN
;
...
...
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