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
9f9bef4d
Commit
9f9bef4d
authored
14 years ago
by
Adam Wardynski
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into win32-compat
parents
9c49566b
ccb85ebf
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
+9
-19
9 additions, 19 deletions
libwccl/parser/grammar.g
with
9 additions
and
19 deletions
libwccl/parser/grammar.g
+
9
−
19
View file @
9f9bef4d
...
@@ -538,11 +538,16 @@ symset_condition
...
@@ -538,11 +538,16 @@ symset_condition
position_operator
position_operator
[const Corpus2::Tagset& tagset, Variables& vars]
[const Corpus2::Tagset& tagset, Variables& vars]
returns [boost::shared_ptr<Function<Position> > ret]
returns [boost::shared_ptr<Function<Position> > ret]
:
ret = position_var_val [vars]
:
|
ret = position_
relpos [tagset,
vars]
(
ret = position_
var_val [
vars]
| ret = position_condition [tagset, vars]
| ret = position_condition [tagset, vars]
//
| LPAREN ret = position_operator [tagset, vars] RPAREN
| LPAREN ret = position_operator [tagset, vars] RPAREN
)
( // if there is SIGNED_INT after the position, it is actually a relative position
i: SIGNED_INT {
ret.reset(new RelativePosition(ret, token_ref_to_int(i)));
}
)?
;
;
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
...
@@ -554,21 +559,6 @@ position_var_val
...
@@ -554,21 +559,6 @@ position_var_val
| ret = position_variable [vars]
| ret = position_variable [vars]
;
;
// ----------------------------------------------------------------------------
// Realtive position operator.
// TODO 2+2, actually relative gets position is possible only as relpos(...,...)
position_relpos
[const Corpus2::Tagset& tagset, Variables& vars]
returns [boost::shared_ptr<Function<Position> > ret]
{
int n = 0;
boost::shared_ptr<Function<Position> > pos;
}
: "relpos" LPAREN pos = position_operator [tagset, vars] COMMA n = number RPAREN {
ret.reset(new RelativePosition(pos, n));
}
;
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// Condition of the position value
// Condition of the position value
// if (Bool, Position, Position)
// if (Bool, Position, Position)
...
@@ -1089,7 +1079,7 @@ SIGNED_INT
...
@@ -1089,7 +1079,7 @@ SIGNED_INT
options {
options {
paraphrase = "Signed integer";
paraphrase = "Signed integer";
}
}
: ('-'|'+') ('0'..'9')+
: ('-'|'+')
(' '!|'\t'!)*
('0'..'9')+
;
;
UNSIGNED_INT
UNSIGNED_INT
...
...
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