Fleet  0.0.9
Inference in the LOT
Classes | Typedefs | Variables
MyGrammar.h File Reference
#include <vector>
#include <functional>
#include "Grammar.h"
#include "Singleton.h"
Include dependency graph for MyGrammar.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  MyGrammar
 
More...
 

Typedefs

using TSeq = std::vector< BindingTree * >
 
using TtoT = std::function< BindingTree *(BindingTree *)>
 
using TtoTSeq = std::function< TSeq(BindingTree *)>
 
using TtoBool = std::function< bool(BindingTree *)>
 
using TxTtoBool = std::function< bool(BindingTree *, BindingTree *)>
 

Variables

std::function parent
 
std::function children
 
std::function ancestors
 
std::function is_subject
 
std::function has_index
 
std::function null
 
std::function eq_tree = +[](BindingTree* x, BindingTree* y) -> bool { return x == y;}
 
std::function corefers
 
std::function gt_linear
 
MyGrammar grammar
 

Typedef Documentation

◆ TSeq

using TSeq = std::vector<BindingTree*>

◆ TtoBool

using TtoBool = std::function<bool(BindingTree*)>

◆ TtoT

using TtoT = std::function<BindingTree*(BindingTree*)>

◆ TtoTSeq

using TtoTSeq = std::function<TSeq(BindingTree*)>

◆ TxTtoBool

using TxTtoBool = std::function<bool(BindingTree*,BindingTree*)>

Variable Documentation

◆ ancestors

std::function ancestors
Initial value:
= +[](BindingTree* x) -> TSeq {
if(x == nullptr) return {};
else {
TSeq out;
while(x->parent != nullptr) {
out.push_back(x->parent);
x = x->parent;
}
return out;
}
}
Definition: BindingTree.h:46
std::vector< BindingTree * > TSeq
Definition: MyGrammar.h:9

◆ children

std::function children
Initial value:
= +[](BindingTree* x) -> TSeq {
if(x == nullptr) return {};
else {
TSeq out;
for(size_t i=0;i<x->nchildren();i++) {
out.push_back(&x->child(i));
}
return out;
}
}
Definition: BindingTree.h:46
std::vector< BindingTree * > TSeq
Definition: MyGrammar.h:9

◆ corefers

std::function corefers
Initial value:
= +[](BindingTree* x, BindingTree* y) -> bool {
return (x != nullptr) and (y != nullptr) and (x->referent == y->referent);
}
Definition: BindingTree.h:46

◆ eq_tree

std::function eq_tree = +[](BindingTree* x, BindingTree* y) -> bool { return x == y;}

◆ grammar

MyGrammar grammar

◆ gt_linear

std::function gt_linear
Initial value:
= +[](BindingTree* x, BindingTree* y) -> bool {
return (x != nullptr) and (y != nullptr) and (x->linear_order > y->linear_order);
}
Definition: BindingTree.h:46

◆ has_index

std::function has_index
Initial value:
= +[](BindingTree* x) -> bool {
return (x != nullptr) and (x->referent != -1);
}
Definition: BindingTree.h:46

◆ is_subject

std::function is_subject
Initial value:
= +[](BindingTree* x) -> bool {
return (x != nullptr) and (x->pos==POS::NPS);
}
Definition: BindingTree.h:46

◆ null

std::function null
Initial value:
= +[](BindingTree* x) -> bool {
return x == nullptr;
}
Definition: BindingTree.h:46

◆ parent

std::function parent
Initial value:
= +[](BindingTree* x) -> BindingTree* {
if(x == nullptr) return nullptr;
return x->parent;
}
Definition: BindingTree.h:46
this_t * parent
Definition: BaseNode.h:26