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
c5dd1dfd
Commit
c5dd1dfd
authored
13 years ago
by
Adam Wardynski
Browse files
Options
Downloads
Patches
Plain Diff
change match_value to match_literal etc. for consistency with literals of other types.
parent
86028bba
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libwccl/parser/grammar.g
+18
-17
18 additions, 17 deletions
libwccl/parser/grammar.g
with
18 additions
and
17 deletions
libwccl/parser/grammar.g
+
18
−
17
View file @
c5dd1dfd
...
...
@@ -408,12 +408,12 @@ position_value
// ----------------------------------------------------------------------------
// Value used into match operator such as TOK[position] and ANN[position, name]
// Returns boost::shared_ptr<Match>
match_
value
match_
literal
returns [boost::shared_ptr<Match> val]
{
boost::shared_ptr<MatchData> m;
}
: m = match_data_
value
{
: m = match_data_
literal
{
val.reset(new Match(m));
}
;
...
...
@@ -425,7 +425,7 @@ match_value_const
{
boost::shared_ptr<Match> m;
}
: m = match_
value
{
: m = match_
literal
{
val.reset(new Constant<Match>(*m));
}
;
...
...
@@ -433,16 +433,16 @@ match_value_const
// ----------------------------------------------------------------------------
// Value used into match operator such as TOK[position] and ANN[position, name]
// Returns boost::shared_ptr<MatchData>
match_data_
value
match_data_
literal
returns [boost::shared_ptr<MatchData> val]
: val = token_match_
value
| val = ann_match_
value
| val = match_vector_
value
: val = token_match_
literal
| val = ann_match_
literal
| val = match_vector_
literal
;
// token match
value
// token match
literal - TOK[position]
// Returns boost::shared_ptr<TokenMatch>
token_match_
value
token_match_
literal
returns [boost::shared_ptr<TokenMatch> val]
{
boost::shared_ptr<Position> p;
...
...
@@ -452,9 +452,9 @@ token_match_value
}
;
// annotation match
value
// annotation match
literal - ANN[position, name]
// Returns boost::shared_ptr<AnnotationMatch>
ann_match_
value
ann_match_
literal
returns [boost::shared_ptr<AnnotationMatch> val]
{
boost::shared_ptr<Position> p;
...
...
@@ -464,28 +464,28 @@ ann_match_value
}
;
// annotation match vector: MATCH() or MATCH(token, ann, MATCH())
// annotation match vector
literal
: MATCH() or MATCH(token, ann, MATCH())
// Returns boost::shared_ptr<MatchVector>
match_vector_
value
match_vector_
literal
returns [boost::shared_ptr<MatchVector> val]
{
val.reset(new MatchVector());
}
: "MATCH" LPAREN (match_vector_
value
_item[val])? RPAREN
: "MATCH" LPAREN (match_vector_
literal
_item[val])? RPAREN
;
// Body of the MATCH value. It only adds vector items to the MatchVector
// Item may be single or multiple
match_vector_
value
_item [boost::shared_ptr<MatchVector>& mvector]
match_vector_
literal
_item [boost::shared_ptr<MatchVector>& mvector]
{
boost::shared_ptr<Match> m_val;
}
: m_val = match_
value
{
: m_val = match_
literal
{
mvector->append(m_val);
}
(
COMMA
m_val = match_
value
{
m_val = match_
literal
{
mvector->append(m_val);
}
)*
...
...
@@ -1998,6 +1998,7 @@ match_action_comma_sep
)*
;
// Function<Match> is wrapper for Constant<Match> and Function<Match>
// Returns boost::shared_ptr<Function<Match> >
match_fit
...
...
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