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
24c39c6e
Commit
24c39c6e
authored
14 years ago
by
ilor
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of nlp.pwr.wroc.pl:wccl
parents
a99edd7b
fe784bbd
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libwccl/parser/grammar.g
+12
-15
12 additions, 15 deletions
libwccl/parser/grammar.g
with
12 additions
and
15 deletions
libwccl/parser/grammar.g
+
12
−
15
View file @
24c39c6e
header {
//don't try to add all the headers inside our namespace
// ANTLR_END_NAMESPACE
#include <libwccl/parser/ParserException.h>
#include <cstdio>
...
...
@@ -48,6 +51,9 @@ header {
//
#include <libwccl/parser/ANTLRParserResult.h>
// start our namespace again
// ANTLR_BEGIN_NAMESPACE(Wccl)
}
options {
...
...
@@ -348,17 +354,11 @@ relpos
[const Corpus2::Tagset& tagset, Wccl::Variables& vars]
returns [boost::shared_ptr<Wccl::Function<Wccl::Position> > ret]
{
int n = 0;
boost::shared_ptr<Wccl::Function<Wccl::Position> > pos;
}
: "relpos"
LPAREN
pos = op_position [tagset, vars] ("+" | "-") ofst: UNSIGNED_INT
RPAREN {
ret.reset(new Wccl::RelativePosition(
pos,
token_ref_to_int(ofst)
)
);
: "relpos" LPAREN pos = op_position [tagset, vars] COMMA n = number RPAREN {
ret.reset(new Wccl::RelativePosition(pos, n));
}
;
...
...
@@ -598,7 +598,7 @@ op_position
: op = position_variable [vars]
| op = position_value
| op = relpos [tagset, vars]
//
| op = condit_position [tagset, vars]
| op = condit_position [tagset, vars]
;
// ----------------------------------------------------------------------------
...
...
@@ -869,6 +869,7 @@ lpred_eq
}
: "equal" LPAREN
(
(position_operators [tagset, vars]) =>
(
p1 = position_operators [tagset, vars] COMMA
p2 = position_operators [tagset, vars] {
...
...
@@ -960,15 +961,12 @@ condit_bool
// ----------------------------------------------------------------------------
// if (Bool, Position, Position)
// ? Position ? Bool : 0
/* Not implemented yet
*/
/*
condit_position
[const Corpus2::Tagset& tagset, Wccl::Variables& vars]
returns [boost::shared_ptr<Wccl::Function<Wccl::Position> > op]
{
boost::shared_ptr<Wccl::Function<Wccl::Bool> > test;
boost::shared_ptr<Wccl::Function<Wccl::
Bool
> > p_true, p_false;
boost::shared_ptr<Wccl::Function<Wccl::
Position
> > p_true, p_false;
}
: "if" LPAREN test = logical_predicates [tagset, vars] COMMA
p_true = position_operators [tagset, vars]
...
...
@@ -988,7 +986,6 @@ condit_position
op.reset(new Wccl::Conditional<Wccl::Position>(test, p_true));
}
;
*/
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
...
...
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